[FFmpeg-cvslog] avcodec/hevc_filter: assert validity of qp predictor input

Michael Niedermayer git at videolan.org
Fri Feb 7 04:53:29 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Feb  7 01:55:17 2014 +0100| [951793717a285faf68b8ade7fde52a445f75f5c0] | committer: Michael Niedermayer

avcodec/hevc_filter: assert validity of qp predictor input

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/hevc_filter.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/hevc_filter.c b/libavcodec/hevc_filter.c
index e1c6aae..91cee91 100644
--- a/libavcodec/hevc_filter.c
+++ b/libavcodec/hevc_filter.c
@@ -150,6 +150,9 @@ static int get_qPy_pred(HEVCContext *s, int xC, int yC,
     else
         qPy_b = s->qp_y_tab[x_cb + (y_cb - 1) * min_cb_width];
 
+    av_assert2(qPy_a >= -s->sps->qp_bd_offset && qPy_a < 52);
+    av_assert2(qPy_b >= -s->sps->qp_bd_offset && qPy_b < 52);
+
     return (qPy_a + qPy_b + 1) >> 1;
 }
 



More information about the ffmpeg-cvslog mailing list