| @@ -266,8 +266,6 @@ static int swscale(SwsContext *c, const uint8_t *src[], · 265 unmodified lines |
| 266 | | 266 | |
| 267 | /* vars which will change and which we need to store back in the context */ | 267 | /* vars which will change and which we need to store back in the context */ |
| 268 | int dstY = c->dstY; | 268 | int dstY = c->dstY; |
| 269 | int lumBufIndex = c->lumBufIndex; | | |
| 270 | int chrBufIndex = c->chrBufIndex; | | |
| 271 | int lastInLumBuf = c->lastInLumBuf; | 269 | int lastInLumBuf = c->lastInLumBuf; |
| 272 | int lastInChrBuf = c->lastInChrBuf; | 270 | int lastInChrBuf = c->lastInChrBuf; |
| 273 | | 271 | |
| @@ -336,8 +334,6 @@ static int swscale(SwsContext *c, const uint8_t *src[], · 62 unmodified lines |
| 336 | * will not get executed. This is not really intended but works | 334 | * will not get executed. This is not really intended but works |
| 337 | * currently, so people might do it. */ | 335 | * currently, so people might do it. */ |
| 338 | if (srcSliceY == 0) { | 336 | if (srcSliceY == 0) { |
| 339 | lumBufIndex = -1; | | |
| 340 | chrBufIndex = -1; | | |
| 341 | dstY = 0; | 337 | dstY = 0; |
| 342 | lastInLumBuf = -1; | 338 | lastInLumBuf = -1; |
| 343 | lastInChrBuf = -1; | 339 | lastInChrBuf = -1; |
| @@ -461,7 +457,6 @@ static int swscale(SwsContext *c, const uint8_t *src[], · 117 unmodified lines |
| 461 | desc[i].process(c, &desc[i], firstPosY, lastPosY - firstPosY + 1); | 457 | desc[i].process(c, &desc[i], firstPosY, lastPosY - firstPosY + 1); |
| 462 | } | 458 | } |
| 463 | | 459 | |
| 464 | lumBufIndex += lastLumSrcY - lastInLumBuf; | | |
| 465 | lastInLumBuf = lastLumSrcY; | 460 | lastInLumBuf = lastLumSrcY; |
| 466 | | 461 | |
| 467 | if (cPosY < lastChrSrcY + 1) { | 462 | if (cPosY < lastChrSrcY + 1) { |
| @@ -469,20 +464,13 @@ static int swscale(SwsContext *c, const uint8_t *src[], · 1 unmodified line |
| 469 | desc[i].process(c, &desc[i], firstCPosY, lastCPosY - firstCPosY + 1); | 464 | desc[i].process(c, &desc[i], firstCPosY, lastCPosY - firstCPosY + 1); |
| 470 | } | 465 | } |
| 471 | | 466 | |
| 472 | chrBufIndex += lastChrSrcY - lastInChrBuf; | | |
| 473 | lastInChrBuf = lastChrSrcY; | 467 | lastInChrBuf = lastChrSrcY; |
| 474 | | 468 | |
| 475 | // wrap buf index around to stay inside the ring buffer | | |
| 476 | if (lumBufIndex >= vLumFilterSize) | | |
| 477 | lumBufIndex -= vLumFilterSize; | | |
| 478 | if (chrBufIndex >= vChrFilterSize) | | |
| 479 | chrBufIndex -= vChrFilterSize; | | |
| 480 | if (!enough_lines) | 469 | if (!enough_lines) |
| 481 | break; // we can't output a dstY line so let's try with the next slice | 470 | break; // we can't output a dstY line so let's try with the next slice |
| 482 | | 471 | |
| 483 | #if HAVE_MMX_INLINE | 472 | #if HAVE_MMX_INLINE |
| 484 | ff_updateMMXDitherTables(c, dstY, lumBufIndex, chrBufIndex, | 473 | ff_updateMMXDitherTables(c, dstY); |
| 485 | lastInLumBuf, lastInChrBuf); | | |
| 486 | #endif | 474 | #endif |
| 487 | if (should_dither) { | 475 | if (should_dither) { |
| 488 | c->chrDither8 = ff_dither_8x8_128[chrDstY & 7]; | 476 | c->chrDither8 = ff_dither_8x8_128[chrDstY & 7]; |
| @@ -524,8 +512,6 @@ static int swscale(SwsContext *c, const uint8_t *src[], · 35 unmodified lines |
| 524 | | 512 | |
| 525 | /* store changed local vars back in the context */ | 513 | /* store changed local vars back in the context */ |
| 526 | c->dstY = dstY; | 514 | c->dstY = dstY; |
| 527 | c->lumBufIndex = lumBufIndex; | | |
| 528 | c->chrBufIndex = chrBufIndex; | | |
| 529 | c->lastInLumBuf = lastInLumBuf; | 515 | c->lastInLumBuf = lastInLumBuf; |
| 530 | c->lastInChrBuf = lastInChrBuf; | 516 | c->lastInChrBuf = lastInChrBuf; |
| 531 | | 517 | |