00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AVUTIL_PIXDESC_H
00023 #define AVUTIL_PIXDESC_H
00024
00025 #include <inttypes.h>
00026 #include "pixfmt.h"
00027
00028 typedef struct AVComponentDescriptor{
00029 uint16_t plane :2;
00030
00035 uint16_t step_minus1 :3;
00036
00041 uint16_t offset_plus1 :3;
00042 uint16_t shift :3;
00043 uint16_t depth_minus1 :4;
00044 }AVComponentDescriptor;
00045
00055 typedef struct AVPixFmtDescriptor{
00056 const char *name;
00057 uint8_t nb_components;
00058
00066 uint8_t log2_chroma_w;
00067
00075 uint8_t log2_chroma_h;
00076 uint8_t flags;
00077
00086 AVComponentDescriptor comp[4];
00087 }AVPixFmtDescriptor;
00088
00089 #define PIX_FMT_BE 1
00090 #define PIX_FMT_PAL 2
00091 #define PIX_FMT_BITSTREAM 4
00092 #define PIX_FMT_HWACCEL 8
00093 #define PIX_FMT_PLANAR 16
00094 #define PIX_FMT_RGB 32
00095
00100 #define PIX_FMT_PSEUDOPAL 64
00101
00105 extern const AVPixFmtDescriptor av_pix_fmt_descriptors[];
00106
00123 void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4],
00124 const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component);
00125
00140 void av_write_image_line(const uint16_t *src, uint8_t *data[4], const int linesize[4],
00141 const AVPixFmtDescriptor *desc, int x, int y, int c, int w);
00142
00154 enum PixelFormat av_get_pix_fmt(const char *name);
00155
00162 const char *av_get_pix_fmt_name(enum PixelFormat pix_fmt);
00163
00174 char *av_get_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt);
00175
00184 int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc);
00185
00186 #endif