Mercurial > mplayer.hg
annotate libvo/yuv2rgb_mlib.c @ 1758:c0aba1ddd7be
fix vo_window again
author | pontscho |
---|---|
date | Wed, 29 Aug 2001 18:27:13 +0000 |
parents | 014b29286ec4 |
children | 44d4f1e9afb0 |
rev | line source |
---|---|
1 | 1 /* |
2 * yuv2rgb_mlib.c, Software YUV to RGB coverter using mediaLib | |
3 * | |
4 * Copyright (C) 2000, Håkan Hjort <d95hjort@dtek.chalmers.se> | |
5 * All Rights Reserved. | |
6 * | |
7 * This file is part of mpeg2dec, a free MPEG-2 video decoder | |
8 * | |
9 * mpeg2dec is free software; you can redistribute it and/or modify | |
10 * it under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2, or (at your option) | |
12 * any later version. | |
13 * | |
14 * mpeg2dec is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with GNU Make; see the file COPYING. If not, write to | |
21 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
22 * | |
23 */ | |
24 | |
25 #include <stdio.h> | |
26 #include <stdlib.h> | |
27 | |
28 #include "config.h" | |
29 #include "video_out.h" | |
30 #include "yuv2rgb.h" | |
31 | |
32 #include <mlib_types.h> | |
33 #include <mlib_status.h> | |
34 #include <mlib_sys.h> | |
35 #include <mlib_video.h> | |
36 | |
1728
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
37 static void mlib_YUV2ARGB420_32(uint8_t* image, uint8_t* py, |
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
38 uint8_t* pu, uint8_t* pv, |
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
39 uint32_t h_size, uint32_t v_size, |
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
40 uint32_t rgb_stride, uint32_t y_stride, |
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
41 uint32_t uv_stride) |
1 | 42 { |
43 mlib_VideoColorYUV2ARGB420(image, py, pu, pv, h_size, | |
44 v_size, rgb_stride, y_stride, uv_stride); | |
45 } | |
46 | |
1728
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
47 static void mlib_YUV2ABGR420_32(uint8_t* image, uint8_t* py, |
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
48 uint8_t* pu, uint8_t* pv, |
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
49 uint32_t h_size, uint32_t v_size, |
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
50 uint32_t rgb_stride, uint32_t y_stride, |
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
51 uint32_t uv_stride) |
1 | 52 { |
53 mlib_VideoColorYUV2ABGR420(image, py, pu, pv, h_size, | |
54 v_size, rgb_stride, y_stride, uv_stride); | |
55 } | |
56 | |
1728
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
57 static void mlib_YUV2RGB420_24(uint8_t* image, uint8_t* py, |
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
58 uint8_t* pu, uint8_t* pv, |
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
59 uint32_t h_size, uint32_t v_size, |
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
60 uint32_t rgb_stride, uint32_t y_stride, |
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
61 uint32_t uv_stride) |
1 | 62 { |
63 mlib_VideoColorYUV2RGB420(image, py, pu, pv, h_size, | |
64 v_size, rgb_stride, y_stride, uv_stride); | |
65 } | |
66 | |
67 | |
68 yuv2rgb_fun yuv2rgb_init_mlib(int bpp, int mode) | |
69 { | |
70 | |
71 if( bpp == 24 ) | |
72 { | |
73 if( mode == MODE_RGB ) | |
74 return mlib_YUV2RGB420_24; | |
75 } | |
76 | |
77 if( bpp == 32 ) | |
78 { | |
79 if( mode == MODE_RGB ) | |
80 return mlib_YUV2ARGB420_32; | |
81 else if( mode == MODE_BGR ) | |
82 return mlib_YUV2ABGR420_32; | |
83 } | |
84 | |
85 return NULL; | |
86 } | |
87 |