1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-06 16:10:09 +02:00

pixdesc: K&R formatting cosmetics

Also change some comments to multiline.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
This commit is contained in:
Luca Barbato 2014-07-28 22:28:13 +02:00 committed by Vittorio Giovara
parent 92a36a6b33
commit b2e059a1ff
2 changed files with 33 additions and 19 deletions

View File

@ -1557,7 +1557,8 @@ int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
return bits >> log2_pixels;
}
char *av_get_pix_fmt_string (char *buf, int buf_size, enum AVPixelFormat pix_fmt)
char *av_get_pix_fmt_string(char *buf, int buf_size,
enum AVPixelFormat pix_fmt)
{
/* print header */
if (pix_fmt < 0) {

View File

@ -28,7 +28,10 @@
#include "pixfmt.h"
typedef struct AVComponentDescriptor {
uint16_t plane :2; ///< which of the 4 planes contains the component
/**
* Which of the 4 planes contains the component.
*/
uint16_t plane : 2;
/**
* Number of elements between 2 horizontally consecutive pixels minus 1.
@ -41,8 +44,17 @@ typedef struct AVComponentDescriptor{
* Elements are bits for bitstream formats, bytes otherwise.
*/
uint16_t offset_plus1 : 3;
uint16_t shift :3; ///< number of least significant bits that must be shifted away to get the value
uint16_t depth_minus1 :4; ///< number of bits in the component minus 1
/**
* Number of least significant bits that must be shifted away
* to get the value.
*/
uint16_t shift : 3;
/**
* Number of bits in the component minus 1.
*/
uint16_t depth_minus1 : 4;
} AVComponentDescriptor;
/**
@ -157,8 +169,9 @@ extern attribute_deprecated const AVPixFmtDescriptor av_pix_fmt_descriptors[];
* component c in data[1] to dst, rather than the palette indexes in
* data[0]. The behavior is undefined if the format is not paletted.
*/
void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4],
const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component);
void av_read_image_line(uint16_t *dst, const uint8_t *data[4],
const int linesize[4], const AVPixFmtDescriptor *desc,
int x, int y, int c, int w, int read_pal_component);
/**
* 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
* @param w the width of the line to write, that is the number of
* values to write to the image line
*/
void av_write_image_line(const uint16_t *src, uint8_t *data[4], const int linesize[4],
const AVPixFmtDescriptor *desc, int x, int y, int c, int w);
void av_write_image_line(const uint16_t *src, uint8_t *data[4],
const int linesize[4], const AVPixFmtDescriptor *desc,
int x, int y, int c, int w);
/**
* Return the pixel format corresponding to name.
@ -208,7 +222,8 @@ const char *av_get_pix_fmt_name(enum AVPixelFormat pix_fmt);
* corresponding info string, or a negative value to print the
* corresponding header.
*/
char *av_get_pix_fmt_string (char *buf, int buf_size, enum AVPixelFormat pix_fmt);
char *av_get_pix_fmt_string(char *buf, int buf_size,
enum AVPixelFormat pix_fmt);
/**
* 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,
*/
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt);
/**
* Utility function to swap the endianness of a pixel format.
*
@ -272,5 +286,4 @@ int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt);
*/
enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt);
#endif /* AVUTIL_PIXDESC_H */