[FFmpeg-cvslog] hevc: Do not left shift a negative value in hevc_loop_filter_chroma

Luca Barbato git at videolan.org
Sun Feb 23 22:23:19 CET 2014


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Wed Feb 19 21:56:35 2014 +0100| [8eeacf31c5ea37baf6b222dc38d20cf4fd33c455] | committer: Luca Barbato

hevc: Do not left shift a negative value in hevc_loop_filter_chroma

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

 libavcodec/hevcdsp_template.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c
index 104c1eb..f02e175 100644
--- a/libavcodec/hevcdsp_template.c
+++ b/libavcodec/hevcdsp_template.c
@@ -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)



More information about the ffmpeg-cvslog mailing list