diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-02-24 18:05:41 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-26 19:26:05 +0100 |
commit | 43e5e3c077bcc41b54a3d306ea149f2895cabb32 (patch) | |
tree | b0b86af691d6067601de0c399ad2106dd94441bf | |
parent | b9de1303a6414174ab2f3bccefa801bfabcf0f88 (diff) | |
download | ffmpeg-43e5e3c077bcc41b54a3d306ea149f2895cabb32.tar.gz |
colormatrix: Accept bt601 aliases as input
As far as matrix coefficients are concerned, BT470BG and SMPTE170M
match BT601. This is similar to the check performed in vf_scale.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
-rw-r--r-- | libavfilter/vf_colormatrix.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c index df78391507..fc335d7bbe 100644 --- a/libavfilter/vf_colormatrix.c +++ b/libavfilter/vf_colormatrix.c @@ -82,6 +82,8 @@ static const AVOption colormatrix_options[] = { { "bt709", "set BT.709 colorspace", 0, AV_OPT_TYPE_CONST, {.i64=COLOR_MODE_BT709}, .flags=FLAGS, .unit="color_mode" }, { "fcc", "set FCC colorspace ", 0, AV_OPT_TYPE_CONST, {.i64=COLOR_MODE_FCC}, .flags=FLAGS, .unit="color_mode" }, { "bt601", "set BT.601 colorspace", 0, AV_OPT_TYPE_CONST, {.i64=COLOR_MODE_BT601}, .flags=FLAGS, .unit="color_mode" }, + { "bt470", "set BT.470 colorspace", 0, AV_OPT_TYPE_CONST, {.i64=COLOR_MODE_BT601}, .flags=FLAGS, .unit="color_mode" }, + { "smpte170m", "set SMTPE-170M colorspace", 0, AV_OPT_TYPE_CONST, {.i64=COLOR_MODE_BT601}, .flags=FLAGS, .unit="color_mode" }, { "smpte240m", "set SMPTE-240M colorspace", 0, AV_OPT_TYPE_CONST, {.i64=COLOR_MODE_SMPTE240M}, .flags=FLAGS, .unit="color_mode" }, { NULL } }; @@ -351,6 +353,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) case AVCOL_SPC_FCC : source = COLOR_MODE_FCC ; break; case AVCOL_SPC_SMPTE240M : source = COLOR_MODE_SMPTE240M ; break; case AVCOL_SPC_BT470BG : source = COLOR_MODE_BT601 ; break; + case AVCOL_SPC_SMPTE170M : source = COLOR_MODE_BT601 ; break; default : av_log(ctx, AV_LOG_ERROR, "Input frame does not specify a supported colorspace, and none has been specified as source either\n"); av_frame_free(&out); |