Lines Matching defs:shift
399 static inline int16_t adpcm_ima_expand_nibble(ADPCMChannelStatus *c, int8_t nibble, int shift)
414 diff = ((2 * delta + 1) * step) >> shift;
425 static inline int16_t adpcm_ima_alp_expand_nibble(ADPCMChannelStatus *c, int8_t nibble, int shift)
437 diff = (delta * step) >> shift;
486 int nibble, step_index, predictor, sign, delta, diff, step, shift;
488 shift = bps - 1;
494 sign = nibble & (1 << shift);
495 delta = av_mod_uintp2(nibble, shift);
496 diff = ((2 * delta + 1) * step) >> shift;
594 static inline int16_t adpcm_sbpro_expand_nibble(ADPCMChannelStatus *c, int8_t nibble, int size, int shift)
600 diff = delta << (7 + c->step + shift);
677 int shift,filter,f0,f1;
688 shift = 12 - (in[4+i*2] & 15);
694 if (shift < 0) {
695 avpriv_request_sample(avctx, "unknown XA-ADPCM shift %d", shift);
696 shift = 0;
708 s = t*(1<<shift) + ((s_1*f0 + s_2*f1+32)>>6);
721 shift = 12 - (in[5+i*2] & 15);
723 if (filter >= FF_ARRAY_ELEMS(xa_adpcm_table) || shift < 0) {
727 if (shift < 0) {
728 avpriv_request_sample(avctx, "unknown XA-ADPCM shift %d", shift);
729 shift = 0;
739 s = t*(1<<shift) + ((s_1*f0 + s_2*f1+32)>>6);
818 int16_t ff_adpcm_argo_expand_nibble(ADPCMChannelStatus *cs, int nibble, int shift, int flag)
820 int sample = sign_extend(nibble, 4) * (1 << shift);
1658 int coeff[2][2], shift[2];
1664 shift[channel] = 20 - (byte & 0x0F);
1673 int sample = sign_extend(byte[channel] >> i, 4) * (1 << shift[channel]);
1696 int shift;
1731 shift = 20 - (byte & 0x0F);
1735 next_sample = (unsigned)sign_extend(byte, 4) << shift;
1738 next_sample = (unsigned)sign_extend(byte >> 4, 4) << shift;
1771 int coeff[2][4], shift[4];
1780 shift[n] = 20 - (val & 0x0F);
1790 level = sign_extend(byte >> 4, 4) * (1 << shift[n]);
1794 level = sign_extend(byte, 4) * (1 << shift[n]);
2132 int filter, shift, flag, byte;
2135 shift = filter & 0xf;
2154 sample = (int)((scale >> shift) + (c->status[channel].sample1 * xa_adpcm_table[filter][0] + c->status[channel].sample2 * xa_adpcm_table[filter][1]) / 64);
2185 int control, shift;
2191 shift = (control >> 4) + 2;
2195 *samples++ = ff_adpcm_argo_expand_nibble(cs, sample >> 4, shift, control & 0x04);
2196 *samples++ = ff_adpcm_argo_expand_nibble(cs, sample >> 0, shift, control & 0x04);