comparison xvmc.h @ 8950:3fb542a23731 libavcodec

Improvements in xvmc structure fields descriptions.
author iive
date Mon, 16 Feb 2009 18:16:23 +0000
parents c1fd3c6a8533
children 533777a86f12
comparison
equal deleted inserted replaced
8949:c6aff37981b6 8950:3fb542a23731
32 #endif 32 #endif
33 #define AV_XVMC_ID 0x1DC711C0 /**< special value to ensure that regular pixel routines haven't corrupted the struct 33 #define AV_XVMC_ID 0x1DC711C0 /**< special value to ensure that regular pixel routines haven't corrupted the struct
34 the number is 1337 speak for the letters IDCT MCo (motion compensation) */ 34 the number is 1337 speak for the letters IDCT MCo (motion compensation) */
35 35
36 struct xvmc_pix_fmt { 36 struct xvmc_pix_fmt {
37 /** Set by the calling application.
38 Once set these values are not supposed to be modified.
39 */
40 //@{
41 /** The field contains the special constant value AV_XVMC_ID. 37 /** The field contains the special constant value AV_XVMC_ID.
42 It is used as a test that the application correctly uses the API, 38 It is used as a test that the application correctly uses the API,
43 and that there is no corruption caused by pixel routines. 39 and that there is no corruption caused by pixel routines.
44 - application - set during initialization 40 - application - set during initialization
45 - libavcodec - unchanged 41 - libavcodec - unchanged
46 */ 42 */
47 int xvmc_id; 43 int xvmc_id;
48 44
49 /** Pointer to the block array allocated by XvMCCreateBlocks() 45 /** Pointer to the block array allocated by XvMCCreateBlocks().
50 it contains differential pixel data (in MoCo mode) 46 The array is have to be freed by XvMCDestroyBlocks().
51 or coefficients for IDCT. 47 Each 64 values represent one data block of
52 - application - set during initialization 48 differential pixel data (in MoCo mode) or coefficients for IDCT.
53 - libavcodec - unchanged 49 - application - set the pointer during initialization
50 - libavcodec - fills coefficients/pixel data into the array
54 */ 51 */
55 short* data_blocks; 52 short* data_blocks;
56 53
57 /** Pointer to the macroblock description array allocated by 54 /** Pointer to the macroblock description array allocated by
58 XvMCCreateMacroBlocks(). 55 XvMCCreateMacroBlocks() and freed by XvMCDestroyMacroBlocks().
59 - application - set during initialization 56 - application - set the pointer during initialization
60 - libavcodec - unchanged 57 - libavcodec - fills description data into the array
61 */ 58 */
62 XvMCMacroBlock* mv_blocks; 59 XvMCMacroBlock* mv_blocks;
63 60
64 /** Number of macroblock descriptions that can be stored in the mv_blocks 61 /** Number of macroblock descriptions that can be stored in the mv_blocks
65 array. 62 array.
87 - libavcodec - unchanged 84 - libavcodec - unchanged
88 */ 85 */
89 int unsigned_intra; 86 int unsigned_intra;
90 87
91 /** Pointer to the surface allocated by XvMCCreateSurface(). 88 /** Pointer to the surface allocated by XvMCCreateSurface().
89 It have to be freed by XvMCDestroySurface() on application exit.
92 It identifies the frame and its state on the video hardware. 90 It identifies the frame and its state on the video hardware.
93 - application - set during initialization 91 - application - set during initialization
94 - libavcodec - unchanged 92 - libavcodec - unchanged
95 */ 93 */
96 XvMCSurface* p_surface; 94 XvMCSurface* p_surface;
97 //}@
98 95
99 /** Set by the decoder before calling ff_draw_horiz_band(), 96 /** Set by the decoder before calling ff_draw_horiz_band(),
100 needed by the XvMCRenderSurface function. */ 97 needed by the XvMCRenderSurface function. */
101 //@{ 98 //@{
102 /** Pointer to the surface used as past reference 99 /** Pointer to the surface used as past reference
122 - libavcodec - set 119 - libavcodec - set
123 */ 120 */
124 unsigned int flags; 121 unsigned int flags;
125 //}@ 122 //}@
126 123
127 /** Offset in the mv array for the current slice. 124 /** Number of macro block descriptions in the mv_blocks array
128 Macroblocks described before that offset are assumed to have already 125 that have already been passed to the hardware.
129 been passed to the hardware.
130 - application - zeroes it on get_buffer(). 126 - application - zeroes it on get_buffer().
131 A successful ff_draw_horiz_band() may increment it 127 A successful ff_draw_horiz_band() may increment it
132 with filled_mb_block_num or zero both. 128 with filled_mb_block_num or zero both.
133 - libavcodec - unchanged 129 - libavcodec - unchanged
134 */ 130 */
135 int start_mv_blocks_num; 131 int start_mv_blocks_num;
136 132
137 /** Number of mv blocks that are filled by libavcodec and have to be 133 /** Number of new macro blocks descriptions in mv_blocks array
138 passed to the hardware. 134 that are filled by libavcodec and have to be passed to the hardware.
139 - application - zeroes it on get_buffer() or after successful 135 - application - zeroes it on get_buffer() or after successful
140 ff_draw_horiz_band(). 136 ff_draw_horiz_band().
141 - libavcodec - increment with one of each stored MB 137 - libavcodec - increment with one of each stored MB
142 */ 138 */
143 int filled_mv_blocks_num; 139 int filled_mv_blocks_num;
144 140
145 /** Offset to the next free data block. The mv_blocks field holds a number 141 /** Number of the the next free data block.
146 pointing to the data blocks. 142 One data block is 64 short values in data_blocks array.
147 - application - zeroes it on get_buffer() and after successful 143 All blocks before this one are already claimed by filling their number
148 ff_draw_horiz_band(). 144 in the corresponding blocks description structure field,
149 - libavcodec - each macroblock increases it with the number 145 that are hold in mv_blocks array.
146 - application - zeroes it on get_buffer().
147 A successful ff_draw_horiz_band() may zero it together
148 with start_mb_blocks_num.
149 - libavcodec - each decoded macroblock increases it with the number
150 of coded blocks it contains. 150 of coded blocks it contains.
151 */ 151 */
152 int next_free_data_block_num; 152 int next_free_data_block_num;
153 153
154 /** extensions may be placed here */ 154 /** extensions may be placed here */
155 #if LIBAVCODEC_VERSION_MAJOR < 53 155 #if LIBAVCODEC_VERSION_MAJOR < 53
156 //@{ 156 //@{
157 /** State - used to work around limitations in the MPlayer video system. 157 /** State flags used to work around limitations in the MPlayer video system.
158 0 - Surface is not used. 158 0 - Surface is not used.
159 1 - Surface is still held in application to be displayed or is 159 1 - Surface is still held in application to be displayed or is
160 still visible. 160 still visible.
161 2 - Surface is still held in libavcodec buffer for prediction. 161 2 - Surface is still held in libavcodec buffer for prediction.
162 */ 162 */