[FFmpeg-cvslog] r30520 - trunk/libswscale/utils.c
stefano
subversion
Sat Feb 6 00:53:25 CET 2010
Author: stefano
Date: Sat Feb 6 00:53:25 2010
New Revision: 30520
Log:
Simplify how usesVFilter and usesHFilter are set.
Modified:
trunk/libswscale/utils.c
Modified: trunk/libswscale/utils.c
==============================================================================
--- trunk/libswscale/utils.c Fri Feb 5 23:56:59 2010 (r30519)
+++ trunk/libswscale/utils.c Sat Feb 6 00:53:25 2010 (r30520)
@@ -865,15 +865,14 @@ SwsContext *sws_getContext(int srcW, int
c->srcFormatBpp = av_get_bits_per_pixel(&av_pix_fmt_descriptors[srcFormat]);
c->vRounder= 4* 0x0001000100010001ULL;
- usesHFilter= usesVFilter= 0;
- if (dstFilter->lumV && dstFilter->lumV->length>1) usesVFilter=1;
- if (dstFilter->lumH && dstFilter->lumH->length>1) usesHFilter=1;
- if (dstFilter->chrV && dstFilter->chrV->length>1) usesVFilter=1;
- if (dstFilter->chrH && dstFilter->chrH->length>1) usesHFilter=1;
- if (srcFilter->lumV && srcFilter->lumV->length>1) usesVFilter=1;
- if (srcFilter->lumH && srcFilter->lumH->length>1) usesHFilter=1;
- if (srcFilter->chrV && srcFilter->chrV->length>1) usesVFilter=1;
- if (srcFilter->chrH && srcFilter->chrH->length>1) usesHFilter=1;
+ usesVFilter = (srcFilter->lumV && srcFilter->lumV->length>1) ||
+ (srcFilter->chrV && srcFilter->chrV->length>1) ||
+ (dstFilter->lumV && dstFilter->lumV->length>1) ||
+ (dstFilter->chrV && dstFilter->chrV->length>1);
+ usesHFilter = (srcFilter->lumH && srcFilter->lumH->length>1) ||
+ (srcFilter->chrH && srcFilter->chrH->length>1) ||
+ (dstFilter->lumH && dstFilter->lumH->length>1) ||
+ (dstFilter->chrH && dstFilter->chrH->length>1);
getSubSampleFactors(&c->chrSrcHSubSample, &c->chrSrcVSubSample, srcFormat);
getSubSampleFactors(&c->chrDstHSubSample, &c->chrDstVSubSample, dstFormat);
More information about the ffmpeg-cvslog
mailing list