[FFmpeg-cvslog] lavc/vvc: Fix left shifts of negative values
Frank Plowman
git at videolan.org
Tue Apr 9 17:44:39 EEST 2024
ffmpeg | branch: master | Frank Plowman <post at frankplowman.com> | Mon Apr 8 16:07:02 2024 +0000| [b4baa4c0b3839387361077545765b53cd1153279] | committer: Nuo Mi
lavc/vvc: Fix left shifts of negative values
All these variables lie in the range [-12..12]
Signed-off-by: Frank Plowman <post at frankplowman.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4baa4c0b3839387361077545765b53cd1153279
---
libavcodec/vvc/ps.c | 12 ++++++------
1 file 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;
}
}
More information about the ffmpeg-cvslog
mailing list