Commit Graph

3 Commits

Author SHA1 Message Date
Anton Khirnov 632c349931 lavfi: add a flag for filters able to work with hw_device_ctx
This way the caller can set it just on the filters that can make use of
it.
2023-03-24 10:16:51 +01:00
Haihao Xiang 742dfa2815 lavfi/vf_stack_vaapi: factor out the common code for stack setting
The common code will be used in QSV based stack filters.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-02-16 11:15:41 +08:00
Haihao Xiang aecfec6f80 avfilter: add VA-API variants of the stack filters
Include hstack_vaapi, vstack_vaapi and xstack_vaapi. They may accept
input streams with different sizes.  libva2 (VA-API 1.0+) is required.

Example:
$ ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -i input.h265 -filter_complex
"[0:v][0:v]hstack_vaapi" -c:v h264_vaapi out.h264

$ ffmpeg \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-filter_complex "[0:v][1:v][2:v][3:v]xstack_vaapi=inputs=4:fill=0x000000:layout=0_0_1920x1080|w0_0_1920x1080|0_h0_1920x1080|w0_h0_1920x1080" \
-c:v hevc_vaapi out.h265

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-01-30 08:48:58 +08:00