annotate ffmpeg/libavcodec/vaapi_internal.h @ 13:844d341cf643 tip

Back up before ISMIR
author Yading Song <yading.song@eecs.qmul.ac.uk>
date Thu, 31 Oct 2013 13:17:06 +0000
parents 6840f77b83aa
children
rev   line source
yading@10 1 /*
yading@10 2 * Video Acceleration API (video decoding)
yading@10 3 * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1
yading@10 4 *
yading@10 5 * Copyright (C) 2008-2009 Splitted-Desktop Systems
yading@10 6 *
yading@10 7 * This file is part of FFmpeg.
yading@10 8 *
yading@10 9 * FFmpeg is free software; you can redistribute it and/or
yading@10 10 * modify it under the terms of the GNU Lesser General Public
yading@10 11 * License as published by the Free Software Foundation; either
yading@10 12 * version 2.1 of the License, or (at your option) any later version.
yading@10 13 *
yading@10 14 * FFmpeg is distributed in the hope that it will be useful,
yading@10 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
yading@10 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
yading@10 17 * Lesser General Public License for more details.
yading@10 18 *
yading@10 19 * You should have received a copy of the GNU Lesser General Public
yading@10 20 * License along with FFmpeg; if not, write to the Free Software
yading@10 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
yading@10 22 */
yading@10 23
yading@10 24 #ifndef AVCODEC_VAAPI_INTERNAL_H
yading@10 25 #define AVCODEC_VAAPI_INTERNAL_H
yading@10 26
yading@10 27 #include <va/va.h>
yading@10 28 #include "vaapi.h"
yading@10 29 #include "avcodec.h"
yading@10 30 #include "mpegvideo.h"
yading@10 31
yading@10 32 /**
yading@10 33 * @addtogroup VAAPI_Decoding
yading@10 34 *
yading@10 35 * @{
yading@10 36 */
yading@10 37
yading@10 38 /** Extract VASurfaceID from a Picture */
yading@10 39 static inline VASurfaceID ff_vaapi_get_surface_id(Picture *pic)
yading@10 40 {
yading@10 41 return (uintptr_t)pic->f.data[3];
yading@10 42 }
yading@10 43
yading@10 44 /** Common AVHWAccel.end_frame() implementation */
yading@10 45 void ff_vaapi_common_end_frame(AVCodecContext *avctx);
yading@10 46
yading@10 47 /** Allocate a new picture parameter buffer */
yading@10 48 void *ff_vaapi_alloc_pic_param(struct vaapi_context *vactx, unsigned int size);
yading@10 49
yading@10 50 /** Allocate a new IQ matrix buffer */
yading@10 51 void *ff_vaapi_alloc_iq_matrix(struct vaapi_context *vactx, unsigned int size);
yading@10 52
yading@10 53 /** Allocate a new bit-plane buffer */
yading@10 54 uint8_t *ff_vaapi_alloc_bitplane(struct vaapi_context *vactx, uint32_t size);
yading@10 55
yading@10 56 /**
yading@10 57 * Allocate a new slice descriptor for the input slice.
yading@10 58 *
yading@10 59 * @param vactx the VA API context
yading@10 60 * @param buffer the slice data buffer base
yading@10 61 * @param size the size of the slice in bytes
yading@10 62 * @return the newly allocated slice parameter
yading@10 63 */
yading@10 64 VASliceParameterBufferBase *ff_vaapi_alloc_slice(struct vaapi_context *vactx, const uint8_t *buffer, uint32_t size);
yading@10 65
yading@10 66 int ff_vaapi_mpeg_end_frame(AVCodecContext *avctx);
yading@10 67 int ff_vaapi_commit_slices(struct vaapi_context *vactx);
yading@10 68 int ff_vaapi_render_picture(struct vaapi_context *vactx, VASurfaceID surface);
yading@10 69
yading@10 70 /* @} */
yading@10 71
yading@10 72 #endif /* AVCODEC_VAAPI_INTERNAL_H */