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

Ville Syrjälä syrjala
Thu May 21 17:22:16 CEST 2009


On Thu, May 21, 2009 at 04:38:53PM +0200, Michael Niedermayer wrote:
> 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 :) ?

Seems like mostly wasted effort. I doubt any application would ever use
that code so the only benefit would be getting swscale-example working.

-- 
Ville Syrj?l?
syrjala at sci.fi
http://www.sci.fi/~syrjala/



More information about the ffmpeg-devel mailing list