Mercurial > libavcodec.hg
annotate motionpixels_tablegen.c @ 12397:4bc3d73ae577 libavcodec
Since the 24 bit format is decoded to endian-dependant
BGR32 and not BGR24, do not swap red and blue on big-endian
for this format as well.
author | reimar |
---|---|
date | Sat, 21 Aug 2010 19:40:38 +0000 |
parents | 59f399926c12 |
children |
rev | line source |
---|---|
10581
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
1 /* |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
2 * Generate a header file for hardcoded motionpixels RGB to YUV table |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
3 * |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
4 * Copyright (c) 2009 Reimar Döffinger <Reimar.Doeffinger@gmx.de> |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
5 * |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
6 * This file is part of FFmpeg. |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
7 * |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
8 * FFmpeg is free software; you can redistribute it and/or |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
9 * modify it under the terms of the GNU Lesser General Public |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
10 * License as published by the Free Software Foundation; either |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
11 * version 2.1 of the License, or (at your option) any later version. |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
12 * |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
13 * FFmpeg is distributed in the hope that it will be useful, |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
16 * Lesser General Public License for more details. |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
17 * |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
18 * You should have received a copy of the GNU Lesser General Public |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
19 * License along with FFmpeg; if not, write to the Free Software |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
21 */ |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
22 |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
23 #include <stdlib.h> |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
24 #define CONFIG_HARDCODED_TABLES 0 |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
25 #define MAX_NEG_CROP 0 |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
26 #define ff_cropTbl ((uint8_t *)NULL) |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
27 #include "motionpixels_tablegen.h" |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
28 #include "tableprint.h" |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
29 |
11570 | 30 int main(void) |
10581
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
31 { |
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
32 motionpixels_tableinit(); |
11570 | 33 |
34 write_fileheader(); | |
10581
2980d9efc542
Add support for hardcoding the motionpixels rgb to yuv table.
reimar
parents:
diff
changeset
|
35 |
11570 | 36 printf("static const YuvPixel mp_rgb_yuv_table[1 << 15] = {\n"); |
11979
59f399926c12
tableprint: use the type name as-is for the functions' names.
flameeyes
parents:
11570
diff
changeset
|
37 write_int8_t_2d_array(mp_rgb_yuv_table, 1 << 15, 3); |
11570 | 38 printf("};\n"); |
39 | |
40 return 0; | |
41 } |