Commit 539940d4 authored by Stefano Sabatini's avatar Stefano Sabatini

imgconvert: remove unused and inconsistent PixFmtInfo.depth field

parent fdd130a2
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
typedef struct PixFmtInfo { typedef struct PixFmtInfo {
uint8_t color_type; /**< color type (see FF_COLOR_xxx constants) */ uint8_t color_type; /**< color type (see FF_COLOR_xxx constants) */
uint8_t is_alpha : 1; /**< true if alpha can be specified */ uint8_t is_alpha : 1; /**< true if alpha can be specified */
uint8_t depth; /**< bit depth of the color components */
uint8_t padded_size; /**< padded size in bits if different from the non-padded size */ uint8_t padded_size; /**< padded size in bits if different from the non-padded size */
} PixFmtInfo; } PixFmtInfo;
...@@ -67,247 +66,193 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { ...@@ -67,247 +66,193 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = {
/* YUV formats */ /* YUV formats */
[PIX_FMT_YUV420P] = { [PIX_FMT_YUV420P] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 8,
}, },
[PIX_FMT_YUV422P] = { [PIX_FMT_YUV422P] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 8,
}, },
[PIX_FMT_YUV444P] = { [PIX_FMT_YUV444P] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 8,
}, },
[PIX_FMT_YUYV422] = { [PIX_FMT_YUYV422] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 8,
}, },
[PIX_FMT_UYVY422] = { [PIX_FMT_UYVY422] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 8,
}, },
[PIX_FMT_YUV410P] = { [PIX_FMT_YUV410P] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 8,
}, },
[PIX_FMT_YUV411P] = { [PIX_FMT_YUV411P] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 8,
}, },
[PIX_FMT_YUV440P] = { [PIX_FMT_YUV440P] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 8,
}, },
[PIX_FMT_YUV420P16LE] = { [PIX_FMT_YUV420P16LE] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 16,
}, },
[PIX_FMT_YUV422P16LE] = { [PIX_FMT_YUV422P16LE] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 16,
}, },
[PIX_FMT_YUV444P16LE] = { [PIX_FMT_YUV444P16LE] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 16,
}, },
[PIX_FMT_YUV420P16BE] = { [PIX_FMT_YUV420P16BE] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 16,
}, },
[PIX_FMT_YUV422P16BE] = { [PIX_FMT_YUV422P16BE] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 16,
}, },
[PIX_FMT_YUV444P16BE] = { [PIX_FMT_YUV444P16BE] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 16,
}, },
/* YUV formats with alpha plane */ /* YUV formats with alpha plane */
[PIX_FMT_YUVA420P] = { [PIX_FMT_YUVA420P] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 8,
}, },
/* JPEG YUV */ /* JPEG YUV */
[PIX_FMT_YUVJ420P] = { [PIX_FMT_YUVJ420P] = {
.color_type = FF_COLOR_YUV_JPEG, .color_type = FF_COLOR_YUV_JPEG,
.depth = 8,
}, },
[PIX_FMT_YUVJ422P] = { [PIX_FMT_YUVJ422P] = {
.color_type = FF_COLOR_YUV_JPEG, .color_type = FF_COLOR_YUV_JPEG,
.depth = 8,
}, },
[PIX_FMT_YUVJ444P] = { [PIX_FMT_YUVJ444P] = {
.color_type = FF_COLOR_YUV_JPEG, .color_type = FF_COLOR_YUV_JPEG,
.depth = 8,
}, },
[PIX_FMT_YUVJ440P] = { [PIX_FMT_YUVJ440P] = {
.color_type = FF_COLOR_YUV_JPEG, .color_type = FF_COLOR_YUV_JPEG,
.depth = 8,
}, },
/* RGB formats */ /* RGB formats */
[PIX_FMT_RGB24] = { [PIX_FMT_RGB24] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 8,
}, },
[PIX_FMT_BGR24] = { [PIX_FMT_BGR24] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 8,
}, },
[PIX_FMT_ARGB] = { [PIX_FMT_ARGB] = {
.is_alpha = 1, .is_alpha = 1,
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 8,
}, },
[PIX_FMT_RGB48BE] = { [PIX_FMT_RGB48BE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 16,
}, },
[PIX_FMT_RGB48LE] = { [PIX_FMT_RGB48LE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 16,
}, },
[PIX_FMT_RGB565BE] = { [PIX_FMT_RGB565BE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 5,
}, },
[PIX_FMT_RGB565LE] = { [PIX_FMT_RGB565LE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 5,
}, },
[PIX_FMT_RGB555BE] = { [PIX_FMT_RGB555BE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 5,
.padded_size = 16, .padded_size = 16,
}, },
[PIX_FMT_RGB555LE] = { [PIX_FMT_RGB555LE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 5,
.padded_size = 16, .padded_size = 16,
}, },
[PIX_FMT_RGB444BE] = { [PIX_FMT_RGB444BE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 4,
.padded_size = 16, .padded_size = 16,
}, },
[PIX_FMT_RGB444LE] = { [PIX_FMT_RGB444LE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 4,
.padded_size = 16, .padded_size = 16,
}, },
/* gray / mono formats */ /* gray / mono formats */
[PIX_FMT_GRAY16BE] = { [PIX_FMT_GRAY16BE] = {
.color_type = FF_COLOR_GRAY, .color_type = FF_COLOR_GRAY,
.depth = 16,
}, },
[PIX_FMT_GRAY16LE] = { [PIX_FMT_GRAY16LE] = {
.color_type = FF_COLOR_GRAY, .color_type = FF_COLOR_GRAY,
.depth = 16,
}, },
[PIX_FMT_GRAY8] = { [PIX_FMT_GRAY8] = {
.color_type = FF_COLOR_GRAY, .color_type = FF_COLOR_GRAY,
.depth = 8,
}, },
[PIX_FMT_MONOWHITE] = { [PIX_FMT_MONOWHITE] = {
.color_type = FF_COLOR_GRAY, .color_type = FF_COLOR_GRAY,
.depth = 1,
}, },
[PIX_FMT_MONOBLACK] = { [PIX_FMT_MONOBLACK] = {
.color_type = FF_COLOR_GRAY, .color_type = FF_COLOR_GRAY,
.depth = 1,
}, },
/* paletted formats */ /* paletted formats */
[PIX_FMT_PAL8] = { [PIX_FMT_PAL8] = {
.is_alpha = 1, .is_alpha = 1,
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 8,
}, },
[PIX_FMT_UYYVYY411] = { [PIX_FMT_UYYVYY411] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 8,
}, },
[PIX_FMT_ABGR] = { [PIX_FMT_ABGR] = {
.is_alpha = 1, .is_alpha = 1,
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 8,
}, },
[PIX_FMT_BGR565BE] = { [PIX_FMT_BGR565BE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 5,
.padded_size = 16, .padded_size = 16,
}, },
[PIX_FMT_BGR565LE] = { [PIX_FMT_BGR565LE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 5,
.padded_size = 16, .padded_size = 16,
}, },
[PIX_FMT_BGR555BE] = { [PIX_FMT_BGR555BE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 5,
.padded_size = 16, .padded_size = 16,
}, },
[PIX_FMT_BGR555LE] = { [PIX_FMT_BGR555LE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 5,
.padded_size = 16, .padded_size = 16,
}, },
[PIX_FMT_BGR444BE] = { [PIX_FMT_BGR444BE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 4,
.padded_size = 16, .padded_size = 16,
}, },
[PIX_FMT_BGR444LE] = { [PIX_FMT_BGR444LE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 4,
.padded_size = 16, .padded_size = 16,
}, },
[PIX_FMT_RGB8] = { [PIX_FMT_RGB8] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 8,
}, },
[PIX_FMT_RGB4] = { [PIX_FMT_RGB4] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 4,
}, },
[PIX_FMT_RGB4_BYTE] = { [PIX_FMT_RGB4_BYTE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 8,
.padded_size = 8, .padded_size = 8,
}, },
[PIX_FMT_BGR8] = { [PIX_FMT_BGR8] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 8,
}, },
[PIX_FMT_BGR4] = { [PIX_FMT_BGR4] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 4,
}, },
[PIX_FMT_BGR4_BYTE] = { [PIX_FMT_BGR4_BYTE] = {
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 8,
.padded_size = 8, .padded_size = 8,
}, },
[PIX_FMT_NV12] = { [PIX_FMT_NV12] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 8,
}, },
[PIX_FMT_NV21] = { [PIX_FMT_NV21] = {
.color_type = FF_COLOR_YUV, .color_type = FF_COLOR_YUV,
.depth = 8,
}, },
[PIX_FMT_BGRA] = { [PIX_FMT_BGRA] = {
.is_alpha = 1, .is_alpha = 1,
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 8,
}, },
[PIX_FMT_RGBA] = { [PIX_FMT_RGBA] = {
.is_alpha = 1, .is_alpha = 1,
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.depth = 8,
}, },
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment