diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-07-15 17:40:51 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-07-15 17:51:09 +0200 |
commit | 042f9d62ca42a6ca26ef6ff23c6078c9ecc90c18 (patch) | |
tree | fe6d6db2945987a5c10923fb28515361eea6eab2 /libswscale/utils.c | |
parent | e6cc30c22bb2007e4d66302d6477176ecf0c0877 (diff) | |
parent | e3bc07f4af25287fa4ade1e9c5501de65c8a698e (diff) | |
download | ffmpeg-042f9d62ca42a6ca26ef6ff23c6078c9ecc90c18.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
configure: Automatically add more flags required on symbian
mem.h: switch doxygen parameter order to match function prototype
doxygen: replace @sa tag by the more readable but equivalent @see
doxygen: use Doxygen markup for authors and web links where appropriate
doxygen: do not include license boilerplate in Doxygen documentation
ac3enc: Mark AVClasses const
ffserver: Replace two loops with one loop.
ffmpeg: Fix the check for experimental codecs
swscale: extend mmx padding.
swscale: clip unscaled colorspace conversion path.
doxygen: misc consistency cosmetics
doc: remove file name from @file directive in Doxygen usage example
doxygen: consistently place brief description
doxygen: place empty line between brief description and detailed description
avformat_open_input(): Add braces to shut up gcc warning.
Conflicts:
libavcodec/8svx.c
libavcodec/tiff.c
libavcodec/tiff.h
libavcodec/vaapi_h264.c
libavcodec/vorbis.c
libavcodec/vorbisdec.c
libavcodec/vp6.c
libswscale/swscale_unscaled.c
libswscale/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r-- | libswscale/utils.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index ec246e22c5..480c5a2a6d 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1048,19 +1048,20 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) //Note we need at least one pixel more at the end because of the MMX code (just in case someone wanna replace the 4000/8000) /* align at 16 bytes for AltiVec */ for (i=0; i<c->vLumBufSize; i++) { - FF_ALLOCZ_OR_GOTO(c, c->lumPixBuf[i+c->vLumBufSize], dst_stride+1, fail); + FF_ALLOCZ_OR_GOTO(c, c->lumPixBuf[i+c->vLumBufSize], dst_stride+16, fail); c->lumPixBuf[i] = c->lumPixBuf[i+c->vLumBufSize]; } - c->uv_off = dst_stride>>1; - c->uv_offx2 = dst_stride; + // 64 / c->scalingBpp is the same as 16 / sizeof(scaling_intermediate) + c->uv_off = (dst_stride>>1) + 64 / c->scalingBpp; + c->uv_offx2 = dst_stride + 16; for (i=0; i<c->vChrBufSize; i++) { - FF_ALLOC_OR_GOTO(c, c->chrUPixBuf[i+c->vChrBufSize], dst_stride*2+1, fail); + FF_ALLOC_OR_GOTO(c, c->chrUPixBuf[i+c->vChrBufSize], dst_stride*2+32, fail); c->chrUPixBuf[i] = c->chrUPixBuf[i+c->vChrBufSize]; - c->chrVPixBuf[i] = c->chrVPixBuf[i+c->vChrBufSize] = c->chrUPixBuf[i] + (dst_stride >> 1); + c->chrVPixBuf[i] = c->chrVPixBuf[i+c->vChrBufSize] = c->chrUPixBuf[i] + (dst_stride >> 1) + 8; } if (CONFIG_SWSCALE_ALPHA && c->alpPixBuf) for (i=0; i<c->vLumBufSize; i++) { - FF_ALLOCZ_OR_GOTO(c, c->alpPixBuf[i+c->vLumBufSize], dst_stride+1, fail); + FF_ALLOCZ_OR_GOTO(c, c->alpPixBuf[i+c->vLumBufSize], dst_stride+16, fail); c->alpPixBuf[i] = c->alpPixBuf[i+c->vLumBufSize]; } |