Mercurial > mplayer.hg
annotate libvo/yuv2rgb_mlib.c @ 2174:260f77017953
fix typo
author | nexus |
---|---|
date | Fri, 12 Oct 2001 08:42:20 +0000 |
parents | 44d4f1e9afb0 |
children |
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, |
1806
44d4f1e9afb0
yuv2rgb_fun typedef uses int parameters, not uint32_t (fixes some compiler
jkeil
parents:
1728
diff
changeset
|
39 int h_size, int v_size, |
44d4f1e9afb0
yuv2rgb_fun typedef uses int parameters, not uint32_t (fixes some compiler
jkeil
parents:
1728
diff
changeset
|
40 int rgb_stride, int y_stride, int uv_stride) |
1 | 41 { |
42 mlib_VideoColorYUV2ARGB420(image, py, pu, pv, h_size, | |
43 v_size, rgb_stride, y_stride, uv_stride); | |
44 } | |
45 | |
1728
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
46 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
|
47 uint8_t* pu, uint8_t* pv, |
1806
44d4f1e9afb0
yuv2rgb_fun typedef uses int parameters, not uint32_t (fixes some compiler
jkeil
parents:
1728
diff
changeset
|
48 int h_size, int v_size, |
44d4f1e9afb0
yuv2rgb_fun typedef uses int parameters, not uint32_t (fixes some compiler
jkeil
parents:
1728
diff
changeset
|
49 int rgb_stride, int y_stride, int uv_stride) |
1 | 50 { |
1806
44d4f1e9afb0
yuv2rgb_fun typedef uses int parameters, not uint32_t (fixes some compiler
jkeil
parents:
1728
diff
changeset
|
51 mlib_VideoColorYUV2ABGR420(image, py, pu, pv, h_size, |
1 | 52 v_size, rgb_stride, y_stride, uv_stride); |
53 } | |
54 | |
1728
014b29286ec4
Remove superfluous 'const' parameter attributes to fix some compiler warnings
jkeil
parents:
1
diff
changeset
|
55 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
|
56 uint8_t* pu, uint8_t* pv, |
1806
44d4f1e9afb0
yuv2rgb_fun typedef uses int parameters, not uint32_t (fixes some compiler
jkeil
parents:
1728
diff
changeset
|
57 int h_size, int v_size, |
44d4f1e9afb0
yuv2rgb_fun typedef uses int parameters, not uint32_t (fixes some compiler
jkeil
parents:
1728
diff
changeset
|
58 int rgb_stride, int y_stride, int uv_stride) |
1 | 59 { |
1806
44d4f1e9afb0
yuv2rgb_fun typedef uses int parameters, not uint32_t (fixes some compiler
jkeil
parents:
1728
diff
changeset
|
60 mlib_VideoColorYUV2RGB420(image, py, pu, pv, h_size, |
1 | 61 v_size, rgb_stride, y_stride, uv_stride); |
62 } | |
63 | |
64 | |
65 yuv2rgb_fun yuv2rgb_init_mlib(int bpp, int mode) | |
66 { | |
67 | |
68 if( bpp == 24 ) | |
69 { | |
70 if( mode == MODE_RGB ) | |
71 return mlib_YUV2RGB420_24; | |
72 } | |
73 | |
74 if( bpp == 32 ) | |
75 { | |
76 if( mode == MODE_RGB ) | |
77 return mlib_YUV2ARGB420_32; | |
78 else if( mode == MODE_BGR ) | |
79 return mlib_YUV2ABGR420_32; | |
80 } | |
81 | |
82 return NULL; | |
83 } | |
84 |