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
00027 typedef struct AVComponentDescriptor{
00028 uint16_t plane :2;
00029
00034 uint16_t step_minus1 :3;
00035
00040 uint16_t offset_plus1 :3;
00041 uint16_t shift :3;
00042 uint16_t depth_minus1 :4;
00043 }AVComponentDescriptor;
00044
00054 typedef struct AVPixFmtDescriptor{
00055 const char *name;
00056 uint8_t nb_components;
00057
00065 uint8_t log2_chroma_w;
00066
00074 uint8_t log2_chroma_h;
00075 uint8_t flags;
00076
00082 AVComponentDescriptor comp[4];
00083 }AVPixFmtDescriptor;
00084
00085 #define PIX_FMT_BE 1
00086 #define PIX_FMT_PAL 2
00087 #define PIX_FMT_BITSTREAM 4
00088 #define PIX_FMT_HWACCEL 8
00089
00090
00093 extern const AVPixFmtDescriptor av_pix_fmt_descriptors[];
00094
00111 void read_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4],
00112 const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component);
00113
00128 void write_line(const uint16_t *src, uint8_t *data[4], const int linesize[4],
00129 const AVPixFmtDescriptor *desc, int x, int y, int c, int w);
00130
00142 enum PixelFormat av_get_pix_fmt(const char *name);
00143
00152 int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc);
00153
00154 #endif