diff options
author | Tong Wu <tong1.wu@intel.com> | 2024-04-18 14:13:36 +0800 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2024-07-02 14:15:12 +0200 |
commit | 6403ad77e37a155095f27104e84d0b75a4394245 (patch) | |
tree | 1973cd6735c9cb3771e347b180ee8c7ded13fb2a /libavcodec/vaapi_encode_av1.c | |
parent | 88b70b8883e1779d9ecb26625032d25a5cc9d55e (diff) | |
download | ffmpeg-6403ad77e37a155095f27104e84d0b75a4394245.tar.gz |
avcodec/vaapi_encode: extract a get_recon_format function to base layer
Surface size and block size parameters are also moved to base layer.
Signed-off-by: Tong Wu <tong1.wu@intel.com>
Diffstat (limited to 'libavcodec/vaapi_encode_av1.c')
-rw-r--r-- | libavcodec/vaapi_encode_av1.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/vaapi_encode_av1.c b/libavcodec/vaapi_encode_av1.c index a590f4cd8b..ea4c391e54 100644 --- a/libavcodec/vaapi_encode_av1.c +++ b/libavcodec/vaapi_encode_av1.c @@ -112,12 +112,12 @@ static void vaapi_encode_av1_trace_write_log(void *ctx, static av_cold int vaapi_encode_av1_get_encoder_caps(AVCodecContext *avctx) { - VAAPIEncodeContext *ctx = avctx->priv_data; - VAAPIEncodeAV1Context *priv = avctx->priv_data; + FFHWBaseEncodeContext *base_ctx = avctx->priv_data; + VAAPIEncodeAV1Context *priv = avctx->priv_data; // Surfaces must be aligned to superblock boundaries. - ctx->surface_width = FFALIGN(avctx->width, priv->use_128x128_superblock ? 128 : 64); - ctx->surface_height = FFALIGN(avctx->height, priv->use_128x128_superblock ? 128 : 64); + base_ctx->surface_width = FFALIGN(avctx->width, priv->use_128x128_superblock ? 128 : 64); + base_ctx->surface_height = FFALIGN(avctx->height, priv->use_128x128_superblock ? 128 : 64); return 0; } @@ -425,7 +425,7 @@ static int vaapi_encode_av1_init_sequence_params(AVCodecContext *avctx) framerate = 0; level = ff_av1_guess_level(avctx->bit_rate, priv->tier, - ctx->surface_width, ctx->surface_height, + base_ctx->surface_width, base_ctx->surface_height, priv->tile_rows * priv->tile_cols, priv->tile_cols, framerate); if (level) { |