diff options
author | Ruiling Song <ruiling.song@intel.com> | 2020-04-01 15:32:15 +0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-04-03 00:58:07 +0200 |
commit | 4700f7d6fce3ae3fcce86e069edf16b6cbae614b (patch) | |
tree | 8e4eb9583ca7c2563cce8f440848289c87676a9e /libswscale/swscale.c | |
parent | 9f567c431eb49e5cd4399f54de433422f5b9b9c4 (diff) | |
download | ffmpeg-4700f7d6fce3ae3fcce86e069edf16b6cbae614b.tar.gz |
swscale/swscale: remove useless code
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r-- | libswscale/swscale.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 8436f056d4..001cfbf15b 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -266,8 +266,6 @@ static int swscale(SwsContext *c, const uint8_t *src[], /* vars which will change and which we need to store back in the context */ int dstY = c->dstY; - int lumBufIndex = c->lumBufIndex; - int chrBufIndex = c->chrBufIndex; int lastInLumBuf = c->lastInLumBuf; int lastInChrBuf = c->lastInChrBuf; @@ -336,8 +334,6 @@ static int swscale(SwsContext *c, const uint8_t *src[], * will not get executed. This is not really intended but works * currently, so people might do it. */ if (srcSliceY == 0) { - lumBufIndex = -1; - chrBufIndex = -1; dstY = 0; lastInLumBuf = -1; lastInChrBuf = -1; @@ -461,7 +457,6 @@ static int swscale(SwsContext *c, const uint8_t *src[], desc[i].process(c, &desc[i], firstPosY, lastPosY - firstPosY + 1); } - lumBufIndex += lastLumSrcY - lastInLumBuf; lastInLumBuf = lastLumSrcY; if (cPosY < lastChrSrcY + 1) { @@ -469,20 +464,13 @@ static int swscale(SwsContext *c, const uint8_t *src[], desc[i].process(c, &desc[i], firstCPosY, lastCPosY - firstCPosY + 1); } - chrBufIndex += lastChrSrcY - lastInChrBuf; lastInChrBuf = lastChrSrcY; - // wrap buf index around to stay inside the ring buffer - if (lumBufIndex >= vLumFilterSize) - lumBufIndex -= vLumFilterSize; - if (chrBufIndex >= vChrFilterSize) - chrBufIndex -= vChrFilterSize; if (!enough_lines) break; // we can't output a dstY line so let's try with the next slice #if HAVE_MMX_INLINE - ff_updateMMXDitherTables(c, dstY, lumBufIndex, chrBufIndex, - lastInLumBuf, lastInChrBuf); + ff_updateMMXDitherTables(c, dstY); #endif if (should_dither) { c->chrDither8 = ff_dither_8x8_128[chrDstY & 7]; @@ -524,8 +512,6 @@ static int swscale(SwsContext *c, const uint8_t *src[], /* store changed local vars back in the context */ c->dstY = dstY; - c->lumBufIndex = lumBufIndex; - c->chrBufIndex = chrBufIndex; c->lastInLumBuf = lastInLumBuf; c->lastInChrBuf = lastInChrBuf; |