[FFmpeg-devel] [PATCH v2 09/16] avfilter/vf_scale: add colorspace and transfer property options

Michael Niedermayer michael at niedermayer.cc
Wed Dec 11 03:07:09 EET 2024


Hi

On Fri, Dec 06, 2024 at 03:32:08PM +0100, Niklas Haas wrote:
> From: Niklas Haas <git at haasn.dev>
> 
> In the long run, it would be ideal if we could add these to the avfilter
> negotiation as well, but for now, this is a good start.
> ---
>  doc/filters.texi       | 56 +++++++++++++++++++++++++++++++
>  libavfilter/vf_scale.c | 75 +++++++++++++++++++++++++++++++++++++++++-
>  2 files changed, 130 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/filters.texi b/doc/filters.texi
> index 9068a8a4e7..eb7463db84 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -21189,6 +21189,62 @@ is used by default. Possible values:
>  @item bottom
>  @end table
>  
> + at item in_primaries
> + at item out_primaries
> +Set in/output RGB primaries.
> +
> +This allows the autodetected value to be overridden as well as allows forcing
> +a specific value used for the output and encoder. Possible values:
> +
> + at table @samp
> + at item auto/unknown
> +Choose automatically.
> +
> + at item bt709
> + at item bt470m
> + at item bt470bg
> + at item smpte170m
> + at item smpte240m
> + at item film
> + at item bt2020
> + at item smpte428
> + at item smpte431
> + at item smpte432
> + at item jedec-p22
> + at item ebu3213
> + at end table
> +
> + at item in_transfer
> + at item out_transfer
> +Set in/output transfer response curve (TRC).
> +
> +This allows the autodetected value to be overridden as well as allows forcing
> +a specific value used for the output and encoder. Possible values:
> +
> + at table @samp
> + at item auto/unknown
> +Choose automatically.
> +
> + at item bt709
> + at item bt470m
> + at item gamma22
> + at item bt470bg
> + at item gamma28
> + at item smpte170m
> + at item smpte240m
> + at item linear
> + at item iec61966-2-1
> + at item srgb
> + at item iec61966-2-4
> + at item xvycc
> + at item bt1361e
> + at item bt2020-10
> + at item bt2020-12
> + at item smpte2084
> + at item smpte428
> + at item arib-std-b67
> + at end table
> +

[...]

> @@ -1084,6 +1119,44 @@ static const AVOption scale_options[] = {
>          {"top",           NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCHROMA_LOC_TOP},         0, 0, FLAGS, .unit = "chroma_loc"},
>          {"bottomleft",    NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCHROMA_LOC_BOTTOMLEFT},  0, 0, FLAGS, .unit = "chroma_loc"},
>          {"bottom",        NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCHROMA_LOC_BOTTOM},      0, 0, FLAGS, .unit = "chroma_loc"},
> +    {  "in_primaries", "set input primaries",   OFFSET(in_primaries),  AV_OPT_TYPE_INT, { .i64 = -1 }, -1, AVCOL_PRI_NB-1, .flags = FLAGS, .unit = "primaries" },
> +    { "out_primaries", "set output primaries",  OFFSET(out_primaries), AV_OPT_TYPE_INT, { .i64 = AVCOL_PRI_UNSPECIFIED }, 0, AVCOL_PRI_NB-1, .flags = FLAGS, .unit = "primaries"},
> +        {"auto",         NULL,  0, AV_OPT_TYPE_CONST, {.i64=-1},                        0, 0, FLAGS, .unit = "primaries"},
> +        {"bt709",        NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_PRI_BT709},           0, 0, FLAGS, .unit = "primaries"},
> +        {"unknown",      NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_PRI_UNSPECIFIED},     0, 0, FLAGS, .unit = "primaries"},

please document the meaning difference in the documentation for auto vs unspecified

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Take away the freedom of one citizen and you will be jailed, take away
the freedom of all citizens and you will be congratulated by your peers
in Parliament.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241211/d5f995f6/attachment.sig>


More information about the ffmpeg-devel mailing list