max-phase2-tdma

max-skip-test
Max 9 years ago
parent 95bba45b02
commit 94a221e827
  1. 3
      op25/gr-op25_repeater/grc/CMakeLists.txt
  2. 3
      op25/gr-op25_repeater/include/op25_repeater/CMakeLists.txt
  3. 11
      op25/gr-op25_repeater/lib/CMakeLists.txt
  4. 2
      op25/gr-op25_repeater/lib/p25_frame_assembler_impl.cc
  5. 2
      op25/gr-op25_repeater/lib/p25_frame_assembler_impl.h
  6. 5
      op25/gr-op25_repeater/lib/rs.cc
  7. 2
      op25/gr-op25_repeater/lib/rs.h
  8. 43
      op25/gr-op25_repeater/lib/software_imbe_decoder.cc
  9. 1
      op25/gr-op25_repeater/lib/software_imbe_decoder.h
  10. 1
      op25/gr-op25_repeater/python/CMakeLists.txt
  11. 3
      op25/gr-op25_repeater/swig/op25_repeater_swig.i

@ -20,5 +20,6 @@ install(FILES
op25_repeater_vocoder.xml
op25_repeater_gardner_costas_cc.xml
op25_repeater_p25_frame_assembler.xml
op25_repeater_fsk4_slicer_fb.xml DESTINATION share/gnuradio/grc/blocks
op25_repeater_fsk4_slicer_fb.xml
op25_repeater_p25p2_frame.xml DESTINATION share/gnuradio/grc/blocks
)

@ -25,5 +25,6 @@ install(FILES
vocoder.h
gardner_costas_cc.h
p25_frame_assembler.h
fsk4_slicer_fb.h DESTINATION include/op25_repeater
fsk4_slicer_fb.h
p25p2_frame.h DESTINATION include/op25_repeater
)

@ -28,14 +28,23 @@ list(APPEND op25_repeater_sources
vocoder_impl.cc
gardner_costas_cc_impl.cc
p25_frame_assembler_impl.cc
fsk4_slicer_fb_impl.cc )
fsk4_slicer_fb_impl.cc
p25p2_frame_impl.cc )
list(APPEND op25_repeater_sources
bch.cc
rs.cc
p25_framer.cc
p25p2_framer.cc
p25p2_isch.cc
p25p2_duid.cc
p25p2_sync.cc
p25p2_tdma.cc
p25p2_vf.cc
imbe_decoder.cc
software_imbe_decoder.cc
ambe.c
mbelib.c
)
add_library(gnuradio-op25_repeater SHARED ${op25_repeater_sources})

@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
* Copyright 2010, 2011, 2012, 2013 KA1RBI
* Copyright 2010, 2011, 2012, 2013, 2014 Max H. Parke KA1RBI
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
* Copyright 2009, 2010, 2011, 2012, 2013 KA1RBI
* Copyright 2009, 2010, 2011, 2012, 2013, 2014 Max H. Parke KA1RBI
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

@ -458,6 +458,11 @@ CW = (CW ^ correction) >> 11;
return CW;
}
uint32_t gly23127Dec (uint32_t CW) {
uint32_t correction = gly23127DecTbl[gly23127GetSyn(CW)];
CW = (CW ^ correction) >> 11;
return CW;
}
void ProcHDU(const_bit_vector A) {
int i, j, k, ec;

@ -11,5 +11,7 @@ void ProcHDU(const_bit_vector A);
void ProcTDU(const_bit_vector A);
void ProcLDU1(const_bit_vector A);
void ProcLDU2(const_bit_vector A);
uint32_t gly24128Dec (uint32_t n) ;
uint32_t gly23127Dec (uint32_t n) ;
#endif

@ -926,6 +926,49 @@ software_imbe_decoder::decode_audio(uint8_t *A)
tmp_f = Old; Old = New; New = tmp_f;
}
void
software_imbe_decoder::decode_tap(int _L, int _K, float _w0, const int * _v, const float * _mu)
{
int ell;
uint32_t ET;
float SE = 0, ER = 0;
int en, tmp_f;
L = _L;
int K = _K;
w0 = _w0;
for(ell = 1; ell <= L; ell++) {
vee[ell][ New] = _v[ell - 1];
Mu[ell][ New] = _mu[ell - 1];
}
// decode_spectral_amplitudes(Start3, Start8);
enhance_spectral_amplitudes(SE);
adaptive_smoothing(SE, ER, ET);
// (8000 samp/sec) * (1 sec / 50 compressed voice frames) = 160 samples/frame
//synth:
synth_unvoiced();// ToDo: make suv return value?
synth_voiced(); // ToDo: make sv return value?
//output:
audio_samples *samples = audio();
for(en = 0; en <= 159; en++) {
// The unvoiced samples are loud and the voiced are low...I don't know why.
// Most of the difference is compensated by removing the 146.6433 factor
// in the synth_unvoiced procedure. The final tweak is done by raising the
// voiced samples:
float sample = suv[en] + sv[en] * 4; //balance v/uv loudness
if(abs((int)sample) > 32767) {
sample = 32767 * (sample < 0) ? -1 : 1; // * sgn(sample)
}
samples->push_back((short)sample);
}
OldL = L;
Oldw0 = w0;
tmp_f = Old; Old = New; New = tmp_f;
}
void
software_imbe_decoder::decode_spectral_amplitudes(int Start3, int Start8)
{

@ -51,6 +51,7 @@ public:
*/
virtual void decode(const voice_codeword& cw);
void decode_tap(int _L, int _K, float _w0, const int * _v, const float * _mu);
private:
//NOTE: Single-letter variable names are upper case only; Lower

@ -45,3 +45,4 @@ GR_ADD_TEST(qa_vocoder ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_vocod
GR_ADD_TEST(qa_gardner_costas_cc ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_gardner_costas_cc.py)
GR_ADD_TEST(qa_p25_frame_assembler ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_p25_frame_assembler.py)
GR_ADD_TEST(qa_fsk4_slicer_fb ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_fsk4_slicer_fb.py)
GR_ADD_TEST(qa_p25p2_frame ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_p25p2_frame.py)

@ -12,6 +12,7 @@
#include "op25_repeater/gardner_costas_cc.h"
#include "op25_repeater/p25_frame_assembler.h"
#include "op25_repeater/fsk4_slicer_fb.h"
#include "op25_repeater/p25p2_frame.h"
%}
%include "op25_repeater/vocoder.h"
@ -24,3 +25,5 @@ GR_SWIG_BLOCK_MAGIC2(op25_repeater, p25_frame_assembler);
%include "op25_repeater/fsk4_slicer_fb.h"
GR_SWIG_BLOCK_MAGIC2(op25_repeater, fsk4_slicer_fb);
%include "op25_repeater/p25p2_frame.h"
GR_SWIG_BLOCK_MAGIC2(op25_repeater, p25p2_frame);

Loading…
Cancel
Save