mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
sws: fix uv overwrite in 32bt
This commit is contained in:
parent
d2c910b9a4
commit
b5ff61695f
@ -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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user