[FFmpeg-devel] [RFC]lavc/ffv1dec: Scale msb-packed output to full 16bit

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Nov 17 22:13:55 EET 2016

2016-11-17 14:49 GMT+01:00 Rostislav Pehlivanov <atomnuker at gmail.com>:
> On 16 November 2016 at 11:15, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
>> Hi!
>> Attached patch improves output for some ffv1 files imo.
>> Current slowdown for the existing decode-line timer is
>> 2%, I wonder if this can be improved through refactoring.
>> Please comment, Carl Eugen
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> So AFAIK the encoder pushes the values to the LSBs but the decoder didn't
> shift them back up?

I don't think the encoder does any shifts here but I may misunderstand.

> I think you should add a comment explaining that happens.

Many (older) decoders have to do this and there is nowhere a
comment, I really believe that this is not particularly convoluted

> Also 2% on a decoder doesn't sound that great,

It's 2% in a function of a decoder.

> did you try using an if case for the entire loop for when the
> values need to be shifted?

That is what I tried to suggest with "refactoring", I suspect
Michael wasn't too happy about the idea.

Carl Eugen

More information about the ffmpeg-devel mailing list