[FFmpeg-devel] [PATCH] swscale: Fix NV12/NV21 support

Michael Niedermayer michaelni
Thu May 21 16:38:53 CEST 2009

On Thu, May 21, 2009 at 04:01:58PM +0300, Ville Syrj?l? wrote:
> On Thu, May 21, 2009 at 05:30:19AM +0200, Michael Niedermayer wrote:
> > On Wed, May 20, 2009 at 10:03:05PM +0300, Ville Syrj?l? wrote:
> > > Hi,
> > > 
> > > NV12/NV21 support is currently broken due to the introduction of
> > > planarCopy. The logic for selecting planarCopy assumes that all
> > > planar YUV formats with the same subsampling factors are compatible.
> > > That is not the case for NV12/NV21. The simple solution is to
> > > never use planarCopy for NV12/NV21.
> > 
> > patch probably ok
> > i assume this fixes some values from swscale-example?
> Didn't know about that one. I just noticed the problem with mplayer when
> trying to use nv12 as the vo format. The output was b/w, after the patch
> the colors are back.
> I just tried swscale-example and can't see any difference in the output
> w/ or w/o the patch. Oh, I see that swscale-example will never test
> nv12/nv21 because they are not supported as input formats. So even in
> the nv12 -> nv12 case where planarCopy might work the last step to
> convert back to yuv420p will always fail.

maybe you want to add nv* input support :) ?


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090521/24152e9b/attachment.pgp>

More information about the ffmpeg-devel mailing list