[FFmpeg-cvslog] avcodec/h264_mc_template: prefetch list1 only if it is used in the MB

Michael Niedermayer git at videolan.org
Fri Dec 18 00:55:24 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Dec 18 00:20:51 2015 +0100| [c8ea57664fe3ad611c9ecd234670544ddff7ca55] | committer: Michael Niedermayer

avcodec/h264_mc_template: prefetch list1 only if it is used in the MB

Fixes ubsan warning
Fixes Mozilla bug 1230276

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/h264_mc_template.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/h264_mc_template.c b/libavcodec/h264_mc_template.c
index eaead35..e4333a7 100644
--- a/libavcodec/h264_mc_template.c
+++ b/libavcodec/h264_mc_template.c
@@ -158,6 +158,7 @@ static void MCFUNC(hl_motion)(const H264Context *h, H264SliceContext *sl,
         }
     }
 
-    prefetch_motion(h, sl, 1, PIXEL_SHIFT, CHROMA_IDC);
+    if (USES_LIST(mb_type, 1))
+        prefetch_motion(h, sl, 1, PIXEL_SHIFT, CHROMA_IDC);
 }
 



More information about the ffmpeg-cvslog mailing list