aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vvc/ps.c
diff options
context:
space:
mode:
authorFei Wang <fei.w.wang@intel.com>2024-10-28 16:55:23 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2024-11-01 12:13:07 +0800
commita94aa2d61e3f67a93c3e01f0107803a30c387a58 (patch)
treef1bccc4d90211c9468df70e883baa3adc2985eef /libavcodec/vvc/ps.c
parent15a75e8e0425309fdc5a2772ebf622b3705f914a (diff)
downloadffmpeg-a94aa2d61e3f67a93c3e01f0107803a30c387a58.tar.gz
lavc/vvc_ps: Add alf raw syntax into VVCALF
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Diffstat (limited to 'libavcodec/vvc/ps.c')
-rw-r--r--libavcodec/vvc/ps.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/vvc/ps.c b/libavcodec/vvc/ps.c
index ff9a6c7a15..f32f1cc5a1 100644
--- a/libavcodec/vvc/ps.c
+++ b/libavcodec/vvc/ps.c
@@ -1043,13 +1043,21 @@ static void alf_derive(VVCALF *alf, const H266RawAPS *aps)
alf_cc(alf, aps);
}
+static void alf_free(FFRefStructOpaque unused, void *obj)
+{
+ VVCALF *alf = obj;
+
+ ff_refstruct_unref(&alf->r);
+}
+
static int aps_decode_alf(const VVCALF **alf, const H266RawAPS *aps)
{
- VVCALF *a = ff_refstruct_allocz(sizeof(*a));
+ VVCALF *a = ff_refstruct_alloc_ext(sizeof(*a), 0, NULL, alf_free);
if (!a)
return AVERROR(ENOMEM);
alf_derive(a, aps);
+ ff_refstruct_replace(&a->r, aps);
ff_refstruct_replace(alf, a);
ff_refstruct_unref(&a);