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

Zhou, Zachary zachary.zhou at intel.com
Mon Oct 29 03:42:55 EET 2018



> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of
> Michael Niedermayer
> Sent: Saturday, October 27, 2018 5:16 AM
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH V2] libavfilter/vaapi: enable vaapi
> rotation feature via call Intel iHD driver
> 
> On Thu, Oct 25, 2018 at 02:52:01PM +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
> >
> > dir=0 for 0   degree
> > dir=1 for 90  degree
> > dir=2 for 180 degree
> > dir=3 for 270 degree
> >
> > ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128
> > -hwaccel_output_format vaapi -i input.264 -vf "rotation_vaapi=dir=1"
> > -c:v h264_vaapi output.h264
> >
> > Signed-off-by: Zachary Zhou <zachary.zhou at intel.com>
> > ---
> >  configure                     |   3 +
> >  libavfilter/Makefile          |   1 +
> >  libavfilter/allfilters.c      |   1 +
> >  libavfilter/vaapi_vpp.h       |   1 +
> >  libavfilter/vf_rotate_vaapi.c | 252
> > ++++++++++++++++++++++++++++++++++
> >  5 files changed, 258 insertions(+)
> >  create mode 100644 libavfilter/vf_rotate_vaapi.c
> 
> still fails to build on 32bit x86
> 
> src/libavfilter/vf_rotate_vaapi.c: In function
> ‘rotation_vaapi_build_filter_params’:
> src/libavfilter/vf_rotate_vaapi.c:69:23: error: ‘VAProcPipelineCaps’ has no
> member named ‘rotation_flags’
>      if (!pipeline_caps.rotation_flags) {
>                        ^
> src/libavfilter/vf_rotate_vaapi.c:95:33: error: ‘VAProcPipelineCaps’ has no
> member named ‘rotation_flags’
>      support_flag = pipeline_caps.rotation_flags &
>                                  ^
> src/libavfilter/vf_rotate_vaapi.c: In function ‘rotation_vaapi_filter_frame’:
> src/libavfilter/vf_rotate_vaapi.c:152:15: error:
> ‘VAProcPipelineParameterBuffer’ has no member named ‘rotation_state’
>          params.rotation_state = vpp_ctx->rotation_state;
>                ^
> make: *** [libavfilter/vf_rotate_vaapi.o] Error 1
> make: *** Waiting for unfinished jobs....
> 
> grep VAAPI ffbuild/config.mak
> !HAVE_VAAPI_DRM=yes
> !HAVE_VAAPI_X11=yes
> !HAVE_OPENCL_VAAPI_BEIGNET=yes
> !HAVE_OPENCL_VAAPI_INTEL_MEDIA=yes
> !CONFIG_VAAPI_ENCODE_EXAMPLE=yes
> !CONFIG_VAAPI_TRANSCODE_EXAMPLE=yes
> !CONFIG_VAAPI=yes
> !CONFIG_VAAPI_1=yes
> !CONFIG_VAAPI_ENCODE=yes
> !CONFIG_H264_VAAPI_ENCODER=yes
> !CONFIG_HEVC_VAAPI_ENCODER=yes
> !CONFIG_MJPEG_VAAPI_ENCODER=yes
> !CONFIG_MPEG2_VAAPI_ENCODER=yes
> !CONFIG_VP8_VAAPI_ENCODER=yes
> !CONFIG_VP9_VAAPI_ENCODER=yes
> !CONFIG_H263_VAAPI_HWACCEL=yes
> !CONFIG_H264_VAAPI_HWACCEL=yes
> !CONFIG_HEVC_VAAPI_HWACCEL=yes
> !CONFIG_MJPEG_VAAPI_HWACCEL=yes
> !CONFIG_MPEG2_VAAPI_HWACCEL=yes
> !CONFIG_MPEG4_VAAPI_HWACCEL=yes
> !CONFIG_VC1_VAAPI_HWACCEL=yes
> !CONFIG_VP8_VAAPI_HWACCEL=yes
> !CONFIG_VP9_VAAPI_HWACCEL=yes
> !CONFIG_WMV3_VAAPI_HWACCEL=yes
> !CONFIG_DEINTERLACE_VAAPI_FILTER=yes
> !CONFIG_DENOISE_VAAPI_FILTER=yes
> !CONFIG_PROCAMP_VAAPI_FILTER=yes
> !CONFIG_SCALE_VAAPI_FILTER=yes
> !CONFIG_SHARPNESS_VAAPI_FILTER=yes
> CONFIG_ROTATION_VAAPI_FILTER=yes
> 
> [...]

Thanks Michael, Can you share your command line for the build script configure ?
Do I need more setting on the configure file ?

> --
> Michael     GnuPG fingerprint:
> 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> If you drop bombs on a foreign country and kill a hundred thousand innocent
> people, expect your government to call the consequence "unprovoked
> inhuman terrorist attacks" and use it to justify dropping more bombs and
> killing more people. The technology changed, the idea is old.


More information about the ffmpeg-devel mailing list