41 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
42 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
43 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
44 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
45 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
46 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
54 -1, -1, 2, 6, -1, -1, 2, 6
58 -1, -1, -1, -1, 1, 2, 4, 6, -1, -1, -1, -1, 1, 2, 4, 6
62 -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 2, 2, 4, 5, 6,
63 -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 2, 2, 4, 5, 6
67 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
68 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 5, 5, 6, 6,
69 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
70 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 5, 5, 6, 6
74 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
75 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
76 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
77 2, 2, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6,
78 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
79 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
80 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
81 2, 2, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6
91 for (
int start_pos = 0; start_pos < 64; start_pos++) {
92 unsigned int dest_pos, table_pos;
94 for (table_pos = 0, dest_pos = start_pos;
96 table_pos++, dest_pos += 64) {
97 int put = 0, count, table_value;
100 for (count = 32; count != 0; count >>= 1) {
101 if (start_pos & count)
127 int8_t channel_hint[2];
147 if (channel_hint[0] & 0x80) {
148 channel_hint[0] = ~channel_hint[0];
164 int16_t *dest = (int16_t *)
frame->data[0];
173 *dest++ = cs.predictor;
176 for (chan = 0; chan <
channels; chan++) {
177 uint16_t *dest = (uint16_t *)
frame->data[0] + chan;
178 int step_index = channel_hint[chan];
179 int output = pcm_data[chan];
183 int lookup_size,
lookup, highbit, lowbits;
185 step_index =
av_clip(step_index, 0, 88);
188 highbit = 1 << (lookup_size - 1);
189 lowbits = highbit - 1;
199 int predict_index,
diff;
201 predict_index = (
lookup << (7 - lookup_size)) | (step_index << 6);
202 predict_index =
av_clip(predict_index, 0, 5785);
226 .
p.
name =
"adpcm_vima",