Mercurial > mplayer.hg
changeset 30478:838bbf6bc6ff
Simplify how usesVFilter and usesHFilter are set.
author | stefano |
---|---|
date | Fri, 05 Feb 2010 23:53:25 +0000 |
parents | 4aea7f4c856e |
children | e9cff5f6cca1 |
files | libswscale/utils.c |
diffstat | 1 files changed, 8 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/libswscale/utils.c Fri Feb 05 22:56:59 2010 +0000 +++ b/libswscale/utils.c Fri Feb 05 23:53:25 2010 +0000 @@ -865,15 +865,14 @@ 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);