aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorFrank Plowman <post@frankplowman.com>2024-04-08 16:07:02 +0000
committerNuo Mi <nuomi2021@gmail.com>2024-04-09 22:13:49 +0800
commitb4baa4c0b3839387361077545765b53cd1153279 (patch)
tree6036de92020923af3b39d66f348fd0dfe7805afa /libavcodec
parent67e2f8b6bf5a44fa8083f90096de6131601879b4 (diff)
downloadffmpeg-b4baa4c0b3839387361077545765b53cd1153279.tar.gz
lavc/vvc: Fix left shifts of negative values
All these variables lie in the range [-12..12] Signed-off-by: Frank Plowman <post@frankplowman.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vvc/ps.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/vvc/ps.c b/libavcodec/vvc/ps.c
index 3c71c34bae..1b23675c98 100644
--- a/libavcodec/vvc/ps.c
+++ b/libavcodec/vvc/ps.c
@@ -1196,12 +1196,12 @@ static void sh_deblock_offsets(VVCSH *sh)
const H266RawSliceHeader *r = sh->r;
if (!r->sh_deblocking_filter_disabled_flag) {
- sh->deblock.beta_offset[LUMA] = r->sh_luma_beta_offset_div2 << 1;
- sh->deblock.tc_offset[LUMA] = r->sh_luma_tc_offset_div2 << 1;
- sh->deblock.beta_offset[CB] = r->sh_cb_beta_offset_div2 << 1;
- sh->deblock.tc_offset[CB] = r->sh_cb_tc_offset_div2 << 1;
- sh->deblock.beta_offset[CR] = r->sh_cr_beta_offset_div2 << 1;
- sh->deblock.tc_offset[CR] = r->sh_cr_tc_offset_div2 << 1;
+ sh->deblock.beta_offset[LUMA] = r->sh_luma_beta_offset_div2 * 2;
+ sh->deblock.tc_offset[LUMA] = r->sh_luma_tc_offset_div2 * 2;
+ sh->deblock.beta_offset[CB] = r->sh_cb_beta_offset_div2 * 2;
+ sh->deblock.tc_offset[CB] = r->sh_cb_tc_offset_div2 * 2;
+ sh->deblock.beta_offset[CR] = r->sh_cr_beta_offset_div2 * 2;
+ sh->deblock.tc_offset[CR] = r->sh_cr_tc_offset_div2 * 2;
}
}