dstar update
This commit is contained in:
parent
a3f4963dea
commit
20743ddc60
|
@ -138,9 +138,13 @@ mbe_dequantizeAmbeParms (mbe_parms * cur_mp, mbe_parms * prev_mp, const int *b,
|
|||
#ifdef AMBE_DEBUG
|
||||
printf ("\nb0:%i w0:%f L:%i b1:%i\n", b0, cur_mp->w0, L, b1);
|
||||
#endif
|
||||
|
||||
deltaGamma = AmbeDg[b2];
|
||||
cur_mp->gamma = deltaGamma + ((float) 0.5 * prev_mp->gamma);
|
||||
if (dstar) {
|
||||
deltaGamma = AmbePlusDg[b2];
|
||||
cur_mp->gamma = deltaGamma + ((float) 1.0 * prev_mp->gamma);
|
||||
} else {
|
||||
deltaGamma = AmbeDg[b2];
|
||||
cur_mp->gamma = deltaGamma + ((float) 0.5 * prev_mp->gamma);
|
||||
}
|
||||
#ifdef AMBE_DEBUG
|
||||
printf ("b2: %i, deltaGamma: %f gamma: %f gamma-1: %f\n", b2, deltaGamma, cur_mp->gamma, prev_mp->gamma);
|
||||
#endif
|
||||
|
|
|
@ -247,7 +247,11 @@ static void encode_ambe(const IMBE_PARAM *imbe_param, int b[], mbe_parms*cur_mp,
|
|||
lsa_sum += lsa[i1];
|
||||
}
|
||||
float gain = lsa_sum / num_harms_f;
|
||||
float diff_gain = gain - 0.5 * prev_mp->gamma;
|
||||
float diff_gain;
|
||||
if (dstar)
|
||||
diff_gain = gain;
|
||||
else
|
||||
diff_gain = gain - 0.5 * prev_mp->gamma;
|
||||
|
||||
diff_gain -= gain_adjust;
|
||||
|
||||
|
|
|
@ -152,7 +152,6 @@ dstar_tx_sb_impl::general_work (int noutput_items,
|
|||
memcpy(out+72, FS, 24);
|
||||
else
|
||||
memcpy(out+72, FS_DUMMY, 24);
|
||||
d_frame_counter += 1;
|
||||
d_frame_counter = (d_frame_counter + 1) % 21;
|
||||
in += 160;
|
||||
nconsumed += 160;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -27,6 +27,7 @@ public:
|
|||
void process_vcw(const uint8_t vf[], int* b);
|
||||
void encode_vcw(uint8_t vf[], const int* b);
|
||||
void encode_dstar(uint8_t result[72], const int b[9]);
|
||||
void decode_dstar(const uint8_t codeword[72], int b[9]);
|
||||
private:
|
||||
void extract_vcw(const uint8_t _vf[], int& _c0, int& _c1, int& _c2, int& _c3);
|
||||
void interleave_vcw(uint8_t _vf[], int _c0, int _c1, int _c2, int _c3);
|
||||
|
|
Loading…
Reference in New Issue