Fixed G.722 codec that is suppossed to work with 14 bits PCM for its input & output (thanks Olle Frimanson for the report).
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2342 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
0789519b6a
commit
ee340b36d9
|
@ -529,8 +529,8 @@ PJ_DEF(pj_status_t) g722_dec_decode( g722_dec_t *dec,
|
|||
/* rhigh <= output high band pcm */
|
||||
|
||||
rx_qmf(dec, rlow, rhigh, &pcm1, &pcm2);
|
||||
out[i*2] = (pj_int16_t)pcm1;
|
||||
out[i*2+1] = (pj_int16_t)pcm2;
|
||||
out[i*2] = (pj_int16_t)(pcm1 << 2);
|
||||
out[i*2+1] = (pj_int16_t)(pcm2 << 2);
|
||||
}
|
||||
|
||||
*nsamples = in_size << 1;
|
||||
|
|
|
@ -542,7 +542,7 @@ PJ_DEF(pj_status_t) g722_enc_encode( g722_enc_t *enc,
|
|||
PJ_ASSERT_RETURN(*out_size >= (nsamples >> 1), PJ_ETOOSMALL);
|
||||
|
||||
for(i = 0; i < nsamples; i += 2) {
|
||||
tx_qmf(enc, in[i], in[i+1], &xlow, &xhigh);
|
||||
tx_qmf(enc, in[i]>>2, in[i+1]>>2, &xlow, &xhigh);
|
||||
|
||||
/* low band encoder */
|
||||
ilow = block1l (xlow, enc->slow, enc->detlow) ;
|
||||
|
|
Loading…
Reference in New Issue