Revision dd9bdeb9

View differences:

libswscale/swscale.c
2437 2437
	if (c->sliceDir == 1) {
2438 2438
            uint8_t* src2[4]= {src[0], src[1], src[2]};
2439 2439
	    // slices go from top to bottom
2440
	    int srcStride2[3]= {srcStride[0], srcStride[1], srcStride[2]};
2441
	    int dstStride2[3]= {dstStride[0], dstStride[1], dstStride[2]};
2440
	    int srcStride2[4]= {srcStride[0], srcStride[1], srcStride[2]};
2441
	    int dstStride2[4]= {dstStride[0], dstStride[1], dstStride[2]};
2442 2442
	    return c->swScale(c, src2, srcStride2, srcSliceY, srcSliceH, dst, dstStride2);
2443 2443
	} else {
2444 2444
	    // slices go from bottom to top => we flip the image internally
2445
	    uint8_t* src2[3]= {src[0] + (srcSliceH-1)*srcStride[0],
2445
	    uint8_t* src2[4]= {src[0] + (srcSliceH-1)*srcStride[0],
2446 2446
			       src[1] + ((srcSliceH>>c->chrSrcVSubSample)-1)*srcStride[1],
2447 2447
			       src[2] + ((srcSliceH>>c->chrSrcVSubSample)-1)*srcStride[2]
2448 2448
	    };
2449
	    uint8_t* dst2[3]= {dst[0] + (c->dstH-1)*dstStride[0],
2449
	    uint8_t* dst2[4]= {dst[0] + (c->dstH-1)*dstStride[0],
2450 2450
			       dst[1] + ((c->dstH>>c->chrDstVSubSample)-1)*dstStride[1],
2451 2451
			       dst[2] + ((c->dstH>>c->chrDstVSubSample)-1)*dstStride[2]};
2452
	    int srcStride2[3]= {-srcStride[0], -srcStride[1], -srcStride[2]};
2453
	    int dstStride2[3]= {-dstStride[0], -dstStride[1], -dstStride[2]};
2452
	    int srcStride2[4]= {-srcStride[0], -srcStride[1], -srcStride[2]};
2453
	    int dstStride2[4]= {-dstStride[0], -dstStride[1], -dstStride[2]};
2454 2454
	    
2455 2455
	    return c->swScale(c, src2, srcStride2, c->srcH-srcSliceY-srcSliceH, srcSliceH, dst2, dstStride2);
2456 2456
	}

Also available in: Unified diff