[FFmpeg-devel] [PATCH] lavc/vvc: Fix assertion bound on qPy_{a, b}
Nuo Mi
nuomi2021 at gmail.com
Sun Aug 25 11:11:42 EEST 2024
On Sat, Aug 24, 2024 at 5:28 PM Frank Plowman <post at frankplowman.com> wrote:
> Signed-off-by: Frank Plowman <post at frankplowman.com>
> ---
> libavcodec/vvc/ctu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/vvc/ctu.c b/libavcodec/vvc/ctu.c
> index 139d3dded5..9ac3684ec9 100644
> --- a/libavcodec/vvc/ctu.c
> +++ b/libavcodec/vvc/ctu.c
> @@ -115,8 +115,8 @@ static int get_qp_y_pred(const VVCLocalContext *lc)
> else
> qPy_a = fc->tab.qp[LUMA][(x_cb - 1) + y_cb * min_cb_width];
>
> - av_assert2(qPy_a >= -fc->ps.sps->qp_bd_offset && qPy_a < 63);
> - av_assert2(qPy_b >= -fc->ps.sps->qp_bd_offset && qPy_b < 63);
> + av_assert2(qPy_a >= -fc->ps.sps->qp_bd_offset && qPy_a <= 63);
> + av_assert2(qPy_b >= -fc->ps.sps->qp_bd_offset && qPy_b <= 63);
>
Hi Frank,
Thank you for the patch.
Perhaps we can consider removing the assert, as other processes guarantee
the range, correct?"
>
> return (qPy_a + qPy_b + 1) >> 1;
> }
> --
> 2.46.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-devel
mailing list