This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit b05c6adbf83f65145da2875909cb122409f632cc Author: Wu Jianhua <[email protected]> AuthorDate: Sat Nov 28 21:19:37 2026 +0800 Commit: jianhuaw <[email protected]> CommitDate: Sun Nov 29 10:42:10 2026 +0000 avcodec/vvc/intra: clip dequantized coefficients before narrowing Suggested-by: Michael Niedermayer <[email protected]> Signed-off-by: Wu Jianhua <[email protected]> --- libavcodec/vvc/intra.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/vvc/intra.c b/libavcodec/vvc/intra.c index aeb45e70dc..90e21b8ad1 100644 --- a/libavcodec/vvc/intra.c +++ b/libavcodec/vvc/intra.c @@ -400,9 +400,10 @@ static const uint8_t* derive_scale_m(const VVCLocalContext *lc, const TransformB static av_always_inline int scale_coeff(const TransformBlock *tb, int coeff, const int scale, const int scale_m, const int log2_transform_range) { - coeff = ((int64_t) coeff * scale * scale_m + tb->bd_offset) >> tb->bd_shift; - coeff = av_clip_intp2(coeff, log2_transform_range); - return coeff; + const int64_t scaled = ((int64_t) coeff * scale * scale_m + tb->bd_offset) >> tb->bd_shift; + const int64_t max = (INT64_C(1) << log2_transform_range) - 1; + + return av_clip64(scaled, -max - 1, max); } static void dequant(const VVCLocalContext *lc, const TransformUnit *tu, TransformBlock *tb) -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
