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