diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-26 09:37:37 +0100 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-04-27 10:43:06 -0300 |
commit | e3d993fab0ad4255dffd10a794fc5e1bd37047b7 (patch) | |
tree | 8a7dba827c021e9abd7ed2afec0eecf5dd066f67 /libavcodec/vaapi_decode.c | |
parent | 337f777f378cfcc0d6f0d01fb7125905e8b0da55 (diff) | |
download | ffmpeg-e3d993fab0ad4255dffd10a794fc5e1bd37047b7.tar.gz |
avcodec/vaapi: Remove old and deprecated VAAPI context and header
Deprecated in 851960f6f8cf1f946fe42fa36cf6598fac68072c.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/vaapi_decode.c')
-rw-r--r-- | libavcodec/vaapi_decode.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c index 57a0eb4e6e..958ddf49da 100644 --- a/libavcodec/vaapi_decode.c +++ b/libavcodec/vaapi_decode.c @@ -640,46 +640,6 @@ int ff_vaapi_decode_init(AVCodecContext *avctx) ctx->va_config = VA_INVALID_ID; ctx->va_context = VA_INVALID_ID; -#if FF_API_STRUCT_VAAPI_CONTEXT - if (avctx->hwaccel_context) { - av_log(avctx, AV_LOG_WARNING, "Using deprecated struct " - "vaapi_context in decode.\n"); - - ctx->have_old_context = 1; - ctx->old_context = avctx->hwaccel_context; - - // Really we only want the VAAPI device context, but this - // allocates a whole generic device context because we don't - // have any other way to determine how big it should be. - ctx->device_ref = - av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_VAAPI); - if (!ctx->device_ref) { - err = AVERROR(ENOMEM); - goto fail; - } - ctx->device = (AVHWDeviceContext*)ctx->device_ref->data; - ctx->hwctx = ctx->device->hwctx; - - ctx->hwctx->display = ctx->old_context->display; - - // The old VAAPI decode setup assumed this quirk was always - // present, so set it here to avoid the behaviour changing. - ctx->hwctx->driver_quirks = - AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS; - - } -#endif - -#if FF_API_STRUCT_VAAPI_CONTEXT - if (ctx->have_old_context) { - ctx->va_config = ctx->old_context->config_id; - ctx->va_context = ctx->old_context->context_id; - - av_log(avctx, AV_LOG_DEBUG, "Using user-supplied decoder " - "context: %#x/%#x.\n", ctx->va_config, ctx->va_context); - } else { -#endif - err = ff_decode_get_hw_frames_ctx(avctx, AV_HWDEVICE_TYPE_VAAPI); if (err < 0) goto fail; @@ -709,9 +669,6 @@ int ff_vaapi_decode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_DEBUG, "Decode context initialised: " "%#x/%#x.\n", ctx->va_config, ctx->va_context); -#if FF_API_STRUCT_VAAPI_CONTEXT - } -#endif return 0; @@ -725,12 +682,6 @@ int ff_vaapi_decode_uninit(AVCodecContext *avctx) VAAPIDecodeContext *ctx = avctx->internal->hwaccel_priv_data; VAStatus vas; -#if FF_API_STRUCT_VAAPI_CONTEXT - if (ctx->have_old_context) { - av_buffer_unref(&ctx->device_ref); - } else { -#endif - if (ctx->va_context != VA_INVALID_ID) { vas = vaDestroyContext(ctx->hwctx->display, ctx->va_context); if (vas != VA_STATUS_SUCCESS) { @@ -748,9 +699,5 @@ int ff_vaapi_decode_uninit(AVCodecContext *avctx) } } -#if FF_API_STRUCT_VAAPI_CONTEXT - } -#endif - return 0; } |