diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-05-26 09:15:38 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-05-26 09:31:02 -0400 |
commit | 69645c021ad2cc503769b44b9008f98b014423de (patch) | |
tree | f4855f0e0163fc927da0fea51216ad954303e936 /libswscale/swscale_template.c | |
parent | 522d65ba259a263d0cd91db27b79c07e13d7fcf2 (diff) | |
download | ffmpeg-69645c021ad2cc503769b44b9008f98b014423de.tar.gz |
swscale: replace formatConvBuffer[VOF] by allocated array.
This allows to convert between formats of arbitrary width,
regardless of the value of VOF/VOFW.
Diffstat (limited to 'libswscale/swscale_template.c')
-rw-r--r-- | libswscale/swscale_template.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c index aeeb42815e..8784359dc2 100644 --- a/libswscale/swscale_template.c +++ b/libswscale/swscale_template.c @@ -459,9 +459,10 @@ inline static void hcscale_c(SwsContext *c, uint16_t *dst, long dstWidth, src2 += c->chrSrcOffset; if (c->chrToYV12) { - c->chrToYV12(formatConvBuffer, formatConvBuffer+VOFW, src1, src2, srcW, pal); + uint8_t *buf2 = formatConvBuffer + FFALIGN(srcW, 16); + c->chrToYV12(formatConvBuffer, buf2, src1, src2, srcW, pal); src1= formatConvBuffer; - src2= formatConvBuffer+VOFW; + src2= buf2; } if (!c->hcscale_fast) { |