mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
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>
This commit is contained in:
parent
b9de1303a6
commit
43e5e3c077
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user