[FFmpeg-devel] [PATCH] Fix linesize computation for NV formats

Stefano Sabatini stefano.sabatini-lala
Fri Nov 20 01:38:55 CET 2009

On date Thursday 2009-11-19 17:51:30 +0100, Michael Niedermayer encoded:
> On Thu, Nov 19, 2009 at 01:37:03AM +0100, Stefano Sabatini wrote:
> > So basically all the code affected by the change is indeed code which
> > is never used, my patch simply makes the linesize params semantics for
> > NV formats consistent with that of all the other formats (thus
> > simplifying the code if we choose to use pixdesc for ff_fill_XXX).
> if no code uses NV12 it should be removed (i dont belive this though)
> if any code uses NV12 your patch will break it.

ffmpeg doesn't support NV12 as input, but can convert to NV12 /
NV21. So we can create a stream with pix_fmt nv12 but there is no mean
to visually test it (e.g. with ffplay) or convert it back to a stream
which is playable by ffmpeg, but maybe someone can suggest some way to
display such a format e.g. with mplayer or vlc.

Also I wonder how hard would be to add it as an input format in lsws.

> either way your patch is wrong, unless by sheer luck the current
> code is buggy and your patch fixes that bug.

> Theres no way both values for linesize could be accepted by code
> using it.

Please could you clarify the last sentence?

I explained why I consider the patch correct, that's also the reason
for which all the filters which claims to work with NVXX are indeed
broken by that, I cannot test but then we have no means to test the
original code either (at least not with ffmpeg tools).

FFmpeg = Furious and Faboulous Miracolous Powered Elitist Gospel

More information about the ffmpeg-devel mailing list