Mercurial > mplayer.hg
annotate fmt-conversion.h @ 24249:9da2161b5554
warning fix:
vf_scale.c:359:92: warning: trigraph ??) ignored, use -trigraphs to enable
author | diego |
---|---|
date | Tue, 28 Aug 2007 17:06:00 +0000 |
parents | 5e3665b6213e |
children | bc46e44e1f69 |
rev | line source |
---|---|
24156 | 1 #ifndef FMT_CONVERSION_H |
2 #define FMT_CONVERSION_H | |
3 | |
21778
bf1fbe97cc40
Fix build with shared libavutil. Approved by Diego.
rathann
parents:
19930
diff
changeset
|
4 #ifdef USE_LIBAVUTIL_SO |
bf1fbe97cc40
Fix build with shared libavutil. Approved by Diego.
rathann
parents:
19930
diff
changeset
|
5 #include <ffmpeg/avutil.h> |
bf1fbe97cc40
Fix build with shared libavutil. Approved by Diego.
rathann
parents:
19930
diff
changeset
|
6 #else |
19872 | 7 #include "avutil.h" |
21778
bf1fbe97cc40
Fix build with shared libavutil. Approved by Diego.
rathann
parents:
19930
diff
changeset
|
8 #endif |
19872 | 9 #include "img_format.h" |
10 | |
11 enum PixelFormat imgfmt2pixfmt(int fmt) | |
12 { | |
13 switch (fmt) { | |
14 case IMGFMT_BGR32: | |
15 return PIX_FMT_RGB32; | |
16 case IMGFMT_BGR24: | |
17 return PIX_FMT_BGR24; | |
18 case IMGFMT_BGR16: | |
19 return PIX_FMT_BGR565; | |
20 case IMGFMT_BGR15: | |
21 return PIX_FMT_BGR555; | |
22 case IMGFMT_BGR8: | |
23 return PIX_FMT_BGR8; | |
24 case IMGFMT_BGR4: | |
25 return PIX_FMT_BGR4; | |
26 case IMGFMT_BGR1: | |
27 case IMGFMT_RGB1: | |
28 return PIX_FMT_MONOBLACK; | |
29 case IMGFMT_RG4B: | |
30 return PIX_FMT_RGB4_BYTE; | |
31 case IMGFMT_BG4B: | |
32 return PIX_FMT_BGR4_BYTE; | |
33 case IMGFMT_RGB32: | |
34 return PIX_FMT_BGR32; | |
35 case IMGFMT_RGB24: | |
36 return PIX_FMT_RGB24; | |
37 case IMGFMT_RGB16: | |
38 return PIX_FMT_RGB565; | |
39 case IMGFMT_RGB15: | |
40 return PIX_FMT_RGB555; | |
41 case IMGFMT_RGB8: | |
42 return PIX_FMT_RGB8; | |
43 case IMGFMT_RGB4: | |
44 return PIX_FMT_RGB4; | |
45 case IMGFMT_YUY2: | |
46 return PIX_FMT_YUYV422; | |
47 case IMGFMT_UYVY: | |
48 return PIX_FMT_UYVY422; | |
49 case IMGFMT_NV12: | |
50 return PIX_FMT_NV12; | |
51 case IMGFMT_NV21: | |
52 return PIX_FMT_NV21; | |
53 case IMGFMT_Y800: | |
19916 | 54 case IMGFMT_Y8: |
19872 | 55 return PIX_FMT_GRAY8; |
56 case IMGFMT_IF09: | |
57 case IMGFMT_YVU9: | |
58 return PIX_FMT_YUV410P; | |
19930
5d0eaf70e1bc
Add missing conversion from IMGFMT_I420 to PIX_FMT_YUV420P.
corey
parents:
19916
diff
changeset
|
59 case IMGFMT_I420: |
19872 | 60 case IMGFMT_YV12: |
61 return PIX_FMT_YUV420P; | |
62 case IMGFMT_411P: | |
63 return PIX_FMT_YUV411P; | |
64 case IMGFMT_422P: | |
65 return PIX_FMT_YUV422P; | |
66 case IMGFMT_444P: | |
67 return PIX_FMT_YUV444P; | |
68 default: | |
69 fprintf(stderr, "Unsupported format %s\n", vo_format_name(fmt)); | |
70 } | |
71 | |
72 return PIX_FMT_NONE; | |
73 } | |
24156 | 74 |
75 #endif /* FMT_CONVERSION_H */ |