summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libx264.c5
-rw-r--r--libavcodec/libx265.c4
-rw-r--r--libavcodec/version.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 2b680abf21..9836818b99 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -104,6 +104,7 @@ typedef struct X264Context {
int chroma_offset;
int scenechange_threshold;
int noise_reduction;
+ int udu_sei;
AVDictionary *x264_params;
@@ -464,6 +465,7 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
}
}
+ if (x4->udu_sei) {
for (int j = 0; j < frame->nb_side_data; j++) {
AVFrameSideData *side_data = frame->side_data[j];
void *tmp;
@@ -487,6 +489,7 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
sei_payload->payload_type = SEI_TYPE_USER_DATA_UNREGISTERED;
sei->num_payloads++;
}
+ }
}
do {
@@ -1168,7 +1171,7 @@ static const AVOption options[] = {
{ "chromaoffset", "QP difference between chroma and luma", OFFSET(chroma_offset), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, VE },
{ "sc_threshold", "Scene change threshold", OFFSET(scenechange_threshold), AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX, VE },
{ "noise_reduction", "Noise reduction", OFFSET(noise_reduction), AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX, VE },
-
+ { "udu_sei", "Use user data unregistered SEI if available", OFFSET(udu_sei), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
{ "x264-params", "Override the x264 configuration using a :-separated list of key=value parameters", OFFSET(x264_params), AV_OPT_TYPE_DICT, { 0 }, 0, 0, VE },
{ NULL },
};
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 7dd70a3450..47d0103a40 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -54,6 +54,7 @@ typedef struct libx265Context {
void *sei_data;
int sei_data_size;
+ int udu_sei;
/**
* If the encoder does not support ROI then warn the first time we
@@ -543,6 +544,7 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
memcpy(x265pic.userData, &pic->reordered_opaque, sizeof(pic->reordered_opaque));
}
+ if (ctx->udu_sei) {
for (i = 0; i < pic->nb_side_data; i++) {
AVFrameSideData *side_data = pic->side_data[i];
void *tmp;
@@ -568,6 +570,7 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
sei_payload->payloadType = SEI_TYPE_USER_DATA_UNREGISTERED;
sei->numPayloads++;
}
+ }
}
ret = ctx->api->encoder_encode(ctx->encoder, &nal, &nnal,
@@ -708,6 +711,7 @@ static const AVOption options[] = {
{ "preset", "set the x265 preset", OFFSET(preset), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE },
{ "tune", "set the x265 tune parameter", OFFSET(tune), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE },
{ "profile", "set the x265 profile", OFFSET(profile), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE },
+ { "udu_sei", "Use user data unregistered SEI if available", OFFSET(udu_sei), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
{ "x265-params", "set the x265 configuration using a :-separated list of key=value parameters", OFFSET(x265_opts), AV_OPT_TYPE_DICT, { 0 }, 0, 0, VE },
{ NULL }
};
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 580b099b36..45c6d13ae7 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 59
#define LIBAVCODEC_VERSION_MINOR 15
-#define LIBAVCODEC_VERSION_MICRO 101
+#define LIBAVCODEC_VERSION_MICRO 102
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \