Also change some comments to multiline.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
... | ... |
@@ -1557,7 +1557,8 @@ int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc) |
1557 | 1557 |
return bits >> log2_pixels; |
1558 | 1558 |
} |
1559 | 1559 |
|
1560 |
-char *av_get_pix_fmt_string (char *buf, int buf_size, enum AVPixelFormat pix_fmt) |
|
1560 |
+char *av_get_pix_fmt_string(char *buf, int buf_size, |
|
1561 |
+ enum AVPixelFormat pix_fmt) |
|
1561 | 1562 |
{ |
1562 | 1563 |
/* print header */ |
1563 | 1564 |
if (pix_fmt < 0) { |
... | ... |
@@ -27,23 +27,35 @@ |
27 | 27 |
#include "attributes.h" |
28 | 28 |
#include "pixfmt.h" |
29 | 29 |
|
30 |
-typedef struct AVComponentDescriptor{ |
|
31 |
- uint16_t plane :2; ///< which of the 4 planes contains the component |
|
30 |
+typedef struct AVComponentDescriptor { |
|
31 |
+ /** |
|
32 |
+ * Which of the 4 planes contains the component. |
|
33 |
+ */ |
|
34 |
+ uint16_t plane : 2; |
|
32 | 35 |
|
33 | 36 |
/** |
34 | 37 |
* Number of elements between 2 horizontally consecutive pixels minus 1. |
35 | 38 |
* Elements are bits for bitstream formats, bytes otherwise. |
36 | 39 |
*/ |
37 |
- uint16_t step_minus1 :3; |
|
40 |
+ uint16_t step_minus1 : 3; |
|
38 | 41 |
|
39 | 42 |
/** |
40 | 43 |
* Number of elements before the component of the first pixel plus 1. |
41 | 44 |
* Elements are bits for bitstream formats, bytes otherwise. |
42 | 45 |
*/ |
43 |
- uint16_t offset_plus1 :3; |
|
44 |
- uint16_t shift :3; ///< number of least significant bits that must be shifted away to get the value |
|
45 |
- uint16_t depth_minus1 :4; ///< number of bits in the component minus 1 |
|
46 |
-}AVComponentDescriptor; |
|
46 |
+ uint16_t offset_plus1 : 3; |
|
47 |
+ |
|
48 |
+ /** |
|
49 |
+ * Number of least significant bits that must be shifted away |
|
50 |
+ * to get the value. |
|
51 |
+ */ |
|
52 |
+ uint16_t shift : 3; |
|
53 |
+ |
|
54 |
+ /** |
|
55 |
+ * Number of bits in the component minus 1. |
|
56 |
+ */ |
|
57 |
+ uint16_t depth_minus1 : 4; |
|
58 |
+} AVComponentDescriptor; |
|
47 | 59 |
|
48 | 60 |
/** |
49 | 61 |
* Descriptor that unambiguously describes how the bits of a pixel are |
... | ... |
@@ -54,9 +66,9 @@ typedef struct AVComponentDescriptor{ |
54 | 54 |
* and all the YUV variants) AVPixFmtDescriptor just stores how values |
55 | 55 |
* are stored not what these values represent. |
56 | 56 |
*/ |
57 |
-typedef struct AVPixFmtDescriptor{ |
|
57 |
+typedef struct AVPixFmtDescriptor { |
|
58 | 58 |
const char *name; |
59 |
- uint8_t nb_components; ///< The number of components each pixel has, (1-4) |
|
59 |
+ uint8_t nb_components; ///< The number of components each pixel has, (1-4) |
|
60 | 60 |
|
61 | 61 |
/** |
62 | 62 |
* Amount to shift the luma width right to find the chroma width. |
... | ... |
@@ -65,7 +77,7 @@ typedef struct AVPixFmtDescriptor{ |
65 | 65 |
* The note above is needed to ensure rounding up. |
66 | 66 |
* This value only refers to the chroma components. |
67 | 67 |
*/ |
68 |
- uint8_t log2_chroma_w; ///< chroma_width = -((-luma_width )>>log2_chroma_w) |
|
68 |
+ uint8_t log2_chroma_w; ///< chroma_width = -((-luma_width )>>log2_chroma_w) |
|
69 | 69 |
|
70 | 70 |
/** |
71 | 71 |
* Amount to shift the luma height right to find the chroma height. |
... | ... |
@@ -83,7 +95,7 @@ typedef struct AVPixFmtDescriptor{ |
83 | 83 |
* comp[2]. |
84 | 84 |
*/ |
85 | 85 |
AVComponentDescriptor comp[4]; |
86 |
-}AVPixFmtDescriptor; |
|
86 |
+} AVPixFmtDescriptor; |
|
87 | 87 |
|
88 | 88 |
/** |
89 | 89 |
* Pixel format is big-endian. |
... | ... |
@@ -157,8 +169,9 @@ extern attribute_deprecated const AVPixFmtDescriptor av_pix_fmt_descriptors[]; |
157 | 157 |
* component c in data[1] to dst, rather than the palette indexes in |
158 | 158 |
* data[0]. The behavior is undefined if the format is not paletted. |
159 | 159 |
*/ |
160 |
-void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4], |
|
161 |
- const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component); |
|
160 |
+void av_read_image_line(uint16_t *dst, const uint8_t *data[4], |
|
161 |
+ const int linesize[4], const AVPixFmtDescriptor *desc, |
|
162 |
+ int x, int y, int c, int w, int read_pal_component); |
|
162 | 163 |
|
163 | 164 |
/** |
164 | 165 |
* Write the values from src to the pixel format component c of an |
... | ... |
@@ -174,8 +187,9 @@ void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesiz |
174 | 174 |
* @param w the width of the line to write, that is the number of |
175 | 175 |
* values to write to the image line |
176 | 176 |
*/ |
177 |
-void av_write_image_line(const uint16_t *src, uint8_t *data[4], const int linesize[4], |
|
178 |
- const AVPixFmtDescriptor *desc, int x, int y, int c, int w); |
|
177 |
+void av_write_image_line(const uint16_t *src, uint8_t *data[4], |
|
178 |
+ const int linesize[4], const AVPixFmtDescriptor *desc, |
|
179 |
+ int x, int y, int c, int w); |
|
179 | 180 |
|
180 | 181 |
/** |
181 | 182 |
* Return the pixel format corresponding to name. |
... | ... |
@@ -208,7 +222,8 @@ const char *av_get_pix_fmt_name(enum AVPixelFormat pix_fmt); |
208 | 208 |
* corresponding info string, or a negative value to print the |
209 | 209 |
* corresponding header. |
210 | 210 |
*/ |
211 |
-char *av_get_pix_fmt_string (char *buf, int buf_size, enum AVPixelFormat pix_fmt); |
|
211 |
+char *av_get_pix_fmt_string(char *buf, int buf_size, |
|
212 |
+ enum AVPixelFormat pix_fmt); |
|
212 | 213 |
|
213 | 214 |
/** |
214 | 215 |
* Return the number of bits per pixel used by the pixel format |
... | ... |
@@ -261,7 +276,6 @@ int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, |
261 | 261 |
*/ |
262 | 262 |
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt); |
263 | 263 |
|
264 |
- |
|
265 | 264 |
/** |
266 | 265 |
* Utility function to swap the endianness of a pixel format. |
267 | 266 |
* |
... | ... |
@@ -272,5 +286,4 @@ int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt); |
272 | 272 |
*/ |
273 | 273 |
enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt); |
274 | 274 |
|
275 |
- |
|
276 | 275 |
#endif /* AVUTIL_PIXDESC_H */ |