Ignore:
Timestamp:
Jun 20, 2011 4:06:19 AM (13 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/src/pjmedia-codec/ipp_codecs.c

    r3553 r3589  
    4242 
    4343#define THIS_FILE   "ipp_codecs.c" 
     44 
    4445 
    4546/* Prototypes for IPP codecs factory */ 
     
    238239{ 
    239240#   if PJMEDIA_HAS_INTEL_IPP_CODEC_AMR 
    240     /* AMR-NB SID seems to produce noise, so let's just disable its VAD. */ 
    241241    {1, "AMR",      PJMEDIA_RTP_PT_AMR,       &USC_GSMAMR_Fxns,  8000, 1, 160,  
    242                     7400, 12200, 2, 0, 1,  
     242                    7400, 12200, 2, 1, 1,  
    243243                    &predecode_amr, &parse_amr, &pack_amr, 
    244244                    {1, {{{"octet-align", 11}, {"1", 1}}} } 
     
    488488        /* SID */ 
    489489        if (info->good_quality) { 
    490             pj_bool_t STI; 
    491             STI = (((pj_uint8_t*)frame.buf)[35 >> 3] & 0x10) != 0; 
    492             usc_frame->frametype = STI? 2 : 1; 
     490            usc_frame->frametype = info->STI? 2 : 1; 
    493491        } else { 
    494492            usc_frame->frametype = setting->amr_nb ? 6 : 7; 
     
    534532        info->good_quality = (pj_uint8_t)((info_ & 0x80) == 0); 
    535533        info->mode = (pj_int8_t) ((info_ >> 8) & 0x0F); 
     534        info->STI = (pj_uint8_t)((info_ >> 5) & 1); 
    536535 
    537536        frames[nframes].buf = r + 2; 
     
    14191418            /* Two octets for AMR frame info, 0=LSB: 
    14201419             * bit 0-3  : frame type 
     1420             * bit 5    : STI flag 
    14211421             * bit 6    : last frame flag 
    14221422             * bit 7    : quality flag 
     
    14421442                if (out.frametype == 6 || out.frametype == 7) 
    14431443                    *info |= 0x80; 
     1444                /* STI */ 
     1445                if (out.frametype != 1) 
     1446                    *info |= 0x20; 
    14441447            } else { 
    14451448                /* Untransmited */ 
Note: See TracChangeset for help on using the changeset viewer.