[FFmpeg-cvslog] swscale: fix gbrap to gbrap alpha scaling

Vittorio Giovara git at videolan.org
Fri Jan 16 14:19:54 CET 2015


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Thu Jan 15 15:15:22 2015 +0100| [2df7277711cbe3ca5415ff8e31228dcffa309211] | committer: Vittorio Giovara

swscale: fix gbrap to gbrap alpha scaling

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2df7277711cbe3ca5415ff8e31228dcffa309211
---

 libswscale/input.c                  |    5 ++---
 tests/ref/fate/filter-pixfmts-scale |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/libswscale/input.c b/libswscale/input.c
index f575b7b..e806bce 100644
--- a/libswscale/input.c
+++ b/libswscale/input.c
@@ -596,12 +596,11 @@ static void planar_rgb_to_y(uint8_t *dst, const uint8_t *src[4], int width)
     }
 }
 
-static void planar_rgb_to_a(uint8_t *_dst, const uint8_t *src[4], int width)
+static void planar_rgb_to_a(uint8_t *dst, const uint8_t *src[4], int width)
 {
-    uint16_t *dst = (uint16_t *)_dst;
     int i;
     for (i = 0; i < width; i++)
-        dst[i] = src[3][i] << 6;
+        dst[i] = src[3][i];
 }
 
 static void planar_rgb_to_uv(uint8_t *dstU, uint8_t *dstV, const uint8_t *src[4], int width)
diff --git a/tests/ref/fate/filter-pixfmts-scale b/tests/ref/fate/filter-pixfmts-scale
index 712754c..408644b 100644
--- a/tests/ref/fate/filter-pixfmts-scale
+++ b/tests/ref/fate/filter-pixfmts-scale
@@ -12,7 +12,7 @@ bgr565be            922a2503767036ae9536f4f7823c04ee
 bgr565le            3a514a298c6161a071ddf9963c06509d
 bgr8                7f007fa6c153a16e808a9c51605a4016
 bgra                a5e7040f9a80cccd65e5acf2ca09ace5
-gbrap               08ea11431bc436d788494d678b3edc6f
+gbrap               7df4fd8da27245788cb422794e03acd4
 gbrp                205c50f8359cb4ba2827a7711dea2cc6
 gbrp10be            30b7f9d5ef5da474fb794743146236aa
 gbrp10le            2e9949a01fe4c38774728e34795165cc



More information about the ffmpeg-cvslog mailing list