diff options
Diffstat (limited to 'libavcodec/vaapi_decode.c')
-rw-r--r-- | libavcodec/vaapi_decode.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c index cc79875..572b3a4 100644 --- a/libavcodec/vaapi_decode.c +++ b/libavcodec/vaapi_decode.c @@ -1,18 +1,18 @@ /* - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -189,14 +189,14 @@ int ff_vaapi_decode_issue(AVCodecContext *avctx, av_log(avctx, AV_LOG_ERROR, "Failed to end picture decode " "issue: %d (%s).\n", vas, vaErrorStr(vas)); err = AVERROR(EIO); - if (HAVE_VAAPI_1 || ctx->hwctx->driver_quirks & + if (CONFIG_VAAPI_1 || ctx->hwctx->driver_quirks & AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS) goto fail; else goto fail_at_end; } - if (HAVE_VAAPI_1 || ctx->hwctx->driver_quirks & + if (CONFIG_VAAPI_1 || ctx->hwctx->driver_quirks & AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS) ff_vaapi_decode_destroy_buffers(avctx, pic); @@ -267,6 +267,9 @@ static const struct { #if VA_CHECK_VERSION(0, 38, 0) MAP(VP9, VP9_0, VP9Profile0 ), #endif +#if VA_CHECK_VERSION(0, 39, 0) + MAP(VP9, VP9_2, VP9Profile2 ), +#endif #undef MAP }; @@ -503,7 +506,7 @@ int ff_vaapi_decode_init(AVCodecContext *avctx) ctx->va_config = VA_INVALID_ID; ctx->va_context = VA_INVALID_ID; -#if FF_API_VAAPI_CONTEXT +#if FF_API_STRUCT_VAAPI_CONTEXT if (avctx->hwaccel_context) { av_log(avctx, AV_LOG_WARNING, "Using deprecated struct " "vaapi_context in decode.\n"); @@ -533,7 +536,7 @@ int ff_vaapi_decode_init(AVCodecContext *avctx) } #endif -#if FF_API_VAAPI_CONTEXT +#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; @@ -572,7 +575,7 @@ 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_VAAPI_CONTEXT +#if FF_API_STRUCT_VAAPI_CONTEXT } #endif @@ -588,7 +591,7 @@ int ff_vaapi_decode_uninit(AVCodecContext *avctx) VAAPIDecodeContext *ctx = avctx->internal->hwaccel_priv_data; VAStatus vas; -#if FF_API_VAAPI_CONTEXT +#if FF_API_STRUCT_VAAPI_CONTEXT if (ctx->have_old_context) { av_buffer_unref(&ctx->device_ref); } else { @@ -611,7 +614,7 @@ int ff_vaapi_decode_uninit(AVCodecContext *avctx) } } -#if FF_API_VAAPI_CONTEXT +#if FF_API_STRUCT_VAAPI_CONTEXT } #endif |