Revision f66e4f5f libavcodec/flacenc.c
libavcodec/flacenc.c | ||
---|---|---|
244 | 244 |
|
245 | 245 |
/* set compression option overrides from AVCodecContext */ |
246 | 246 |
if(avctx->use_lpc >= 0) { |
247 |
s->options.use_lpc = clip(avctx->use_lpc, 0, 11); |
|
247 |
s->options.use_lpc = av_clip(avctx->use_lpc, 0, 11);
|
|
248 | 248 |
} |
249 | 249 |
if(s->options.use_lpc == 1) |
250 | 250 |
av_log(avctx, AV_LOG_DEBUG, " use lpc: Levinson-Durbin recursion with Welch window\n"); |
... | ... | |
712 | 712 |
error=0; |
713 | 713 |
for(i=0; i<order; i++) { |
714 | 714 |
error += lpc_in[i] * (1 << sh); |
715 |
lpc_out[i] = clip(lrintf(error), -qmax, qmax); |
|
715 |
lpc_out[i] = av_clip(lrintf(error), -qmax, qmax);
|
|
716 | 716 |
error -= lpc_out[i]; |
717 | 717 |
} |
718 | 718 |
*shift = sh; |
Also available in: Unified diff