Revision 3d43e42f libavcodec/mpegvideo_xvmc.c

View differences:

libavcodec/mpegvideo_xvmc.c
34 34
/**
35 35
 * Initializes the block field of the MpegEncContext pointer passed as
36 36
 * parameter after making sure that the data is not corrupted.
37
 * In order to implement something like direct rendering instead of decodeing
38
 * coefficients in s->blocks and then copy them, do that directly
39
 * into the data_blocks array provided by xvmc.
37 40
 */
38 41
void ff_xvmc_init_block(MpegEncContext *s)
39 42
{
......
43 46
    s->block = (DCTELEM *)(render->data_blocks + render->next_free_data_block_num * 64);
44 47
}
45 48

  
49
/**
50
 * Fill individual block pointers, so there are no gaps in the data_block array
51
 * in case not all blocks in MB are coded.
52
 */
46 53
void ff_xvmc_pack_pblocks(MpegEncContext *s, int cbp)
47 54
{
48 55
    int i, j = 0;
......
59 66
}
60 67

  
61 68
/**
69
 * Find and store the surfaces that are used as reference frames.
62 70
 * This function should be called for every new field and/or frame.
63 71
 * It should be safe to call the function a few times for the same field.
64 72
 */
......
118 126
}
119 127

  
120 128
/**
121
 * This function should be called for every new field and/or frame.
129
 * Complete frame/field rendering by passing any remaining blocks.
130
 * Normally ff_draw_horiz_band() is called on each slice, however
131
 * there may be some remaining blocks, for example put by error_resilience.
122 132
 * It should be safe to call the function a few times for the same field.
123 133
 */
124 134
void ff_xvmc_field_end(MpegEncContext *s)
......
130 140
        ff_draw_horiz_band(s, 0, 0);
131 141
}
132 142

  
143
/**
144
 * Synthesize the data needed by XvMC to render one macroblock of data.
145
 * Fill all relevent fields, if necessery do IDCT.
146
 */
133 147
void ff_xvmc_decode_mb(MpegEncContext *s)
134 148
{
135 149
    XvMCMacroBlock *mv_block;

Also available in: Unified diff