diff mbox series

[FFmpeg-devel,01/10] lavc/hevcdec: rename HEVCContext.HEVClcList to local_ctx

Message ID 20240410133118.28144-1-anton@khirnov.net
State Accepted
Commit a1471ec8ada0a2f5a8c0064ef7103cda5db691f8
Headers show
Series [FFmpeg-devel,01/10] lavc/hevcdec: rename HEVCContext.HEVClcList to local_ctx | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov April 10, 2024, 1:31 p.m. UTC
It is more consistent with our naming conventions.
---
 libavcodec/hevcdec.c | 30 +++++++++++++++---------------
 libavcodec/hevcdec.h |  2 +-
 2 files changed, 16 insertions(+), 16 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index d3b668af00..c70937a756 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -2697,14 +2697,14 @@  static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal)
     }
 
     for (i = 1; i < s->threads_number; i++) {
-        if (s->HEVClcList[i])
+        if (s->local_ctx[i])
             continue;
-        s->HEVClcList[i] = av_mallocz(sizeof(HEVCLocalContext));
-        if (!s->HEVClcList[i])
+        s->local_ctx[i] = av_mallocz(sizeof(HEVCLocalContext));
+        if (!s->local_ctx[i])
             return AVERROR(ENOMEM);
-        s->HEVClcList[i]->logctx = s->avctx;
-        s->HEVClcList[i]->parent = s;
-        s->HEVClcList[i]->common_cabac_state = &s->cabac;
+        s->local_ctx[i]->logctx = s->avctx;
+        s->local_ctx[i]->parent = s;
+        s->local_ctx[i]->common_cabac_state = &s->cabac;
     }
 
     offset = (lc->gb.index >> 3);
@@ -2742,8 +2742,8 @@  static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal)
     s->data = data;
 
     for (i = 1; i < s->threads_number; i++) {
-        s->HEVClcList[i]->first_qp_group = 1;
-        s->HEVClcList[i]->qp_y = s->HEVClc->qp_y;
+        s->local_ctx[i]->first_qp_group = 1;
+        s->local_ctx[i]->qp_y = s->HEVClc->qp_y;
     }
 
     atomic_store(&s->wpp_err, 0);
@@ -2756,7 +2756,7 @@  static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal)
         return AVERROR(ENOMEM);
 
     if (s->ps.pps->entropy_coding_sync_enabled_flag)
-        s->avctx->execute2(s->avctx, hls_decode_entry_wpp, s->HEVClcList, ret, s->sh.num_entry_point_offsets + 1);
+        s->avctx->execute2(s->avctx, hls_decode_entry_wpp, s->local_ctx, ret, s->sh.num_entry_point_offsets + 1);
 
     for (i = 0; i <= s->sh.num_entry_point_offsets; i++)
         res += ret[i];
@@ -3474,13 +3474,13 @@  static av_cold int hevc_decode_free(AVCodecContext *avctx)
     av_freep(&s->sh.offset);
     av_freep(&s->sh.size);
 
-    if (s->HEVClcList) {
+    if (s->local_ctx) {
         for (i = 1; i < s->threads_number; i++) {
-            av_freep(&s->HEVClcList[i]);
+            av_freep(&s->local_ctx[i]);
         }
     }
     av_freep(&s->HEVClc);
-    av_freep(&s->HEVClcList);
+    av_freep(&s->local_ctx);
 
     ff_h2645_packet_uninit(&s->pkt);
 
@@ -3497,13 +3497,13 @@  static av_cold int hevc_init_context(AVCodecContext *avctx)
     s->avctx = avctx;
 
     s->HEVClc = av_mallocz(sizeof(HEVCLocalContext));
-    s->HEVClcList = av_mallocz(sizeof(HEVCLocalContext*) * s->threads_number);
-    if (!s->HEVClc || !s->HEVClcList)
+    s->local_ctx = av_mallocz(sizeof(HEVCLocalContext*) * s->threads_number);
+    if (!s->HEVClc || !s->local_ctx)
         return AVERROR(ENOMEM);
     s->HEVClc->parent = s;
     s->HEVClc->logctx = avctx;
     s->HEVClc->common_cabac_state = &s->cabac;
-    s->HEVClcList[0] = s->HEVClc;
+    s->local_ctx[0] = s->HEVClc;
 
     s->output_frame = av_frame_alloc();
     if (!s->output_frame)
diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h
index e65a6180ca..9e3e6a8cd7 100644
--- a/libavcodec/hevcdec.h
+++ b/libavcodec/hevcdec.h
@@ -441,7 +441,7 @@  typedef struct HEVCContext {
     const AVClass *c;  // needed by private avoptions
     AVCodecContext *avctx;
 
-    HEVCLocalContext    **HEVClcList;
+    HEVCLocalContext    **local_ctx;
     HEVCLocalContext    *HEVClc;
 
     uint8_t             threads_type;