misc/winutils/include/libavcodec/dxva2.h
author nemo
Fri, 24 May 2013 10:34:22 -0400
changeset 9053 0bf55d656352
parent 7813 7ac83d79b897
permissions -rw-r--r--
Add a mask, tweak changelog a bit
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7813
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
     1
/*
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
     2
 * DXVA2 HW acceleration
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
     3
 *
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
     4
 * copyright (c) 2009 Laurent Aimar
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
     5
 *
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
     6
 * This file is part of Libav.
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
     7
 *
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
     8
 * Libav is free software; you can redistribute it and/or
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
     9
 * modify it under the terms of the GNU Lesser General Public
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    10
 * License as published by the Free Software Foundation; either
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    11
 * version 2.1 of the License, or (at your option) any later version.
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    12
 *
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    13
 * Libav is distributed in the hope that it will be useful,
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    16
 * Lesser General Public License for more details.
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    17
 *
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    18
 * You should have received a copy of the GNU Lesser General Public
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    19
 * License along with Libav; if not, write to the Free Software
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    21
 */
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    22
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    23
#ifndef AVCODEC_DXVA_H
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    24
#define AVCODEC_DXVA_H
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    25
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    26
/**
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    27
 * @file
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    28
 * @ingroup lavc_codec_hwaccel_dxva2
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    29
 * Public libavcodec DXVA2 header.
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    30
 */
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    31
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    32
#include <stdint.h>
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    33
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    34
#include <d3d9.h>
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    35
#include <dxva2api.h>
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    36
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    37
/**
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    38
 * @defgroup lavc_codec_hwaccel_dxva2 DXVA2
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    39
 * @ingroup lavc_codec_hwaccel
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    40
 *
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    41
 * @{
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    42
 */
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    43
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    44
#define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    45
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    46
/**
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    47
 * This structure is used to provides the necessary configurations and data
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    48
 * to the DXVA2 Libav HWAccel implementation.
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    49
 *
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    50
 * The application must make it available as AVCodecContext.hwaccel_context.
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    51
 */
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    52
struct dxva_context {
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    53
    /**
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    54
     * DXVA2 decoder object
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    55
     */
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    56
    IDirectXVideoDecoder *decoder;
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    57
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    58
    /**
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    59
     * DXVA2 configuration used to create the decoder
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    60
     */
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    61
    const DXVA2_ConfigPictureDecode *cfg;
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    62
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    63
    /**
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    64
     * The number of surface in the surface array
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    65
     */
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    66
    unsigned surface_count;
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    67
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    68
    /**
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    69
     * The array of Direct3D surfaces used to create the decoder
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    70
     */
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    71
    LPDIRECT3DSURFACE9 *surface;
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    72
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    73
    /**
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    74
     * A bit field configuring the workarounds needed for using the decoder
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    75
     */
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    76
    uint64_t workaround;
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    77
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    78
    /**
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    79
     * Private to the Libav AVHWAccel implementation
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    80
     */
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    81
    unsigned report_id;
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    82
};
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    83
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    84
/**
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    85
 * @}
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    86
 */
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    87
7ac83d79b897 support video recording on windows with automation and headers
koda
parents:
diff changeset
    88
#endif /* AVCODEC_DXVA_H */