Revision 89150098 libavcodec/adpcm.c

View differences:

libavcodec/adpcm.c
107 107
    3, 4, 7, 8, 10, 11, 0, -1, -3, -4
108 108
};
109 109

  
110
static const int ct_adpcm_table[8] = {
111
    0x00E6, 0x00E6, 0x00E6, 0x00E6,
112
    0x0133, 0x0199, 0x0200, 0x0266
113
};
114

  
115 110
// padded to zero where table size is less then 16
116 111
static const int swf_index_tables[4][16] = {
117 112
    /*2*/ { -1, 2 },
......
759 754
    c->predictor = ((c->predictor * 254) >> 8) + (sign ? -diff : diff);
760 755
    c->predictor = av_clip_int16(c->predictor);
761 756
    /* calculate new step and clamp it to range 511..32767 */
762
    new_step = (ct_adpcm_table[nibble & 7] * c->step) >> 8;
757
    new_step = (AdaptationTable[nibble & 7] * c->step) >> 8;
763 758
    c->step = av_clip(new_step, 511, 32767);
764 759

  
765 760
    return (short)c->predictor;

Also available in: Unified diff