changeset 8926:b8da7a21372c libavcodec

Document all functions in mpegvideo_xvmc.
author iive
date Sun, 15 Feb 2009 18:30:39 +0000
parents 23051e3e9d25
children b978ca882917
files mpegvideo_xvmc.c
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo_xvmc.c	Sun Feb 15 17:42:08 2009 +0000
+++ b/mpegvideo_xvmc.c	Sun Feb 15 18:30:39 2009 +0000
@@ -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 @@
     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 @@
 }
 
 /**
+ * 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 @@
 }
 
 /**
- * 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 @@
         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;