aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rawenc.c
diff options
context:
space:
mode:
authorThomas Siedel <thomas.ff@spin-digital.com>2023-03-21 16:01:20 +0100
committerJames Almer <jamrial@gmail.com>2023-06-29 14:12:50 -0300
commit45a8a62df9b9c6c93c003b177ce0190860c1f8e8 (patch)
tree71d6ea121fb19619806774642982377d380e8ee9 /libavformat/rawenc.c
parentac2b25f4e5ad0f03cf2a17c82defe2b1ba7a02b1 (diff)
downloadffmpeg-45a8a62df9b9c6c93c003b177ce0190860c1f8e8.tar.gz
avformat/rawenc: add H266/VVC muxer
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/rawenc.c')
-rw-r--r--libavformat/rawenc.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index 70d6322c53..f916db13a2 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -378,6 +378,29 @@ const FFOutputFormat ff_h264_muxer = {
};
#endif
+#if CONFIG_VVC_MUXER
+static int vvc_check_bitstream(AVFormatContext *s, AVStream *st,
+ const AVPacket *pkt)
+{
+ if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 &&
+ AV_RB24(pkt->data) != 0x000001)
+ return ff_stream_add_bitstream_filter(st, "vvc_mp4toannexb", NULL);
+ return 1;
+}
+
+const FFOutputFormat ff_vvc_muxer = {
+ .p.name = "vvc",
+ .p.long_name = NULL_IF_CONFIG_SMALL("raw H.266/VVC video"),
+ .p.extensions = "vvc,h266,266",
+ .p.audio_codec = AV_CODEC_ID_NONE,
+ .p.video_codec = AV_CODEC_ID_VVC,
+ .init = force_one_stream,
+ .write_packet = ff_raw_write_packet,
+ .check_bitstream = vvc_check_bitstream,
+ .p.flags = AVFMT_NOTIMESTAMPS,
+};
+#endif
+
#if CONFIG_HEVC_MUXER
static int hevc_check_bitstream(AVFormatContext *s, AVStream *st,
const AVPacket *pkt)