[FFmpeg-devel] [PATCH v1] avfilter: Add tonemap vaapi filter for H2S

Michael Niedermayer michael at niedermayer.cc
Wed Nov 13 19:12:22 EET 2019


On Tue, Nov 12, 2019 at 04:59:48PM +0800, Xinpeng Sun wrote:
> It performs HDR(High Dynamic Range) to SDR(Standard Dynamic Range) conversion
> with tone-mapping. It supports HDR10 only as input temporarily.
> 
> H2S: P010 -> NV12
> 
> 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=h2s,hwdownload,format=nv12' -pix_fmt nv12 \
> -f rawvideo -y OUTPUT
> 
> Signed-off-by: Xinpeng Sun <xinpeng.sun at intel.com>
> Signed-off-by: Zachary Zhou <zachary.zhou at intel.com>

i hope i didnt miss any dependant patches but
fails to build

libavfilter/vf_tonemap_vaapi.c:43:5: error: unknown type name ‘VAHdrMetaDataHDR10’
     VAHdrMetaDataHDR10  in_metadata;
     ^
libavfilter/vf_tonemap_vaapi.c: In function ‘tonemap_vaapi_set_filter_params’:
libavfilter/vf_tonemap_vaapi.c:54:5: error: unknown type name ‘VAProcFilterParameterBufferHDRToneMapping’
     VAProcFilterParameterBufferHDRToneMapping *hdrtm_param;
     ^
libavfilter/vf_tonemap_vaapi.c:65:23: error: request for member ‘data’ in something not a structure or union
     memcpy(hdrtm_param->data.metadata, &ctx->in_metadata, sizeof(VAHdrMetaDataHDR10));
                       ^
libavfilter/vf_tonemap_vaapi.c:65:66: error: ‘VAHdrMetaDataHDR10’ undeclared (first use in this function)
     memcpy(hdrtm_param->data.metadata, &ctx->in_metadata, sizeof(VAHdrMetaDataHDR10));
                                                                  ^
libavfilter/vf_tonemap_vaapi.c:65:66: note: each undeclared identifier is reported only once for each function it appears in
libavfilter/vf_tonemap_vaapi.c: In function ‘tonemap_vaapi_build_filter_params’:
libavfilter/vf_tonemap_vaapi.c:82:5: error: unknown type name ‘VAProcFilterCapHighDynamicRange’
     VAProcFilterCapHighDynamicRange hdr_cap;
     ^
libavfilter/vf_tonemap_vaapi.c:84:5: error: unknown type name ‘VAProcFilterParameterBufferHDRToneMapping’
     VAProcFilterParameterBufferHDRToneMapping hdrtm_param;
     ^
libavfilter/vf_tonemap_vaapi.c:88:38: error: ‘VAProcFilterHighDynamicRangeToneMapping’ undeclared (first use in this function)
                                      VAProcFilterHighDynamicRangeToneMapping,
                                      ^
libavfilter/vf_tonemap_vaapi.c:96:16: error: request for member ‘metadata_type’ in something not a structure or union
     if (hdr_cap.metadata_type == VAProcHighDynamicRangeMetadataNone) {
                ^
libavfilter/vf_tonemap_vaapi.c:96:34: error: ‘VAProcHighDynamicRangeMetadataNone’ undeclared (first use in this function)
     if (hdr_cap.metadata_type == VAProcHighDynamicRangeMetadataNone) {
                                  ^
libavfilter/vf_tonemap_vaapi.c:103:15: error: ‘VA_TONE_MAPPING_HDR_TO_SDR’ undeclared (first use in this function)
         if (!(VA_TONE_MAPPING_HDR_TO_SDR & hdr_cap.caps_flag)) {
               ^
libavfilter/vf_tonemap_vaapi.c:103:51: error: request for member ‘caps_flag’ in something not a structure or union
         if (!(VA_TONE_MAPPING_HDR_TO_SDR & hdr_cap.caps_flag)) {
                                                   ^
libavfilter/vf_tonemap_vaapi.c:115:16: error: request for member ‘type’ in something not a structure or union
     hdrtm_param.type = VAProcFilterHighDynamicRangeToneMapping;
                ^
libavfilter/vf_tonemap_vaapi.c:116:16: error: request for member ‘data’ in something not a structure or union
     hdrtm_param.data.metadata_type = VAProcHighDynamicRangeMetadataHDR10;
                ^
libavfilter/vf_tonemap_vaapi.c:116:38: error: ‘VAProcHighDynamicRangeMetadataHDR10’ undeclared (first use in this function)
     hdrtm_param.data.metadata_type = VAProcHighDynamicRangeMetadataHDR10;
                                      ^
libavfilter/vf_tonemap_vaapi.c:117:16: error: request for member ‘data’ in something not a structure or union
     hdrtm_param.data.metadata      = &ctx->in_metadata;
                ^
libavfilter/vf_tonemap_vaapi.c:118:16: error: request for member ‘data’ in something not a structure or union
     hdrtm_param.data.metadata_size = sizeof(VAHdrMetaDataHDR10);
                ^
libavfilter/vf_tonemap_vaapi.c:118:45: error: ‘VAHdrMetaDataHDR10’ undeclared (first use in this function)
     hdrtm_param.data.metadata_size = sizeof(VAHdrMetaDataHDR10);
                                             ^
libavfilter/vf_tonemap_vaapi.c: In function ‘tonemap_vaapi_filter_frame’:
libavfilter/vf_tonemap_vaapi.c:176:15: error: ‘VAProcPipelineParameterBuffer’ has no member named ‘output_color_properties’
         params.output_color_properties.colour_primaries = AVCOL_PRI_BT709;
               ^
libavfilter/vf_tonemap_vaapi.c:177:15: error: ‘VAProcPipelineParameterBuffer’ has no member named ‘output_color_properties’
         params.output_color_properties.transfer_characteristics = AVCOL_TRC_BT709;
               ^
make: *** [libavfilter/vf_tonemap_vaapi.o] Error 1

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

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20191113/86f9f145/attachment.sig>


More information about the ffmpeg-devel mailing list