Browse Source

spelling/grammar/consistency review part I

Originally committed as revision 16840 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diego Biurrun 16 years ago
parent
commit
89c9ff504b
10 changed files with 76 additions and 75 deletions
  1. 2 2
      libavutil/avstring.h
  2. 38 38
      libavutil/avutil.h
  3. 2 2
      libavutil/bswap.h
  4. 12 12
      libavutil/common.h
  5. 3 3
      libavutil/crc.c
  6. 1 1
      libavutil/crc.h
  7. 2 2
      libavutil/fifo.c
  8. 7 7
      libavutil/fifo.h
  9. 1 1
      libavutil/integer.c
  10. 8 7
      libavutil/integer.h

+ 2 - 2
libavutil/avstring.h

@@ -48,7 +48,7 @@ int av_stristart(const char *str, const char *pfx, const char **ptr);
 
 /**
  * Copy the string src to dst, but no more than size - 1 bytes, and
- * null terminate dst.
+ * null-terminate dst.
  *
  * This function is the same as BSD strlcpy().
  *
@@ -61,7 +61,7 @@ size_t av_strlcpy(char *dst, const char *src, size_t size);
 
 /**
  * Append the string src to the string dst, but to a total length of
- * no more than size - 1 bytes, and null terminate dst.
+ * no more than size - 1 bytes, and null-terminate dst.
  *
  * This function is similar to BSD strlcat(), but differs when
  * size <= strlen(dst).

+ 38 - 38
libavutil/avutil.h

@@ -62,11 +62,11 @@ unsigned avutil_version(void);
 /**
  * Pixel format. Notes:
  *
- * PIX_FMT_RGB32 is handled in an endian-specific manner. A RGBA
+ * PIX_FMT_RGB32 is handled in an endian-specific manner. An RGBA
  * color is put together as:
  *  (A << 24) | (R << 16) | (G << 8) | B
- * This is stored as BGRA on little endian CPU architectures and ARGB on
- * big endian CPUs.
+ * This is stored as BGRA on little-endian CPU architectures and ARGB on
+ * big-endian CPUs.
  *
  * When the pixel format is palettized RGB (PIX_FMT_PAL8), the palettized
  * image data is stored in AVFrame.data[0]. The palette is transported in
@@ -79,53 +79,53 @@ unsigned avutil_version(void);
  */
 enum PixelFormat {
     PIX_FMT_NONE= -1,
-    PIX_FMT_YUV420P,   ///< Planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
-    PIX_FMT_YUYV422,   ///< Packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
-    PIX_FMT_RGB24,     ///< Packed RGB 8:8:8, 24bpp, RGBRGB...
-    PIX_FMT_BGR24,     ///< Packed RGB 8:8:8, 24bpp, BGRBGR...
-    PIX_FMT_YUV422P,   ///< Planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
-    PIX_FMT_YUV444P,   ///< Planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
-    PIX_FMT_RGB32,     ///< Packed RGB 8:8:8, 32bpp, (msb)8A 8R 8G 8B(lsb), in cpu endianness
-    PIX_FMT_YUV410P,   ///< Planar YUV 4:1:0,  9bpp, (1 Cr & Cb sample per 4x4 Y samples)
-    PIX_FMT_YUV411P,   ///< Planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
-    PIX_FMT_RGB565,    ///< Packed RGB 5:6:5, 16bpp, (msb)   5R 6G 5B(lsb), in cpu endianness
-    PIX_FMT_RGB555,    ///< Packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), in cpu endianness most significant bit to 0
+    PIX_FMT_YUV420P,   ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
+    PIX_FMT_YUYV422,   ///< packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
+    PIX_FMT_RGB24,     ///< packed RGB 8:8:8, 24bpp, RGBRGB...
+    PIX_FMT_BGR24,     ///< packed RGB 8:8:8, 24bpp, BGRBGR...
+    PIX_FMT_YUV422P,   ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
+    PIX_FMT_YUV444P,   ///< planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
+    PIX_FMT_RGB32,     ///< packed RGB 8:8:8, 32bpp, (msb)8A 8R 8G 8B(lsb), in CPU endianness
+    PIX_FMT_YUV410P,   ///< planar YUV 4:1:0,  9bpp, (1 Cr & Cb sample per 4x4 Y samples)
+    PIX_FMT_YUV411P,   ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
+    PIX_FMT_RGB565,    ///< packed RGB 5:6:5, 16bpp, (msb)   5R 6G 5B(lsb), in CPU endianness
+    PIX_FMT_RGB555,    ///< packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), in CPU endianness, most significant bit to 0
     PIX_FMT_GRAY8,     ///<        Y        ,  8bpp
     PIX_FMT_MONOWHITE, ///<        Y        ,  1bpp, 0 is white, 1 is black
     PIX_FMT_MONOBLACK, ///<        Y        ,  1bpp, 0 is black, 1 is white
     PIX_FMT_PAL8,      ///< 8 bit with PIX_FMT_RGB32 palette
-    PIX_FMT_YUVJ420P,  ///< Planar YUV 4:2:0, 12bpp, full scale (jpeg)
-    PIX_FMT_YUVJ422P,  ///< Planar YUV 4:2:2, 16bpp, full scale (jpeg)
-    PIX_FMT_YUVJ444P,  ///< Planar YUV 4:4:4, 24bpp, full scale (jpeg)
+    PIX_FMT_YUVJ420P,  ///< planar YUV 4:2:0, 12bpp, full scale (JPEG)
+    PIX_FMT_YUVJ422P,  ///< planar YUV 4:2:2, 16bpp, full scale (JPEG)
+    PIX_FMT_YUVJ444P,  ///< planar YUV 4:4:4, 24bpp, full scale (JPEG)
     PIX_FMT_XVMC_MPEG2_MC,///< XVideo Motion Acceleration via common packet passing(xvmc_render.h)
     PIX_FMT_XVMC_MPEG2_IDCT,
-    PIX_FMT_UYVY422,   ///< Packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
-    PIX_FMT_UYYVYY411, ///< Packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
-    PIX_FMT_BGR32,     ///< Packed RGB 8:8:8, 32bpp, (msb)8A 8B 8G 8R(lsb), in cpu endianness
-    PIX_FMT_BGR565,    ///< Packed RGB 5:6:5, 16bpp, (msb)   5B 6G 5R(lsb), in cpu endianness
-    PIX_FMT_BGR555,    ///< Packed RGB 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), in cpu endianness most significant bit to 1
-    PIX_FMT_BGR8,      ///< Packed RGB 3:3:2,  8bpp, (msb)2B 3G 3R(lsb)
-    PIX_FMT_BGR4,      ///< Packed RGB 1:2:1,  4bpp, (msb)1B 2G 1R(lsb)
-    PIX_FMT_BGR4_BYTE, ///< Packed RGB 1:2:1,  8bpp, (msb)1B 2G 1R(lsb)
-    PIX_FMT_RGB8,      ///< Packed RGB 3:3:2,  8bpp, (msb)2R 3G 3B(lsb)
-    PIX_FMT_RGB4,      ///< Packed RGB 1:2:1,  4bpp, (msb)1R 2G 1B(lsb)
-    PIX_FMT_RGB4_BYTE, ///< Packed RGB 1:2:1,  8bpp, (msb)1R 2G 1B(lsb)
-    PIX_FMT_NV12,      ///< Planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 for UV
+    PIX_FMT_UYVY422,   ///< packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
+    PIX_FMT_UYYVYY411, ///< packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
+    PIX_FMT_BGR32,     ///< packed RGB 8:8:8, 32bpp, (msb)8A 8B 8G 8R(lsb), in CPU endianness
+    PIX_FMT_BGR565,    ///< packed RGB 5:6:5, 16bpp, (msb)   5B 6G 5R(lsb), in CPU endianness
+    PIX_FMT_BGR555,    ///< packed RGB 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), in CPU endianness, most significant bit to 1
+    PIX_FMT_BGR8,      ///< packed RGB 3:3:2,  8bpp, (msb)2B 3G 3R(lsb)
+    PIX_FMT_BGR4,      ///< packed RGB 1:2:1,  4bpp, (msb)1B 2G 1R(lsb)
+    PIX_FMT_BGR4_BYTE, ///< packed RGB 1:2:1,  8bpp, (msb)1B 2G 1R(lsb)
+    PIX_FMT_RGB8,      ///< packed RGB 3:3:2,  8bpp, (msb)2R 3G 3B(lsb)
+    PIX_FMT_RGB4,      ///< packed RGB 1:2:1,  4bpp, (msb)1R 2G 1B(lsb)
+    PIX_FMT_RGB4_BYTE, ///< packed RGB 1:2:1,  8bpp, (msb)1R 2G 1B(lsb)
+    PIX_FMT_NV12,      ///< planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 for UV
     PIX_FMT_NV21,      ///< as above, but U and V bytes are swapped
 
-    PIX_FMT_RGB32_1,   ///< Packed RGB 8:8:8, 32bpp, (msb)8R 8G 8B 8A(lsb), in cpu endianness
-    PIX_FMT_BGR32_1,   ///< Packed RGB 8:8:8, 32bpp, (msb)8B 8G 8R 8A(lsb), in cpu endianness
+    PIX_FMT_RGB32_1,   ///< packed RGB 8:8:8, 32bpp, (msb)8R 8G 8B 8A(lsb), in CPU endianness
+    PIX_FMT_BGR32_1,   ///< packed RGB 8:8:8, 32bpp, (msb)8B 8G 8R 8A(lsb), in CPU endianness
 
     PIX_FMT_GRAY16BE,  ///<        Y        , 16bpp, big-endian
     PIX_FMT_GRAY16LE,  ///<        Y        , 16bpp, little-endian
-    PIX_FMT_YUV440P,   ///< Planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
-    PIX_FMT_YUVJ440P,  ///< Planar YUV 4:4:0 full scale (jpeg)
-    PIX_FMT_YUVA420P,  ///< Planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
-    PIX_FMT_VDPAU_H264,///< H264 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
-    PIX_FMT_VDPAU_MPEG1,///< MPEG1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
-    PIX_FMT_VDPAU_MPEG2,///< MPEG2 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+    PIX_FMT_YUV440P,   ///< planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
+    PIX_FMT_YUVJ440P,  ///< planar YUV 4:4:0 full scale (JPEG)
+    PIX_FMT_YUVA420P,  ///< planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
+    PIX_FMT_VDPAU_H264,///< H.264 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+    PIX_FMT_VDPAU_MPEG1,///< MPEG-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+    PIX_FMT_VDPAU_MPEG2,///< MPEG-2 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
     PIX_FMT_VDPAU_WMV3,///< WMV3 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
-    PIX_FMT_VDPAU_VC1, ///< VC1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+    PIX_FMT_VDPAU_VC1, ///< VC-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
     PIX_FMT_NB,        ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
 };
 

+ 2 - 2
libavutil/bswap.h

@@ -77,8 +77,8 @@ static inline uint64_t av_const bswap_64(uint64_t x)
 }
 #endif
 
-// be2me ... BigEndian to MachineEndian
-// le2me ... LittleEndian to MachineEndian
+// be2me ... big-endian to machine-endian
+// le2me ... little-endian to machine-endian
 
 #ifdef WORDS_BIGENDIAN
 #define be2me_16(x) (x)

+ 12 - 12
libavutil/common.h

@@ -93,7 +93,7 @@
 #endif
 #endif
 
-//rounded divison & shift
+//rounded division & shift
 #define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
 /* assume b>0 */
 #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
@@ -140,7 +140,7 @@ static inline av_const int av_log2_16bit(unsigned int v)
 }
 
 /**
- * clip a signed integer value into the amin-amax range
+ * Clips a signed integer value into the amin-amax range.
  * @param a value to clip
  * @param amin minimum value of the clip range
  * @param amax maximum value of the clip range
@@ -154,7 +154,7 @@ static inline av_const int av_clip(int a, int amin, int amax)
 }
 
 /**
- * clip a signed integer value into the 0-255 range
+ * Clips a signed integer value into the 0-255 range.
  * @param a value to clip
  * @return clipped value
  */
@@ -165,7 +165,7 @@ static inline av_const uint8_t av_clip_uint8(int a)
 }
 
 /**
- * clip a signed integer value into the -32768,32767 range
+ * Clips a signed integer value into the -32768,32767 range.
  * @param a value to clip
  * @return clipped value
  */
@@ -176,7 +176,7 @@ static inline av_const int16_t av_clip_int16(int a)
 }
 
 /**
- * clip a float value into the amin-amax range
+ * Clips a float value into the amin-amax range.
  * @param a value to clip
  * @param amin minimum value of the clip range
  * @param amax maximum value of the clip range
@@ -194,7 +194,7 @@ static inline av_const float av_clipf(float a, float amin, float amax)
 
 /*!
  * \def GET_UTF8(val, GET_BYTE, ERROR)
- * converts a UTF-8 character (up to 4 bytes long) to its 32-bit UCS-4 encoded form
+ * Converts a UTF-8 character (up to 4 bytes long) to its 32-bit UCS-4 encoded form
  * \param val is the output and should be of type uint32_t. It holds the converted
  * UCS-4 character and should be a left value.
  * \param GET_BYTE gets UTF-8 encoded bytes from any proper source. It can be
@@ -222,19 +222,19 @@ static inline av_const float av_clipf(float a, float amin, float amax)
 
 /*!
  * \def PUT_UTF8(val, tmp, PUT_BYTE)
- * converts a 32-bit unicode character to its UTF-8 encoded form (up to 4 bytes long).
- * \param val is an input only argument and should be of type uint32_t. It holds
- * a ucs4 encoded unicode character that is to be converted to UTF-8. If
- * val is given as a function it's executed only once.
+ * Converts a 32-bit Unicode character to its UTF-8 encoded form (up to 4 bytes long).
+ * \param val is an input-only argument and should be of type uint32_t. It holds
+ * a UCS-4 encoded Unicode character that is to be converted to UTF-8. If
+ * val is given as a function it is executed only once.
  * \param tmp is a temporary variable and should be of type uint8_t. It
  * represents an intermediate value during conversion that is to be
- * outputted by PUT_BYTE.
+ * output by PUT_BYTE.
  * \param PUT_BYTE writes the converted UTF-8 bytes to any proper destination.
  * It could be a function or a statement, and uses tmp as the input byte.
  * For example, PUT_BYTE could be "*output++ = tmp;" PUT_BYTE will be
  * executed up to 4 times for values in the valid UTF-8 range and up to
  * 7 times in the general case, depending on the length of the converted
- * unicode character.
+ * Unicode character.
  */
 #define PUT_UTF8(val, tmp, PUT_BYTE)\
     {\

+ 3 - 3
libavutil/crc.c

@@ -86,7 +86,7 @@ int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size){
 }
 
 /**
- * Get an initialized standard CRC table.
+ * Gets an initialized standard CRC table.
  * @param crc_id ID of a standard CRC
  * @return a pointer to the CRC table or NULL on failure
  */
@@ -104,8 +104,8 @@ const AVCRC *av_crc_get_table(AVCRCId crc_id){
 }
 
 /**
- * Calculate the CRC of a block
- * @param crc CRC of previous blocks if any or initial value for CRC.
+ * Calculates the CRC of a block.
+ * @param crc CRC of previous blocks if any or initial value for CRC
  * @return CRC updated with the data from the given block
  *
  * @see av_crc_init() "le" parameter

+ 1 - 1
libavutil/crc.h

@@ -33,7 +33,7 @@ typedef enum {
     AV_CRC_16_CCITT,
     AV_CRC_32_IEEE,
     AV_CRC_32_IEEE_LE,  /*< reversed bitorder version of AV_CRC_32_IEEE */
-    AV_CRC_MAX,         /*< not part of public API! don't use outside lavu */
+    AV_CRC_MAX,         /*< Not part of public API! Do not use outside libavutil. */
 }AVCRCId;
 
 int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size);

+ 2 - 2
libavutil/fifo.c

@@ -1,5 +1,5 @@
 /*
- * A very simple circular buffer FIFO implementation
+ * a very simple circular buffer FIFO implementation
  * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
  * Copyright (c) 2006 Roman Shaposhnik
  *
@@ -117,7 +117,7 @@ int av_fifo_generic_read(AVFifoBuffer *f, int buf_size, void (*func)(void*, void
     return 0;
 }
 
-/** discard data from the fifo */
+/** Discard data from the FIFO. */
 void av_fifo_drain(AVFifoBuffer *f, int size)
 {
     f->rptr += size;

+ 7 - 7
libavutil/fifo.h

@@ -18,7 +18,7 @@
 
 /**
  * @file fifo.h
- * A very simple circular buffer FIFO implementation.
+ * a very simple circular buffer FIFO implementation
  */
 
 #ifndef AVUTIL_FIFO_H
@@ -64,7 +64,7 @@ int av_fifo_size(AVFifoBuffer *f);
 int av_fifo_read(AVFifoBuffer *f, uint8_t *buf, int buf_size);
 
 /**
- * Feeds data from an AVFifoBuffer to a user supplied callback.
+ * Feeds data from an AVFifoBuffer to a user-supplied callback.
  * @param *f AVFifoBuffer to read from
  * @param buf_size number of bytes to read
  * @param *func generic read function
@@ -83,16 +83,16 @@ attribute_deprecated void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int
 #endif
 
 /**
- * Feeds data from a user supplied callback to an AVFifoBuffer.
+ * Feeds data from a user-supplied callback to an AVFifoBuffer.
  * @param *f AVFifoBuffer to write to
  * @param *src data source
  * @param size number of bytes to write
- * @param *func generic write function. First parameter is src,
- * second is dest_buf, third is dest_buf_size.
+ * @param *func generic write function; the first parameter is src,
+ * the second is dest_buf, the third is dest_buf_size.
  * func must return the number of bytes written to dest_buf, or <= 0 to
  * indicate no more data available to write.
  * If func is NULL, src is interpreted as a simple byte array for source data.
- * @return the number of bytes written to the fifo.
+ * @return the number of bytes written to the FIFO
  */
 int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int));
 
@@ -110,7 +110,7 @@ attribute_deprecated void av_fifo_realloc(AVFifoBuffer *f, unsigned int size);
  * Resizes an AVFifoBuffer.
  * @param *f AVFifoBuffer to resize
  * @param size new AVFifoBuffer size in bytes
- * @return <0 for failure >=0 otherwise
+ * @return <0 for failure, >=0 otherwise
  */
 int av_fifo_realloc2(AVFifoBuffer *f, unsigned int size);
 

+ 1 - 1
libavutil/integer.c

@@ -21,7 +21,7 @@
 
 /**
  * @file integer.c
- * arbitrary precision integers.
+ * arbitrary precision integers
  * @author Michael Niedermayer <michaelni@gmx.at>
  */
 

+ 8 - 7
libavutil/integer.h

@@ -48,29 +48,30 @@ int av_log2_i(AVInteger a) av_const;
 AVInteger av_mul_i(AVInteger a, AVInteger b) av_const;
 
 /**
- * returns 0 if a==b, 1 if a>b and -1 if a<b.
+ * Returns 0 if a==b, 1 if a>b and -1 if a<b.
  */
 int av_cmp_i(AVInteger a, AVInteger b) av_const;
 
 /**
- * bitwise shift.
- * @param s the number of bits by which the value should be shifted right, may be negative for shifting left
+ * bitwise shift
+ * @param s the number of bits by which the value should be shifted right,
+            may be negative for shifting left
  */
 AVInteger av_shr_i(AVInteger a, int s) av_const;
 
 /**
- * returns a % b.
- * @param quot a/b will be stored here
+ * Returns a % b.
+ * @param quot a/b will be stored here.
  */
 AVInteger av_mod_i(AVInteger *quot, AVInteger a, AVInteger b);
 
 /**
- * returns a/b.
+ * Returns a/b.
  */
 AVInteger av_div_i(AVInteger a, AVInteger b) av_const;
 
 /**
- * converts the given int64_t to an AVInteger.
+ * Converts the given int64_t to an AVInteger.
  */
 AVInteger av_int2i(int64_t a) av_const;
 

Some files were not shown because too many files changed in this diff