39 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
40 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
41 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
42 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
43 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
44 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
52 -1, -1, 2, 6, -1, -1, 2, 6
56 -1, -1, -1, -1, 1, 2, 4, 6, -1, -1, -1, -1, 1, 2, 4, 6
60 -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 2, 2, 4, 5, 6,
61 -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 2, 2, 4, 5, 6
65 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
66 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 5, 5, 6, 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
72 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
73 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
74 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
75 2, 2, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6,
76 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
77 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
78 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
79 2, 2, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6
89 for (
int start_pos = 0; start_pos < 64; start_pos++) {
90 unsigned int dest_pos, table_pos;
92 for (table_pos = 0, dest_pos = start_pos;
94 table_pos++, dest_pos += 64) {
95 int put = 0, count, table_value;
98 for (count = 32; count != 0; count >>= 1) {
99 if (start_pos & count)
126 int8_t channel_hint[2];
146 if (channel_hint[0] & 0x80) {
147 channel_hint[0] = ~channel_hint[0];
163 for (chan = 0; chan <
channels; chan++) {
164 uint16_t *dest = (uint16_t *)
frame->data[0] + chan;
165 int step_index = channel_hint[chan];
166 int output = pcm_data[chan];
170 int lookup_size,
lookup, highbit, lowbits;
172 step_index =
av_clip(step_index, 0, 88);
175 highbit = 1 << (lookup_size - 1);
176 lowbits = highbit - 1;
186 int predict_index,
diff;
188 predict_index = (
lookup << (7 - lookup_size)) | (step_index << 6);
189 predict_index =
av_clip(predict_index, 0, 5785);
212 .
name =
"adpcm_vima",