diff options
author | James Almer <jamrial@gmail.com> | 2024-06-11 13:50:07 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-06-13 20:36:09 -0300 |
commit | 1b9af306da36a9e5b2e786b07cad50c5ba8c203f (patch) | |
tree | 06c6306cf83dbcd45469be9f9f58971cec15f91c /libavcodec/vvc | |
parent | 4b57ea8fc74aefb0eaba90ae4b73931a217f8f33 (diff) | |
download | ffmpeg-1b9af306da36a9e5b2e786b07cad50c5ba8c203f.tar.gz |
avcodec: use the renamed av_zero_extend
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/vvc')
-rw-r--r-- | libavcodec/vvc/cabac.c | 8 | ||||
-rw-r--r-- | libavcodec/vvc/ctu.c | 8 | ||||
-rw-r--r-- | libavcodec/vvc/inter.c | 18 | ||||
-rw-r--r-- | libavcodec/vvc/inter_template.c | 8 | ||||
-rw-r--r-- | libavcodec/vvc/intra_template.c | 2 | ||||
-rw-r--r-- | libavcodec/vvc/intra_utils.c | 4 | ||||
-rw-r--r-- | libavcodec/vvc/mvs.c | 2 |
7 files changed, 25 insertions, 25 deletions
diff --git a/libavcodec/vvc/cabac.c b/libavcodec/vvc/cabac.c index a5ccccd1c0..0d45eec751 100644 --- a/libavcodec/vvc/cabac.c +++ b/libavcodec/vvc/cabac.c @@ -954,8 +954,8 @@ void get_left_top(const VVCLocalContext *lc, uint8_t *left, uint8_t *top, const VVCFrameContext *fc = lc->fc; const VVCSPS *sps = fc->ps.sps; const int min_cb_width = fc->ps.pps->min_cb_width; - 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 x_cb = x0 >> sps->min_cb_log2_size_y; const int y_cb = y0 >> sps->min_cb_log2_size_y; @@ -1132,8 +1132,8 @@ static int mtt_split_cu_vertical_flag_decode(VVCLocalContext *lc, const int x0, const VVCFrameContext *fc = lc->fc; const VVCSPS *sps = fc->ps.sps; const int min_cb_width = fc->ps.pps->min_cb_width; - 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 x_cb = x0 >> sps->min_cb_log2_size_y; const int y_cb = y0 >> sps->min_cb_log2_size_y; const int available_a = lc->ctb_up_flag || y0b; diff --git a/libavcodec/vvc/ctu.c b/libavcodec/vvc/ctu.c index 809510b93d..ce79f14288 100644 --- a/libavcodec/vvc/ctu.c +++ b/libavcodec/vvc/ctu.c @@ -713,8 +713,8 @@ static enum IntraPredMode luma_intra_pred_mode(VVCLocalContext* lc, const int in const int x_b = (x0 + cu->cb_width - 1) >> sps->min_cb_log2_size_y; const int y_b = (y0 - 1) >> sps->min_cb_log2_size_y; int min_cb_width = fc->ps.pps->min_cb_width; - int x0b = av_mod_uintp2(x0, sps->ctb_log2_size_y); - int y0b = av_mod_uintp2(y0, sps->ctb_log2_size_y); + int x0b = av_zero_extend(x0, sps->ctb_log2_size_y); + 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; @@ -2508,8 +2508,8 @@ void ff_vvc_set_neighbour_available(VVCLocalContext *lc, const int x0, const int y0, const int w, const int h) { const int log2_ctb_size = lc->fc->ps.sps->ctb_log2_size_y; - const int x0b = av_mod_uintp2(x0, log2_ctb_size); - const int y0b = av_mod_uintp2(y0, log2_ctb_size); + const int x0b = av_zero_extend(x0, log2_ctb_size); + const int y0b = av_zero_extend(y0, log2_ctb_size); lc->na.cand_up = (lc->ctb_up_flag || y0b); lc->na.cand_left = (lc->ctb_left_flag || x0b); 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); diff --git a/libavcodec/vvc/inter_template.c b/libavcodec/vvc/inter_template.c index a8068f4ba8..89effffb8f 100644 --- a/libavcodec/vvc/inter_template.c +++ b/libavcodec/vvc/inter_template.c @@ -47,7 +47,7 @@ static void av_always_inline FUNC(put_scaled)(uint8_t *_dst, const ptrdiff_t _ds for (int i = 0; i < width; i++) { const int tx = _x + dx * i; const int x = SCALED_INT(tx) - x0; - const int mx = av_mod_uintp2(tx >> shift1, shift2); + const int mx = av_zero_extend(tx >> shift1, shift2); const int8_t *filter = hf + mx * taps; const pixel *src = (pixel*)_src - extra_before * src_stride; @@ -61,7 +61,7 @@ static void av_always_inline FUNC(put_scaled)(uint8_t *_dst, const ptrdiff_t _ds for (int i = 0; i < height; i++) { const int ty = _y + dy * i; const int x = SCALED_INT(ty) - y0; - const int mx = av_mod_uintp2(ty >> shift1, shift2); + const int mx = av_zero_extend(ty >> shift1, shift2); const int8_t *filter = vf + mx * taps; tmp = tmp_array + extra_before; @@ -136,7 +136,7 @@ static void av_always_inline FUNC(put_uni_w_scaled)(uint8_t *_dst, const ptrdiff for (int i = 0; i < width; i++) { const int tx = _x + dx * i; const int x = SCALED_INT(tx) - x0; - const int mx = av_mod_uintp2(tx >> shift1, shift2); + const int mx = av_zero_extend(tx >> shift1, shift2); const int8_t *filter = hf + mx * taps; const pixel *src = (pixel*)_src - extra_before * src_stride; @@ -150,7 +150,7 @@ static void av_always_inline FUNC(put_uni_w_scaled)(uint8_t *_dst, const ptrdiff for (int i = 0; i < height; i++) { const int ty = _y + dy * i; const int x = SCALED_INT(ty) - y0; - const int mx = av_mod_uintp2(ty >> shift1, shift2); + const int mx = av_zero_extend(ty >> shift1, shift2); const int8_t *filter = vf + mx * taps; tmp = tmp_array + extra_before; diff --git a/libavcodec/vvc/intra_template.c b/libavcodec/vvc/intra_template.c index 1a4d5f6f93..62342c8142 100644 --- a/libavcodec/vvc/intra_template.c +++ b/libavcodec/vvc/intra_template.c @@ -99,7 +99,7 @@ static av_always_inline void FUNC(cclm_select_luma)(const VVCFrameContext *fc, { const VVCSPS *sps = fc->ps.sps; - const int b_ctu_boundary = !av_mod_uintp2(y0, sps->ctb_log2_size_y); + const int b_ctu_boundary = !av_zero_extend(y0, sps->ctb_log2_size_y); const int hs = sps->hshift[1]; const int vs = sps->vshift[1]; const ptrdiff_t stride = fc->frame->linesize[0] / sizeof(pixel); diff --git a/libavcodec/vvc/intra_utils.c b/libavcodec/vvc/intra_utils.c index 040aacdffe..8c40eb1b16 100644 --- a/libavcodec/vvc/intra_utils.c +++ b/libavcodec/vvc/intra_utils.c @@ -100,7 +100,7 @@ int ff_vvc_get_top_available(const VVCLocalContext *lc, const int x, const int y const int vs = sps->vshift[c_idx]; const int log2_ctb_size_v = sps->ctb_log2_size_y - vs; const int end_of_ctb_x = ((lc->cu->x0 >> sps->ctb_log2_size_y) + 1) << sps->ctb_log2_size_y; - const int y0b = av_mod_uintp2(y, log2_ctb_size_v); + const int y0b = av_zero_extend(y, log2_ctb_size_v); const int max_x = FFMIN(fc->ps.pps->width, end_of_ctb_x) >> hs; const ReconstructedArea *a; int px = x; @@ -130,7 +130,7 @@ int ff_vvc_get_left_available(const VVCLocalContext *lc, const int x, const int const int hs = sps->hshift[c_idx]; const int vs = sps->vshift[c_idx]; const int log2_ctb_size_h = sps->ctb_log2_size_y - hs; - const int x0b = av_mod_uintp2(x, log2_ctb_size_h); + const int x0b = av_zero_extend(x, log2_ctb_size_h); const int end_of_ctb_y = ((lc->cu->y0 >> sps->ctb_log2_size_y) + 1) << sps->ctb_log2_size_y; const int max_y = FFMIN(fc->ps.pps->height, end_of_ctb_y) >> vs; const ReconstructedArea *a; diff --git a/libavcodec/vvc/mvs.c b/libavcodec/vvc/mvs.c index b96e750272..42564b3e6f 100644 --- a/libavcodec/vvc/mvs.c +++ b/libavcodec/vvc/mvs.c @@ -549,7 +549,7 @@ static int is_a0_available(const VVCLocalContext *lc, const CodingUnit *cu) { const VVCFrameContext *fc = lc->fc; const VVCSPS *sps = fc->ps.sps; - const int x0b = av_mod_uintp2(cu->x0, sps->ctb_log2_size_y); + const int x0b = av_zero_extend(cu->x0, sps->ctb_log2_size_y); int cand_bottom_left; if (!x0b && !lc->ctb_left_flag) { |