comparison libswscale/swscale_internal.h @ 23278:b745a8414f2c

cosmetics; one test per line for all isXXX(x) macros
author ivo
date Fri, 11 May 2007 11:24:06 +0000
parents 1befc8d767cd
children 786823779b67
comparison
equal deleted inserted replaced
23277:32873ccfb007 23278:b745a8414f2c
169 int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation); 169 int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation);
170 170
171 char *sws_format_name(int format); 171 char *sws_format_name(int format);
172 172
173 //FIXME replace this with something faster 173 //FIXME replace this with something faster
174 #define isPlanarYUV(x) ((x)==PIX_FMT_YUV410P || (x)==PIX_FMT_YUV420P \ 174 #define isPlanarYUV(x) ( \
175 || (x)==PIX_FMT_YUV411P || (x)==PIX_FMT_YUV422P \ 175 (x)==PIX_FMT_YUV410P \
176 || (x)==PIX_FMT_YUV444P || (x)==PIX_FMT_NV12 \ 176 || (x)==PIX_FMT_YUV420P \
177 || (x)==PIX_FMT_NV21) 177 || (x)==PIX_FMT_YUV411P \
178 #define isYUV(x) ((x)==PIX_FMT_UYVY422 || (x)==PIX_FMT_YUYV422 || isPlanarYUV(x)) 178 || (x)==PIX_FMT_YUV422P \
179 #define isGray(x) ((x)==PIX_FMT_GRAY8 || (x)==PIX_FMT_GRAY16BE || (x)==PIX_FMT_GRAY16LE) 179 || (x)==PIX_FMT_YUV444P \
180 #define isGray16(x) ((x)==PIX_FMT_GRAY16BE || (x)==PIX_FMT_GRAY16LE) 180 || (x)==PIX_FMT_NV12 \
181 #define isRGB(x) ((x)==PIX_FMT_BGR32 || (x)==PIX_FMT_RGB24 \ 181 || (x)==PIX_FMT_NV21 \
182 || (x)==PIX_FMT_RGB565 || (x)==PIX_FMT_RGB555 \ 182 )
183 || (x)==PIX_FMT_RGB8 || (x)==PIX_FMT_RGB4 || (x)==PIX_FMT_RGB4_BYTE \ 183 #define isYUV(x) ( \
184 || (x)==PIX_FMT_MONOBLACK) 184 (x)==PIX_FMT_UYVY422 \
185 #define isBGR(x) ((x)==PIX_FMT_RGB32 || (x)==PIX_FMT_BGR24 \ 185 || (x)==PIX_FMT_YUYV422 \
186 || (x)==PIX_FMT_BGR565 || (x)==PIX_FMT_BGR555 \ 186 || isPlanarYUV(x) \
187 || (x)==PIX_FMT_BGR8 || (x)==PIX_FMT_BGR4 || (x)==PIX_FMT_BGR4_BYTE \ 187 )
188 || (x)==PIX_FMT_MONOBLACK) 188 #define isGray(x) ( \
189 (x)==PIX_FMT_GRAY8 \
190 || (x)==PIX_FMT_GRAY16BE \
191 || (x)==PIX_FMT_GRAY16LE \
192 )
193 #define isGray16(x) ( \
194 (x)==PIX_FMT_GRAY16BE \
195 || (x)==PIX_FMT_GRAY16LE \
196 )
197 #define isRGB(x) ( \
198 (x)==PIX_FMT_BGR32 \
199 || (x)==PIX_FMT_RGB24 \
200 || (x)==PIX_FMT_RGB565 \
201 || (x)==PIX_FMT_RGB555 \
202 || (x)==PIX_FMT_RGB8 \
203 || (x)==PIX_FMT_RGB4 \
204 || (x)==PIX_FMT_RGB4_BYTE \
205 || (x)==PIX_FMT_MONOBLACK \
206 )
207 #define isBGR(x) ( \
208 (x)==PIX_FMT_RGB32 \
209 || (x)==PIX_FMT_BGR24 \
210 || (x)==PIX_FMT_BGR565 \
211 || (x)==PIX_FMT_BGR555 \
212 || (x)==PIX_FMT_BGR8 \
213 || (x)==PIX_FMT_BGR4 \
214 || (x)==PIX_FMT_BGR4_BYTE \
215 || (x)==PIX_FMT_MONOBLACK \
216 )
189 217
190 static inline int fmt_depth(int fmt) 218 static inline int fmt_depth(int fmt)
191 { 219 {
192 switch(fmt) { 220 switch(fmt) {
193 case PIX_FMT_BGRA: 221 case PIX_FMT_BGRA: