• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libavcodec/pixdesc.c

Go to the documentation of this file.
00001 /*
00002  * pixel format descriptor
00003  * Copyright (c) 2009 Michael Niedermayer <michaelni@gmx.at>
00004  *
00005  * This file is part of FFmpeg.
00006  *
00007  * FFmpeg is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * FFmpeg is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with FFmpeg; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00020  */
00021 
00022 #include "libavutil/pixfmt.h"
00023 #include "pixdesc.h"
00024 
00025 static const AVPixFmtDescriptor pix_fmt_desc[PIX_FMT_NB] = {
00026     [PIX_FMT_YUV422P] = {
00027         .nb_channels  = 3,
00028         .log2_chroma_w= 1,
00029         .log2_chroma_h= 0,
00030         .comp = {
00031             {0,0,1,0,7},
00032             {1,0,1,0,7},
00033             {2,0,1,0,7},
00034         },
00035     },
00036     [PIX_FMT_YUV420P] = {
00037         .nb_channels  = 3,
00038         .log2_chroma_w= 1,
00039         .log2_chroma_h= 1,
00040         .comp = {
00041             {0,0,1,0,7},
00042             {1,0,1,0,7},
00043             {2,0,1,0,7},
00044         },
00045     },
00046     [PIX_FMT_YUV410P] = {
00047         .nb_channels  = 3,
00048         .log2_chroma_w= 2,
00049         .log2_chroma_h= 2,
00050         .comp = {
00051             {0,0,1,0,7},
00052             {1,0,1,0,7},
00053             {2,0,1,0,7},
00054         },
00055     },
00056     [PIX_FMT_NV12] = {
00057         .nb_channels  = 3,
00058         .log2_chroma_w= 1,
00059         .log2_chroma_h= 1,
00060         .comp = {
00061             {0,0,1,0,7},
00062             {1,1,1,0,7},
00063             {1,1,2,0,7},
00064         },
00065     },
00066     [PIX_FMT_YUYV422] = {
00067         .nb_channels  = 3,
00068         .log2_chroma_w= 1,
00069         .log2_chroma_h= 0,
00070         .comp = {
00071             {0,1,1,0,7},
00072             {0,3,2,0,7},
00073             {0,3,4,0,7},
00074         },
00075     },
00076     [PIX_FMT_UYVY422] = {
00077         .nb_channels  = 3,
00078         .log2_chroma_w= 1,
00079         .log2_chroma_h= 0,
00080         .comp = {
00081             {0,1,2,0,7},
00082             {0,3,1,0,7},
00083             {0,3,3,0,7},
00084         },
00085     },
00086     [PIX_FMT_GRAY16LE] = {
00087         .nb_channels  = 1,
00088         .log2_chroma_w= 0,
00089         .log2_chroma_h= 0,
00090         .comp = {
00091             {0,1,1,0,15},
00092         },
00093     },
00094     [PIX_FMT_GRAY16BE] = {
00095         .nb_channels  = 1,
00096         .log2_chroma_w= 0,
00097         .log2_chroma_h= 0,
00098         .comp = {
00099             {0,1,1,0,15},
00100         },
00101         .flags = PIX_FMT_BE,
00102     },
00103     [PIX_FMT_RGB24] = {
00104         .nb_channels  = 3,
00105         .log2_chroma_w= 0,
00106         .log2_chroma_h= 0,
00107         .comp = {
00108             {0,2,1,0,7},
00109             {0,2,2,0,7},
00110             {0,2,3,0,7},
00111         },
00112     },
00113     [PIX_FMT_RGBA] = {
00114         .nb_channels  = 4,
00115         .log2_chroma_w= 0,
00116         .log2_chroma_h= 0,
00117         .comp = {
00118             {0,3,1,0,7},
00119             {0,3,2,0,7},
00120             {0,3,3,0,7},
00121             {0,3,4,0,7},
00122         },
00123     },
00124     [PIX_FMT_RGB48LE] = {
00125         .nb_channels  = 3,
00126         .log2_chroma_w= 0,
00127         .log2_chroma_h= 0,
00128         .comp = {
00129             {0,5,1,0,15},
00130             {0,5,3,0,15},
00131             {0,5,5,0,15},
00132         },
00133     },
00134     [PIX_FMT_RGB48BE] = {
00135         .nb_channels  = 3,
00136         .log2_chroma_w= 0,
00137         .log2_chroma_h= 0,
00138         .comp = {
00139             {0,5,1,0,15},
00140             {0,5,3,0,15},
00141             {0,5,5,0,15},
00142         },
00143         .flags = PIX_FMT_BE,
00144     },
00145 //FIXME change pix fmt defines so that we have a LE & BE instead of a native-endian
00146 #if 0
00147     [PIX_FMT_RGB565_LE] = {
00148         .nb_channels  = 3,
00149         .log2_chroma_w= 0,
00150         .log2_chroma_h= 0,
00151         .comp = {
00152             {0,1,1,0,4},
00153             {0,1,1,5,5},
00154             {0,1,2,3,4},
00155         },
00156     },
00157     [PIX_FMT_RGB565_BE] = {
00158         .nb_channels  = 3,
00159         .log2_chroma_w= 0,
00160         .log2_chroma_h= 0,
00161         .comp = {
00162             {0,1,1, 0,4},
00163             {0,1,1, 5,5},
00164             {0,1,0, 3,4},
00165         },
00166         .flags = PIX_FMT_BE,
00167     },
00168 #endif
00169     [PIX_FMT_MONOBLACK] = {
00170         .nb_channels  = 1,
00171         .log2_chroma_w= 0,
00172         .log2_chroma_h= 0,
00173         .comp = {
00174             {0,0,1,7,0},
00175         },
00176         .flags = PIX_FMT_BITSTREAM,
00177     },
00178     [PIX_FMT_PAL8] = {
00179         .nb_channels  = 1,
00180         .log2_chroma_w= 0,
00181         .log2_chroma_h= 0,
00182         .comp = {
00183             {0,0,1,0,7},
00184         },
00185         .flags = PIX_FMT_PAL,
00186     },
00187 };

Generated on Sat Feb 16 2013 09:23:13 for ffmpeg by  doxygen 1.7.1