[FFmpeg-devel] [PATCH v2] avfilter: Add tonemap vaapi filter for H2S
Carl Eugen Hoyos
ceffmpeg at gmail.com
Wed Nov 27 12:14:16 EET 2019
Am Mi., 27. Nov. 2019 um 10:51 Uhr schrieb Xinpeng Sun <xinpeng.sun at intel.com>:
>
> It performs HDR(High Dynamic Range) to SDR(Standard Dynamic Range) conversion
> with tone-mapping. It only supports HDR10 as input temporarily.
>
> An example command to use this filter with vaapi codecs:
> FFMPEG -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi \
> -i INPUT -vf 'tonemap_vaapi=format=p010' -c:v hevc_vaapi -profile 2 OUTPUT
Why is HDR10 -> P010 (10bit -> 10 bit) called H2S?
[...]
> + if (input_frame->color_trc != AVCOL_TRC_SMPTE2084) {
> + av_log(avctx, AV_LOG_ERROR, "Only support HDR10 as input for vaapi tone-mapping\n");
> + return AVERROR(EINVAL);
Shouldn't this also accept unknown trc?
(With a warning)
[...]
> + { "format", "Output pixel format set", OFFSET(output_format_string), AV_OPT_TYPE_STRING, .flags = FLAGS, "format" },
Sorry if I misremember how this is done for other filters:
Shouldn't the output format be set by the filter chain or the format filter?
Carl Eugen
More information about the ffmpeg-devel
mailing list