diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-02-05 23:53:25 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-02-05 23:53:25 +0000 |
commit | 62bb4ca19956430ae3407a4926c464c7bcbb9691 (patch) | |
tree | dfa3eb94318eec70e5ef93e3cef18c0a632fa413 /libswscale/utils.c | |
parent | 1dc5c35809e2de8970104ad6b27148ecc5fd6267 (diff) | |
download | ffmpeg-62bb4ca19956430ae3407a4926c464c7bcbb9691.tar.gz |
Simplify how usesVFilter and usesHFilter are set.
Originally committed as revision 30520 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r-- | libswscale/utils.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 928a5fd85e..eebd40c79a 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -865,15 +865,14 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, 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); |