aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevcdec.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-06-29 15:53:55 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-25 17:54:16 +0200
commit1837ae9d5f3eb8483c76dc708e68e466f9021cac (patch)
tree6c91460cc2740ce2c08ce6358a3511f4ea2a2141 /libavcodec/hevcdec.h
parentc8d9d15f5e8194bfde538481387383918dda6ebc (diff)
downloadffmpeg-1837ae9d5f3eb8483c76dc708e68e466f9021cac.tar.gz
avcodec/hevcdec: Add pointers to logctx and parent ctx to HEVCLocalCtx
It is safe for a slice thread to read the main context and therefore it is safe to add a pointer to const HEVCContext (namely the parent context) to each HEVCLocalContext. It is also safe (and actually redundant) to add a pointer to a logcontext to HEVCLocalContext. Doing so allows to pass the HEVCLocalContext as context in the parts of the code that is run slice-threaded when slice-threading is in use (currently these parts of the code use ordinary HEVCContext*). This way one is not tempted to modify the main context from the slice contexts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/hevcdec.h')
-rw-r--r--libavcodec/hevcdec.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h
index f6acf845ae..271a55df2f 100644
--- a/libavcodec/hevcdec.h
+++ b/libavcodec/hevcdec.h
@@ -428,6 +428,9 @@ typedef struct HEVCLocalContext {
uint8_t first_qp_group;
+ void *logctx;
+ const struct HEVCContext *parent;
+
GetBitContext gb;
CABACContext cc;