summaryrefslogtreecommitdiff
path: root/libavcodec/hevcdec.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-06-29 17:47:06 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-25 23:31:12 +0200
commit136ada2fc372e8fd2dcdc2b3b7256529ebcbe275 (patch)
tree4d2bb2209530dd38171de78b9144ab71df89c5d8 /libavcodec/hevcdec.h
parent1837ae9d5f3eb8483c76dc708e68e466f9021cac (diff)
avcodec/hevc_mvs: Pass HEVCLocalContext when slice-threading
The HEVC decoder has both HEVCContext and HEVCLocalContext structures. The latter is supposed to be the structure containing the per-slicethread state. Yet that is not how it is handled in practice: Each HEVCLocalContext has a unique HEVCContext allocated for it and each of these coincides except in exactly one field: The corresponding HEVCLocalContext. This makes it possible to pass the HEVCContext everywhere where logically a HEVCLocalContext should be used. This commit stops doing this for lavc/hevc_mvs.c; it also constifies everything that is possible in order to ensure that no slice thread accidentally modifies the main HEVCContext state. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/hevcdec.h')
-rw-r--r--libavcodec/hevcdec.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h
index 271a55df2f..3bb3fdb90a 100644
--- a/libavcodec/hevcdec.h
+++ b/libavcodec/hevcdec.h
@@ -667,12 +667,12 @@ void ff_hevc_bump_frame(HEVCContext *s);
void ff_hevc_unref_frame(HEVCContext *s, HEVCFrame *frame, int flags);
-void ff_hevc_set_neighbour_available(HEVCContext *s, int x0, int y0,
+void ff_hevc_set_neighbour_available(HEVCLocalContext *lc, int x0, int y0,
int nPbW, int nPbH);
-void ff_hevc_luma_mv_merge_mode(HEVCContext *s, int x0, int y0,
+void ff_hevc_luma_mv_merge_mode(HEVCLocalContext *lc, int x0, int y0,
int nPbW, int nPbH, int log2_cb_size,
int part_idx, int merge_idx, MvField *mv);
-void ff_hevc_luma_mv_mvp_mode(HEVCContext *s, int x0, int y0,
+void ff_hevc_luma_mv_mvp_mode(HEVCLocalContext *lc, int x0, int y0,
int nPbW, int nPbH, int log2_cb_size,
int part_idx, int merge_idx,
MvField *mv, int mvp_lx_flag, int LX);