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