OSDN Git Service

hevc: Do not left shift a negative value in hevc_loop_filter_chroma
authorLuca Barbato <lu_zero@gentoo.org>
Wed, 19 Feb 2014 20:56:35 +0000 (21:56 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Sun, 23 Feb 2014 13:34:41 +0000 (14:34 +0100)
libavcodec/hevcdsp_template.c

index 104c1eb..f02e175 100644 (file)
@@ -1281,7 +1281,7 @@ static void FUNC(hevc_loop_filter_chroma)(uint8_t *_pix, ptrdiff_t _xstride,
             const int p0 = P0;
             const int q0 = Q0;
             const int q1 = Q1;
-            delta0 = av_clip((((q0 - p0) << 2) + p1 - q1 + 4) >> 3, -tc, tc);
+            delta0 = av_clip((((q0 - p0) * 4) + p1 - q1 + 4) >> 3, -tc, tc);
             if (!no_p)
                 P0 = av_clip_pixel(p0 + delta0);
             if (!no_q)