spelling/grammar/consistency review part II

Originally committed as revision 16848 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Diego Biurrun 16 years ago
parent 7b484a7a17
commit bfe3676feb
  1. 3
      libavutil/adler32.c
  2. 2
      libavutil/avutil.h
  3. 11
      libavutil/base64.c
  4. 7
      libavutil/base64.h
  5. 6
      libavutil/integer.h
  6. 4
      libavutil/internal.h
  7. 14
      libavutil/log.h
  8. 2
      libavutil/lzo.c
  9. 14
      libavutil/random.c
  10. 4
      libavutil/random.h
  11. 18
      libavutil/tree.h

@ -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. * This is a modified version based on adler32.c from the zlib library.
* *
* Copyright (C) 1995 Mark Adler * Copyright (C) 1995 Mark Adler

@ -70,7 +70,7 @@ unsigned avutil_version(void);
* *
* When the pixel format is palettized RGB (PIX_FMT_PAL8), the palettized * 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 * 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 * formatted the same as in PIX_FMT_RGB32 described above (i.e., it is
* also endian-specific). Note also that the individual RGB palette * also endian-specific). Note also that the individual RGB palette
* components stored in AVFrame.data[1] should be in the range 0..255. * components stored in AVFrame.data[1] should be in the range 0..255.

@ -1,5 +1,4 @@
/* /*
* Base64.c
* Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com) * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com)
* *
* This file is part of FFmpeg. * This file is part of FFmpeg.
@ -20,8 +19,8 @@
*/ */
/** /**
* @file base64.c * @file base64.c
* @brief Base64 Encode/Decode * @brief Base64 encode/decode
* @author Ryan Martell <rdm4@martellventures.com> (with lots of Michael) * @author Ryan Martell <rdm4@martellventures.com> (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 * b64_encode: Stolen from VLC's http.c.
* simplified by michael * Simplified by Michael.
* fixed edge cases and made it work from data (vs. strings) by ryan. * 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) char *av_base64_encode(char * buf, int buf_len, const uint8_t * src, int len)

@ -1,5 +1,4 @@
/* /*
* Base64.c
* Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com) * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com)
* *
* This file is part of FFmpeg. * This file is part of FFmpeg.
@ -25,13 +24,13 @@
#include <stdint.h> #include <stdint.h>
/** /**
* decodes base64 * Decodes Base64.
* param order as strncpy() * Parameter order is the same as strncpy().
*/ */
int av_base64_decode(uint8_t * out, const char *in, int out_length); int av_base64_decode(uint8_t * out, const char *in, int out_length);
/** /**
* encodes base64 * Encodes Base64.
* @param src data, not a string * @param src data, not a string
* @param buf output string * @param buf output string
*/ */

@ -76,9 +76,9 @@ AVInteger av_div_i(AVInteger a, AVInteger b) av_const;
AVInteger av_int2i(int64_t a) av_const; AVInteger av_int2i(int64_t a) av_const;
/** /**
* converts the given AVInteger to an int64_t. * Converts the given AVInteger to an int64_t.
* if the AVInteger is too large to fit into an int64_t, * If the AVInteger is too large to fit into an int64_t,
* then only the least significant 64bit will be used * then only the least significant 64 bits will be used.
*/ */
int64_t av_i2int(AVInteger a) av_const; int64_t av_i2int(AVInteger a) av_const;

@ -319,8 +319,8 @@ static av_always_inline av_const float truncf(float x)
#endif /* HAVE_TRUNCF */ #endif /* HAVE_TRUNCF */
/** /**
* Returns NULL if CONFIG_SMALL is true otherwise the argument * Returns NULL if CONFIG_SMALL is true, otherwise the argument
* without modifications, used to disable the definition of strings * without modification. Used to disable the definition of strings
* (for example AVCodec long_names). * (for example AVCodec long_names).
*/ */
#if CONFIG_SMALL #if CONFIG_SMALL

@ -25,7 +25,7 @@
#include "avutil.h" #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 * arbitrary struct of which the first field is a pointer to an
* AVClass struct (e.g. AVCodecContext, AVFormatContext etc.). * AVClass struct (e.g. AVCodecContext, AVFormatContext etc.).
*/ */
@ -38,8 +38,8 @@ struct AVCLASS {
const char* class_name; const char* class_name;
/** /**
* a pointer to a function which returns the name of a context * A pointer to a function which returns the name of a context
* instance \p ctx associated with the class * instance \p ctx associated with the class.
*/ */
const char* (*item_name)(void* ctx); const char* (*item_name)(void* ctx);
@ -65,7 +65,7 @@ struct AVCLASS {
#define AV_LOG_QUIET -8 #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 #define AV_LOG_PANIC 0
@ -92,7 +92,7 @@ struct AVCLASS {
#define AV_LOG_VERBOSE 40 #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 #define AV_LOG_DEBUG 48
#endif #endif
@ -102,8 +102,8 @@ extern int av_log_level;
#endif #endif
/** /**
* Send the specified message to the log if the level is less than or equal to * Sends the specified message to the log if the level is less than or equal
* the current av_log_level. By default, all logging messages are sent to * 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 * stderr. This behavior can be altered by setting a different av_vlog callback
* function. * function.
* *

@ -35,7 +35,7 @@ typedef struct LZOContext {
} 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 * \return byte read
*/ */
static inline int get_byte(LZOContext *c) { static inline int get_byte(LZOContext *c) {

@ -1,8 +1,8 @@
/* /*
* Mersenne Twister Random Algorithm * Mersenne Twister Random Algorithm
* Copyright (c) 2006 Ryan Martell * Copyright (c) 2006 Ryan Martell
* Based on A C-program for MT19937, with initialization improved 2002/1/26. Coded by * Based on a C program for MT19937, with initialization improved 2002/1/26.
* Takuji Nishimura and Makoto Matsumoto. * Coded by Takuji Nishimura and Makoto Matsumoto.
* *
* This file is part of FFmpeg. * 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 <stdio.h> #include <stdio.h>
#include "random.h" #include "random.h"
@ -52,7 +53,7 @@ void av_random_init(AVRandomState *state, unsigned int seed)
unsigned int prev= state->mt[index - 1]; unsigned int prev= state->mt[index - 1];
state->mt[index] = (1812433253UL * (prev ^ (prev>>30)) + index) & 0xffffffff; 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 #if LIBAVUTIL_VERSION_MAJOR < 50
@ -62,7 +63,8 @@ void av_init_random(unsigned int seed, AVRandomState *state)
} }
#endif #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) void av_random_generate_untempered_numbers(AVRandomState *state)
{ {
int kk; int kk;

@ -1,8 +1,8 @@
/* /*
* Mersenne Twister Random Algorithm * Mersenne Twister Random Algorithm
* Copyright (c) 2006 Ryan Martell * Copyright (c) 2006 Ryan Martell
* Based on A C-program for MT19937, with initialization improved 2002/1/26. Coded by * Based on a C program for MT19937, with initialization improved 2002/1/26.
* Takuji Nishimura and Makoto Matsumoto. * Coded by Takuji Nishimura and Makoto Matsumoto.
* *
* This file is part of FFmpeg. * This file is part of FFmpeg.
* *

@ -21,8 +21,8 @@
/** /**
* @file tree.h * @file tree.h
* A tree container. * A tree container.
* Insertion, Removial, Finding equal, largest which is smaller than and * Insertion, removal, finding equal, largest which is smaller than and
* smallest which is larger than all have O(log n) worst case time. * smallest which is larger than, all have O(log n) worst case complexity.
* @author Michael Niedermayer <michaelni@gmx.at> * @author Michael Niedermayer <michaelni@gmx.at>
*/ */
@ -35,8 +35,8 @@ extern const int av_tree_node_size;
/** /**
* Finds an element. * Finds an element.
* @param root a pointer to the root node of the tree * @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 * @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 * element and next[1] the next element. If either does not exist,
* then the corresponding entry in next is unchanged. * then the corresponding entry in next is unchanged.
* @return An element with cmp(key, elem)==0 or NULL if no such element exists in * @return An element with cmp(key, elem)==0 or NULL if no such element exists in
* the tree. * 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. * Inserts or removes an element.
* If *next is NULL then the element supplied will be removed if it exists. * If *next is NULL, then the supplied element will be removed if it exists.
* If *next is not NULL then the element supplied will be inserted, unless * If *next is not NULL, then the supplied element will be inserted, unless
* it already exists in the tree. * 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 * the root node can change during insertions, this is required
* to keep the tree balanced. * to keep the tree balanced.
* @param next Used to allocate and free AVTreeNodes. For insertion the user * @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 av_tree_insert(rootp, key, cmp, next);
* } * }
* *
* @return If no insertion happened, the found element. * @return If no insertion happened, the found element; if an insertion or
* If an insertion or removial happened, then either key or NULL will be returned. removal happened, then either key or NULL will be returned.
* Which one it is depends on the tree state and the implementation. You * 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. * should make no assumptions that it's one or the other in the code.
*/ */

Loading…
Cancel
Save