[FFmpeg-devel] [PATCH] libavfilter/vaapi: enable vaapi rotation feature via call Intel iHD driver

Mark Thompson sw at jkqxz.net
Thu Oct 25 02:08:01 EEST 2018


On 23/10/18 22:05, Eoff, Ullysses A wrote:
> 
>> -----Original Message-----
>> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of Eoff, Ullysses A
>> Sent: Tuesday, October 23, 2018 1:50 PM
>> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
>> Subject: Re: [FFmpeg-devel] [PATCH] libavfilter/vaapi: enable vaapi rotation feature via call Intel iHD driver
>>
>>> -----Original Message-----
>>> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of Michael Niedermayer
>>> Sent: Tuesday, October 23, 2018 10:06 AM
>>> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
>>> Subject: Re: [FFmpeg-devel] [PATCH] libavfilter/vaapi: enable vaapi rotation feature via call Intel iHD driver
>>>
>>> On Tue, Oct 23, 2018 at 03:52:40PM +0800, Zachary Zhou wrote:
>>>> It supports clockwise rotation by 0/90/180/270 degrees defined in
>>>> va/va_vpp.h, tested following command line on SKL platform
>>>>
>>>> ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128
>>>> -hwaccel_output_format vaapi -i input.264 -vf "rotation_vaapi=angle=90"
>>>> -c:v h264_vaapi output.h264
>>>> ---
>>>>  libavfilter/Makefile        |   1 +
>>>>  libavfilter/allfilters.c    |   1 +
>>>>  libavfilter/vaapi_vpp.h     |   1 +
>>>>  libavfilter/vf_misc_vaapi.c | 122 ++++++++++++++++++++++++++++++++++++
>>>>  4 files changed, 125 insertions(+)
>>>
>>> breaks build
>>> make distclean ; ./configure && make -j12
>>> ...
>>> libavfilter/vf_misc_vaapi.c: In function ‘rotation_vaapi_build_filter_params’:
>>> libavfilter/vf_misc_vaapi.c:165:23: error: ‘VAProcPipelineCaps’ has no member named ‘rotation_flags’
>>>      if (!pipeline_caps.rotation_flags) {
>>>                        ^
>>> libavfilter/vf_misc_vaapi.c:191:33: error: ‘VAProcPipelineCaps’ has no member named ‘rotation_flags’
>>>      support_flag = pipeline_caps.rotation_flags &
>>>                                  ^
>>> libavfilter/vf_misc_vaapi.c: In function ‘misc_vaapi_filter_frame’:
>>> libavfilter/vf_misc_vaapi.c:248:15: error: ‘VAProcPipelineParameterBuffer’ has no member named ‘rotation_state’
>>>          params.rotation_state = vpp_ctx->rotation_state;
>>>                ^
>>> make: *** [libavfilter/vf_misc_vaapi.o] Error 1
>>> make: *** Waiting for unfinished jobs....
>>>
>>>
>>
>> Looks like VPP rotation caps weren't introduced until libva 2.1.0 (in commit cff70165e08ab).
>> Perhaps, compilation of this feature should be guarded by VA_CHECK_VERSION macro?
>>
> 
> That is, VA-API 1.1.0... VA_CHECK_VERSION(1, 1, 0)

I think this wants to be a configure option, because the filter will be enabled or not based on it - maybe look for the rotation_state field in VAProcPipelineParameterBuffer with check_struct?

- Mark


More information about the ffmpeg-devel mailing list