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 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
43 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
44 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
45 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
53 -1, -1, 2, 6, -1, -1, 2, 6
57 -1, -1, -1, -1, 1, 2, 4, 6, -1, -1, -1, -1, 1, 2, 4, 6
61 -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 2, 2, 4, 5, 6,
62 -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 2, 2, 4, 5, 6
66 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
67 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 5, 5, 6, 6,
68 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
69 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 5, 5, 6, 6
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, -1, -1, -1, -1, -1, -1,
75 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
76 2, 2, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6,
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, -1, -1, -1, -1, -1, -1,
79 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
80 2, 2, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6
90 for (
int start_pos = 0; start_pos < 64; start_pos++) {
91 unsigned int dest_pos, table_pos;
93 for (table_pos = 0, dest_pos = start_pos;
95 table_pos++, dest_pos += 64) {
96 int put = 0, count, table_value;
99 for (count = 32; count != 0; count >>= 1) {
100 if (start_pos & count)
126 int8_t channel_hint[2];
146 if (channel_hint[0] & 0x80) {
147 channel_hint[0] = ~channel_hint[0];
162 for (chan = 0; chan <
channels; chan++) {
163 uint16_t *dest = (uint16_t *)
frame->
data[0] + chan;
164 int step_index = channel_hint[chan];
165 int output = pcm_data[chan];
169 int lookup_size,
lookup, highbit, lowbits;
171 step_index =
av_clip(step_index, 0, 88);
174 highbit = 1 << (lookup_size - 1);
175 lowbits = highbit - 1;
185 int predict_index,
diff;
187 predict_index = (
lookup << (7 - lookup_size)) | (step_index << 6);
188 predict_index =
av_clip(predict_index, 0, 5785);
211 .
p.
name =
"adpcm_vima",