[FFmpeg-cvslog] swscale: fix incorrect chroma bias in yuv2rgb48_1_c().

Ronald S. Bultje git at videolan.org
Tue Feb 14 02:18:51 CET 2012


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Sun Feb 12 15:55:44 2012 -0800| [d63b7d8c37e6d18c36d6e95f76efd934beb704c0] | committer: Ronald S. Bultje

swscale: fix incorrect chroma bias in yuv2rgb48_1_c().

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

 libswscale/output.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libswscale/output.c b/libswscale/output.c
index 5b2ba37..a70cf1f 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -810,8 +810,8 @@ yuv2rgb48_1_c_template(SwsContext *c, const int32_t *buf0,
         for (i = 0; i < (dstW >> 1); i++) {
             int Y1 = (buf0[i * 2]    ) >> 2;
             int Y2 = (buf0[i * 2 + 1]) >> 2;
-            int U  = (ubuf0[i] + ubuf1[i] + (-128 << 11)) >> 3;
-            int V  = (vbuf0[i] + vbuf1[i] + (-128 << 11)) >> 3;
+            int U  = (ubuf0[i] + ubuf1[i] + (-128 << 12)) >> 3;
+            int V  = (vbuf0[i] + vbuf1[i] + (-128 << 12)) >> 3;
             int R, G, B;
 
             Y1 -= c->yuv2rgb_y_offset;



More information about the ffmpeg-cvslog mailing list