aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vvc/inter.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-06-11 13:50:07 -0300
committerJames Almer <jamrial@gmail.com>2024-06-13 20:36:09 -0300
commit1b9af306da36a9e5b2e786b07cad50c5ba8c203f (patch)
tree06c6306cf83dbcd45469be9f9f58971cec15f91c /libavcodec/vvc/inter.c
parent4b57ea8fc74aefb0eaba90ae4b73931a217f8f33 (diff)
downloadffmpeg-1b9af306da36a9e5b2e786b07cad50c5ba8c203f.tar.gz
avcodec: use the renamed av_zero_extend
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/vvc/inter.c')
-rw-r--r--libavcodec/vvc/inter.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/vvc/inter.c b/libavcodec/vvc/inter.c
index aaf3230c1e..344a0a8c13 100644
--- a/libavcodec/vvc/inter.c
+++ b/libavcodec/vvc/inter.c
@@ -267,8 +267,8 @@ static void mc(VVCLocalContext *lc, int16_t *dst, const VVCFrame *ref, const Mv
const int hs = fc->ps.sps->hshift[c_idx];
const int vs = fc->ps.sps->vshift[c_idx];
const int idx = av_log2(block_w) - 1;
- const intptr_t mx = av_mod_uintp2(mv->x, 4 + hs) << (is_chroma - hs);
- const intptr_t my = av_mod_uintp2(mv->y, 4 + vs) << (is_chroma - vs);
+ const intptr_t mx = av_zero_extend(mv->x, 4 + hs) << (is_chroma - hs);
+ const intptr_t my = av_zero_extend(mv->y, 4 + vs) << (is_chroma - vs);
const int hpel_if_idx = (is_chroma || pu->merge_gpm_flag) ? 0 : pu->mi.hpel_if_idx;
const int8_t *hf = INTER_FILTER(hpel_if_idx, mx);
const int8_t *vf = INTER_FILTER(hpel_if_idx, my);
@@ -295,8 +295,8 @@ static void mc_uni(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride
const int idx = av_log2(block_w) - 1;
const Mv *mv = &mvf->mv[lx];
const int is_chroma = !!c_idx;
- const intptr_t mx = av_mod_uintp2(mv->x, 4 + hs) << (is_chroma - hs);
- const intptr_t my = av_mod_uintp2(mv->y, 4 + vs) << (is_chroma - vs);
+ const intptr_t mx = av_zero_extend(mv->x, 4 + hs) << (is_chroma - hs);
+ const intptr_t my = av_zero_extend(mv->y, 4 + vs) << (is_chroma - vs);
const int hpel_if_idx = is_chroma ? 0 : pu->mi.hpel_if_idx;
const int8_t *hf = INTER_FILTER(hpel_if_idx, mx);
const int8_t *vf = INTER_FILTER(hpel_if_idx, my);
@@ -335,8 +335,8 @@ static void mc_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride,
for (int i = L0; i <= L1; i++) {
const Mv *mv = mvf->mv + i;
- const int mx = av_mod_uintp2(mv->x, 4 + hs) << (is_chroma - hs);
- const int my = av_mod_uintp2(mv->y, 4 + vs) << (is_chroma - vs);
+ const int mx = av_zero_extend(mv->x, 4 + hs) << (is_chroma - hs);
+ const int my = av_zero_extend(mv->y, 4 + vs) << (is_chroma - vs);
const int ox = x_off + (mv->x >> (4 + hs));
const int oy = y_off + (mv->y >> (4 + vs));
const VVCFrame *ref = refs[i];
@@ -672,8 +672,8 @@ static int ciip_derive_intra_weight(const VVCLocalContext *lc, const int x0, con
{
const VVCFrameContext *fc = lc->fc;
const VVCSPS *sps = fc->ps.sps;
- const int x0b = av_mod_uintp2(x0, sps->ctb_log2_size_y);
- const int y0b = av_mod_uintp2(y0, sps->ctb_log2_size_y);
+ const int x0b = av_zero_extend(x0, sps->ctb_log2_size_y);
+ const int y0b = av_zero_extend(y0, sps->ctb_log2_size_y);
const int available_l = lc->ctb_left_flag || x0b;
const int available_u = lc->ctb_up_flag || y0b;
const int min_pu_width = fc->ps.pps->min_pu_width;
@@ -971,7 +971,7 @@ static void pred_affine_blk(VVCLocalContext *lc)
luma_prof_bi(lc, dst0, dst_stride, refp[L0], refp[L1], mv, x, y, sbw, sbh);
}
if (fc->ps.sps->r->sps_chroma_format_idc) {
- if (!av_mod_uintp2(sby, vs) && !av_mod_uintp2(sbx, hs)) {
+ if (!av_zero_extend(sby, vs) && !av_zero_extend(sbx, hs)) {
MvField mvc;
derive_affine_mvc(&mvc, fc, mv, x, y, sbw, sbh);