History

cavs: convert cavsdata.h to a .c file

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

Mans Rullgard committed 14 years ago

Commit 88386fe1 parent a6d9f9e3 files · +63 −2Browse files

Unified · Split

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t