Lines Matching refs:nibble
41 int nibble; member
218 int nibble = FFMIN(7, abs(delta) * 4 / in adpcm_ima_compress_sample() local
221 ff_adpcm_yamaha_difflookup[nibble]) / 8); in adpcm_ima_compress_sample()
223 c->step_index = av_clip(c->step_index + ff_adpcm_index_table[nibble], 0, 88); in adpcm_ima_compress_sample()
224 return nibble; in adpcm_ima_compress_sample()
233 int nibble = FFMIN(abs(delta) * 4 / step, 7); in adpcm_ima_alp_compress_sample() local
234 int diff = (step * nibble) >> 2; in adpcm_ima_alp_compress_sample()
238 nibble = sign | nibble; in adpcm_ima_alp_compress_sample()
242 c->step_index = av_clip(c->step_index + ff_adpcm_index_table[nibble], 0, 88); in adpcm_ima_alp_compress_sample()
243 return nibble; in adpcm_ima_alp_compress_sample()
251 int nibble = 8*(delta < 0); in adpcm_ima_qt_compress_sample() local
257 nibble |= 4; in adpcm_ima_qt_compress_sample()
262 nibble |= 2; in adpcm_ima_qt_compress_sample()
267 nibble |= 1; in adpcm_ima_qt_compress_sample()
272 if (nibble & 8) in adpcm_ima_qt_compress_sample()
278 c->step_index = av_clip(c->step_index + ff_adpcm_index_table[nibble], 0, 88); in adpcm_ima_qt_compress_sample()
280 return nibble; in adpcm_ima_qt_compress_sample()
286 int predictor, nibble, bias; in adpcm_ms_compress_sample() local
291 nibble = sample - predictor; in adpcm_ms_compress_sample()
292 if (nibble >= 0) in adpcm_ms_compress_sample()
297 nibble = (nibble + bias) / c->idelta; in adpcm_ms_compress_sample()
298 nibble = av_clip_intp2(nibble, 3) & 0x0F; in adpcm_ms_compress_sample()
300 predictor += ((nibble & 0x08) ? (nibble - 0x10) : nibble) * c->idelta; in adpcm_ms_compress_sample()
305 c->idelta = (ff_adpcm_AdaptationTable[nibble] * c->idelta) >> 8; in adpcm_ms_compress_sample()
309 return nibble; in adpcm_ms_compress_sample()
315 int nibble, delta; in adpcm_yamaha_compress_sample() local
324 nibble = FFMIN(7, abs(delta) * 4 / c->step) + (delta < 0) * 8; in adpcm_yamaha_compress_sample()
326 c->predictor += ((c->step * ff_adpcm_yamaha_difflookup[nibble]) / 8); in adpcm_yamaha_compress_sample()
328 c->step = (c->step * ff_adpcm_yamaha_indexscale[nibble]) >> 8; in adpcm_yamaha_compress_sample()
331 return nibble; in adpcm_yamaha_compress_sample()
394 const int nibble = nidx & 0xf; in adpcm_compress_trellis() local
448 paths[u->path].nibble = nibble;\ in adpcm_compress_trellis()
461 (ff_adpcm_AdaptationTable[nibble] * step) >> 8)); in adpcm_compress_trellis()
477 const int nibble = nidx < 0 ? 7 - nidx : nidx;\ in adpcm_compress_trellis()
480 ff_adpcm_yamaha_difflookup[nibble]) / 8;\ in adpcm_compress_trellis()
484 av_clip(step + ff_adpcm_index_table[nibble], 0, 88)); in adpcm_compress_trellis()
487 av_clip((step * ff_adpcm_yamaha_indexscale[nibble]) >> 8, in adpcm_compress_trellis()
515 dst[k] = p->nibble; in adpcm_compress_trellis()
529 dst[i] = p->nibble; in adpcm_compress_trellis()
544 int nibble; in adpcm_argo_compress_nibble() local
547 nibble = 4 * s - 8 * cs->sample1 + 4 * cs->sample2; in adpcm_argo_compress_nibble()
549 nibble = 4 * s - 4 * cs->sample1; in adpcm_argo_compress_nibble()
551 return (nibble >> shift) & 0x0F; in adpcm_argo_compress_nibble()
569 int nibble = adpcm_argo_compress_nibble(cs, samples[n], shift, flag); in adpcm_argo_compress_block() local
570 int16_t sample = ff_adpcm_argo_expand_nibble(cs, nibble, shift, flag); in adpcm_argo_compress_block()
575 put_bits(pb, 4, nibble); in adpcm_argo_compress_block()
805 int nibble; in adpcm_encode_frame() local
806 nibble = adpcm_ms_compress_sample(&c->status[ 0], *samples++) << 4; in adpcm_encode_frame()
807 nibble |= adpcm_ms_compress_sample(&c->status[st], *samples++); in adpcm_encode_frame()
808 *dst++ = nibble; in adpcm_encode_frame()
834 int nibble; in adpcm_encode_frame() local
835 nibble = adpcm_yamaha_compress_sample(&c->status[ 0], *samples++); in adpcm_encode_frame()
836 nibble |= adpcm_yamaha_compress_sample(&c->status[st], *samples++) << 4; in adpcm_encode_frame()
837 *dst++ = nibble; in adpcm_encode_frame()
881 int nibble; in adpcm_encode_frame() local
882 nibble = adpcm_ima_compress_sample(&c->status[0], *samples++) << 4; in adpcm_encode_frame()
883 nibble |= adpcm_ima_compress_sample(&c->status[0], *samples++) & 0x0F; in adpcm_encode_frame()
884 bytestream_put_byte(&dst, nibble); in adpcm_encode_frame()
888 int nibble = adpcm_ima_compress_sample(&c->status[0], *samples++) << 4; in adpcm_encode_frame() local
889 bytestream_put_byte(&dst, nibble); in adpcm_encode_frame()