Revision 6118e52e postproc/swscale_template.c

View differences:

postproc/swscale_template.c
796 796
#endif
797 797
}
798 798

  
799
static inline void RENAME(yuv2nv12X)(SwsContext *c, int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,
800
				     int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
801
				     uint8_t *dest, uint8_t *uDest, int dstW, int chrDstW, int dstFormat)
802
{
803
yuv2nv12XinC(lumFilter, lumSrc, lumFilterSize,
804
	     chrFilter, chrSrc, chrFilterSize,
805
	     dest, uDest, dstW, chrDstW, dstFormat);
806
}
807

  
799 808
static inline void RENAME(yuv2yuv1)(int16_t *lumSrc, int16_t *chrSrc,
800 809
				    uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW)
801 810
{
......
2792 2801
				((uint16_t)vChrFilter[chrDstY*vChrFilterSize + i])*0x10001;
2793 2802
		}
2794 2803
#endif
2795
		if(isPlanarYUV(dstFormat) || isGray(dstFormat)) //YV12 like
2804
		if(dstFormat == IMGFMT_NV12 || dstFormat == IMGFMT_NV21){
2805
			const int chrSkipMask= (1<<c->chrDstVSubSample)-1;
2806
			if(dstY&chrSkipMask) uDest= NULL; //FIXME split functions in lumi / chromi
2807
			RENAME(yuv2nv12X)(c,
2808
				vLumFilter+dstY*vLumFilterSize   , lumSrcPtr, vLumFilterSize,
2809
				vChrFilter+chrDstY*vChrFilterSize, chrSrcPtr, vChrFilterSize,
2810
				dest, uDest, dstW, chrDstW, dstFormat);
2811
		}
2812
		else if(isPlanarYUV(dstFormat) || isGray(dstFormat)) //YV12 like
2796 2813
		{
2797 2814
			const int chrSkipMask= (1<<c->chrDstVSubSample)-1;
2798 2815
			if((dstY&chrSkipMask) || isGray(dstFormat)) uDest=vDest= NULL; //FIXME split functions in lumi / chromi
......
2840 2857
	    {
2841 2858
		int16_t **lumSrcPtr= lumPixBuf + lumBufIndex + firstLumSrcY - lastInLumBuf + vLumBufSize;
2842 2859
		int16_t **chrSrcPtr= chrPixBuf + chrBufIndex + firstChrSrcY - lastInChrBuf + vChrBufSize;
2843
		if(isPlanarYUV(dstFormat) || isGray(dstFormat)) //YV12
2860
		if(dstFormat == IMGFMT_NV12 || dstFormat == IMGFMT_NV21){
2861
			const int chrSkipMask= (1<<c->chrDstVSubSample)-1;
2862
			if(dstY&chrSkipMask) uDest= NULL; //FIXME split functions in lumi / chromi
2863
			yuv2nv12XinC(
2864
				vLumFilter+dstY*vLumFilterSize   , lumSrcPtr, vLumFilterSize,
2865
				vChrFilter+chrDstY*vChrFilterSize, chrSrcPtr, vChrFilterSize,
2866
				dest, uDest, dstW, chrDstW, dstFormat);
2867
		}
2868
		else if(isPlanarYUV(dstFormat) || isGray(dstFormat)) //YV12
2844 2869
		{
2845 2870
			const int chrSkipMask= (1<<c->chrDstVSubSample)-1;
2846 2871
			if((dstY&chrSkipMask) || isGray(dstFormat)) uDest=vDest= NULL; //FIXME split functions in lumi / chromi

Also available in: Unified diff