From bfe3676feb5548993292b806de45a1cbc746c05f Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 28 Jan 2009 23:03:17 +0000 Subject: spelling/grammar/consistency review part II Originally committed as revision 16848 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavutil/adler32.c | 3 ++- libavutil/avutil.h | 2 +- libavutil/base64.c | 11 +++++------ libavutil/base64.h | 7 +++---- libavutil/integer.h | 6 +++--- libavutil/internal.h | 4 ++-- libavutil/log.h | 14 +++++++------- libavutil/lzo.c | 2 +- libavutil/random.c | 14 ++++++++------ libavutil/random.h | 4 ++-- libavutil/tree.h | 18 +++++++++--------- 11 files changed, 43 insertions(+), 42 deletions(-) (limited to 'libavutil') diff --git a/libavutil/adler32.c b/libavutil/adler32.c index dad8dabed1..a4c3810e05 100644 --- a/libavutil/adler32.c +++ b/libavutil/adler32.c @@ -1,4 +1,5 @@ -/* adler32.c -- compute the Adler-32 checksum of a data stream +/* + * Compute the Adler-32 checksum of a data stream. * This is a modified version based on adler32.c from the zlib library. * * Copyright (C) 1995 Mark Adler diff --git a/libavutil/avutil.h b/libavutil/avutil.h index 9f3f216459..6550d9fea8 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -70,7 +70,7 @@ unsigned avutil_version(void); * * 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 - * AVFrame.data[1] and, is 1024 bytes long (256 4-byte entries) and is + * AVFrame.data[1], is 1024 bytes long (256 4-byte entries) and is * formatted the same as in PIX_FMT_RGB32 described above (i.e., it is * also endian-specific). Note also that the individual RGB palette * components stored in AVFrame.data[1] should be in the range 0..255. diff --git a/libavutil/base64.c b/libavutil/base64.c index 0e9ce35e9c..b7ad4897c7 100644 --- a/libavutil/base64.c +++ b/libavutil/base64.c @@ -1,5 +1,4 @@ /* - * Base64.c * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com) * * This file is part of FFmpeg. @@ -20,8 +19,8 @@ */ /** -* @file base64.c - * @brief Base64 Encode/Decode + * @file base64.c + * @brief Base64 encode/decode * @author Ryan Martell (with lots of Michael) */ @@ -65,9 +64,9 @@ int av_base64_decode(uint8_t * out, const char *in, int out_length) } /***************************************************************************** -* b64_encode: stolen from VLC's http.c -* simplified by michael -* fixed edge cases and made it work from data (vs. strings) by ryan. +* b64_encode: Stolen from VLC's http.c. +* Simplified by Michael. +* Fixed edge cases and made it work from data (vs. strings) by Ryan. *****************************************************************************/ char *av_base64_encode(char * buf, int buf_len, const uint8_t * src, int len) diff --git a/libavutil/base64.h b/libavutil/base64.h index 91df541d59..843e362495 100644 --- a/libavutil/base64.h +++ b/libavutil/base64.h @@ -1,5 +1,4 @@ /* - * Base64.c * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com) * * This file is part of FFmpeg. @@ -25,13 +24,13 @@ #include /** - * decodes base64 - * param order as strncpy() + * Decodes Base64. + * Parameter order is the same as strncpy(). */ int av_base64_decode(uint8_t * out, const char *in, int out_length); /** - * encodes base64 + * Encodes Base64. * @param src data, not a string * @param buf output string */ diff --git a/libavutil/integer.h b/libavutil/integer.h index fdde30c400..148b5c344d 100644 --- a/libavutil/integer.h +++ b/libavutil/integer.h @@ -76,9 +76,9 @@ AVInteger av_div_i(AVInteger a, AVInteger b) av_const; AVInteger av_int2i(int64_t a) av_const; /** - * converts the given AVInteger to an int64_t. - * if the AVInteger is too large to fit into an int64_t, - * then only the least significant 64bit will be used + * Converts the given AVInteger to an int64_t. + * If the AVInteger is too large to fit into an int64_t, + * then only the least significant 64 bits will be used. */ int64_t av_i2int(AVInteger a) av_const; diff --git a/libavutil/internal.h b/libavutil/internal.h index 59c4412e10..e11525f147 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -319,8 +319,8 @@ static av_always_inline av_const float truncf(float x) #endif /* HAVE_TRUNCF */ /** - * Returns NULL if CONFIG_SMALL is true otherwise the argument - * without modifications, used to disable the definition of strings + * Returns NULL if CONFIG_SMALL is true, otherwise the argument + * without modification. Used to disable the definition of strings * (for example AVCodec long_names). */ #if CONFIG_SMALL diff --git a/libavutil/log.h b/libavutil/log.h index 8c93f9c853..29eafb5c40 100644 --- a/libavutil/log.h +++ b/libavutil/log.h @@ -25,7 +25,7 @@ #include "avutil.h" /** - * Describes the class of an AVClass context structure, that is an + * Describes the class of an AVClass context structure. That is an * arbitrary struct of which the first field is a pointer to an * AVClass struct (e.g. AVCodecContext, AVFormatContext etc.). */ @@ -38,8 +38,8 @@ struct AVCLASS { const char* class_name; /** - * a pointer to a function which returns the name of a context - * instance \p ctx associated with the class + * A pointer to a function which returns the name of a context + * instance \p ctx associated with the class. */ const char* (*item_name)(void* ctx); @@ -65,7 +65,7 @@ struct AVCLASS { #define AV_LOG_QUIET -8 /** - * something went really wrong and we will crash now + * Something went really wrong and we will crash now. */ #define AV_LOG_PANIC 0 @@ -92,7 +92,7 @@ struct AVCLASS { #define AV_LOG_VERBOSE 40 /** - * stuff which is only useful for libav* developers + * Stuff which is only useful for libav* developers. */ #define AV_LOG_DEBUG 48 #endif @@ -102,8 +102,8 @@ extern int av_log_level; #endif /** - * Send the specified message to the log if the level is less than or equal to - * the current av_log_level. By default, all logging messages are sent to + * Sends the specified message to the log if the level is less than or equal + * to the current av_log_level. By default, all logging messages are sent to * stderr. This behavior can be altered by setting a different av_vlog callback * function. * diff --git a/libavutil/lzo.c b/libavutil/lzo.c index 90d70d24a1..c555774194 100644 --- a/libavutil/lzo.c +++ b/libavutil/lzo.c @@ -35,7 +35,7 @@ typedef struct LZOContext { } LZOContext; /** - * \brief read one byte from input buffer, avoiding overrun + * \brief Reads one byte from the input buffer, avoiding an overrun. * \return byte read */ static inline int get_byte(LZOContext *c) { diff --git a/libavutil/random.c b/libavutil/random.c index 468ab71783..dbec6354d9 100644 --- a/libavutil/random.c +++ b/libavutil/random.c @@ -1,8 +1,8 @@ /* * Mersenne Twister Random Algorithm * Copyright (c) 2006 Ryan Martell - * Based on A C-program for MT19937, with initialization improved 2002/1/26. Coded by - * Takuji Nishimura and Makoto Matsumoto. + * Based on a C program for MT19937, with initialization improved 2002/1/26. + * Coded by Takuji Nishimura and Makoto Matsumoto. * * This file is part of FFmpeg. * @@ -23,8 +23,9 @@ /** -see http://en.wikipedia.org/wiki/Mersenne_twister for an explanation of this algorithm. -*/ + * See http://en.wikipedia.org/wiki/Mersenne_twister + * for an explanation of this algorithm. + */ #include #include "random.h" @@ -52,7 +53,7 @@ void av_random_init(AVRandomState *state, unsigned int seed) unsigned int prev= state->mt[index - 1]; state->mt[index] = (1812433253UL * (prev ^ (prev>>30)) + index) & 0xffffffff; } - state->index= index; // will cause it to generate untempered numbers the first iteration + state->index= index; // Will cause it to generate untempered numbers in the first iteration. } #if LIBAVUTIL_VERSION_MAJOR < 50 @@ -62,7 +63,8 @@ void av_init_random(unsigned int seed, AVRandomState *state) } #endif -/** generate AV_RANDOM_N words at one time (which will then be tempered later) (av_random calls this; you shouldn't) */ +/** Generates AV_RANDOM_N words at one time (which will then be tempered later). + * av_random calls this; you shouldn't. */ void av_random_generate_untempered_numbers(AVRandomState *state) { int kk; diff --git a/libavutil/random.h b/libavutil/random.h index 1e3c299b86..93bbad867d 100644 --- a/libavutil/random.h +++ b/libavutil/random.h @@ -1,8 +1,8 @@ /* * Mersenne Twister Random Algorithm * Copyright (c) 2006 Ryan Martell - * Based on A C-program for MT19937, with initialization improved 2002/1/26. Coded by - * Takuji Nishimura and Makoto Matsumoto. + * Based on a C program for MT19937, with initialization improved 2002/1/26. + * Coded by Takuji Nishimura and Makoto Matsumoto. * * This file is part of FFmpeg. * diff --git a/libavutil/tree.h b/libavutil/tree.h index ed6611c520..fc3b4b58d4 100644 --- a/libavutil/tree.h +++ b/libavutil/tree.h @@ -21,8 +21,8 @@ /** * @file tree.h * A tree container. - * Insertion, Removial, Finding equal, largest which is smaller than and - * smallest which is larger than all have O(log n) worst case time. + * Insertion, removal, finding equal, largest which is smaller than and + * smallest which is larger than, all have O(log n) worst case complexity. * @author Michael Niedermayer */ @@ -35,8 +35,8 @@ extern const int av_tree_node_size; /** * Finds an element. * @param root a pointer to the root node of the tree - * @param next If next is not NULL then next[0] will contain the previous - * element and next[1] the next element if either does not exist + * @param next If next is not NULL, then next[0] will contain the previous + * element and next[1] the next element. If either does not exist, * then the corresponding entry in next is unchanged. * @return An element with cmp(key, elem)==0 or NULL if no such element exists in * the tree. @@ -45,10 +45,10 @@ void *av_tree_find(const struct AVTreeNode *root, void *key, int (*cmp)(void *ke /** * Inserts or removes an element. - * If *next is NULL then the element supplied will be removed if it exists. - * If *next is not NULL then the element supplied will be inserted, unless + * If *next is NULL, then the supplied element will be removed if it exists. + * If *next is not NULL, then the supplied element will be inserted, unless * it already exists in the tree. - * @param rootp A pointer to a pointer to the root node of the tree. Note that + * @param rootp A pointer to a pointer to the root node of the tree; note that * the root node can change during insertions, this is required * to keep the tree balanced. * @param next Used to allocate and free AVTreeNodes. For insertion the user @@ -70,8 +70,8 @@ void *av_tree_find(const struct AVTreeNode *root, void *key, int (*cmp)(void *ke * return av_tree_insert(rootp, key, cmp, next); * } * - * @return If no insertion happened, the found element. - * If an insertion or removial happened, then either key or NULL will be returned. + * @return If no insertion happened, the found element; if an insertion or + removal happened, then either key or NULL will be returned. * Which one it is depends on the tree state and the implementation. You * should make no assumptions that it's one or the other in the code. */ -- cgit v1.2.3