[FFmpeg-devel] [PATCH] ac3enc: remove right shifting from lshift_tab(). lshift is never negative.
Luca Barbato
lu_zero
Thu Feb 10 20:21:01 CET 2011
On 02/10/2011 06:57 PM, Justin Ruggles wrote:
> ---
> libavcodec/ac3enc_fixed.c | 6 +-----
> 1 files changed, 1 insertions(+), 5 deletions(-)
>
>
>
> 0001-ac3enc-remove-right-shifting-from-lshift_tab-.-lshif.patch
>
>
> diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c
> index 90e148b..fc6c266 100644
> --- a/libavcodec/ac3enc_fixed.c
> +++ b/libavcodec/ac3enc_fixed.c
> @@ -286,7 +286,7 @@ static int log2_tab(int16_t *tab, int n)
> * Left-shift each value in an array by a specified amount.
> * @param tab input array
> * @param n number of values in the array
> - * @param lshift left shift amount. a negative value means right shift.
> + * @param lshift left shift amount
> */
> static void lshift_tab(int16_t *tab, int n, int lshift)
> {
> @@ -295,10 +295,6 @@ static void lshift_tab(int16_t *tab, int n, int lshift)
What about using unsigned for lshift? Beside that I think it's ok.
lu
--
Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero
More information about the ffmpeg-devel
mailing list