Changeset 2342


Ignore:
Timestamp:
Oct 6, 2008 6:42:13 PM (10 years ago)
Author:
nanang
Message:

Fixed G.722 codec that is suppossed to work with 14 bits PCM for its input & output (thanks Olle Frimanson for the report).

Location:
pjproject/trunk/pjmedia/src/pjmedia-codec/g722
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-codec/g722/g722_dec.c

    r1870 r2342  
    530530 
    531531        rx_qmf(dec, rlow, rhigh, &pcm1, &pcm2); 
    532         out[i*2] = (pj_int16_t)pcm1; 
    533         out[i*2+1] = (pj_int16_t)pcm2; 
     532        out[i*2] = (pj_int16_t)(pcm1 << 2); 
     533        out[i*2+1] = (pj_int16_t)(pcm2 << 2); 
    534534    } 
    535535 
  • pjproject/trunk/pjmedia/src/pjmedia-codec/g722/g722_enc.c

    r1872 r2342  
    543543     
    544544    for(i = 0; i < nsamples; i += 2) { 
    545         tx_qmf(enc, in[i], in[i+1], &xlow, &xhigh); 
     545        tx_qmf(enc, in[i]>>2, in[i+1]>>2, &xlow, &xhigh); 
    546546 
    547547        /* low band encoder */ 
Note: See TracChangeset for help on using the changeset viewer.