summaryrefslogtreecommitdiff
path: root/libavcodec/hevcpred_template.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-06-30 17:57:35 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-25 23:32:08 +0200
commit6265b155bc6dfa9d327273b060af767cc391a3f1 (patch)
treea14720d5fb21722d2531ad6b50e6071e982bd1b5 /libavcodec/hevcpred_template.c
parent13b3e84a4fc9cf2ecfeaa7a9ed148eda496419a6 (diff)
downloadffmpeg-6265b155bc6dfa9d327273b060af767cc391a3f1.tar.gz
avcodec/hevcpred: 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/hevcpred as well as the corresponding mips code; the latter is untested. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/hevcpred_template.c')
-rw-r--r--libavcodec/hevcpred_template.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/hevcpred_template.c b/libavcodec/hevcpred_template.c
index ca75ec1128..16d1c7f35f 100644
--- a/libavcodec/hevcpred_template.c
+++ b/libavcodec/hevcpred_template.c
@@ -27,7 +27,7 @@
#define POS(x, y) src[(x) + stride * (y)]
-static av_always_inline void FUNC(intra_pred)(HEVCContext *s, int x0, int y0,
+static av_always_inline void FUNC(intra_pred)(HEVCLocalContext *lc, int x0, int y0,
int log2_size, int c_idx)
{
#define PU(x) \
@@ -70,7 +70,7 @@ do { \
else \
a = PIXEL_SPLAT_X4(ptr[i + 3])
- HEVCLocalContext *lc = s->HEVClc;
+ const HEVCContext *const s = lc->parent;
int i;
int hshift = s->ps.sps->hshift[c_idx];
int vshift = s->ps.sps->vshift[c_idx];
@@ -346,9 +346,9 @@ do { \
}
#define INTRA_PRED(size) \
-static void FUNC(intra_pred_ ## size)(HEVCContext *s, int x0, int y0, int c_idx) \
+static void FUNC(intra_pred_ ## size)(HEVCLocalContext *lc, int x0, int y0, int c_idx) \
{ \
- FUNC(intra_pred)(s, x0, y0, size, c_idx); \
+ FUNC(intra_pred)(lc, x0, y0, size, c_idx); \
}
INTRA_PRED(2)