Lines Matching refs:status
87 ADPCMChannelStatus status[6];
118 c->status[0].step = c->status[1].step = 511;
126 c->status[0].predictor = AV_RL32(avctx->extradata);
127 c->status[1].predictor = AV_RL32(avctx->extradata + 4);
428 *samples++ = c->status[i].predictor = get_sbits(&gb, 16);
429 c->status[i].step_index = get_bits(&gb, 6);
438 int step = ff_adpcm_step_table[c->status[i].step_index];
451 c->status[i].predictor -= vpdiff;
453 c->status[i].predictor += vpdiff;
455 c->status[i].step_index += table[delta & (~signmask)];
457 c->status[i].step_index = av_clip(c->status[i].step_index, 0, 88);
458 c->status[i].predictor = av_clip_int16(c->status[i].predictor);
460 *samples++ = c->status[i].predictor;
608 if (!s->status[0].step_index) {
704 cs = &(c->status[channel]);
741 cs = &(c->status[i]);
759 cs = &c->status[i];
771 cs = &c->status[i];
784 c->status[i].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
787 c->status[i].step_index = sign_extend(bytestream2_get_le16u(&gb), 16);
788 if (c->status[i].step_index > 88u) {
790 i, c->status[i].step_index);
797 cs = &c->status[i];
815 c->status[0].coeff1 = ff_adpcm_AdaptCoeff1[block_predictor];
816 c->status[0].coeff2 = ff_adpcm_AdaptCoeff2[block_predictor];
824 c->status[1].coeff1 = ff_adpcm_AdaptCoeff1[block_predictor];
825 c->status[1].coeff2 = ff_adpcm_AdaptCoeff2[block_predictor];
827 c->status[0].idelta = sign_extend(bytestream2_get_le16u(&gb), 16);
829 c->status[1].idelta = sign_extend(bytestream2_get_le16u(&gb), 16);
832 c->status[0].sample1 = sign_extend(bytestream2_get_le16u(&gb), 16);
833 if (st) c->status[1].sample1 = sign_extend(bytestream2_get_le16u(&gb), 16);
834 c->status[0].sample2 = sign_extend(bytestream2_get_le16u(&gb), 16);
835 if (st) c->status[1].sample2 = sign_extend(bytestream2_get_le16u(&gb), 16);
837 *samples++ = c->status[0].sample2;
838 if (st) *samples++ = c->status[1].sample2;
839 *samples++ = c->status[0].sample1;
840 if (st) *samples++ = c->status[1].sample1;
843 *samples++ = adpcm_ms_expand_nibble(&c->status[0 ], byte >> 4 );
844 *samples++ = adpcm_ms_expand_nibble(&c->status[st], byte & 0x0F);
850 cs = &c->status[channel];
861 *samples++ = adpcm_ima_expand_nibble(&c->status[0 ], v >> 4 , 3);
862 *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);
874 c->status[0].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
875 c->status[1].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
876 c->status[0].step_index = bytestream2_get_byteu(&gb);
877 c->status[1].step_index = bytestream2_get_byteu(&gb);
878 if (c->status[0].step_index > 88u || c->status[1].step_index > 88u){
880 c->status[0].step_index, c->status[1].step_index);
884 diff_channel = c->status[1].predictor;
899 /* for this algorithm, c->status[0] is the sum channel and
900 * c->status[1] is the diff channel */
904 adpcm_ima_expand_nibble(&c->status[0], nibble, 3);
908 adpcm_ima_expand_nibble(&c->status[1], nibble, 3);
911 diff_channel = (diff_channel + c->status[1].predictor) / 2;
912 *samples++ = c->status[0].predictor + c->status[1].predictor;
913 *samples++ = c->status[0].predictor - c->status[1].predictor;
917 adpcm_ima_expand_nibble(&c->status[0], nibble, 3);
920 diff_channel = (diff_channel + c->status[1].predictor) / 2;
921 *samples++ = c->status[0].predictor + c->status[1].predictor;
922 *samples++ = c->status[0].predictor - c->status[1].predictor;
931 cs = &c->status[channel];
952 *samples++ = adpcm_ima_expand_nibble(&c->status[0 ], v1, 3);
953 *samples++ = adpcm_ima_expand_nibble(&c->status[st], v2, 3);
959 *samples++ = adpcm_ima_expand_nibble(&c->status[0], v >> 4 , 3);
960 *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);
966 *samples++ = adpcm_ima_oki_expand_nibble(&c->status[0], v >> 4 );
967 *samples++ = adpcm_ima_oki_expand_nibble(&c->status[st], v & 0x0F);
972 cs = &c->status[channel];
988 *samples++ = adpcm_ima_expand_nibble(&c->status[channel], byte[channel] & 0x0F, 3);
991 *samples++ = adpcm_ima_expand_nibble(&c->status[channel], byte[channel] >> 4 , 3);
1002 *smp++ = adpcm_ima_expand_nibble(&c->status[channel], v >> 4 , 3);
1003 *smp++ = adpcm_ima_expand_nibble(&c->status[channel], v & 0x0F, 3);
1010 *samples++ = adpcm_ima_expand_nibble(&c->status[channel], v >> 4 , 3);
1011 samples[st] = adpcm_ima_expand_nibble(&c->status[channel], v & 0x0F, 3);
1026 &c->status[0], &c->status[1],
1036 c->status[i].step_index = bytestream2_get_le32u(&gb);
1037 if (c->status[i].step_index > 88u) {
1039 i, c->status[i].step_index);
1044 c->status[i].predictor = bytestream2_get_le32u(&gb);
1048 *samples++ = adpcm_ima_expand_nibble(&c->status[0], byte >> 4, 3);
1049 *samples++ = adpcm_ima_expand_nibble(&c->status[st], byte & 0x0F, 3);
1055 *samples++ = adpcm_ima_expand_nibble(&c->status[0], byte >> 4, 6);
1056 *samples++ = adpcm_ima_expand_nibble(&c->status[st], byte & 0x0F, 6);
1133 c->status[channel].sample1 * coeff[channel][0] +
1134 c->status[channel].sample2 * coeff[channel][1] + 0x80) >> 8;
1135 c->status[channel].sample2 = c->status[channel].sample1;
1136 c->status[channel].sample1 = av_clip_int16(sample);
1137 *samples++ = c->status[channel].sample1;
1173 current_sample = c->status[channel].predictor;
1174 previous_sample = c->status[channel].prev_sample;
1216 c->status[channel].predictor = current_sample;
1217 c->status[channel].prev_sample = previous_sample;
1258 c->status[0].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
1259 c->status[0].step_index = bytestream2_get_le16u(&gb);
1261 if (c->status[0].step_index > 88u) {
1263 c->status[0].step_index);
1270 *samples++ = adpcm_ima_expand_nibble(&c->status[0], v >> 4, 3);
1271 *samples++ = adpcm_ima_expand_nibble(&c->status[0], v & 0xf, 3);
1276 c->status[i].predictor = sign_extend(bytestream2_get_be16u(&gb), 16);
1277 c->status[i].step_index = bytestream2_get_byteu(&gb);
1279 if (c->status[i].step_index > 88u) {
1281 c->status[i].step_index);
1289 *samples++ = adpcm_ima_qt_expand_nibble(&c->status[0 ], v >> 4, 3);
1290 *samples++ = adpcm_ima_qt_expand_nibble(&c->status[st], v & 0xf, 3);
1296 *samples++ = adpcm_ct_expand_nibble(&c->status[0 ], v >> 4 );
1297 *samples++ = adpcm_ct_expand_nibble(&c->status[st], v & 0x0F);
1303 if (!c->status[0].step_index) {
1308 c->status[0].step_index = 1;
1314 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
1316 *samples++ = adpcm_sbpro_expand_nibble(&c->status[st],
1322 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
1324 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
1326 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
1332 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
1334 *samples++ = adpcm_sbpro_expand_nibble(&c->status[st],
1336 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
1338 *samples++ = adpcm_sbpro_expand_nibble(&c->status[st],
1350 *samples++ = adpcm_yamaha_expand_nibble(&c->status[0 ], v & 0x0F);
1351 *samples++ = adpcm_yamaha_expand_nibble(&c->status[st], v >> 4 );
1369 int prev1 = c->status[channel].sample1;
1370 int prev2 = c->status[channel].sample2;
1400 c->status[channel].sample1 = prev1;
1401 c->status[channel].sample2 = prev2;
1430 c->status[i].sample1 = sign_extend(bytestream2_get_be16u(&gb), 16);
1431 c->status[i].sample2 = sign_extend(bytestream2_get_be16u(&gb), 16);
1457 sampledat = ((c->status[ch].sample1 * factor1
1458 + c->status[ch].sample2 * factor2) >> 11) + (sampledat << exp);
1460 c->status[ch].sample2 = c->status[ch].sample1;
1461 c->status[ch].sample1 = *samples++;
1485 prev = (c->status[channel].sample1 * 0x3c);
1488 prev = (c->status[channel].sample1 * 0x73) - (c->status[channel].sample2 * 0x34);
1491 prev = (c->status[channel].sample1 * 0x62) - (c->status[channel].sample2 * 0x37);
1507 c->status[channel].sample2 = c->status[channel].sample1;
1508 c->status[channel].sample1 = sampledat;