00001 /* 00002 * Video Acceleration API (video decoding) 00003 * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1 00004 * 00005 * Copyright (C) 2008-2009 Splitted-Desktop Systems 00006 * 00007 * This file is part of FFmpeg. 00008 * 00009 * FFmpeg is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Lesser General Public 00011 * License as published by the Free Software Foundation; either 00012 * version 2.1 of the License, or (at your option) any later version. 00013 * 00014 * FFmpeg is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * Lesser General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public 00020 * License along with FFmpeg; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00022 */ 00023 00024 #ifndef AVCODEC_VAAPI_INTERNAL_H 00025 #define AVCODEC_VAAPI_INTERNAL_H 00026 00027 #include <va/va.h> 00028 #include "vaapi.h" 00029 #include "avcodec.h" 00030 #include "mpegvideo.h" 00031 00039 static inline VASurfaceID ff_vaapi_get_surface_id(Picture *pic) 00040 { 00041 return (uintptr_t)pic->f.data[3]; 00042 } 00043 00045 int ff_vaapi_common_end_frame(MpegEncContext *s); 00046 00048 void *ff_vaapi_alloc_pic_param(struct vaapi_context *vactx, unsigned int size); 00049 00051 void *ff_vaapi_alloc_iq_matrix(struct vaapi_context *vactx, unsigned int size); 00052 00054 uint8_t *ff_vaapi_alloc_bitplane(struct vaapi_context *vactx, uint32_t size); 00055 00064 VASliceParameterBufferBase *ff_vaapi_alloc_slice(struct vaapi_context *vactx, const uint8_t *buffer, uint32_t size); 00065 00066 /* @} */ 00067 00068 #endif /* AVCODEC_VAAPI_INTERNAL_H */