diff options
author | Linjie Fu <linjie.fu@intel.com> | 2019-11-26 11:56:18 +0800 |
---|---|---|
committer | Zhong Li <zhongli_dev@126.com> | 2019-12-12 23:43:06 +0800 |
commit | 8446318502bf21347a4867a5a1fcd8d9bfbd6a41 (patch) | |
tree | 446ac7afe53344362c716f34f4753d40ac0534b4 /libavcodec/qsvenc.h | |
parent | 0ceed513d563c5c95a2f180f8203e1df080b5f84 (diff) | |
download | ffmpeg-8446318502bf21347a4867a5a1fcd8d9bfbd6a41.tar.gz |
lavc/qsvenc: add Tiles encode support for HEVC
Add -tile_rows and -tile_cols option to specify the number of tile rows
and columns for ICL+ (gen 11) platform.
A tile must wholly contain all the slices within it. Slices cannot cross
tile boundaries. So the slice number would be implicitly resized to the
max(nSlice, nTile).
Example:
ffmpeg -v verbose -hwaccel qsv -init_hw_device qsv=hw
-filter_hw_device hw -f rawvideo -s:v 1920x1080 -i ./input.nv12 -vf
format=nv12,hwupload=extra_hw_frames=64 -c:v hevc_qsv -tile_rows 2
-tile_cols 2 -slices 4 -y output.h265
Also dump the actual quantity of encoded tiled rows and columns in run
time.
Fix the enhancement #8400.
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Diffstat (limited to 'libavcodec/qsvenc.h')
-rw-r--r-- | libavcodec/qsvenc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h index ee35582075..6609171af3 100644 --- a/libavcodec/qsvenc.h +++ b/libavcodec/qsvenc.h @@ -38,6 +38,7 @@ #define QSV_HAVE_CO3 QSV_VERSION_ATLEAST(1, 11) #define QSV_HAVE_CO_VPS QSV_VERSION_ATLEAST(1, 17) +#define QSV_HAVE_EXT_HEVC_TILES QSV_VERSION_ATLEAST(1, 13) #define QSV_HAVE_EXT_VP9_PARAM QSV_VERSION_ATLEAST(1, 26) #define QSV_HAVE_TRELLIS QSV_VERSION_ATLEAST(1, 8) @@ -124,6 +125,9 @@ typedef struct QSVEncContext { mfxExtMultiFrameParam extmfp; mfxExtMultiFrameControl extmfc; #endif +#if QSV_HAVE_EXT_HEVC_TILES + mfxExtHEVCTiles exthevctiles; +#endif #if QSV_HAVE_EXT_VP9_PARAM mfxExtVP9Param extvp9param; #endif @@ -161,6 +165,9 @@ typedef struct QSVEncContext { int max_frame_size; int max_slice_size; + int tile_cols; + int tile_rows; + int aud; int single_sei_nal_unit; |