aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc
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/hevc
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/hevc')
-rw-r--r--libavcodec/hevc/cabac.c4
-rw-r--r--libavcodec/hevc/hevcdec.c20
-rw-r--r--libavcodec/hevc/mvs.c4
-rw-r--r--libavcodec/hevc/pred_template.c4
-rw-r--r--libavcodec/hevc/ps.c4
5 files changed, 18 insertions, 18 deletions
diff --git a/libavcodec/hevc/cabac.c b/libavcodec/hevc/cabac.c
index 39ca7c0135..33f8241bb3 100644
--- a/libavcodec/hevc/cabac.c
+++ b/libavcodec/hevc/cabac.c
@@ -642,8 +642,8 @@ int ff_hevc_split_coding_unit_flag_decode(HEVCLocalContext *lc, const HEVCSPS *s
{
const HEVCContext *const s = lc->parent;
int inc = 0, depth_left = 0, depth_top = 0;
- int x0b = av_mod_uintp2(x0, sps->log2_ctb_size);
- int y0b = av_mod_uintp2(y0, sps->log2_ctb_size);
+ int x0b = av_zero_extend(x0, sps->log2_ctb_size);
+ int y0b = av_zero_extend(y0, sps->log2_ctb_size);
int x_cb = x0 >> sps->log2_min_cb_size;
int y_cb = y0 >> sps->log2_min_cb_size;
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index 4b95358b95..1d2e53afc3 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -1679,8 +1679,8 @@ static void chroma_mc_uni(HEVCLocalContext *lc,
int idx = hevc_pel_weight[block_w];
int hshift = sps->hshift[1];
int vshift = sps->vshift[1];
- intptr_t mx = av_mod_uintp2(mv->x, 2 + hshift);
- intptr_t my = av_mod_uintp2(mv->y, 2 + vshift);
+ intptr_t mx = av_zero_extend(mv->x, 2 + hshift);
+ intptr_t my = av_zero_extend(mv->y, 2 + vshift);
intptr_t _mx = mx << (1 - hshift);
intptr_t _my = my << (1 - vshift);
int emu = src0 == s->cur_frame->f->data[1] || src0 == s->cur_frame->f->data[2];
@@ -1753,10 +1753,10 @@ static void chroma_mc_bi(HEVCLocalContext *lc,
int hshift = sps->hshift[1];
int vshift = sps->vshift[1];
- intptr_t mx0 = av_mod_uintp2(mv0->x, 2 + hshift);
- intptr_t my0 = av_mod_uintp2(mv0->y, 2 + vshift);
- intptr_t mx1 = av_mod_uintp2(mv1->x, 2 + hshift);
- intptr_t my1 = av_mod_uintp2(mv1->y, 2 + vshift);
+ intptr_t mx0 = av_zero_extend(mv0->x, 2 + hshift);
+ intptr_t my0 = av_zero_extend(mv0->y, 2 + vshift);
+ intptr_t mx1 = av_zero_extend(mv1->x, 2 + hshift);
+ intptr_t my1 = av_zero_extend(mv1->y, 2 + vshift);
intptr_t _mx0 = mx0 << (1 - hshift);
intptr_t _my0 = my0 << (1 - vshift);
intptr_t _mx1 = mx1 << (1 - hshift);
@@ -2020,8 +2020,8 @@ static int luma_intra_pred_mode(HEVCLocalContext *lc, const HEVCSPS *sps,
int y_pu = y0 >> sps->log2_min_pu_size;
int min_pu_width = sps->min_pu_width;
int size_in_pus = pu_size >> sps->log2_min_pu_size;
- int x0b = av_mod_uintp2(x0, sps->log2_ctb_size);
- int y0b = av_mod_uintp2(y0, sps->log2_ctb_size);
+ int x0b = av_zero_extend(x0, sps->log2_ctb_size);
+ int y0b = av_zero_extend(y0, sps->log2_ctb_size);
int cand_up = (lc->ctb_up_flag || y0b) ?
s->tab_ipm[(y_pu - 1) * min_pu_width + x_pu] : INTRA_DC;
@@ -2233,8 +2233,8 @@ static int hls_coding_unit(HEVCLocalContext *lc, const HEVCContext *s,
lc->cu.cu_transquant_bypass_flag = 0;
if (s->sh.slice_type != HEVC_SLICE_I) {
- const int x0b = av_mod_uintp2(x0, sps->log2_ctb_size);
- const int y0b = av_mod_uintp2(y0, sps->log2_ctb_size);
+ const int x0b = av_zero_extend(x0, sps->log2_ctb_size);
+ const int y0b = av_zero_extend(y0, sps->log2_ctb_size);
uint8_t skip_flag = ff_hevc_skip_flag_decode(lc, x0b, y0b, x_cb, y_cb,
min_cb_width);
diff --git a/libavcodec/hevc/mvs.c b/libavcodec/hevc/mvs.c
index 772fedceeb..96d8d58f39 100644
--- a/libavcodec/hevc/mvs.c
+++ b/libavcodec/hevc/mvs.c
@@ -43,8 +43,8 @@ static const uint8_t l0_l1_cand_idx[12][2] = {
void ff_hevc_set_neighbour_available(HEVCLocalContext *lc, int x0, int y0,
int nPbW, int nPbH, int log2_ctb_size)
{
- int x0b = av_mod_uintp2(x0, log2_ctb_size);
- int y0b = av_mod_uintp2(y0, log2_ctb_size);
+ int x0b = av_zero_extend(x0, log2_ctb_size);
+ 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/hevc/pred_template.c b/libavcodec/hevc/pred_template.c
index ca21774f75..b4c2fcf506 100644
--- a/libavcodec/hevc/pred_template.c
+++ b/libavcodec/hevc/pred_template.c
@@ -121,8 +121,8 @@ do { \
if (pps->constrained_intra_pred_flag == 1) {
int size_in_luma_pu_v = PU(size_in_luma_v);
int size_in_luma_pu_h = PU(size_in_luma_h);
- int on_pu_edge_x = !av_mod_uintp2(x0, sps->log2_min_pu_size);
- int on_pu_edge_y = !av_mod_uintp2(y0, sps->log2_min_pu_size);
+ int on_pu_edge_x = !av_zero_extend(x0, sps->log2_min_pu_size);
+ int on_pu_edge_y = !av_zero_extend(y0, sps->log2_min_pu_size);
if (!size_in_luma_pu_h)
size_in_luma_pu_h++;
if (cand_bottom_left == 1 && on_pu_edge_x) {
diff --git a/libavcodec/hevc/ps.c b/libavcodec/hevc/ps.c
index c02fc8b6c3..80ac35a7db 100644
--- a/libavcodec/hevc/ps.c
+++ b/libavcodec/hevc/ps.c
@@ -1258,8 +1258,8 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
sps->qp_bd_offset = 6 * (sps->bit_depth - 8);
- if (av_mod_uintp2(sps->width, sps->log2_min_cb_size) ||
- av_mod_uintp2(sps->height, sps->log2_min_cb_size)) {
+ if (av_zero_extend(sps->width, sps->log2_min_cb_size) ||
+ av_zero_extend(sps->height, sps->log2_min_cb_size)) {
av_log(avctx, AV_LOG_ERROR, "Invalid coded frame dimensions.\n");
return AVERROR_INVALIDDATA;
}