[FFmpeg-devel] [PATCH 2/2] avcodec/mlpenc: fix undefined shift

Rostislav Pehlivanov atomnuker at gmail.com
Wed Nov 29 06:05:29 EET 2017


On 28 November 2017 at 19:55, Paul B Mahol <onemda at gmail.com> wrote:

> Decreases artifacts.
>
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavcodec/mlpenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c
> index c588f5b904..eceb0ddbb2 100644
> --- a/libavcodec/mlpenc.c
> +++ b/libavcodec/mlpenc.c
> @@ -466,7 +466,7 @@ static void default_decoding_params(MLPEncodeContext
> *ctx,
>   */
>  static int inline number_sbits(int number)
>  {
> -    if (number < 0)
> +    if (number <= 0)
>          number++;
>
>      return av_log2(FFABS(number)) + 1 + !!number;
> --
> 2.11.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

Doesn't really seem to do anything to lossless check failures (not in 32
bit mode either where most of the errors are, which is why its disabled).
Which undefined shift does it fix?


More information about the ffmpeg-devel mailing list