[FFmpeg-devel] [PATCH] Fix linesize computation for NV formats
Stefano Sabatini
stefano.sabatini-lala
Mon Nov 16 01:09:15 CET 2009
On date Monday 2009-11-16 00:57:25 +0100, Michael Niedermayer encoded:
> On Sun, Nov 15, 2009 at 11:23:27PM +0100, Stefano Sabatini wrote:
> > On date Sunday 2009-11-15 17:13:22 +0100, Stefano Sabatini encoded:
> > > Hi,
> > >
> > > for NV12 and NV21 data[1] contains both the U and V components, so
> > > its size needs to be multiplied by 2.
> > > Alternatively we could have:
> > > linesize[1] = width
> > >
> > > which is equivalent.
> > >
> > > I couldn't find any NV12 samples and libswscale cannot issue that in
> > > output, so I didn't tested it.
> >
> > That change also requires a corresponding change in ff_fill_pointer(),
> > so patch updated.
> >
> > I wonder if there is some reason if it has been done like that, it is
> > done that way since the initial inclusion of NV formats support in
> > r6115.
>
> ill defer review of this until you claim that you confirmed a bug in
> a test and that this patch fixes it.
I don't think this is strictly a bug, but this makes more harder to
deal with NV12 formats, as linesize[1] has a special value (half the
size of the data[1] plane linesize) which has to be considered when
dealing with the format, for example when filling the pointers in
ff_fill_pointer().
But I agree that we should at least test the change, has anyone an
NV12 sample or can suggest how/where to get it?
Regards.
--
FFmpeg = Fantastic & Foolish Meaningless Prodigious Epic Governor
More information about the ffmpeg-devel
mailing list