[FFmpeg-cvslog] avcodec/av1dec: make CBS parse only the OBU types we care about
James Almer
git at videolan.org
Fri Mar 10 21:30:39 EET 2023
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Mar 7 09:03:26 2023 -0300| [68a858fcc913c4939798c7b6580a814184a1089b] | committer: James Almer
avcodec/av1dec: make CBS parse only the OBU types we care about
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=68a858fcc913c4939798c7b6580a814184a1089b
---
libavcodec/av1dec.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 314c721ac2..a80e37e33f 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -752,6 +752,16 @@ static int update_context_with_frame_header(AVCodecContext *avctx,
return 0;
}
+static const CodedBitstreamUnitType decompose_unit_types[] = {
+ AV1_OBU_FRAME,
+ AV1_OBU_FRAME_HEADER,
+ AV1_OBU_METADATA,
+ AV1_OBU_REDUNDANT_FRAME_HEADER,
+ AV1_OBU_SEQUENCE_HEADER,
+ AV1_OBU_TEMPORAL_DELIMITER,
+ AV1_OBU_TILE_GROUP,
+};
+
static av_cold int av1_decode_init(AVCodecContext *avctx)
{
AV1DecContext *s = avctx->priv_data;
@@ -781,6 +791,9 @@ static av_cold int av1_decode_init(AVCodecContext *avctx)
if (ret < 0)
return ret;
+ s->cbc->decompose_unit_types = decompose_unit_types;
+ s->cbc->nb_decompose_unit_types = FF_ARRAY_ELEMS(decompose_unit_types);
+
s->itut_t35_fifo = av_fifo_alloc2(1, sizeof(AV1RawMetadataITUTT35),
AV_FIFO_FLAG_AUTO_GROW);
if (!s->itut_t35_fifo)
More information about the ffmpeg-cvslog
mailing list