diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-07-03 01:04:51 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-07-11 03:51:10 +0200 |
commit | b5ff61695f2c0493036b463666c5936ee10da344 (patch) | |
tree | a6a8fa1b0979bc5837a621075f92b6461c54ec41 | |
parent | d2c910b9a4ff6cd8bff0da1b6dd9098c70c01189 (diff) | |
download | ffmpeg-b5ff61695f2c0493036b463666c5936ee10da344.tar.gz |
sws: fix uv overwrite in 32bt
-rw-r--r-- | libswscale/utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 15d594c582..3e1662716b 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -786,7 +786,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) int srcH= c->srcH; int dstW= c->dstW; int dstH= c->dstH; - int dst_stride = FFALIGN(dstW * sizeof(int16_t)+66, 16), dst_stride_px = dst_stride >> 1; + int dst_stride = FFALIGN(dstW * sizeof(int16_t)+66, 16); int flags, cpu_flags; enum PixelFormat srcFormat= c->srcFormat; enum PixelFormat dstFormat= c->dstFormat; @@ -1047,12 +1047,12 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) FF_ALLOCZ_OR_GOTO(c, c->lumPixBuf[i+c->vLumBufSize], dst_stride+1, fail); c->lumPixBuf[i] = c->lumPixBuf[i+c->vLumBufSize]; } - c->uv_off = dst_stride_px; + c->uv_off = dst_stride>>1; c->uv_offx2 = dst_stride; for (i=0; i<c->vChrBufSize; i++) { FF_ALLOC_OR_GOTO(c, c->chrUPixBuf[i+c->vChrBufSize], dst_stride*2+1, fail); c->chrUPixBuf[i] = c->chrUPixBuf[i+c->vChrBufSize]; - c->chrVPixBuf[i] = c->chrVPixBuf[i+c->vChrBufSize] = c->chrUPixBuf[i] + dst_stride_px; + c->chrVPixBuf[i] = c->chrVPixBuf[i+c->vChrBufSize] = c->chrUPixBuf[i] + (dst_stride>>1); } if (CONFIG_SWSCALE_ALPHA && c->alpPixBuf) for (i=0; i<c->vLumBufSize; i++) { |