[FFmpeg-cvslog] swscale/swscale_unscaled: fix alpha values for rgb/bgr -> RGB32_1 / BGR32_1
Michael Niedermayer
git at videolan.org
Thu Sep 19 23:36:07 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Sep 19 23:09:16 2013 +0200| [13eff473adb00cc44d1a1800070f4c928e08b15b] | committer: Michael Niedermayer
swscale/swscale_unscaled: fix alpha values for rgb/bgr -> RGB32_1 / BGR32_1
Found-by: Justin Ruggles
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=13eff473adb00cc44d1a1800070f4c928e08b15b
---
libswscale/swscale_unscaled.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index 92b7357..8fb2157 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -879,8 +879,13 @@ static int rgbToRgbWrapper(SwsContext *c, const uint8_t *src[], int srcStride[],
srcPtr += ALT32_CORR;
if ((dstFormat == AV_PIX_FMT_RGB32_1 || dstFormat == AV_PIX_FMT_BGR32_1) &&
- !isRGBA32(srcFormat))
+ !isRGBA32(srcFormat)) {
+ int i;
+ av_assert0(ALT32_CORR == 1);
+ for (i = 0; i < srcSliceH; i++)
+ dstPtr[dstStride[0] * (srcSliceY + i)] = 255;
dstPtr += ALT32_CORR;
+ }
if (dstStride[0] * srcBpp == srcStride[0] * dstBpp && srcStride[0] > 0 &&
!(srcStride[0] % srcBpp) && !dst_bswap && !src_bswap)
More information about the ffmpeg-cvslog
mailing list