Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2019-07-28 21:23:16 +0300
committerMark Thompson <sw@jkqxz.net>2019-07-29 21:57:09 +0300
commitb123d0780ec26456b08cd50e1062d464262ceb38 (patch)
tree4a3584f5fc8e259868de5431cd5820aa10e8029e /libavcodec/h264_metadata_bsf.c
parentf9b8503639c0ff90846f07c92e2fe7836690dd0c (diff)
h264_metadata: Support overscan_appropriate_flag
Fixes #8041.
Diffstat (limited to 'libavcodec/h264_metadata_bsf.c')
-rw-r--r--libavcodec/h264_metadata_bsf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c
index 3684e6bf7f..5de74be9d6 100644
--- a/libavcodec/h264_metadata_bsf.c
+++ b/libavcodec/h264_metadata_bsf.c
@@ -57,6 +57,8 @@ typedef struct H264MetadataContext {
AVRational sample_aspect_ratio;
+ int overscan_appropriate_flag;
+
int video_format;
int video_full_range_flag;
int colour_primaries;
@@ -129,6 +131,11 @@ static int h264_metadata_update_sps(AVBSFContext *bsf,
} \
} while (0)
+ if (ctx->overscan_appropriate_flag >= 0) {
+ SET_VUI_FIELD(overscan_appropriate_flag);
+ sps->vui.overscan_info_present_flag = 1;
+ }
+
if (ctx->video_format >= 0 ||
ctx->video_full_range_flag >= 0 ||
ctx->colour_primaries >= 0 ||
@@ -630,6 +637,10 @@ static const AVOption h264_metadata_options[] = {
OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL,
{ .dbl = 0.0 }, 0, 65535, FLAGS },
+ { "overscan_appropriate_flag", "Set VUI overscan appropriate flag",
+ OFFSET(overscan_appropriate_flag), AV_OPT_TYPE_INT,
+ { .i64 = -1 }, -1, 1, FLAGS },
+
{ "video_format", "Set video format (table E-2)",
OFFSET(video_format), AV_OPT_TYPE_INT,
{ .i64 = -1 }, -1, 7, FLAGS},