Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 01/10] lavc/hevcdec: rename HEVCContext.HEVClcList to local_ctx
@ 2024-04-10 13:31 Anton Khirnov
  2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 02/10] lavc/hevcdec: track local context count separately from WPP thread count Anton Khirnov
                   ` (8 more replies)
  0 siblings, 9 replies; 22+ messages in thread
From: Anton Khirnov @ 2024-04-10 13:31 UTC (permalink / raw)
  To: ffmpeg-devel

It is more consistent with our naming conventions.
---
 libavcodec/hevcdec.c | 30 +++++++++++++++---------------
 libavcodec/hevcdec.h |  2 +-
 2 files changed, 16 insertions(+), 16 deletions(-)

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;
-- 
2.43.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2024-05-29  8:06 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-10 13:31 [FFmpeg-devel] [PATCH 01/10] lavc/hevcdec: rename HEVCContext.HEVClcList to local_ctx Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 02/10] lavc/hevcdec: track local context count separately from WPP thread count Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 03/10] lavc/hevcdec: allocate local_ctx as array of structs rather than pointers Anton Khirnov
2024-04-17  9:29   ` Andreas Rheinhardt
2024-05-24  9:03     ` Anton Khirnov
2024-05-27 13:10       ` Andreas Rheinhardt
2024-05-28 13:54         ` [FFmpeg-devel] [PATCH v2 " Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 04/10] lavc/hevcdec: drop a useless execute() call with 1 job Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 05/10] lavc/hevc_ps: reduce the size of used_by_curr_pic_lt_sps_flag Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 06/10] lavc/hevc_ps/HEVCSPS: change flags into size-1 bitfields Anton Khirnov
2024-04-11 11:55   ` Andreas Rheinhardt
2024-05-24  9:07     ` Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 07/10] lavc/hevc_ps: fix variable signedness in ff_hevc_decode_short_term_rps() Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 08/10] lavc/hevc_ps: do not store delta_poc_s[01] in ShortTermRPS Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 09/10] lavc/hevc_ps: reduce the size of ShortTermRPS.used Anton Khirnov
2024-04-10 13:42   ` James Almer
2024-05-24  9:11     ` Anton Khirnov
2024-05-24 11:54       ` James Almer
2024-05-29  8:05         ` [FFmpeg-devel] [PATCH v2 09-10] " Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 10/10] lavc/hevc_ps: compactify ShortTermRPS Anton Khirnov
2024-04-11 12:35   ` James Almer
2024-05-24  9:19     ` Anton Khirnov

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git