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

James Almer jamrial at gmail.com
Wed Nov 29 06:07:01 EET 2017


On 11/29/2017 1:05 AM, Rostislav Pehlivanov wrote:
> 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).

It does for the sample in ticket 6216. It removes the check failure
errors, but the end result is apparently still not bitexact.

> Which undefined shift does it fix?
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 



More information about the ffmpeg-devel mailing list