annotate ffmpeg/libavcodec/xvmc.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 * Copyright (C) 2003 Ivan Kalvachev
yading@10 3 *
yading@10 4 * This file is part of FFmpeg.
yading@10 5 *
yading@10 6 * FFmpeg is free software; you can redistribute it and/or
yading@10 7 * modify it under the terms of the GNU Lesser General Public
yading@10 8 * License as published by the Free Software Foundation; either
yading@10 9 * version 2.1 of the License, or (at your option) any later version.
yading@10 10 *
yading@10 11 * FFmpeg is distributed in the hope that it will be useful,
yading@10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
yading@10 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
yading@10 14 * Lesser General Public License for more details.
yading@10 15 *
yading@10 16 * You should have received a copy of the GNU Lesser General Public
yading@10 17 * License along with FFmpeg; if not, write to the Free Software
yading@10 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
yading@10 19 */
yading@10 20
yading@10 21 #ifndef AVCODEC_XVMC_H
yading@10 22 #define AVCODEC_XVMC_H
yading@10 23
yading@10 24 /**
yading@10 25 * @file
yading@10 26 * @ingroup lavc_codec_hwaccel_xvmc
yading@10 27 * Public libavcodec XvMC header.
yading@10 28 */
yading@10 29
yading@10 30 #include <X11/extensions/XvMC.h>
yading@10 31
yading@10 32 #include "avcodec.h"
yading@10 33
yading@10 34 /**
yading@10 35 * @defgroup lavc_codec_hwaccel_xvmc XvMC
yading@10 36 * @ingroup lavc_codec_hwaccel
yading@10 37 *
yading@10 38 * @{
yading@10 39 */
yading@10 40
yading@10 41 #define AV_XVMC_ID 0x1DC711C0 /**< special value to ensure that regular pixel routines haven't corrupted the struct
yading@10 42 the number is 1337 speak for the letters IDCT MCo (motion compensation) */
yading@10 43
yading@10 44 struct xvmc_pix_fmt {
yading@10 45 /** The field contains the special constant value AV_XVMC_ID.
yading@10 46 It is used as a test that the application correctly uses the API,
yading@10 47 and that there is no corruption caused by pixel routines.
yading@10 48 - application - set during initialization
yading@10 49 - libavcodec - unchanged
yading@10 50 */
yading@10 51 int xvmc_id;
yading@10 52
yading@10 53 /** Pointer to the block array allocated by XvMCCreateBlocks().
yading@10 54 The array has to be freed by XvMCDestroyBlocks().
yading@10 55 Each group of 64 values represents one data block of differential
yading@10 56 pixel information (in MoCo mode) or coefficients for IDCT.
yading@10 57 - application - set the pointer during initialization
yading@10 58 - libavcodec - fills coefficients/pixel data into the array
yading@10 59 */
yading@10 60 short* data_blocks;
yading@10 61
yading@10 62 /** Pointer to the macroblock description array allocated by
yading@10 63 XvMCCreateMacroBlocks() and freed by XvMCDestroyMacroBlocks().
yading@10 64 - application - set the pointer during initialization
yading@10 65 - libavcodec - fills description data into the array
yading@10 66 */
yading@10 67 XvMCMacroBlock* mv_blocks;
yading@10 68
yading@10 69 /** Number of macroblock descriptions that can be stored in the mv_blocks
yading@10 70 array.
yading@10 71 - application - set during initialization
yading@10 72 - libavcodec - unchanged
yading@10 73 */
yading@10 74 int allocated_mv_blocks;
yading@10 75
yading@10 76 /** Number of blocks that can be stored at once in the data_blocks array.
yading@10 77 - application - set during initialization
yading@10 78 - libavcodec - unchanged
yading@10 79 */
yading@10 80 int allocated_data_blocks;
yading@10 81
yading@10 82 /** Indicate that the hardware would interpret data_blocks as IDCT
yading@10 83 coefficients and perform IDCT on them.
yading@10 84 - application - set during initialization
yading@10 85 - libavcodec - unchanged
yading@10 86 */
yading@10 87 int idct;
yading@10 88
yading@10 89 /** In MoCo mode it indicates that intra macroblocks are assumed to be in
yading@10 90 unsigned format; same as the XVMC_INTRA_UNSIGNED flag.
yading@10 91 - application - set during initialization
yading@10 92 - libavcodec - unchanged
yading@10 93 */
yading@10 94 int unsigned_intra;
yading@10 95
yading@10 96 /** Pointer to the surface allocated by XvMCCreateSurface().
yading@10 97 It has to be freed by XvMCDestroySurface() on application exit.
yading@10 98 It identifies the frame and its state on the video hardware.
yading@10 99 - application - set during initialization
yading@10 100 - libavcodec - unchanged
yading@10 101 */
yading@10 102 XvMCSurface* p_surface;
yading@10 103
yading@10 104 /** Set by the decoder before calling ff_draw_horiz_band(),
yading@10 105 needed by the XvMCRenderSurface function. */
yading@10 106 //@{
yading@10 107 /** Pointer to the surface used as past reference
yading@10 108 - application - unchanged
yading@10 109 - libavcodec - set
yading@10 110 */
yading@10 111 XvMCSurface* p_past_surface;
yading@10 112
yading@10 113 /** Pointer to the surface used as future reference
yading@10 114 - application - unchanged
yading@10 115 - libavcodec - set
yading@10 116 */
yading@10 117 XvMCSurface* p_future_surface;
yading@10 118
yading@10 119 /** top/bottom field or frame
yading@10 120 - application - unchanged
yading@10 121 - libavcodec - set
yading@10 122 */
yading@10 123 unsigned int picture_structure;
yading@10 124
yading@10 125 /** XVMC_SECOND_FIELD - 1st or 2nd field in the sequence
yading@10 126 - application - unchanged
yading@10 127 - libavcodec - set
yading@10 128 */
yading@10 129 unsigned int flags;
yading@10 130 //}@
yading@10 131
yading@10 132 /** Number of macroblock descriptions in the mv_blocks array
yading@10 133 that have already been passed to the hardware.
yading@10 134 - application - zeroes it on get_buffer().
yading@10 135 A successful ff_draw_horiz_band() may increment it
yading@10 136 with filled_mb_block_num or zero both.
yading@10 137 - libavcodec - unchanged
yading@10 138 */
yading@10 139 int start_mv_blocks_num;
yading@10 140
yading@10 141 /** Number of new macroblock descriptions in the mv_blocks array (after
yading@10 142 start_mv_blocks_num) that are filled by libavcodec and have to be
yading@10 143 passed to the hardware.
yading@10 144 - application - zeroes it on get_buffer() or after successful
yading@10 145 ff_draw_horiz_band().
yading@10 146 - libavcodec - increment with one of each stored MB
yading@10 147 */
yading@10 148 int filled_mv_blocks_num;
yading@10 149
yading@10 150 /** Number of the next free data block; one data block consists of
yading@10 151 64 short values in the data_blocks array.
yading@10 152 All blocks before this one have already been claimed by placing their
yading@10 153 position into the corresponding block description structure field,
yading@10 154 that are part of the mv_blocks array.
yading@10 155 - application - zeroes it on get_buffer().
yading@10 156 A successful ff_draw_horiz_band() may zero it together
yading@10 157 with start_mb_blocks_num.
yading@10 158 - libavcodec - each decoded macroblock increases it by the number
yading@10 159 of coded blocks it contains.
yading@10 160 */
yading@10 161 int next_free_data_block_num;
yading@10 162 };
yading@10 163
yading@10 164 /**
yading@10 165 * @}
yading@10 166 */
yading@10 167
yading@10 168 #endif /* AVCODEC_XVMC_H */