Originally committed as revision 16848 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diego Biurrun authored on 2009/01/29 08:03:17... | ... |
@@ -70,7 +70,7 @@ unsigned avutil_version(void); |
70 | 70 |
* |
71 | 71 |
* When the pixel format is palettized RGB (PIX_FMT_PAL8), the palettized |
72 | 72 |
* image data is stored in AVFrame.data[0]. The palette is transported in |
73 |
- * AVFrame.data[1] and, is 1024 bytes long (256 4-byte entries) and is |
|
73 |
+ * AVFrame.data[1], is 1024 bytes long (256 4-byte entries) and is |
|
74 | 74 |
* formatted the same as in PIX_FMT_RGB32 described above (i.e., it is |
75 | 75 |
* also endian-specific). Note also that the individual RGB palette |
76 | 76 |
* components stored in AVFrame.data[1] should be in the range 0..255. |
... | ... |
@@ -1,5 +1,4 @@ |
1 | 1 |
/* |
2 |
- * Base64.c |
|
3 | 2 |
* Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com) |
4 | 3 |
* |
5 | 4 |
* This file is part of FFmpeg. |
... | ... |
@@ -20,8 +19,8 @@ |
20 | 20 |
*/ |
21 | 21 |
|
22 | 22 |
/** |
23 |
-* @file base64.c |
|
24 |
- * @brief Base64 Encode/Decode |
|
23 |
+ * @file base64.c |
|
24 |
+ * @brief Base64 encode/decode |
|
25 | 25 |
* @author Ryan Martell <rdm4@martellventures.com> (with lots of Michael) |
26 | 26 |
*/ |
27 | 27 |
|
... | ... |
@@ -65,9 +64,9 @@ int av_base64_decode(uint8_t * out, const char *in, int out_length) |
65 | 65 |
} |
66 | 66 |
|
67 | 67 |
/***************************************************************************** |
68 |
-* b64_encode: stolen from VLC's http.c |
|
69 |
-* simplified by michael |
|
70 |
-* fixed edge cases and made it work from data (vs. strings) by ryan. |
|
68 |
+* b64_encode: Stolen from VLC's http.c. |
|
69 |
+* Simplified by Michael. |
|
70 |
+* Fixed edge cases and made it work from data (vs. strings) by Ryan. |
|
71 | 71 |
*****************************************************************************/ |
72 | 72 |
|
73 | 73 |
char *av_base64_encode(char * buf, int buf_len, const uint8_t * src, int len) |
... | ... |
@@ -1,5 +1,4 @@ |
1 | 1 |
/* |
2 |
- * Base64.c |
|
3 | 2 |
* Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com) |
4 | 3 |
* |
5 | 4 |
* This file is part of FFmpeg. |
... | ... |
@@ -25,13 +24,13 @@ |
25 | 25 |
#include <stdint.h> |
26 | 26 |
|
27 | 27 |
/** |
28 |
- * decodes base64 |
|
29 |
- * param order as strncpy() |
|
28 |
+ * Decodes Base64. |
|
29 |
+ * Parameter order is the same as strncpy(). |
|
30 | 30 |
*/ |
31 | 31 |
int av_base64_decode(uint8_t * out, const char *in, int out_length); |
32 | 32 |
|
33 | 33 |
/** |
34 |
- * encodes base64 |
|
34 |
+ * Encodes Base64. |
|
35 | 35 |
* @param src data, not a string |
36 | 36 |
* @param buf output string |
37 | 37 |
*/ |
... | ... |
@@ -76,9 +76,9 @@ AVInteger av_div_i(AVInteger a, AVInteger b) av_const; |
76 | 76 |
AVInteger av_int2i(int64_t a) av_const; |
77 | 77 |
|
78 | 78 |
/** |
79 |
- * converts the given AVInteger to an int64_t. |
|
80 |
- * if the AVInteger is too large to fit into an int64_t, |
|
81 |
- * then only the least significant 64bit will be used |
|
79 |
+ * Converts the given AVInteger to an int64_t. |
|
80 |
+ * If the AVInteger is too large to fit into an int64_t, |
|
81 |
+ * then only the least significant 64 bits will be used. |
|
82 | 82 |
*/ |
83 | 83 |
int64_t av_i2int(AVInteger a) av_const; |
84 | 84 |
|
... | ... |
@@ -319,8 +319,8 @@ static av_always_inline av_const float truncf(float x) |
319 | 319 |
#endif /* HAVE_TRUNCF */ |
320 | 320 |
|
321 | 321 |
/** |
322 |
- * Returns NULL if CONFIG_SMALL is true otherwise the argument |
|
323 |
- * without modifications, used to disable the definition of strings |
|
322 |
+ * Returns NULL if CONFIG_SMALL is true, otherwise the argument |
|
323 |
+ * without modification. Used to disable the definition of strings |
|
324 | 324 |
* (for example AVCodec long_names). |
325 | 325 |
*/ |
326 | 326 |
#if CONFIG_SMALL |
... | ... |
@@ -25,7 +25,7 @@ |
25 | 25 |
#include "avutil.h" |
26 | 26 |
|
27 | 27 |
/** |
28 |
- * Describes the class of an AVClass context structure, that is an |
|
28 |
+ * Describes the class of an AVClass context structure. That is an |
|
29 | 29 |
* arbitrary struct of which the first field is a pointer to an |
30 | 30 |
* AVClass struct (e.g. AVCodecContext, AVFormatContext etc.). |
31 | 31 |
*/ |
... | ... |
@@ -38,8 +38,8 @@ struct AVCLASS { |
38 | 38 |
const char* class_name; |
39 | 39 |
|
40 | 40 |
/** |
41 |
- * a pointer to a function which returns the name of a context |
|
42 |
- * instance \p ctx associated with the class |
|
41 |
+ * A pointer to a function which returns the name of a context |
|
42 |
+ * instance \p ctx associated with the class. |
|
43 | 43 |
*/ |
44 | 44 |
const char* (*item_name)(void* ctx); |
45 | 45 |
|
... | ... |
@@ -65,7 +65,7 @@ struct AVCLASS { |
65 | 65 |
#define AV_LOG_QUIET -8 |
66 | 66 |
|
67 | 67 |
/** |
68 |
- * something went really wrong and we will crash now |
|
68 |
+ * Something went really wrong and we will crash now. |
|
69 | 69 |
*/ |
70 | 70 |
#define AV_LOG_PANIC 0 |
71 | 71 |
|
... | ... |
@@ -92,7 +92,7 @@ struct AVCLASS { |
92 | 92 |
#define AV_LOG_VERBOSE 40 |
93 | 93 |
|
94 | 94 |
/** |
95 |
- * stuff which is only useful for libav* developers |
|
95 |
+ * Stuff which is only useful for libav* developers. |
|
96 | 96 |
*/ |
97 | 97 |
#define AV_LOG_DEBUG 48 |
98 | 98 |
#endif |
... | ... |
@@ -102,8 +102,8 @@ extern int av_log_level; |
102 | 102 |
#endif |
103 | 103 |
|
104 | 104 |
/** |
105 |
- * Send the specified message to the log if the level is less than or equal to |
|
106 |
- * the current av_log_level. By default, all logging messages are sent to |
|
105 |
+ * Sends the specified message to the log if the level is less than or equal |
|
106 |
+ * to the current av_log_level. By default, all logging messages are sent to |
|
107 | 107 |
* stderr. This behavior can be altered by setting a different av_vlog callback |
108 | 108 |
* function. |
109 | 109 |
* |
... | ... |
@@ -35,7 +35,7 @@ typedef struct LZOContext { |
35 | 35 |
} LZOContext; |
36 | 36 |
|
37 | 37 |
/** |
38 |
- * \brief read one byte from input buffer, avoiding overrun |
|
38 |
+ * \brief Reads one byte from the input buffer, avoiding an overrun. |
|
39 | 39 |
* \return byte read |
40 | 40 |
*/ |
41 | 41 |
static inline int get_byte(LZOContext *c) { |
... | ... |
@@ -1,8 +1,8 @@ |
1 | 1 |
/* |
2 | 2 |
* Mersenne Twister Random Algorithm |
3 | 3 |
* Copyright (c) 2006 Ryan Martell |
4 |
- * Based on A C-program for MT19937, with initialization improved 2002/1/26. Coded by |
|
5 |
- * Takuji Nishimura and Makoto Matsumoto. |
|
4 |
+ * Based on a C program for MT19937, with initialization improved 2002/1/26. |
|
5 |
+ * Coded by Takuji Nishimura and Makoto Matsumoto. |
|
6 | 6 |
* |
7 | 7 |
* This file is part of FFmpeg. |
8 | 8 |
* |
... | ... |
@@ -23,8 +23,9 @@ |
23 | 23 |
|
24 | 24 |
|
25 | 25 |
/** |
26 |
-see http://en.wikipedia.org/wiki/Mersenne_twister for an explanation of this algorithm. |
|
27 |
-*/ |
|
26 |
+ * See http://en.wikipedia.org/wiki/Mersenne_twister |
|
27 |
+ * for an explanation of this algorithm. |
|
28 |
+ */ |
|
28 | 29 |
#include <stdio.h> |
29 | 30 |
#include "random.h" |
30 | 31 |
|
... | ... |
@@ -52,7 +53,7 @@ void av_random_init(AVRandomState *state, unsigned int seed) |
52 | 52 |
unsigned int prev= state->mt[index - 1]; |
53 | 53 |
state->mt[index] = (1812433253UL * (prev ^ (prev>>30)) + index) & 0xffffffff; |
54 | 54 |
} |
55 |
- state->index= index; // will cause it to generate untempered numbers the first iteration |
|
55 |
+ state->index= index; // Will cause it to generate untempered numbers in the first iteration. |
|
56 | 56 |
} |
57 | 57 |
|
58 | 58 |
#if LIBAVUTIL_VERSION_MAJOR < 50 |
... | ... |
@@ -62,7 +63,8 @@ void av_init_random(unsigned int seed, AVRandomState *state) |
62 | 62 |
} |
63 | 63 |
#endif |
64 | 64 |
|
65 |
-/** generate AV_RANDOM_N words at one time (which will then be tempered later) (av_random calls this; you shouldn't) */ |
|
65 |
+/** Generates AV_RANDOM_N words at one time (which will then be tempered later). |
|
66 |
+ * av_random calls this; you shouldn't. */ |
|
66 | 67 |
void av_random_generate_untempered_numbers(AVRandomState *state) |
67 | 68 |
{ |
68 | 69 |
int kk; |
... | ... |
@@ -1,8 +1,8 @@ |
1 | 1 |
/* |
2 | 2 |
* Mersenne Twister Random Algorithm |
3 | 3 |
* Copyright (c) 2006 Ryan Martell |
4 |
- * Based on A C-program for MT19937, with initialization improved 2002/1/26. Coded by |
|
5 |
- * Takuji Nishimura and Makoto Matsumoto. |
|
4 |
+ * Based on a C program for MT19937, with initialization improved 2002/1/26. |
|
5 |
+ * Coded by Takuji Nishimura and Makoto Matsumoto. |
|
6 | 6 |
* |
7 | 7 |
* This file is part of FFmpeg. |
8 | 8 |
* |
... | ... |
@@ -21,8 +21,8 @@ |
21 | 21 |
/** |
22 | 22 |
* @file tree.h |
23 | 23 |
* A tree container. |
24 |
- * Insertion, Removial, Finding equal, largest which is smaller than and |
|
25 |
- * smallest which is larger than all have O(log n) worst case time. |
|
24 |
+ * Insertion, removal, finding equal, largest which is smaller than and |
|
25 |
+ * smallest which is larger than, all have O(log n) worst case complexity. |
|
26 | 26 |
* @author Michael Niedermayer <michaelni@gmx.at> |
27 | 27 |
*/ |
28 | 28 |
|
... | ... |
@@ -35,8 +35,8 @@ extern const int av_tree_node_size; |
35 | 35 |
/** |
36 | 36 |
* Finds an element. |
37 | 37 |
* @param root a pointer to the root node of the tree |
38 |
- * @param next If next is not NULL then next[0] will contain the previous |
|
39 |
- * element and next[1] the next element if either does not exist |
|
38 |
+ * @param next If next is not NULL, then next[0] will contain the previous |
|
39 |
+ * element and next[1] the next element. If either does not exist, |
|
40 | 40 |
* then the corresponding entry in next is unchanged. |
41 | 41 |
* @return An element with cmp(key, elem)==0 or NULL if no such element exists in |
42 | 42 |
* the tree. |
... | ... |
@@ -45,10 +45,10 @@ void *av_tree_find(const struct AVTreeNode *root, void *key, int (*cmp)(void *ke |
45 | 45 |
|
46 | 46 |
/** |
47 | 47 |
* Inserts or removes an element. |
48 |
- * If *next is NULL then the element supplied will be removed if it exists. |
|
49 |
- * If *next is not NULL then the element supplied will be inserted, unless |
|
48 |
+ * If *next is NULL, then the supplied element will be removed if it exists. |
|
49 |
+ * If *next is not NULL, then the supplied element will be inserted, unless |
|
50 | 50 |
* it already exists in the tree. |
51 |
- * @param rootp A pointer to a pointer to the root node of the tree. Note that |
|
51 |
+ * @param rootp A pointer to a pointer to the root node of the tree; note that |
|
52 | 52 |
* the root node can change during insertions, this is required |
53 | 53 |
* to keep the tree balanced. |
54 | 54 |
* @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 |
70 | 70 |
* return av_tree_insert(rootp, key, cmp, next); |
71 | 71 |
* } |
72 | 72 |
* |
73 |
- * @return If no insertion happened, the found element. |
|
74 |
- * If an insertion or removial happened, then either key or NULL will be returned. |
|
73 |
+ * @return If no insertion happened, the found element; if an insertion or |
|
74 |
+ removal happened, then either key or NULL will be returned. |
|
75 | 75 |
* Which one it is depends on the tree state and the implementation. You |
76 | 76 |
* should make no assumptions that it's one or the other in the code. |
77 | 77 |
*/ |