On Thu, 12 Dec 2019, Ruiling Song wrote:

From: Xinpeng Sun <xinpeng....@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

Signed-off-by: Xinpeng Sun <xinpeng....@intel.com>
Signed-off-by: Zachary Zhou <zachary.z...@intel.com>
Signed-off-by: Ruiling Song <ruiling.s...@intel.com>
---
When I re-think about the document part. I find it is not necessary to repeat
how to set up vaapi device in this filter part. There is already good 
explanation
of it(https://trac.ffmpeg.org/wiki/Hardware/VAAPI), so I add a link to it.
I only make code changes requested by Vittoria and me. So if no further comment,
I am going to apply the patch next week. Thanks!

Ruiling

configure                      |   2 +
doc/filters.texi               |  59 +++++
libavfilter/Makefile           |   1 +
libavfilter/allfilters.c       |   1 +
libavfilter/vf_tonemap_vaapi.c | 419 +++++++++++++++++++++++++++++++++
5 files changed, 482 insertions(+)
create mode 100644 libavfilter/vf_tonemap_vaapi.c

diff --git a/configure b/configure
index 42e7df3941..74f2d38317 100755
--- a/configure
+++ b/configure
@@ -3576,6 +3576,7 @@ tinterlace_filter_deps="gpl"
tinterlace_merge_test_deps="tinterlace_filter"
tinterlace_pad_test_deps="tinterlace_filter"
tonemap_filter_deps="const_nan"
+tonemap_vaapi_filter_deps="vaapi 
VAProcPipelineParameterBuffer_output_hdr_metadata"
tonemap_opencl_filter_deps="opencl const_nan"
transpose_opencl_filter_deps="opencl"
transpose_vaapi_filter_deps="vaapi VAProcPipelineCaps_rotation_flags"
@@ -6577,6 +6578,7 @@ if enabled vaapi; then

    check_type "va/va.h va/va_dec_hevc.h" "VAPictureParameterBufferHEVC"
    check_struct "va/va.h" "VADecPictureParameterBufferVP9" bit_depth
+    check_struct "va/va.h va/va_vpp.h" "VAProcPipelineParameterBuffer" 
output_hdr_metadata

This check does not seem to be enough, I am getting errors like this for libva 2.3.0:

libavfilter/vf_tonemap_vaapi.c: In function ‘tonemap_vaapi_set_filter_params’: libavfilter/vf_tonemap_vaapi.c:156:5: error: unknown type name ‘VAProcFilterParameterBufferHDRToneMapping’; did you mean ‘VAProcFilterParameterBufferDeinterlacing’?
     VAProcFilterParameterBufferHDRToneMapping *hdrtm_param;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     VAProcFilterParameterBufferDeinterlacing


Regards,
Marton
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to