[FFmpeg-cvslog] avcodec/dovi_rpuenc: add `flags` to ff_dovi_rpu_generate()
Niklas Haas
git at videolan.org
Fri Aug 16 12:51:54 EEST 2024
ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Tue Jun 18 17:18:14 2024 +0200| [1e6fdb89bdcb7d8db6f12dc5322a703a0fc995e2] | committer: Niklas Haas
avcodec/dovi_rpuenc: add `flags` to ff_dovi_rpu_generate()
Will be used to control compression, encapsulation etc.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1e6fdb89bdcb7d8db6f12dc5322a703a0fc995e2
---
libavcodec/dovi_rpu.h | 2 +-
libavcodec/dovi_rpuenc.c | 2 +-
libavcodec/libaomenc.c | 2 +-
libavcodec/libsvtav1.c | 2 +-
libavcodec/libx265.c | 3 ++-
5 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/libavcodec/dovi_rpu.h b/libavcodec/dovi_rpu.h
index 205d16ffbc..65a4529106 100644
--- a/libavcodec/dovi_rpu.h
+++ b/libavcodec/dovi_rpu.h
@@ -135,7 +135,7 @@ int ff_dovi_configure(DOVIContext *s, AVCodecContext *avctx);
* including the EMDF header (profile 10) or NAL encapsulation (otherwise).
*/
int ff_dovi_rpu_generate(DOVIContext *s, const AVDOVIMetadata *metadata,
- uint8_t **out_rpu, int *out_size);
+ int flags, uint8_t **out_rpu, int *out_size);
/***************************************************
diff --git a/libavcodec/dovi_rpuenc.c b/libavcodec/dovi_rpuenc.c
index 2a6131eff5..e1a70be42d 100644
--- a/libavcodec/dovi_rpuenc.c
+++ b/libavcodec/dovi_rpuenc.c
@@ -435,7 +435,7 @@ static void generate_ext_v2(PutBitContext *pb, const AVDOVIDmData *dm)
}
int ff_dovi_rpu_generate(DOVIContext *s, const AVDOVIMetadata *metadata,
- uint8_t **out_rpu, int *out_size)
+ int flags, uint8_t **out_rpu, int *out_size)
{
PutBitContext *pb = &(PutBitContext){0};
const AVDOVIRpuDataHeader *hdr;
diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
index dec74ebecd..aa51c89e29 100644
--- a/libavcodec/libaomenc.c
+++ b/libavcodec/libaomenc.c
@@ -1294,7 +1294,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
const AVDOVIMetadata *metadata = (const AVDOVIMetadata *)sd->data;
uint8_t *t35;
int size;
- if ((res = ff_dovi_rpu_generate(&ctx->dovi, metadata, &t35, &size)) < 0)
+ if ((res = ff_dovi_rpu_generate(&ctx->dovi, metadata, 0, &t35, &size)) < 0)
return res;
res = aom_img_add_metadata(rawimg, OBU_METADATA_TYPE_ITUT_T35,
t35, size, AOM_MIF_ANY_FRAME);
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 2fef8c8971..b6db63fd7a 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -541,7 +541,7 @@ static int eb_send_frame(AVCodecContext *avctx, const AVFrame *frame)
const AVDOVIMetadata *metadata = (const AVDOVIMetadata *)sd->data;
uint8_t *t35;
int size;
- if ((ret = ff_dovi_rpu_generate(&svt_enc->dovi, metadata, &t35, &size)) < 0)
+ if ((ret = ff_dovi_rpu_generate(&svt_enc->dovi, metadata, 0, &t35, &size)) < 0)
return ret;
ret = svt_add_metadata(headerPtr, EB_AV1_METADATA_TYPE_ITUT_T35, t35, size);
av_free(t35);
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 3bc3b5a03e..12044ae2cc 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -789,7 +789,8 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
sd = av_frame_get_side_data(pic, AV_FRAME_DATA_DOVI_METADATA);
if (ctx->dovi.cfg.dv_profile && sd) {
const AVDOVIMetadata *metadata = (const AVDOVIMetadata *)sd->data;
- ret = ff_dovi_rpu_generate(&ctx->dovi, metadata, &x265pic.rpu.payload,
+ ret = ff_dovi_rpu_generate(&ctx->dovi, metadata, 0,
+ &x265pic.rpu.payload,
&x265pic.rpu.payloadSize);
if (ret < 0) {
free_picture(ctx, &x265pic);
More information about the ffmpeg-cvslog
mailing list