diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-04 11:59:16 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-10-07 22:35:05 +0200 |
commit | 3e9b8d14e5d0df72765a1c9ca683c9d0f1d51e1a (patch) | |
tree | fd1b7cbc5358212171beb26f98e21cc0bf02216e /libavcodec/av1dec.h | |
parent | 56dd585146288070c98a9429ae85dc3551940a4b (diff) | |
download | ffmpeg-3e9b8d14e5d0df72765a1c9ca683c9d0f1d51e1a.tar.gz |
avcodec/cbs: Use RefStruct-API for unit content
This avoids allocations and error checks etc. as well
as duplicate pointer lists in the CodedBitstreamFooContexts.
It also avoids casting const away for use as opaque,
as the RefStruct API supports const opaques.
The fact that some of the units are not refcounted
(i.e. they are sometimes part of an encoding context
like VAAPIEncodeH264Context) meant that CodedBitstreamUnit
still contains two pointers, one to the content
and another ownership pointer, replacing the AVBufferRef* pointer.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/av1dec.h')
-rw-r--r-- | libavcodec/av1dec.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/av1dec.h b/libavcodec/av1dec.h index 59ffed1d9b..acbeec4af3 100644 --- a/libavcodec/av1dec.h +++ b/libavcodec/av1dec.h @@ -38,7 +38,7 @@ typedef struct AV1Frame { AVBufferRef *hwaccel_priv_buf; void *hwaccel_picture_private; - AVBufferRef *header_ref; + AV1RawOBU *header_ref; ///< RefStruct reference backing raw_frame_header. AV1RawFrameHeader *raw_frame_header; int temporal_id; @@ -71,15 +71,15 @@ typedef struct AV1DecContext { CodedBitstreamFragment current_obu; AVPacket *pkt; - AVBufferRef *seq_ref; + AV1RawOBU *seq_ref; ///< RefStruct reference backing raw_seq AV1RawSequenceHeader *raw_seq; - AVBufferRef *header_ref; + AV1RawOBU *header_ref; ///< RefStruct reference backing raw_frame_header AV1RawFrameHeader *raw_frame_header; TileGroupInfo *tile_group_info; - AVBufferRef *cll_ref; + AV1RawOBU *cll_ref; ///< RefStruct reference backing cll AV1RawMetadataHDRCLL *cll; - AVBufferRef *mdcv_ref; + AV1RawOBU *mdcv_ref; ///< RefStruct reference backing mdcv AV1RawMetadataHDRMDCV *mdcv; AVFifo *itut_t35_fifo; |