Ignore:
Timestamp:
Jun 11, 2010 1:38:42 PM (14 years ago)
Author:
nanang
Message:

Close #1072:

  • Added API pjmedia_codec_g722_set_pcm_shift() to enable configurable level-adjusment setting.
  • Also added macro PJMEDIA_G722_DEFAULT_PCM_SHIFT (default value is 2) to accomplish 14-16 bit PCM conversion for G722 input/output.
  • Added a feature in G722 to stop level-adjusment/PCM-shifting when clipping occured, compile-time configurable via PJMEDIA_G722_STOP_PCM_SHIFT_ON_CLIPPING macro.
File:
1 edited

Legend:

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

    r2394 r3202  
    505505    int ilowr, ylow, rlow, dlowt; 
    506506    int ihigh, rhigh, dhigh; 
    507     int pcm1, pcm2; 
    508507    pj_uint8_t *in_ = (pj_uint8_t*) in; 
    509508 
     
    530529        /* rhigh <= output high band pcm */ 
    531530 
    532         rx_qmf(dec, rlow, rhigh, &pcm1, &pcm2); 
    533         out[i*2] = (pj_int16_t)(pcm1 << 2); 
    534         out[i*2+1] = (pj_int16_t)(pcm2 << 2); 
     531        rx_qmf(dec, rlow, rhigh, &out[i*2], &out[i*2+1]); 
    535532    } 
    536533 
Note: See TracChangeset for help on using the changeset viewer.