summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_xvmc.c
diff options
context:
space:
mode:
authorIvan Kalvachev <ikalvachev@gmail.com>2009-02-15 18:30:39 +0000
committerIvan Kalvachev <ikalvachev@gmail.com>2009-02-15 18:30:39 +0000
commit3d43e42f293bd79a4b4cd93b499f438827481eb8 (patch)
treeb8d1c724f52f1b602731c16efc65bfe695c199ed /libavcodec/mpegvideo_xvmc.c
parentf602b044b55b986eba91aeeb598321b55c59715e (diff)
Document all functions in mpegvideo_xvmc.
Originally committed as revision 17340 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo_xvmc.c')
-rw-r--r--libavcodec/mpegvideo_xvmc.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_xvmc.c b/libavcodec/mpegvideo_xvmc.c
index 1310c92bbf..d9b238ac0f 100644
--- a/libavcodec/mpegvideo_xvmc.c
+++ b/libavcodec/mpegvideo_xvmc.c
@@ -34,6 +34,9 @@
/**
* Initializes the block field of the MpegEncContext pointer passed as
* parameter after making sure that the data is not corrupted.
+ * In order to implement something like direct rendering instead of decodeing
+ * coefficients in s->blocks and then copy them, do that directly
+ * into the data_blocks array provided by xvmc.
*/
void ff_xvmc_init_block(MpegEncContext *s)
{
@@ -43,6 +46,10 @@ void ff_xvmc_init_block(MpegEncContext *s)
s->block = (DCTELEM *)(render->data_blocks + render->next_free_data_block_num * 64);
}
+/**
+ * Fill individual block pointers, so there are no gaps in the data_block array
+ * in case not all blocks in MB are coded.
+ */
void ff_xvmc_pack_pblocks(MpegEncContext *s, int cbp)
{
int i, j = 0;
@@ -59,6 +66,7 @@ void ff_xvmc_pack_pblocks(MpegEncContext *s, int cbp)
}
/**
+ * Find and store the surfaces that are used as reference frames.
* This function should be called for every new field and/or frame.
* It should be safe to call the function a few times for the same field.
*/
@@ -118,7 +126,9 @@ return -1;
}
/**
- * This function should be called for every new field and/or frame.
+ * Complete frame/field rendering by passing any remaining blocks.
+ * Normally ff_draw_horiz_band() is called on each slice, however
+ * there may be some remaining blocks, for example put by error_resilience.
* It should be safe to call the function a few times for the same field.
*/
void ff_xvmc_field_end(MpegEncContext *s)
@@ -130,6 +140,10 @@ void ff_xvmc_field_end(MpegEncContext *s)
ff_draw_horiz_band(s, 0, 0);
}
+/**
+ * Synthesize the data needed by XvMC to render one macroblock of data.
+ * Fill all relevent fields, if necessery do IDCT.
+ */
void ff_xvmc_decode_mb(MpegEncContext *s)
{
XvMCMacroBlock *mv_block;