summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-04-07 11:11:07 +0200
committerAnton Khirnov <anton@khirnov.net>2024-04-07 11:11:07 +0200
commitd8d27d5f00af4aee89d0acb81c85182ecb8046bf (patch)
tree6f4a4451f5091bb3945049f910de259124b513d1
parent6dd3a004c9143d5ee188e519f0c7b838c7fee9ea (diff)
lavc/hevcdec: rename HEVCContext.HEVClcList to local_ctx
It is more consistent with our naming conventions.
-rw-r--r--libavcodec/hevcdec.c30
-rw-r--r--libavcodec/hevcdec.h2
2 files changed, 16 insertions, 16 deletions
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 727b02f0f4..276a0bf8da 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];
@@ -3473,13 +3473,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);
@@ -3496,13 +3496,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;