[FFmpeg-cvslog] lavc/hevcdec: move HEVCContext.filter_slice_edges to HEVCLayerContext
Anton Khirnov
git at videolan.org
Fri Sep 6 15:25:56 EEST 2024
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Jun 5 09:01:16 2024 +0200| [eeb369d24fffab580c4cc5c69b07a95412677f28] | committer: Anton Khirnov
lavc/hevcdec: move HEVCContext.filter_slice_edges to HEVCLayerContext
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eeb369d24fffab580c4cc5c69b07a95412677f28
---
libavcodec/hevc/filter.c | 2 +-
libavcodec/hevc/hevcdec.c | 8 ++++----
libavcodec/hevc/hevcdec.h | 6 +++---
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/libavcodec/hevc/filter.c b/libavcodec/hevc/filter.c
index f5224151b6..12a57eb223 100644
--- a/libavcodec/hevc/filter.c
+++ b/libavcodec/hevc/filter.c
@@ -281,7 +281,7 @@ static void sao_filter_CTB(HEVCLocalContext *lc, const HEVCLayerContext *l,
uint8_t vert_edge[] = { 0, 0 };
uint8_t horiz_edge[] = { 0, 0 };
uint8_t diag_edge[] = { 0, 0, 0, 0 };
- uint8_t lfase = CTB(s->filter_slice_edges, x_ctb, y_ctb);
+ uint8_t lfase = CTB(l->filter_slice_edges, x_ctb, y_ctb);
uint8_t no_tile_filter = pps->tiles_enabled_flag &&
!pps->loop_filter_across_tiles_enabled_flag;
uint8_t restore = no_tile_filter || !lfase;
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index 02571f0607..4174743eb6 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -80,7 +80,7 @@ static void pic_arrays_free(HEVCContext *s, HEVCLayerContext *l)
av_freep(&s->qp_y_tab);
av_freep(&s->tab_slice_address);
- av_freep(&s->filter_slice_edges);
+ av_freep(&l->filter_slice_edges);
av_freep(&s->horizontal_bs);
av_freep(&s->vertical_bs);
@@ -119,12 +119,12 @@ static int pic_arrays_init(HEVCContext *s, HEVCLayerContext *l, const HEVCSPS *s
if (!l->tab_ipm || !l->cbf_luma || !l->is_pcm)
goto fail;
- s->filter_slice_edges = av_mallocz(ctb_count);
+ l->filter_slice_edges = av_mallocz(ctb_count);
s->tab_slice_address = av_malloc_array(pic_size_in_ctb,
sizeof(*s->tab_slice_address));
s->qp_y_tab = av_malloc_array(pic_size_in_ctb,
sizeof(*s->qp_y_tab));
- if (!s->qp_y_tab || !s->filter_slice_edges || !s->tab_slice_address)
+ if (!s->qp_y_tab || !l->filter_slice_edges || !s->tab_slice_address)
goto fail;
s->horizontal_bs = av_calloc(l->bs_width, l->bs_height);
@@ -2568,7 +2568,7 @@ static int hls_decode_entry(HEVCContext *s, GetBitContext *gb)
l->deblock[ctb_addr_rs].beta_offset = s->sh.beta_offset;
l->deblock[ctb_addr_rs].tc_offset = s->sh.tc_offset;
- s->filter_slice_edges[ctb_addr_rs] = s->sh.slice_loop_filter_across_slices_enabled_flag;
+ l->filter_slice_edges[ctb_addr_rs] = s->sh.slice_loop_filter_across_slices_enabled_flag;
more_data = hls_coding_quadtree(lc, l, pps, sps, x_ctb, y_ctb, sps->log2_ctb_size, 0);
if (more_data < 0) {
diff --git a/libavcodec/hevc/hevcdec.h b/libavcodec/hevc/hevcdec.h
index dde87be5be..afaf4c1954 100644
--- a/libavcodec/hevc/hevcdec.h
+++ b/libavcodec/hevc/hevcdec.h
@@ -455,6 +455,9 @@ typedef struct HEVCLayerContext {
uint8_t *cbf_luma; // cbf_luma of colocated TU
uint8_t *tab_ipm;
uint8_t *is_pcm;
+
+ // CTB-level flags affecting loop filter operation
+ uint8_t *filter_slice_edges;
} HEVCLayerContext;
typedef struct HEVCContext {
@@ -512,9 +515,6 @@ typedef struct HEVCContext {
int32_t *tab_slice_address;
- // CTB-level flags affecting loop filter operation
- uint8_t *filter_slice_edges;
-
/** used on BE to byteswap the lines for checksumming */
uint8_t *checksum_buf;
int checksum_buf_size;
More information about the ffmpeg-cvslog
mailing list