Browse code

cavs: convert cavsdata.h to a .c file

Defining tables in header files is ugly and prone to duplication.

Signed-off-by: Diego Biurrun <diego@biurrun.de>

Mans Rullgard authored on 2012/08/26 16:59:41
Showing 3 changed files
... ...
@@ -117,7 +117,7 @@ OBJS-$(CONFIG_BMV_VIDEO_DECODER)       += bmv.o
117 117
 OBJS-$(CONFIG_BMV_AUDIO_DECODER)       += bmv.o
118 118
 OBJS-$(CONFIG_C93_DECODER)             += c93.o
119 119
 OBJS-$(CONFIG_CAVS_DECODER)            += cavs.o cavsdec.o cavsdsp.o \
120
-                                          mpeg12data.o
120
+                                          cavsdata.o mpeg12data.o
121 121
 OBJS-$(CONFIG_CDGRAPHICS_DECODER)      += cdgraphics.o
122 122
 OBJS-$(CONFIG_CDXL_DECODER)            += cdxl.o
123 123
 OBJS-$(CONFIG_CINEPAK_DECODER)         += cinepak.o
... ...
@@ -30,7 +30,6 @@
30 30
 #include "golomb.h"
31 31
 #include "mathops.h"
32 32
 #include "cavs.h"
33
-#include "cavsdata.h"
34 33
 
35 34
 static const uint8_t alpha_tab[64] = {
36 35
    0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1,  2,  2,  2,  3,  3,
37 36
new file mode 100644
... ...
@@ -0,0 +1,62 @@
0
+/*
1
+ * Chinese AVS video (AVS1-P2, JiZhun profile) decoder.
2
+ * Copyright (c) 2006  Stefan Gehrer <stefan.gehrer@gmx.de>
3
+ *
4
+ * This file is part of Libav.
5
+ *
6
+ * Libav is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
+ *
11
+ * Libav is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with Libav; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
+ */
20
+
21
+#include "cavs.h"
22
+
23
+const uint8_t ff_cavs_partition_flags[30] = {
24
+  0,                                 //I_8X8
25
+  0,                                 //P_SKIP
26
+  0,                                 //P_16X16
27
+                      SPLITH,        //P_16X8
28
+                             SPLITV, //P_8X16
29
+                      SPLITH|SPLITV, //P_8X8
30
+                      SPLITH|SPLITV, //B_SKIP
31
+                      SPLITH|SPLITV, //B_DIRECT
32
+  0,                                 //B_FWD_16X16
33
+  0,                                 //B_BWD_16X16
34
+  0,                                 //B_SYM_16X16
35
+  FWD0|FWD1          |SPLITH,
36
+  FWD0|FWD1                 |SPLITV,
37
+  BWD0|BWD1          |SPLITH,
38
+  BWD0|BWD1                 |SPLITV,
39
+  FWD0|BWD1          |SPLITH,
40
+  FWD0|BWD1                 |SPLITV,
41
+  BWD0|FWD1          |SPLITH,
42
+  BWD0|FWD1                 |SPLITV,
43
+  FWD0|FWD1     |SYM1|SPLITH,
44
+  FWD0|FWD1     |SYM1       |SPLITV,
45
+  BWD0|FWD1     |SYM1|SPLITH,
46
+  BWD0|FWD1     |SYM1       |SPLITV,
47
+  FWD0|FWD1|SYM0     |SPLITH,
48
+  FWD0|FWD1|SYM0            |SPLITV,
49
+  FWD0|BWD1|SYM0     |SPLITH,
50
+  FWD0|BWD1|SYM0            |SPLITV,
51
+  FWD0|FWD1|SYM0|SYM1|SPLITH,
52
+  FWD0|FWD1|SYM0|SYM1       |SPLITV,
53
+                      SPLITH|SPLITV, //B_8X8 = 29
54
+};
55
+
56
+/** mark block as "no prediction from this direction"
57
+    e.g. forward motion vector in BWD partition */
58
+const cavs_vector ff_cavs_dir_mv   = {0,0,1,REF_DIR};
59
+
60
+/** mark block as using intra prediction */
61
+const cavs_vector ff_cavs_intra_mv = {0,0,1,REF_INTRA};