aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevcdec.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-04-07 11:23:48 +0200
committerAnton Khirnov <anton@khirnov.net>2024-05-31 19:26:06 +0200
commitf0aece90d99ce7ceacc8ef947d01cfdeedae1d6c (patch)
tree629180a285b4ff6544e88526757f89c0221116db /libavcodec/hevcdec.h
parent25ce44efa5f199e4ee0ed47985801077c203e7d8 (diff)
downloadffmpeg-f0aece90d99ce7ceacc8ef947d01cfdeedae1d6c.tar.gz
lavc/hevcdec: allocate local_ctx as array of structs rather than pointers
It is more efficient and easier to manage.
Diffstat (limited to 'libavcodec/hevcdec.h')
-rw-r--r--libavcodec/hevcdec.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h
index ca68fb54a7..5aa3d40450 100644
--- a/libavcodec/hevcdec.h
+++ b/libavcodec/hevcdec.h
@@ -439,13 +439,17 @@ typedef struct HEVCLocalContext {
/* properties of the boundary of the current CTB for the purposes
* of the deblocking filter */
int boundary_flags;
+
+ // an array of these structs is used for per-thread state - pad its size
+ // to avoid false sharing
+ char padding[128];
} HEVCLocalContext;
typedef struct HEVCContext {
const AVClass *c; // needed by private avoptions
AVCodecContext *avctx;
- HEVCLocalContext **local_ctx;
+ HEVCLocalContext *local_ctx;
unsigned nb_local_ctx;
HEVCLocalContext *HEVClc;