Revision ec62c38f

View differences:

postproc/swscale.c
1710 1710

  
1711 1711
	SwsContext *c;
1712 1712
	int i;
1713
	int usesFilter;
1713
	int usesVFilter, usesHFilter;
1714 1714
	int unscaled, needsDither;
1715 1715
	int srcFormat, dstFormat;
1716 1716
	SwsFilter dummyFilter= {NULL, NULL, NULL, NULL};
......
1779 1779
	c->origSrcFormat= origSrcFormat;
1780 1780
        c->vRounder= 4* 0x0001000100010001ULL;
1781 1781

  
1782
	usesFilter=0;
1783
	if(dstFilter->lumV!=NULL && dstFilter->lumV->length>1) usesFilter=1;
1784
	if(dstFilter->lumH!=NULL && dstFilter->lumH->length>1) usesFilter=1;
1785
	if(dstFilter->chrV!=NULL && dstFilter->chrV->length>1) usesFilter=1;
1786
	if(dstFilter->chrH!=NULL && dstFilter->chrH->length>1) usesFilter=1;
1787
	if(srcFilter->lumV!=NULL && srcFilter->lumV->length>1) usesFilter=1;
1788
	if(srcFilter->lumH!=NULL && srcFilter->lumH->length>1) usesFilter=1;
1789
	if(srcFilter->chrV!=NULL && srcFilter->chrV->length>1) usesFilter=1;
1790
	if(srcFilter->chrH!=NULL && srcFilter->chrH->length>1) usesFilter=1;
1782
	usesHFilter= usesVFilter= 0;
1783
	if(dstFilter->lumV!=NULL && dstFilter->lumV->length>1) usesVFilter=1;
1784
	if(dstFilter->lumH!=NULL && dstFilter->lumH->length>1) usesHFilter=1;
1785
	if(dstFilter->chrV!=NULL && dstFilter->chrV->length>1) usesVFilter=1;
1786
	if(dstFilter->chrH!=NULL && dstFilter->chrH->length>1) usesHFilter=1;
1787
	if(srcFilter->lumV!=NULL && srcFilter->lumV->length>1) usesVFilter=1;
1788
	if(srcFilter->lumH!=NULL && srcFilter->lumH->length>1) usesHFilter=1;
1789
	if(srcFilter->chrV!=NULL && srcFilter->chrV->length>1) usesVFilter=1;
1790
	if(srcFilter->chrH!=NULL && srcFilter->chrH->length>1) usesHFilter=1;
1791 1791

  
1792 1792
	getSubSampleFactors(&c->chrSrcHSubSample, &c->chrSrcVSubSample, srcFormat);
1793 1793
	getSubSampleFactors(&c->chrDstHSubSample, &c->chrDstVSubSample, dstFormat);
......
1815 1815
	sws_setColorspaceDetails(c, Inverse_Table_6_9[SWS_CS_DEFAULT], 0, Inverse_Table_6_9[SWS_CS_DEFAULT] /* FIXME*/, 0, 0, 1<<16, 1<<16); 
1816 1816

  
1817 1817
	/* unscaled special Cases */
1818
	if(unscaled && !usesFilter)
1818
	if(unscaled && !usesHFilter && !usesVFilter)
1819 1819
	{
1820 1820
		/* yv12_to_nv12 */
1821 1821
		if(srcFormat == IMGFMT_YV12 && dstFormat == IMGFMT_NV12)
......
1887 1887
			if(flags&SWS_PRINT_INFO)
1888 1888
				MSG_INFO("SwScaler: output Width is not a multiple of 32 -> no MMX2 scaler\n");
1889 1889
		}
1890
		if(usesHFilter) c->canMMX2BeUsed=0;
1890 1891
	}
1891 1892
	else
1892 1893
		c->canMMX2BeUsed=0;

Also available in: Unified diff