Commit 12beb744 authored by stefano's avatar stefano

Simplify how usesVFilter and usesHFilter are set.


git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@30520 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 60ea578e
...@@ -865,15 +865,14 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, ...@@ -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->srcFormatBpp = av_get_bits_per_pixel(&av_pix_fmt_descriptors[srcFormat]);
c->vRounder= 4* 0x0001000100010001ULL; c->vRounder= 4* 0x0001000100010001ULL;
usesHFilter= usesVFilter= 0; usesVFilter = (srcFilter->lumV && srcFilter->lumV->length>1) ||
if (dstFilter->lumV && dstFilter->lumV->length>1) usesVFilter=1; (srcFilter->chrV && srcFilter->chrV->length>1) ||
if (dstFilter->lumH && dstFilter->lumH->length>1) usesHFilter=1; (dstFilter->lumV && dstFilter->lumV->length>1) ||
if (dstFilter->chrV && dstFilter->chrV->length>1) usesVFilter=1; (dstFilter->chrV && dstFilter->chrV->length>1);
if (dstFilter->chrH && dstFilter->chrH->length>1) usesHFilter=1; usesHFilter = (srcFilter->lumH && srcFilter->lumH->length>1) ||
if (srcFilter->lumV && srcFilter->lumV->length>1) usesVFilter=1; (srcFilter->chrH && srcFilter->chrH->length>1) ||
if (srcFilter->lumH && srcFilter->lumH->length>1) usesHFilter=1; (dstFilter->lumH && dstFilter->lumH->length>1) ||
if (srcFilter->chrV && srcFilter->chrV->length>1) usesVFilter=1; (dstFilter->chrH && dstFilter->chrH->length>1);
if (srcFilter->chrH && srcFilter->chrH->length>1) usesHFilter=1;
getSubSampleFactors(&c->chrSrcHSubSample, &c->chrSrcVSubSample, srcFormat); getSubSampleFactors(&c->chrSrcHSubSample, &c->chrSrcVSubSample, srcFormat);
getSubSampleFactors(&c->chrDstHSubSample, &c->chrDstVSubSample, dstFormat); getSubSampleFactors(&c->chrDstHSubSample, &c->chrDstVSubSample, dstFormat);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment