[FFmpeg-soc] [soc]: r5560 - in indeo5: ivi_common.c ivi_common.h ivi_dsp.c ivi_dsp.h

kostya subversion at mplayerhq.hu
Sun Jan 3 11:24:43 CET 2010


Author: kostya
Date: Sun Jan  3 11:24:43 2010
New Revision: 5560

Log:
Move doxy comments for global functions into headers and remove duplicating
entries in corresponding .c files.

Modified:
   indeo5/ivi_common.c
   indeo5/ivi_common.h
   indeo5/ivi_dsp.c
   indeo5/ivi_dsp.h

Modified: indeo5/ivi_common.c
==============================================================================
--- indeo5/ivi_common.c	Sun Jan  3 11:13:43 2010	(r5559)
+++ indeo5/ivi_common.c	Sun Jan  3 11:24:43 2010	(r5560)
@@ -49,16 +49,6 @@ static uint16_t inv_bits(const uint16_t 
     return res;
 }
 
-
-/**
- *  Generates a huffman codebook from the given descriptor
- *  and converts it into the FFmpeg VLC table.
- *
- *  @param cb   [in]  pointer to codebook descriptor
- *  @param pOut [out] where to place the generated VLC table
- *  @param flag [in]  flag: 1 - for static or 0 for dynamic tables
- *  @return     result code: 0 - OK, -1 = error (invalid codebook descriptor)
- */
 int ff_ivi_create_huff_from_desc(const IVIHuffDesc *cb, VLC *pOut,
                                  const int flag)
 {
@@ -94,15 +84,6 @@ int ff_ivi_create_huff_from_desc(const I
                     (flag & 1) | INIT_VLC_LE);
 }
 
-
-/**
- *  Decodes a huffman codebook descriptor from the bitstream.
- *
- *  @param gb   [in,out] the GetBit context
- *  @param desc [out] ptr to descriptor to be filled with data
- *  @return     selector indicating huffman table:
- *              (0...6 - predefined, 7 - custom one supplied with the bitstream)
- */
 int ff_ivi_dec_huff_desc(GetBitContext *gb, IVIHuffDesc *desc)
 {
     int tab_sel, i;
@@ -119,14 +100,6 @@ int ff_ivi_dec_huff_desc(GetBitContext *
     return tab_sel;
 }
 
-
-/**
- *  Compares two huffman codebook descriptors.
- *
- *  @param desc1    [in] ptr to the 1st descriptor to compare
- *  @param desc2    [in] ptr to the 2nd descriptor to compare
- *  @return         comparison result: 0 - equal, 1 - not equal
- */
 int ff_ivi_huff_desc_cmp(const IVIHuffDesc *desc1, const IVIHuffDesc *desc2)
 {
     if (desc1->num_rows != desc2->num_rows ||
@@ -135,27 +108,12 @@ int ff_ivi_huff_desc_cmp(const IVIHuffDe
     return 0;
 }
 
-
-/**
- *  Copies huffman codebook descriptors.
- *
- *  @param dst  [out] ptr to the destination descriptor
- *  @param src  [in]  ptr to the source descriptor
- */
 void ff_ivi_huff_desc_copy(IVIHuffDesc *dst, const IVIHuffDesc *src)
 {
     dst->num_rows = src->num_rows;
     memcpy(dst->xbits, src->xbits, src->num_rows);
 }
 
-
-/**
- *  Initializes planes (prepares descriptors, allocates buffers etc).
- *
- *  @param planes       [in,out] pointer to the array of the plane descriptors
- *  @param cfg          [in] pointer to the ivi_pic_config structure describing picture layout
- *  @return             result code: 0 - OK
- */
 int av_cold ff_ivi_init_planes(IVIPlaneDesc *planes, const IVIPicConfig *cfg)
 {
     int         p, b;
@@ -211,12 +169,6 @@ int av_cold ff_ivi_init_planes(IVIPlaneD
     return 0;
 }
 
-
-/**
- *  Frees planes, bands and macroblocks buffers.
- *
- *  @param planes       [in] pointer to the array of the plane descriptors
- */
 void av_cold ff_ivi_free_buffers(IVIPlaneDesc *planes)
 {
     int p, b, t;
@@ -235,15 +187,6 @@ void av_cold ff_ivi_free_buffers(IVIPlan
     }
 }
 
-
-/**
- *  Initializes tile and macroblock descriptors.
- *
- *  @param planes       [in,out] pointer to the array of the plane descriptors
- *  @param tile_width   [in]     tile width
- *  @param tile_height  [in]     tile height
- *  @return             result code: 0 - OK
- */
 int av_cold ff_ivi_init_tiles(IVIPlaneDesc *planes, const int tile_width,
                               const int tile_height)
 {
@@ -300,10 +243,6 @@ int av_cold ff_ivi_init_tiles(IVIPlaneDe
     return 0;
 }
 
-
-/**
- *  Copies the pixels into the frame buffer.
- */
 void ff_ivi_put_pixels_8x8(int32_t *in, int16_t *out, uint32_t pitch,
                            uint8_t *flags)
 {
@@ -314,11 +253,6 @@ void ff_ivi_put_pixels_8x8(int32_t *in, 
             out[x] = in[x];
 }
 
-
-/**
- *  Copies the DC coefficient into the first pixel of the block and
- *  zeroes all others.
- */
 void ff_ivi_put_dc_pixel_8x8(int32_t *in, int16_t *out, uint32_t pitch,
                              int blk_size)
 {
@@ -332,17 +266,6 @@ void ff_ivi_put_dc_pixel_8x8(int32_t *in
         memset(out, 0, 8*sizeof(int16_t));
 }
 
-
-/**
- *  Decodes size of the tile data.
- *  The size is stored as a variable-length field having the following format:
- *  if (tile_data_size < 255) than this field is only one byte long
- *  if (tile_data_size >= 255) than this field four is byte long: 0xFF X1 X2 X3
- *  where X1-X3 is size of the tile data
- *
- *  @param gb   [in,out] the GetBit context
- *  @return     size of the tile data in bytes
- */
 int ff_ivi_dec_tile_data_size(GetBitContext *gb)
 {
     int    len;
@@ -360,18 +283,6 @@ int ff_ivi_dec_tile_data_size(GetBitCont
     return len;
 }
 
-
-/**
- *  Decodes block data:
- *  extracts huffman-coded transform coefficients from the bitstream,
- *  dequantizes them, applies inverse transform and motion compensation
- *  in order to reconstruct the picture.
- *
- *  @param gb   [in,out] the GetBit context
- *  @param band [in]     pointer to the band descriptor
- *  @param tile [in]     pointer to the tile descriptor
- *  @return     result code: 0 - OK, -1 = error (corrupted blocks data)
- */
 int ff_ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile)
 {
     int         mbn, blk, num_blocks, num_coeffs, blk_size, scan_pos, run, val,
@@ -512,16 +423,6 @@ int ff_ivi_decode_blocks(GetBitContext *
     return 0;
 }
 
-
-/**
- *  Handles empty tiles by performing data copying and motion
- *  compensation respectively.
- *
- *  @param avctx    [in] ptr to the AVCodecContext
- *  @param band     [in] pointer to the band descriptor
- *  @param tile     [in] pointer to the tile descriptor
- *  @param mv_scale [in] scaling factor for motion vectors
- */
 void ff_ivi_process_empty_tile(AVCodecContext *avctx, IVIBandDesc *band,
                                IVITile *tile, int32_t mv_scale)
 {
@@ -630,9 +531,6 @@ void ff_ivi_process_empty_tile(AVCodecCo
 
 
 #ifdef IVI_DEBUG
-/**
- *  Calculates band checksum from band data.
- */
 uint16_t ivi_calc_band_checksum (IVIBandDesc *band)
 {
     int         x, y;
@@ -648,10 +546,6 @@ uint16_t ivi_calc_band_checksum (IVIBand
     return checksum;
 }
 
-
-/**
- *  Verifies that band data lies in range.
- */
 int ivi_check_band (IVIBandDesc *band, uint8_t *ref, int pitch)
 {
     int         x, y, result;
@@ -678,16 +572,6 @@ int ivi_check_band (IVIBandDesc *band, u
 }
 #endif
 
-
-/**
- *  Converts and outputs the current plane.
- *  This conversion is done by adding back the bias value of 128
- *  (subtracted in the encoder) and clipping the result.
- *
- *  @param plane        [in]  pointer to the descriptor of the plane being processed
- *  @param dst          [out] pointer to the buffer receiving converted pixels
- *  @param dst_pitch    [in]  pitch for moving to the next y line
- */
 void ff_ivi_output_plane(const IVIPlaneDesc *plane, uint8_t *dst, const int dst_pitch)
 {
     int             x, y;

Modified: indeo5/ivi_common.h
==============================================================================
--- indeo5/ivi_common.h	Sun Jan  3 11:13:43 2010	(r5559)
+++ indeo5/ivi_common.h	Sun Jan  3 11:24:43 2010	(r5560)
@@ -193,22 +193,137 @@ static inline int ivi_pic_config_cmp(IVI
 /** divide the motion vector mv by 2 */
 #define IVI_MV_DIV2(mv) (((mv) + ((mv) > 0))>>1)
 
+/**
+ *  Generates a huffman codebook from the given descriptor
+ *  and converts it into the FFmpeg VLC table.
+ *
+ *  @param cb   [in]  pointer to codebook descriptor
+ *  @param pOut [out] where to place the generated VLC table
+ *  @param flag [in]  flag: 1 - for static or 0 for dynamic tables
+ *  @return     result code: 0 - OK, -1 = error (invalid codebook descriptor)
+ */
 int  ff_ivi_create_huff_from_desc(const IVIHuffDesc *cb, VLC *pOut, int flag);
+
+/**
+ *  Decodes a huffman codebook descriptor from the bitstream.
+ *
+ *  @param gb   [in,out] the GetBit context
+ *  @param desc [out] ptr to descriptor to be filled with data
+ *  @return     selector indicating huffman table:
+ *              (0...6 - predefined, 7 - custom one supplied with the bitstream)
+ */
 int  ff_ivi_dec_huff_desc(GetBitContext *gb, IVIHuffDesc *desc);
+
+/**
+ *  Compares two huffman codebook descriptors.
+ *
+ *  @param desc1    [in] ptr to the 1st descriptor to compare
+ *  @param desc2    [in] ptr to the 2nd descriptor to compare
+ *  @return         comparison result: 0 - equal, 1 - not equal
+ */
 int  ff_ivi_huff_desc_cmp(const IVIHuffDesc *desc1, const IVIHuffDesc *desc2);
+
+/**
+ *  Copies huffman codebook descriptors.
+ *
+ *  @param dst  [out] ptr to the destination descriptor
+ *  @param src  [in]  ptr to the source descriptor
+ */
 void ff_ivi_huff_desc_copy(IVIHuffDesc *dst, const IVIHuffDesc *src);
+
+/**
+ *  Initializes planes (prepares descriptors, allocates buffers etc).
+ *
+ *  @param planes       [in,out] pointer to the array of the plane descriptors
+ *  @param cfg          [in] pointer to the ivi_pic_config structure describing picture layout
+ *  @return             result code: 0 - OK
+ */
 int  ff_ivi_init_planes(IVIPlaneDesc *planes, const IVIPicConfig *cfg);
+
+/**
+ *  Frees planes, bands and macroblocks buffers.
+ *
+ *  @param planes       [in] pointer to the array of the plane descriptors
+ */
 void ff_ivi_free_buffers(IVIPlaneDesc *planes);
+
+/**
+ *  Initializes tile and macroblock descriptors.
+ *
+ *  @param planes       [in,out] pointer to the array of the plane descriptors
+ *  @param tile_width   [in]     tile width
+ *  @param tile_height  [in]     tile height
+ *  @return             result code: 0 - OK
+ */
 int  ff_ivi_init_tiles(IVIPlaneDesc *planes, const int tile_width, const int tile_height);
+
+/**
+ *  Decodes size of the tile data.
+ *  The size is stored as a variable-length field having the following format:
+ *  if (tile_data_size < 255) than this field is only one byte long
+ *  if (tile_data_size >= 255) than this field four is byte long: 0xFF X1 X2 X3
+ *  where X1-X3 is size of the tile data
+ *
+ *  @param gb   [in,out] the GetBit context
+ *  @return     size of the tile data in bytes
+ */
 int  ff_ivi_dec_tile_data_size(GetBitContext *gb);
+
+/**
+ *  Decodes block data:
+ *  extracts huffman-coded transform coefficients from the bitstream,
+ *  dequantizes them, applies inverse transform and motion compensation
+ *  in order to reconstruct the picture.
+ *
+ *  @param gb   [in,out] the GetBit context
+ *  @param band [in]     pointer to the band descriptor
+ *  @param tile [in]     pointer to the tile descriptor
+ *  @return     result code: 0 - OK, -1 = error (corrupted blocks data)
+ */
 int  ff_ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile);
+
+/**
+ *  Handles empty tiles by performing data copying and motion
+ *  compensation respectively.
+ *
+ *  @param avctx    [in] ptr to the AVCodecContext
+ *  @param band     [in] pointer to the band descriptor
+ *  @param tile     [in] pointer to the tile descriptor
+ *  @param mv_scale [in] scaling factor for motion vectors
+ */
 void ff_ivi_process_empty_tile(AVCodecContext *avctx, IVIBandDesc *band, IVITile *tile, int32_t mv_scale);
+
+/**
+ *  Converts and outputs the current plane.
+ *  This conversion is done by adding back the bias value of 128
+ *  (subtracted in the encoder) and clipping the result.
+ *
+ *  @param plane        [in]  pointer to the descriptor of the plane being processed
+ *  @param dst          [out] pointer to the buffer receiving converted pixels
+ *  @param dst_pitch    [in]  pitch for moving to the next y line
+ */
 void ff_ivi_output_plane(const IVIPlaneDesc *plane, uint8_t *dst, const int dst_pitch);
+
+/**
+ *  Copies the pixels into the frame buffer.
+ */
 void ff_ivi_put_pixels_8x8(int32_t *in, int16_t *out, uint32_t pitch, uint8_t *flags);
+
+/**
+ *  Copies the DC coefficient into the first pixel of the block and
+ *  zeroes all others.
+ */
 void ff_ivi_put_dc_pixel_8x8(int32_t *in, int16_t *out, uint32_t pitch, int blk_size);
 
 #ifdef IVI_DEBUG
+/**
+ *  Calculates band checksum from band data.
+ */
 uint16_t ivi_calc_band_checksum (IVIBandDesc *band);
+
+/**
+ *  Verifies that band data lies in range.
+ */
 int ivi_check_band (IVIBandDesc *band, uint8_t *ref, int pitch);
 #endif
 

Modified: indeo5/ivi_dsp.c
==============================================================================
--- indeo5/ivi_dsp.c	Sun Jan  3 11:13:43 2010	(r5559)
+++ indeo5/ivi_dsp.c	Sun Jan  3 11:24:43 2010	(r5560)
@@ -31,9 +31,6 @@
 #include "ivi_common.h"
 #include "ivi_dsp.h"
 
-/**
- *  5/3 wavelet recomposition filter for Indeo5
- */
 void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
                         const int dst_pitch, const int num_bands)
 {
@@ -219,10 +216,6 @@ void ff_ivi_recompose53(const IVIPlaneDe
     d3 = COMPENSATE(s3);\
     d4 = COMPENSATE(s4);}
 
-
-/**
- *  two-dimensional inverse slant 8x8 transform
- */
 void ff_ivi_inverse_slant_8x8(int32_t *in, int16_t *out, uint32_t pitch, uint8_t *flags)
 {
     int     i, t1;
@@ -261,10 +254,6 @@ void ff_ivi_inverse_slant_8x8(int32_t *i
 #undef COMPENSATE
 }
 
-
-/**
- *  two-dimensional inverse slant 4x4 transform
- */
 void ff_ivi_inverse_slant_4x4(int32_t *in, int16_t *out, uint32_t pitch, uint8_t *flags)
 {
     int     i, t1;
@@ -300,10 +289,6 @@ void ff_ivi_inverse_slant_4x4(int32_t *i
 #undef COMPENSATE
 }
 
-
-/**
- *  DC-only inverse 2D slant transforms
- */
 void ff_ivi_dc_slant_2d(int32_t *in, int16_t *out, uint32_t pitch, int blk_size)
 {
     int     x, y;
@@ -317,10 +302,6 @@ void ff_ivi_dc_slant_2d(int32_t *in, int
     }
 }
 
-
-/**
- *  inverse 1D row slant transform
- */
 void ff_ivi_row_slant8(int32_t *in, int16_t *out, uint32_t pitch, uint8_t *flags)
 {
     int     i, t1;
@@ -341,10 +322,6 @@ void ff_ivi_row_slant8(int32_t *in, int1
 #undef COMPENSATE
 }
 
-
-/**
- *  DC-only inverse row slant transform
- */
 void ff_ivi_dc_row_slant(int32_t *in, int16_t *out, uint32_t pitch, int blk_size)
 {
     int     x, y;
@@ -363,10 +340,6 @@ void ff_ivi_dc_row_slant(int32_t *in, in
     }
 }
 
-
-/**
- *  inverse 1D column slant transform
- */
 void ff_ivi_col_slant8(int32_t *in, int16_t *out, uint32_t pitch, uint8_t *flags)
 {
     int     i, t1, row2, row4, row8;
@@ -394,10 +367,6 @@ void ff_ivi_col_slant8(int32_t *in, int1
 #undef COMPENSATE
 }
 
-
-/**
- *  DC-only inverse column slant transform
- */
 void ff_ivi_dc_col_slant(int32_t *in, int16_t *out, uint32_t pitch, int blk_size)
 {
     int     x, y;
@@ -412,10 +381,6 @@ void ff_ivi_dc_col_slant(int32_t *in, in
     }
 }
 
-
-/**
- *  8x8 block motion compensation with adding delta
- */
 void ff_ivi_mc_8x8_delta(int16_t *buf, int16_t *ref_buf, uint32_t pitch, int mc_type)
 {
     int     i, j;
@@ -454,10 +419,6 @@ void ff_ivi_mc_8x8_delta(int16_t *buf, i
     }
 }
 
-
-/**
- *  4x4 block motion compensation with adding delta
- */
 void ff_ivi_mc_4x4_delta(int16_t *buf, int16_t *ref_buf, uint32_t pitch, int mc_type)
 {
     int     i;
@@ -501,10 +462,6 @@ void ff_ivi_mc_4x4_delta(int16_t *buf, i
     }
 }
 
-
-/**
- *  motion compensation without adding delta
- */
 void ff_ivi_mc_8x8_no_delta(int16_t *buf, int16_t *ref_buf, uint32_t pitch, int mc_type)
 {
     int     i, j;
@@ -535,10 +492,6 @@ void ff_ivi_mc_8x8_no_delta(int16_t *buf
     }
 }
 
-
-/**
- *  4x4 block motion compensation without adding delta
- */
 void ff_ivi_mc_4x4_no_delta(int16_t *buf, int16_t *ref_buf, uint32_t pitch, int mc_type)
 {
     int     i;

Modified: indeo5/ivi_dsp.h
==============================================================================
--- indeo5/ivi_dsp.h	Sun Jan  3 11:13:43 2010	(r5559)
+++ indeo5/ivi_dsp.h	Sun Jan  3 11:24:43 2010	(r5560)
@@ -103,8 +103,14 @@ void ff_ivi_row_slant8(int32_t *in, int1
  */
 void ff_ivi_col_slant8(int32_t *in, int16_t *out, uint32_t pitch, uint8_t *flags);
 
+/**
+ *  DC-only inverse row slant transform
+ */
 void ff_ivi_dc_row_slant(int32_t *in, int16_t *out, uint32_t pitch, int blk_size);
 
+/**
+ *  DC-only inverse column slant transform
+ */
 void ff_ivi_dc_col_slant(int32_t *in, int16_t *out, uint32_t pitch, int blk_size);
 
 /**


More information about the FFmpeg-soc mailing list