From: Niklas Haas <ffmpeg@haasn.xyz> To: ffmpeg-devel@ffmpeg.org Cc: Niklas Haas <git@haasn.dev> Subject: [FFmpeg-devel] [PATCH 3/4] avcodec/libaomenc: encode dovi RPUs as T.35 metadata Date: Tue, 19 Mar 2024 20:16:41 +0100 Message-ID: <20240319191642.95217-3-ffmpeg@haasn.xyz> (raw) In-Reply-To: <20240319191642.95217-1-ffmpeg@haasn.xyz> From: Niklas Haas <git@haasn.dev> Using the new conversion function implemented in the previous commit. --- libavcodec/libaomenc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index 8c1f84cc9fb..2c8fe524fa7 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -42,6 +42,7 @@ #include "avcodec.h" #include "bsf.h" #include "codec_internal.h" +#include "dovi_rpu.h" #include "encode.h" #include "internal.h" #include "libaom.h" @@ -1283,6 +1284,7 @@ static int aom_encode(AVCodecContext *avctx, AVPacket *pkt, aom_enc_frame_flags_t flags = 0; if (frame) { + AVFrameSideData *sd; rawimg = &ctx->rawimg; rawimg->planes[AOM_PLANE_Y] = frame->data[0]; rawimg->planes[AOM_PLANE_U] = frame->data[1]; @@ -1318,6 +1320,17 @@ FF_ENABLE_DEPRECATION_WARNINGS break; } + if ((sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DOVI_RPU_BUFFER))) { + AVBufferRef *t35; + if ((res = ff_dovi_rpu_to_t35(avctx, sd->data, sd->size, &t35)) < 0) + return res; + res = aom_img_add_metadata(rawimg, OBU_METADATA_TYPE_ITUT_T35, + t35->data, t35->size, AOM_MIF_ANY_FRAME); + av_buffer_unref(&t35); + if (res != AOM_CODEC_OK) + return AVERROR(ENOMEM); + } + if (frame->pict_type == AV_PICTURE_TYPE_I) flags |= AOM_EFLAG_FORCE_KF; } -- 2.44.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2024-03-19 19:17 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-19 19:16 [FFmpeg-devel] [PATCH 1/4] fftools/ffmpeg_enc: strip DOVI config record for AV1 Niklas Haas 2024-03-19 19:16 ` [FFmpeg-devel] [PATCH 2/4] avcodec/dovi_rpu: implement T.35 payload synthesis Niklas Haas 2024-03-19 19:16 ` Niklas Haas [this message] 2024-03-19 19:16 ` [FFmpeg-devel] [PATCH 4/4] avcodec/libx265: encode dovi RPUs Niklas Haas 2024-03-19 21:39 ` Derek Buitenhuis [not found] ` <9183F034-A7F5-4683-A932-273E15B9886C@cosmin.at> 2024-03-19 21:59 ` Cosmin Stejerean via ffmpeg-devel 2024-03-19 23:04 ` Niklas Haas 2024-03-19 23:19 ` Vittorio Giovara 2024-03-21 12:09 ` Niklas Haas 2024-03-20 19:30 ` Michael Niedermayer 2024-03-20 21:22 ` Jan Ekström 2024-03-21 12:02 ` Niklas Haas 2024-03-21 10:16 ` [FFmpeg-devel] [PATCH 1/4] fftools/ffmpeg_enc: strip DOVI config record for AV1 Anton Khirnov 2024-03-21 12:11 ` Niklas Haas 2024-03-22 9:41 ` Anton Khirnov 2024-03-22 13:08 ` Niklas Haas 2024-03-22 17:04 ` Niklas Haas 2024-03-23 17:45 ` Niklas Haas
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240319191642.95217-3-ffmpeg@haasn.xyz \ --to=ffmpeg@haasn.xyz \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=git@haasn.dev \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git