aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-07-03 01:04:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-07-11 03:51:10 +0200
commitb5ff61695f2c0493036b463666c5936ee10da344 (patch)
treea6a8fa1b0979bc5837a621075f92b6461c54ec41 /libswscale
parentd2c910b9a4ff6cd8bff0da1b6dd9098c70c01189 (diff)
downloadffmpeg-b5ff61695f2c0493036b463666c5936ee10da344.tar.gz
sws: fix uv overwrite in 32bt
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/utils.c6
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++) {