[FFmpeg-devel] [PATCH v1] avfilter: Add tonemap vaapi filter for H2S
Sun, Xinpeng
xinpeng.sun at intel.com
Fri Nov 15 10:20:24 EET 2019
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Michael Niedermayer
> Sent: Thursday, November 14, 2019 1:12 AM
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH v1] avfilter: Add tonemap vaapi filter for
> H2S
>
> 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
>
Sorry, I forgot to run fate on my updated patch. (I run it previously and the fate passed, but I removed the version check in the updated patch and sent it in the rush.)
The main reason is missing the check of libva version, I will addressed it next time and make sure the fate passes in CI before submission.
> 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
More information about the ffmpeg-devel
mailing list