Revision 89150098

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;
libavcodec/truemotion1data.h
34 34
static const int16_t ydt3[8] = { 4, -6, 20, -20, 46, -46, 94, -94 };
35 35
static const int16_t fat_ydt3[8] = { 0, -15, 50, -50, 115, -115, 235, -235 };
36 36
static const int16_t ydt4[8] = { 0, -4, 4, -16, 16, -36, 36, -80 };
37
/* NOTE: This table breaks the [+,-] pattern that the rest of the
38
 * tables maintain. Is this intentional? */
37 39
static const int16_t fat_ydt4[8] = { 0, 40, 80, -76, 160, -154, 236, -236 };
38 40

  
39 41
/* C delta tables, skinny and fat */
......
41 43
static const int16_t cdt2[8] = { 0, -4, 3, -16, 20, -32, 36, -32 };
42 44
static const int16_t fat_cdt2[8] = { 0, -20, 15, -80, 100, -160, 180, -160 };
43 45
static const int16_t cdt3[8] = { 0, -2, 2, -8, 8, -18, 18, -40 };
44
/* NOTE: This table breaks the [+,-] pattern that the rest of the
45
 * tables maintain. Is this intentional? */
46
static const int16_t fat_cdt3[8] = { 0, 40, 80, -76, 160, -154, 236, -236 };
47 46

  
48 47
/* all the delta tables to choose from, at all 4 delta levels */
49 48
static const int16_t * const ydts[] = { ydt1, ydt2, ydt3, ydt4, NULL };
50 49
static const int16_t * const fat_ydts[] = { fat_ydt3, fat_ydt3, fat_ydt3, fat_ydt4, NULL };
51 50
static const int16_t * const cdts[] = { cdt1, cdt1, cdt2, cdt3, NULL };
52
static const int16_t * const fat_cdts[] = { fat_cdt2, fat_cdt2, fat_cdt2, fat_cdt3, NULL };
51
static const int16_t * const fat_cdts[] = { fat_cdt2, fat_cdt2, fat_cdt2, fat_ydt4, NULL };
53 52

  
54 53
static const uint8_t pc_tbl2[] = {
55 54
0x8,0x00,0x00,0x00,0x00,

Also available in: Unified diff