1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

vf_zscale: Add more supported input properties

Bump the minimum version necessary in the configure file.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
This commit is contained in:
Vittorio Giovara 2017-11-28 13:56:06 -05:00
parent 3e0560b054
commit 002db7d49a
2 changed files with 52 additions and 1 deletions

2
configure vendored
View File

@ -5929,7 +5929,7 @@ enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get
require_cpp_condition x265.h "X265_BUILD >= 68"
enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
enabled libzimg && require_pkg_config libzimg "zimg >= 2.3.0" zimg.h zimg_get_api_version
enabled libzimg && require_pkg_config libzimg "zimg >= 2.6.2" zimg.h zimg_get_api_version
enabled libzmq && require_pkg_config libzmq libzmq zmq.h zmq_ctx_new
enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new &&
{ check_cpp_condition libzvbi.h "VBI_VERSION_MAJOR > 0 || VBI_VERSION_MINOR > 2 || VBI_VERSION_MINOR == 2 && VBI_VERSION_MICRO >= 28" ||

View File

@ -353,16 +353,26 @@ static int convert_matrix(enum AVColorSpace colorspace)
return ZIMG_MATRIX_709;
case AVCOL_SPC_UNSPECIFIED:
return ZIMG_MATRIX_UNSPECIFIED;
case AVCOL_SPC_FCC:
return ZIMG_MATRIX_FCC;
case AVCOL_SPC_BT470BG:
return ZIMG_MATRIX_470BG;
case AVCOL_SPC_SMPTE170M:
return ZIMG_MATRIX_170M;
case AVCOL_SPC_SMPTE240M:
return ZIMG_MATRIX_240M;
case AVCOL_SPC_YCGCO:
return ZIMG_MATRIX_YCGCO;
case AVCOL_SPC_BT2020_NCL:
return ZIMG_MATRIX_2020_NCL;
case AVCOL_SPC_BT2020_CL:
return ZIMG_MATRIX_2020_CL;
case AVCOL_SPC_CHROMA_DERIVED_NCL:
return ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL;
case AVCOL_SPC_CHROMA_DERIVED_CL:
return ZIMG_MATRIX_CHROMATICITY_DERIVED_CL;
case AVCOL_SPC_ICTCP:
return ZIMG_MATRIX_ICTCP;
}
return ZIMG_MATRIX_UNSPECIFIED;
}
@ -374,10 +384,22 @@ static int convert_trc(enum AVColorTransferCharacteristic color_trc)
return ZIMG_TRANSFER_UNSPECIFIED;
case AVCOL_TRC_BT709:
return ZIMG_TRANSFER_709;
case AVCOL_TRC_GAMMA22:
return ZIMG_TRANSFER_470_M;
case AVCOL_TRC_GAMMA28:
return ZIMG_TRANSFER_470_BG;
case AVCOL_TRC_SMPTE170M:
return ZIMG_TRANSFER_601;
case AVCOL_TRC_SMPTE240M:
return ZIMG_TRANSFER_240M;
case AVCOL_TRC_LINEAR:
return ZIMG_TRANSFER_LINEAR;
case AVCOL_TRC_LOG:
return ZIMG_TRANSFER_LOG_100;
case AVCOL_TRC_LOG_SQRT:
return ZIMG_TRANSFER_LOG_316;
case AVCOL_TRC_IEC61966_2_4:
return ZIMG_TRANSFER_IEC_61966_2_4;
case AVCOL_TRC_BT2020_10:
return ZIMG_TRANSFER_2020_10;
case AVCOL_TRC_BT2020_12:
@ -399,14 +421,26 @@ static int convert_primaries(enum AVColorPrimaries color_primaries)
return ZIMG_PRIMARIES_UNSPECIFIED;
case AVCOL_PRI_BT709:
return ZIMG_PRIMARIES_709;
case AVCOL_PRI_BT470M:
return ZIMG_PRIMARIES_470_M;
case AVCOL_PRI_BT470BG:
return ZIMG_PRIMARIES_470_BG;
case AVCOL_PRI_SMPTE170M:
return ZIMG_PRIMARIES_170M;
case AVCOL_PRI_SMPTE240M:
return ZIMG_PRIMARIES_240M;
case AVCOL_PRI_FILM:
return ZIMG_PRIMARIES_FILM;
case AVCOL_PRI_BT2020:
return ZIMG_PRIMARIES_2020;
case AVCOL_PRI_SMPTE428:
return ZIMG_PRIMARIES_ST428;
case AVCOL_PRI_SMPTE431:
return ZIMG_PRIMARIES_ST431_2;
case AVCOL_PRI_SMPTE432:
return ZIMG_PRIMARIES_ST432_1;
case AVCOL_PRI_JEDEC_P22:
return ZIMG_PRIMARIES_EBU3213_E;
}
return ZIMG_PRIMARIES_UNSPECIFIED;
}
@ -745,10 +779,16 @@ static const AVOption zscale_options[] = {
{ "2020", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_2020}, 0, 0, FLAGS, "primaries" },
{ "unknown", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_UNSPECIFIED}, 0, 0, FLAGS, "primaries" },
{ "bt709", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_709}, 0, 0, FLAGS, "primaries" },
{ "bt470m", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_470_M}, 0, 0, FLAGS, "primaries" },
{ "bt470bg", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_470_BG}, 0, 0, FLAGS, "primaries" },
{ "smpte170m", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_170M}, 0, 0, FLAGS, "primaries" },
{ "smpte240m", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_240M}, 0, 0, FLAGS, "primaries" },
{ "film", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_FILM}, 0, 0, FLAGS, "primaries" },
{ "bt2020", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_2020}, 0, 0, FLAGS, "primaries" },
{ "smpte428", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_ST428}, 0, 0, FLAGS, "primaries" },
{ "smpte431", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_ST431_2}, 0, 0, FLAGS, "primaries" },
{ "smpte432", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_ST432_1}, 0, 0, FLAGS, "primaries" },
{ "jedec-p22", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_EBU3213_E}, 0, 0, FLAGS, "primaries" },
{ "transfer", "set transfer characteristic", OFFSET(trc), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, FLAGS, "transfer" },
{ "t", "set transfer characteristic", OFFSET(trc), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, FLAGS, "transfer" },
{ "input", 0, 0, AV_OPT_TYPE_CONST, {.i64 = -1}, 0, 0, FLAGS, "transfer" },
@ -759,12 +799,17 @@ static const AVOption zscale_options[] = {
{ "2020_10", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_2020_10}, 0, 0, FLAGS, "transfer" },
{ "2020_12", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_2020_12}, 0, 0, FLAGS, "transfer" },
{ "unknown", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_UNSPECIFIED}, 0, 0, FLAGS, "transfer" },
{ "bt470m", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_470_M}, 0, 0, FLAGS, "transfer" },
{ "bt470bg", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_470_BG}, 0, 0, FLAGS, "transfer" },
{ "smpte170m", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_601}, 0, 0, FLAGS, "transfer" },
{ "bt709", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_709}, 0, 0, FLAGS, "transfer" },
{ "linear", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_LINEAR}, 0, 0, FLAGS, "transfer" },
{ "log100", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_LOG_100}, 0, 0, FLAGS, "transfer" },
{ "log316", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_LOG_316}, 0, 0, FLAGS, "transfer" },
{ "bt2020-10", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_2020_10}, 0, 0, FLAGS, "transfer" },
{ "bt2020-12", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_2020_12}, 0, 0, FLAGS, "transfer" },
{ "smpte2084", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_ST2084}, 0, 0, FLAGS, "transfer" },
{ "iec61966-2-4", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_IEC_61966_2_4},0, 0, FLAGS, "transfer" },
{ "iec61966-2-1", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_IEC_61966_2_1},0, 0, FLAGS, "transfer" },
{ "arib-std-b67", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_ARIB_B67}, 0, 0, FLAGS, "transfer" },
{ "matrix", "set colorspace matrix", OFFSET(colorspace), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, FLAGS, "matrix" },
@ -777,12 +822,18 @@ static const AVOption zscale_options[] = {
{ "2020_ncl", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_2020_NCL}, 0, 0, FLAGS, "matrix" },
{ "2020_cl", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_2020_CL}, 0, 0, FLAGS, "matrix" },
{ "unknown", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_UNSPECIFIED}, 0, 0, FLAGS, "matrix" },
{ "gbr", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_RGB}, 0, 0, FLAGS, "matrix" },
{ "bt709", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_709}, 0, 0, FLAGS, "matrix" },
{ "fcc", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_FCC}, 0, 0, FLAGS, "matrix" },
{ "bt470bg", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_470BG}, 0, 0, FLAGS, "matrix" },
{ "smpte170m", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_170M}, 0, 0, FLAGS, "matrix" },
{ "smpte2400m", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_240M}, 0, 0, FLAGS, "matrix" },
{ "ycgco", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_YCGCO}, 0, 0, FLAGS, "matrix" },
{ "bt2020nc", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_2020_NCL}, 0, 0, FLAGS, "matrix" },
{ "bt2020c", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_2020_CL}, 0, 0, FLAGS, "matrix" },
{ "chroma-derived-nc",0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL}, 0, 0, FLAGS, "matrix" },
{ "chroma-derived-c", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_CHROMATICITY_DERIVED_CL}, 0, 0, FLAGS, "matrix" },
{ "ictcp", 0, 0, AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_ICTCP}, 0, 0, FLAGS, "matrix" },
{ "in_range", "set input color range", OFFSET(range_in), AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_RANGE_FULL, FLAGS, "range" },
{ "rangein", "set input color range", OFFSET(range_in), AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_RANGE_FULL, FLAGS, "range" },
{ "rin", "set input color range", OFFSET(range_in), AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_RANGE_FULL, FLAGS, "range" },