diff options
author | Mark Thompson <sw@jkqxz.net> | 2022-03-17 14:41:50 +0800 |
---|---|---|
committer | Haihao Xiang <haihao.xiang@intel.com> | 2022-04-11 11:38:43 +0800 |
commit | 99b333e5ff5a91de2a5d740bbc9fa344154511c1 (patch) | |
tree | b8f66b368c9b5c84a411ab3646aba9572e8c5df5 /libavcodec/vaapi_encode.h | |
parent | a285968a0b122484635846babd9a1e8183e70fb0 (diff) |
vaapi_encode: Move block size calculation after entrypoint selection
The block size can be dependent on the profile and entrypoint selected.
It defaults to 16x16, with codecs able to override this choice with their
own function.
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Diffstat (limited to 'libavcodec/vaapi_encode.h')
-rw-r--r-- | libavcodec/vaapi_encode.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/vaapi_encode.h b/libavcodec/vaapi_encode.h index 4596e49ba9..af0588c30b 100644 --- a/libavcodec/vaapi_encode.h +++ b/libavcodec/vaapi_encode.h @@ -386,6 +386,13 @@ typedef struct VAAPIEncodeType { // factor depending on RC mode. int default_quality; + // Determine encode parameters like block sizes for surface alignment + // and slices. This may need to query the profile and entrypoint, + // which will be available when this function is called. If not set, + // assume that all blocks are 16x16 and that surfaces should be + // aligned to match this. + int (*get_encoder_caps)(AVCodecContext *avctx); + // Perform any extra codec-specific configuration after the // codec context is initialised (set up the private data and // add any necessary global parameters). |