diff options
Diffstat (limited to 'libavcodec/vaapi_vc1.c')
-rw-r--r-- | libavcodec/vaapi_vc1.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c index 4022549..4e82be1 100644 --- a/libavcodec/vaapi_vc1.c +++ b/libavcodec/vaapi_vc1.c @@ -3,20 +3,20 @@ * * Copyright (C) 2008-2009 Splitted-Desktop Systems * - * 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 */ @@ -25,7 +25,7 @@ #include "vc1.h" #include "vc1data.h" -/** Translate Libav MV modes to VA API */ +/** Translate FFmpeg MV modes to VA API */ static int get_VAMvModeVC1(enum MVModes mv_mode) { switch (mv_mode) { @@ -129,7 +129,7 @@ static inline int vc1_get_TTFRM(VC1Context *v) return 0; } -/** Pack Libav bitplanes into a VABitPlaneBuffer element */ +/** Pack FFmpeg bitplanes into a VABitPlaneBuffer element */ static inline void vc1_pack_bitplanes(uint8_t *bitplane, int n, const uint8_t *ff_bp[3], int x, int y, int stride) { const int bitplane_index = n / 2; @@ -148,7 +148,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t { VC1Context * const v = avctx->priv_data; MpegEncContext * const s = &v->s; - struct vaapi_context * const vactx = avctx->hwaccel_context; + FFVAContext * const vactx = ff_vaapi_get_context(avctx); VAPictureParameterBufferVC1 *pic_param; vactx->slice_param_size = sizeof(VASliceParameterBufferVC1); @@ -313,6 +313,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, { VC1Context * const v = avctx->priv_data; MpegEncContext * const s = &v->s; + FFVAContext * const vactx = ff_vaapi_get_context(avctx); VASliceParameterBufferVC1 *slice_param; /* Current bit buffer is beyond any marker for VC-1, so skip it */ @@ -322,7 +323,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, } /* Fill in VASliceParameterBufferVC1 */ - slice_param = (VASliceParameterBufferVC1 *)ff_vaapi_alloc_slice(avctx->hwaccel_context, buffer, size); + slice_param = (VASliceParameterBufferVC1 *)ff_vaapi_alloc_slice(vactx, buffer, size); if (!slice_param) return -1; slice_param->macroblock_offset = get_bits_count(&s->gb); @@ -339,6 +340,9 @@ AVHWAccel ff_wmv3_vaapi_hwaccel = { .start_frame = vaapi_vc1_start_frame, .end_frame = ff_vaapi_mpeg_end_frame, .decode_slice = vaapi_vc1_decode_slice, + .init = ff_vaapi_context_init, + .uninit = ff_vaapi_context_fini, + .priv_data_size = sizeof(FFVAContext), }; #endif @@ -350,4 +354,7 @@ AVHWAccel ff_vc1_vaapi_hwaccel = { .start_frame = vaapi_vc1_start_frame, .end_frame = ff_vaapi_mpeg_end_frame, .decode_slice = vaapi_vc1_decode_slice, + .init = ff_vaapi_context_init, + .uninit = ff_vaapi_context_fini, + .priv_data_size = sizeof(FFVAContext), }; |