You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/g723_1enc: Remove unnecessary av_clipl_int32()
partial_corr is an int16_t and so the av_clipl_int32() never clips and can be removed. This also avoids undefined left-shifts of negative numbers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -200,8 +200,7 @@ static void levinson_durbin(int16_t *lpc, int16_t *autocorr, int16_t error)
|
|||||||
|
|
||||||
partial_corr = temp / (error << 1);
|
partial_corr = temp / (error << 1);
|
||||||
|
|
||||||
lpc[i] = av_clipl_int32((int64_t) (partial_corr << 14) +
|
lpc[i] = (partial_corr + (1 << 1)) >> 2;
|
||||||
(1 << 15)) >> 16;
|
|
||||||
|
|
||||||
/* Update the prediction error */
|
/* Update the prediction error */
|
||||||
temp = MULL2(temp, partial_corr);
|
temp = MULL2(temp, partial_corr);
|
||||||
|
Reference in New Issue
Block a user