Commit 979b77ee authored by James Almer's avatar James Almer

dca_xll: use av_clip_intp2()

Reviewed-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent b5564e04
...@@ -393,7 +393,7 @@ static void dca_xll_inv_adapt_pred(int *samples, int nsamples, unsigned order, ...@@ -393,7 +393,7 @@ static void dca_xll_inv_adapt_pred(int *samples, int nsamples, unsigned order,
for (; j < order; j++) for (; j < order; j++)
s += (int64_t) c[j] * prev[DCA_XLL_AORDER_MAX + i - 1 - j]; s += (int64_t) c[j] * prev[DCA_XLL_AORDER_MAX + i - 1 - j];
samples[i] -= av_clip((s + 0x8000) >> 16, -0x1000000, 0xffffff); samples[i] -= av_clip_intp2((s + 0x8000) >> 16, 24);
} }
} }
for (i = order; i < nsamples; i++) { for (i = order; i < nsamples; i++) {
...@@ -402,7 +402,7 @@ static void dca_xll_inv_adapt_pred(int *samples, int nsamples, unsigned order, ...@@ -402,7 +402,7 @@ static void dca_xll_inv_adapt_pred(int *samples, int nsamples, unsigned order,
/* NOTE: Equations seem to imply addition, while the /* NOTE: Equations seem to imply addition, while the
* pseudocode seems to use subtraction.*/ * pseudocode seems to use subtraction.*/
samples[i] -= av_clip((s + 0x8000) >> 16, -0x1000000, 0xffffff); samples[i] -= av_clip_intp2((s + 0x8000) >> 16, 24);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment