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_mjpeg.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_mjpeg.c')
-rw-r--r-- | libavcodec/vaapi_encode_mjpeg.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/vaapi_encode_mjpeg.c b/libavcodec/vaapi_encode_mjpeg.c index 48dc677bec..5d51a0b2b9 100644 --- a/libavcodec/vaapi_encode_mjpeg.c +++ b/libavcodec/vaapi_encode_mjpeg.c @@ -439,14 +439,13 @@ static int vaapi_encode_mjpeg_init_slice_params(AVCodecContext *avctx, static av_cold int vaapi_encode_mjpeg_get_encoder_caps(AVCodecContext *avctx) { FFHWBaseEncodeContext *base_ctx = avctx->priv_data; - VAAPIEncodeContext *ctx = avctx->priv_data; const AVPixFmtDescriptor *desc; desc = av_pix_fmt_desc_get(base_ctx->input_frames->sw_format); av_assert0(desc); - ctx->surface_width = FFALIGN(avctx->width, 8 << desc->log2_chroma_w); - ctx->surface_height = FFALIGN(avctx->height, 8 << desc->log2_chroma_h); + base_ctx->surface_width = FFALIGN(avctx->width, 8 << desc->log2_chroma_w); + base_ctx->surface_height = FFALIGN(avctx->height, 8 << desc->log2_chroma_h); return 0; } |