yading@10: /* yading@10: * DXVA2 HW acceleration yading@10: * yading@10: * copyright (c) 2009 Laurent Aimar yading@10: * yading@10: * This file is part of FFmpeg. yading@10: * yading@10: * FFmpeg is free software; you can redistribute it and/or yading@10: * modify it under the terms of the GNU Lesser General Public yading@10: * License as published by the Free Software Foundation; either yading@10: * version 2.1 of the License, or (at your option) any later version. yading@10: * yading@10: * FFmpeg is distributed in the hope that it will be useful, yading@10: * but WITHOUT ANY WARRANTY; without even the implied warranty of yading@10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU yading@10: * Lesser General Public License for more details. yading@10: * yading@10: * You should have received a copy of the GNU Lesser General Public yading@10: * License along with FFmpeg; if not, write to the Free Software yading@10: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA yading@10: */ yading@10: yading@10: #ifndef AVCODEC_DXVA_H yading@10: #define AVCODEC_DXVA_H yading@10: yading@10: /** yading@10: * @file yading@10: * @ingroup lavc_codec_hwaccel_dxva2 yading@10: * Public libavcodec DXVA2 header. yading@10: */ yading@10: yading@10: #if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600 yading@10: #undef _WIN32_WINNT yading@10: #endif yading@10: yading@10: #if !defined(_WIN32_WINNT) yading@10: #define _WIN32_WINNT 0x0600 yading@10: #endif yading@10: yading@10: #include yading@10: #include yading@10: #include yading@10: yading@10: /** yading@10: * @defgroup lavc_codec_hwaccel_dxva2 DXVA2 yading@10: * @ingroup lavc_codec_hwaccel yading@10: * yading@10: * @{ yading@10: */ yading@10: yading@10: #define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards yading@10: yading@10: /** yading@10: * This structure is used to provides the necessary configurations and data yading@10: * to the DXVA2 FFmpeg HWAccel implementation. yading@10: * yading@10: * The application must make it available as AVCodecContext.hwaccel_context. yading@10: */ yading@10: struct dxva_context { yading@10: /** yading@10: * DXVA2 decoder object yading@10: */ yading@10: IDirectXVideoDecoder *decoder; yading@10: yading@10: /** yading@10: * DXVA2 configuration used to create the decoder yading@10: */ yading@10: const DXVA2_ConfigPictureDecode *cfg; yading@10: yading@10: /** yading@10: * The number of surface in the surface array yading@10: */ yading@10: unsigned surface_count; yading@10: yading@10: /** yading@10: * The array of Direct3D surfaces used to create the decoder yading@10: */ yading@10: LPDIRECT3DSURFACE9 *surface; yading@10: yading@10: /** yading@10: * A bit field configuring the workarounds needed for using the decoder yading@10: */ yading@10: uint64_t workaround; yading@10: yading@10: /** yading@10: * Private to the FFmpeg AVHWAccel implementation yading@10: */ yading@10: unsigned report_id; yading@10: }; yading@10: yading@10: /** yading@10: * @} yading@10: */ yading@10: yading@10: #endif /* AVCODEC_DXVA_H */