Hauptseite   Klassenhierarchie   Alphabetische Liste   Übersicht   Auflistung der Dateien   Elementübersicht  

Convert.h

00001 #ifndef _CONVERT_H_
00002 #define _CONVERT_H_
00003 
00004 #include "cmodels.h"
00005 
00006 #define TABLE_SIZE      (8*256)
00007 #define CONVERT_COLORS 7
00008 #define ADD(symbol) &Convert::convert_ ## symbol
00009 
00010 
00011 class Convert {
00012 public:
00013     Convert( int infmt, int outfmt, int width, int height );
00014     ~Convert();
00015 
00016     void do_convert( unsigned char *inbuf, unsigned char *outbuf );
00017 
00018 protected:
00019     typedef void (Convert::*convert_func)(void);
00020     typedef void (Convert::*convert_init_func)(int);
00021 
00022     /************ Prototypes ************/
00023     void convert_init24(int in);
00024     void convert_nil24(void);
00025     void convert_24to8(void);
00026     void convert_24to16(void);
00027     void convert_24to422(void);
00028     void convert_24to420(void);
00029     void convert_24toG(void);
00030     void convert_init8(int in);
00031     void convert_nil8(void);
00032     void convert_8to24(void);
00033     void convert_8to16(void);
00034     void convert_8to422(void);
00035     void convert_8to420(void);
00036     void convert_8toG(void);
00037     void convert_init16(int in);
00038     void convert_nil16(void);
00039     void convert_16to24(void);
00040     void convert_16to8(void);
00041     void convert_16to422(void);
00042     void convert_16to420(void);
00043     void convert_16toG(void);
00044     void convert_init422(int in);
00045     void convert_nil422(void);
00046     void convert_422to24(void);
00047     void convert_422to8(void);
00048     void convert_422to16(void);
00049     void convert_422to420(void);
00050     void convert_422toG(void);
00051     void convert_init420(int in);
00052     void convert_nil420(void);
00053     void convert_420to24(void);
00054     void convert_420to8(void);
00055     void convert_420to16(void);
00056     void convert_420to422(void);
00057     void convert_420toG(void);
00058     void convert_initG(int in);
00059     void convert_nilG(void);
00060     void convert_Gto24(void);
00061     void convert_Gto16(void);
00062     void convert_Gto422(void);
00063     void convert_Gto420(void);
00064     void convert_Gto8(void);
00065     void convert_nil(void);
00066 
00067     /***** Variablen *****/
00068     int inwidth ;
00069     int inheight;
00070     int outwidth;
00071     int outheight;
00072     int informat, outformat;
00073     int in_pal;
00074     int out_pal;
00075     int in_altcol;
00076     int out_altcol;
00077     int convert_bytes;
00078 
00079     unsigned char *convert_outbuf, *convert_inbuf;
00080 
00081     int convert_5to8tab[32];
00082     int convert_6to8tab[64];
00083     int convert_8to5tab[256];
00084     int convert_8to6tab[256];
00085     int convert_256to5tab[256];
00086     int convert_256to9tab[256];
00087     int convert_32to5tab[32];
00088     int convert_64to9tab[64];
00089     int convert_palette[256][3];
00090     int convert_palette16[256][3];
00091     int convert_paletteYCC[256][3];
00092     int convert_paletteG[256];
00093     int convert_backpal[5][9][5];
00094 
00095     int convert_rgb_ycc_tab[TABLE_SIZE];
00096     int convert_Crrtab[256];
00097     int convert_Cbbtab[256];
00098     int convert_Crgtab[256];
00099     int convert_Cbgtab[256];
00100     unsigned char convert_range[5*256+128];
00101     unsigned char *convert_rangetable;
00102 
00103     convert_func convert_doit;
00104 
00105     static const int convert_color_bpps[CONVERT_COLORS];
00106 
00107     static const convert_init_func convert_inittable[CONVERT_COLORS];
00108 
00109     static const convert_func convert_table[CONVERT_COLORS][CONVERT_COLORS];
00110 
00111 };
00112 
00113 #endif

Erzeugt am Tue Dec 31 22:54:54 2002 für av_convert von doxygen1.2.9.1 geschrieben von Dimitri van Heesch, © 1997-2001