aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc/hevcdec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-05-31 13:55:39 +0200
committerAnton Khirnov <anton@khirnov.net>2024-06-11 17:39:34 +0200
commit38b8ae4112684c3415ab2f7d717605759d764d27 (patch)
treea1c417ec25d59c6e7ee702fdaf04b0040045edc2 /libavcodec/hevc/hevcdec.c
parentd0868d70eaa19b6ae118f16a770738e801fa7be7 (diff)
downloadffmpeg-38b8ae4112684c3415ab2f7d717605759d764d27.tar.gz
lavc/hevc/pred: stop accessing parameter sets through HEVCParamSets
Instead, accept PPS/SPS as function arguments. Makes the code shorter and significantly reduces diff in future commits.
Diffstat (limited to 'libavcodec/hevc/hevcdec.c')
-rw-r--r--libavcodec/hevc/hevcdec.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index cf972ed560..5e4e5776e0 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -1160,7 +1160,7 @@ static int hls_transform_unit(HEVCLocalContext *lc, int x0, int y0,
int trafo_size = 1 << log2_trafo_size;
ff_hevc_set_neighbour_available(lc, x0, y0, trafo_size, trafo_size, s->ps.sps->log2_ctb_size);
- s->hpc.intra_pred[log2_trafo_size - 2](lc, x0, y0, 0);
+ s->hpc.intra_pred[log2_trafo_size - 2](lc, s->ps.pps, x0, y0, 0);
}
if (cbf_luma || cbf_cb[0] || cbf_cr[0] ||
@@ -1247,7 +1247,7 @@ static int hls_transform_unit(HEVCLocalContext *lc, int x0, int y0,
if (lc->cu.pred_mode == MODE_INTRA) {
ff_hevc_set_neighbour_available(lc, x0, y0 + (i << log2_trafo_size_c),
trafo_size_h, trafo_size_v, s->ps.sps->log2_ctb_size);
- s->hpc.intra_pred[log2_trafo_size_c - 2](lc, x0, y0 + (i << log2_trafo_size_c), 1);
+ s->hpc.intra_pred[log2_trafo_size_c - 2](lc, s->ps.pps, x0, y0 + (i << log2_trafo_size_c), 1);
}
if (cbf_cb[i])
ff_hevc_hls_residual_coding(lc, s->ps.pps, x0, y0 + (i << log2_trafo_size_c),
@@ -1277,7 +1277,7 @@ static int hls_transform_unit(HEVCLocalContext *lc, int x0, int y0,
if (lc->cu.pred_mode == MODE_INTRA) {
ff_hevc_set_neighbour_available(lc, x0, y0 + (i << log2_trafo_size_c),
trafo_size_h, trafo_size_v, s->ps.sps->log2_ctb_size);
- s->hpc.intra_pred[log2_trafo_size_c - 2](lc, x0, y0 + (i << log2_trafo_size_c), 2);
+ s->hpc.intra_pred[log2_trafo_size_c - 2](lc, s->ps.pps, x0, y0 + (i << log2_trafo_size_c), 2);
}
if (cbf_cr[i])
ff_hevc_hls_residual_coding(lc, s->ps.pps, x0, y0 + (i << log2_trafo_size_c),
@@ -1306,7 +1306,7 @@ static int hls_transform_unit(HEVCLocalContext *lc, int x0, int y0,
if (lc->cu.pred_mode == MODE_INTRA) {
ff_hevc_set_neighbour_available(lc, xBase, yBase + (i << log2_trafo_size),
trafo_size_h, trafo_size_v, s->ps.sps->log2_ctb_size);
- s->hpc.intra_pred[log2_trafo_size - 2](lc, xBase, yBase + (i << log2_trafo_size), 1);
+ s->hpc.intra_pred[log2_trafo_size - 2](lc, s->ps.pps, xBase, yBase + (i << log2_trafo_size), 1);
}
if (cbf_cb[i])
ff_hevc_hls_residual_coding(lc, s->ps.pps, xBase, yBase + (i << log2_trafo_size),
@@ -1316,7 +1316,7 @@ static int hls_transform_unit(HEVCLocalContext *lc, int x0, int y0,
if (lc->cu.pred_mode == MODE_INTRA) {
ff_hevc_set_neighbour_available(lc, xBase, yBase + (i << log2_trafo_size),
trafo_size_h, trafo_size_v, s->ps.sps->log2_ctb_size);
- s->hpc.intra_pred[log2_trafo_size - 2](lc, xBase, yBase + (i << log2_trafo_size), 2);
+ s->hpc.intra_pred[log2_trafo_size - 2](lc, s->ps.pps, xBase, yBase + (i << log2_trafo_size), 2);
}
if (cbf_cr[i])
ff_hevc_hls_residual_coding(lc, s->ps.pps, xBase, yBase + (i << log2_trafo_size),
@@ -1329,26 +1329,26 @@ static int hls_transform_unit(HEVCLocalContext *lc, int x0, int y0,
int trafo_size_v = 1 << (log2_trafo_size_c + s->ps.sps->vshift[1]);
ff_hevc_set_neighbour_available(lc, x0, y0, trafo_size_h, trafo_size_v,
s->ps.sps->log2_ctb_size);
- s->hpc.intra_pred[log2_trafo_size_c - 2](lc, x0, y0, 1);
- s->hpc.intra_pred[log2_trafo_size_c - 2](lc, x0, y0, 2);
+ s->hpc.intra_pred[log2_trafo_size_c - 2](lc, s->ps.pps, x0, y0, 1);
+ s->hpc.intra_pred[log2_trafo_size_c - 2](lc, s->ps.pps, x0, y0, 2);
if (s->ps.sps->chroma_format_idc == 2) {
ff_hevc_set_neighbour_available(lc, x0, y0 + (1 << log2_trafo_size_c),
trafo_size_h, trafo_size_v, s->ps.sps->log2_ctb_size);
- s->hpc.intra_pred[log2_trafo_size_c - 2](lc, x0, y0 + (1 << log2_trafo_size_c), 1);
- s->hpc.intra_pred[log2_trafo_size_c - 2](lc, x0, y0 + (1 << log2_trafo_size_c), 2);
+ s->hpc.intra_pred[log2_trafo_size_c - 2](lc, s->ps.pps, x0, y0 + (1 << log2_trafo_size_c), 1);
+ s->hpc.intra_pred[log2_trafo_size_c - 2](lc, s->ps.pps, x0, y0 + (1 << log2_trafo_size_c), 2);
}
} else if (blk_idx == 3) {
int trafo_size_h = 1 << (log2_trafo_size + 1);
int trafo_size_v = 1 << (log2_trafo_size + s->ps.sps->vshift[1]);
ff_hevc_set_neighbour_available(lc, xBase, yBase,
trafo_size_h, trafo_size_v, s->ps.sps->log2_ctb_size);
- s->hpc.intra_pred[log2_trafo_size - 2](lc, xBase, yBase, 1);
- s->hpc.intra_pred[log2_trafo_size - 2](lc, xBase, yBase, 2);
+ s->hpc.intra_pred[log2_trafo_size - 2](lc, s->ps.pps, xBase, yBase, 1);
+ s->hpc.intra_pred[log2_trafo_size - 2](lc, s->ps.pps, xBase, yBase, 2);
if (s->ps.sps->chroma_format_idc == 2) {
ff_hevc_set_neighbour_available(lc, xBase, yBase + (1 << log2_trafo_size),
trafo_size_h, trafo_size_v, s->ps.sps->log2_ctb_size);
- s->hpc.intra_pred[log2_trafo_size - 2](lc, xBase, yBase + (1 << log2_trafo_size), 1);
- s->hpc.intra_pred[log2_trafo_size - 2](lc, xBase, yBase + (1 << log2_trafo_size), 2);
+ s->hpc.intra_pred[log2_trafo_size - 2](lc, s->ps.pps, xBase, yBase + (1 << log2_trafo_size), 1);
+ s->hpc.intra_pred[log2_trafo_size - 2](lc, s->ps.pps, xBase, yBase + (1 << log2_trafo_size), 2);
}
}
}