lavu/hwcontext_qsv: Add support for AV_PIX_FMT_BGRA.
authorZhong Li <zhong.li@intel.com>
Mon, 21 May 2018 09:58:52 +0000 (17:58 +0800)
committerZhong Li <zhong.li@intel.com>
Thu, 11 Oct 2018 05:26:59 +0000 (13:26 +0800)
commita5e1cb9e96bca091ed7103d8be72a99e7dc31582
tree609539b41ae8560ac589236e9fb37ed0d1c5db4f
parent7a6d88ee6269666e5676a37a75bde231a6508e28
lavu/hwcontext_qsv: Add support for AV_PIX_FMT_BGRA.

RGB32(AV_PIX_FMT_BGRA on intel platforms) format may be used as overlay with alpha blending.
So add AV_PIX_FMT_BGRA format support.

One example of alpha blending overlay: ffmpeg -hwaccel qsv -c:v h264_qsv -i BA1_Sony_D.jsv
-filter_complex 'movie=lena-rgba.png,hwupload=extra_hw_frames=16[a];[0:v][a]overlay_qsv=x=10:y=10'
-c:v h264_qsv -y out.mp4

Rename RGB32 to be BGRA to make it clearer as Mark Thompson's suggestion.

V2: Add P010 format support else will introduce HEVC 10bit encoding regression.
    Thanks for LinJie's discovery.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Verified-by: Fu, Linjie <linjie.fu@intel.com>
libavfilter/qsvvpp.c
libavutil/hwcontext_qsv.c