[FFmpeg-devel] [PATCH 06/22] avcodec/dovi_rpuenc: add `flags` to ff_dovi_rpu_generate()
Niklas Haas
ffmpeg at haasn.xyz
Sun Jul 28 13:25:11 EEST 2024
From: Niklas Haas <git at haasn.dev>
Will be used to control compression, encapsulation etc.
---
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 0dc7ab6eeb..4302c3d587 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -783,7 +783,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);
--
2.45.2
More information about the ffmpeg-devel
mailing list