Ignore:
Timestamp:
Jun 20, 2011 4:06:19 AM (9 years ago)
Author:
nanang
Message:

Fixed #1307:

  • Fixed AMR NO_DATA frame length definition in amr_helper.h.
  • Fixed bug packing/parsing AMR SID frames in processing SID type indicator (STI).
  • Enabled native VAD in IPP AMR-NB.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjmedia/include/pjmedia-codec/amr_helper.h

    r3553 r3589  
    568568 */ 
    569569const pj_uint8_t  pjmedia_codec_amrnb_framelen[16] =  
    570     {12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 5}; 
     570    {12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0}; 
    571571/** 
    572572 * Constant of AMR-NB frame lengths in bits. 
     
    584584 */ 
    585585const pj_uint8_t  pjmedia_codec_amrwb_framelen[16] =  
    586     {17, 23, 32, 37, 40, 46, 50, 58, 60, 5, 0, 0, 0, 0, 0, 5}; 
     586    {17, 23, 32, 37, 40, 46, 50, 58, 60, 5, 0, 0, 0, 0, 0, 0}; 
    587587/** 
    588588 * Constant of AMR-WB frame lengths in bits. 
     
    607607    pj_uint8_t start_bit;       /**< Frame start bit.                   */ 
    608608    pj_uint8_t good_quality:1;  /**< Flag if frame is good/degraded.    */ 
     609    pj_uint8_t STI:1;           /**< STI mode (first/update).           */ 
    609610} pjmedia_codec_amr_bit_info; 
    610611#pragma pack() 
     
    10211022 
    10221023            /* SID */ 
    1023             pj_uint8_t STI = 0; 
    1024  
    1025             amr_bits[35] = (pj_uint8_t)(STI & 1); 
     1024            amr_bits[35] |= info->STI; 
    10261025 
    10271026            if (setting->amr_nb) { 
     
    11641163        info->good_quality = (pj_uint8_t)(Q == 1); 
    11651164        info->start_bit = 0; 
     1165        info->STI = 0; 
    11661166        frames[cnt].timestamp = ts_; 
    11671167        frames[cnt].type = PJMEDIA_FRAME_TYPE_AUDIO; 
     
    11861186        frames[cnt].buf = r; 
    11871187        info->start_bit = r_bitptr; 
     1188 
     1189        if (FT == SID_FT) { 
     1190            unsigned sti_bitptr; 
     1191            sti_bitptr = r_bitptr + 35; 
     1192            info->STI = (pj_uint8_t) 
     1193                        (r[sti_bitptr >> 3] >> (7 - (sti_bitptr % 8))) & 1; 
     1194        } 
    11881195 
    11891196        if (setting->octet_aligned) { 
Note: See TracChangeset for help on using the changeset viewer.