summaryrefslogtreecommitdiff
authorkui.zhang <kui.zhang@amlogic.com>2012-09-11 13:58:25 (GMT)
committer kui.zhang <kui.zhang@amlogic.com>2012-09-11 13:58:25 (GMT)
commit38b4ffc40e0ddc6410fa93852cc5cd1f262468ac (patch)
tree576fc0be3752c41c2ef3f343dbbcaeeb19e64ff8
parent05df4e9ddd9b4600698814c3adfd68033a206d0c (diff)
downloadlibzvbi-38b4ffc40e0ddc6410fa93852cc5cd1f262468ac.zip
libzvbi-38b4ffc40e0ddc6410fa93852cc5cd1f262468ac.tar.gz
libzvbi-38b4ffc40e0ddc6410fa93852cc5cd1f262468ac.tar.bz2
optimize code
Diffstat
-rwxr-xr-xntsc_decode/Android.mk5
-rwxr-xr-xntsc_decode/am_ntsc_cc.c2
-rwxr-xr-xntsc_decode/debug/test_main/Android.mk (renamed from ntsc_decode/test/Android.mk)12
-rwxr-xr-xntsc_decode/debug/test_main/caption.c (renamed from ntsc_decode/test/caption.c)4
-rwxr-xr-xntsc_decode/debug/test_main/decode.c (renamed from ntsc_decode/test/decode.c)2
-rwxr-xr-xntsc_decode/debug/test_so/Android.mk21
-rwxr-xr-xntsc_decode/debug/test_so/caption.c (renamed from ntsc_decode/caption.c)2
-rwxr-xr-xntsc_decode/debug/test_so/caption.h (renamed from ntsc_decode/caption.h)0
-rwxr-xr-xntsc_decode/debug/test_so/decode.c (renamed from ntsc_decode/decode.c)2
-rwxr-xr-xntsc_decode/debug/test_so/decode.h (renamed from ntsc_decode/decode.h)0
-rwxr-xr-xntsc_decode/ntsc_dmx/test/Android.mk2
-rwxr-xr-xntsc_decode/readme.txt5
-rwxr-xr-xntsc_decode/sliced_vbi.c (renamed from ntsc_decode/sliced1.c)2
-rwxr-xr-xntsc_decode/sliced_vbi.h (renamed from ntsc_decode/sliced1.h)0
14 files changed, 37 insertions, 22 deletions
diff --git a/ntsc_decode/Android.mk b/ntsc_decode/Android.mk
index 4f8231b..ead118a 100755
--- a/ntsc_decode/Android.mk
+++ b/ntsc_decode/Android.mk
@@ -2,10 +2,9 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:=am_ntsc_cc.c \
- sliced1.c \
+ sliced_vbi.c \
ntsc_dmx/am_vbi_dmx.c \
- ntsc_dmx/linux_vbi/linux_ntsc.c \
- decode.c
+ ntsc_dmx/linux_vbi/linux_ntsc.c
LOCAL_SHARED_LIBRARIES+= libzvbi
diff --git a/ntsc_decode/am_ntsc_cc.c b/ntsc_decode/am_ntsc_cc.c
index 5975579..017ca7e 100755
--- a/ntsc_decode/am_ntsc_cc.c
+++ b/ntsc_decode/am_ntsc_cc.c
@@ -10,7 +10,7 @@
#include "hamm.h"
#include "dvb_demux.h"
#include "sliced.h"
-#include "sliced1.h"
+#include "sliced_vbi.h"
#include "am_ntsc_cc.h"
#include "vbi_dmx.h"
diff --git a/ntsc_decode/test/Android.mk b/ntsc_decode/debug/test_main/Android.mk
index a7e5c71..ef1a64e 100755
--- a/ntsc_decode/test/Android.mk
+++ b/ntsc_decode/debug/test_main/Android.mk
@@ -1,15 +1,15 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_SRC_FILES:=caption.c \
- ../sliced1.c
+LOCAL_SRC_FILES:=decode.c \
+ ../../sliced_vbi.c
LOCAL_SHARED_LIBRARIES+= libzvbi
-LOCAL_C_INCLUDES:=$(LOCAL_PATH)/../src \
- $(LOCAL_PATH)/ \
- $(LOCAL_PATH)/ntsc_dmx/ \
- $(LOCAL_PATH)/ntsc_dmx/include
+LOCAL_C_INCLUDES:=$(LOCAL_PATH)/../../../src \
+ $(LOCAL_PATH)/../../ \
+ $(LOCAL_PATH)/../../ntsc_dmx/ \
+ $(LOCAL_PATH)/../../ntsc_dmx/include
LOCAL_MODULE:= xds_decode
LOCAL_MODULE_TAGS := optional
diff --git a/ntsc_decode/test/caption.c b/ntsc_decode/debug/test_main/caption.c
index 323839e..34f1819 100755
--- a/ntsc_decode/test/caption.c
+++ b/ntsc_decode/debug/test_main/caption.c
@@ -44,7 +44,7 @@
#include "hamm.h"
#include "dvb_demux.h"
#include "sliced.h"
-#include "sliced1.h"
+#include "sliced_vbi.h"
#define XDS_SEP_DEBUG(x) /* x */ x
vbi_decoder * vbi;
vbi_pgno pgno = -1;
@@ -122,7 +122,7 @@ draw_row (uint32_t * canvas,
vbi_rgba *s = row_buffer;
XDS_SEP_DEBUG(printf("draw_row = %d\n",row));
for (i = 0; i < pg->columns; ++i) {
- XDS_SEP_DEBUG(printf("%02x ", unicode_ccfont2 (pg->text[row * pg->columns + i].unicode, pg->text[row * pg->columns + i].->italic)));
+ //XDS_SEP_DEBUG(printf("%02x ", unicode_ccfont2 (pg->text[row * pg->columns + i].unicode, pg->text[row * pg->columns + i].->italic)));
if (pg->text[row * pg->columns + i].opacity
== VBI_TRANSPARENT_SPACE) {
num_tspaces++;
diff --git a/ntsc_decode/test/decode.c b/ntsc_decode/debug/test_main/decode.c
index adb699f..124af4e 100755
--- a/ntsc_decode/test/decode.c
+++ b/ntsc_decode/debug/test_main/decode.c
@@ -62,7 +62,7 @@
#endif
#include "sliced.h"
-#include "sliced1.h"
+#include "sliced_vbi.h"
#undef _
#define _(x) x /* i18n TODO */
diff --git a/ntsc_decode/debug/test_so/Android.mk b/ntsc_decode/debug/test_so/Android.mk
new file mode 100755
index 0000000..e2347c9
--- a/dev/null
+++ b/ntsc_decode/debug/test_so/Android.mk
@@ -0,0 +1,21 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:= decode.c \
+ ../../sliced_vbi.c \
+ ../../ntsc_dmx/am_vbi_dmx.c \
+ ../../ntsc_dmx/linux_vbi/linux_ntsc.c
+
+LOCAL_SHARED_LIBRARIES+= libzvbi
+
+LOCAL_C_INCLUDES:=$(LOCAL_PATH)/../../../src \
+ $(LOCAL_PATH)/../../ \
+ $(LOCAL_PATH)/../../ntsc_dmx/ \
+ $(LOCAL_PATH)/../../ntsc_dmx/include
+
+LOCAL_MODULE:= libntsc_decode
+LOCAL_MODULE_TAGS := optional
+LOCAL_ARM_MODE := arm
+LOCAL_CFLAGS+=-D_REENTRANT -D_GNU_SOURCE -DENABLE_DVB=1 -DENABLE_V4L=1 -DENABLE_V4L2=1 -DHAVE_ICONV=1 -DPACKAGE=\"zvbi\" -DVERSION=\"0.2.33\" -DANDROID -DHAVE_GETOPT_LONG=1
+LOCAL_SHARED_LIBRARIES += libicuuc liblog
+include $(BUILD_SHARED_LIBRARY) \ No newline at end of file
diff --git a/ntsc_decode/caption.c b/ntsc_decode/debug/test_so/caption.c
index 323839e..1e1997b 100755
--- a/ntsc_decode/caption.c
+++ b/ntsc_decode/debug/test_so/caption.c
@@ -44,7 +44,7 @@
#include "hamm.h"
#include "dvb_demux.h"
#include "sliced.h"
-#include "sliced1.h"
+#include "sliced_vbi.h"
#define XDS_SEP_DEBUG(x) /* x */ x
vbi_decoder * vbi;
vbi_pgno pgno = -1;
diff --git a/ntsc_decode/caption.h b/ntsc_decode/debug/test_so/caption.h
index a60fff8..a60fff8 100755
--- a/ntsc_decode/caption.h
+++ b/ntsc_decode/debug/test_so/caption.h
diff --git a/ntsc_decode/decode.c b/ntsc_decode/debug/test_so/decode.c
index fd9ff57..b5cd47a 100755
--- a/ntsc_decode/decode.c
+++ b/ntsc_decode/debug/test_so/decode.c
@@ -62,7 +62,7 @@
#endif
#include "sliced.h"
-#include "sliced1.h"
+#include "sliced_vbi.h"
#include "decode.h"
#undef _
#define _(x) x /* i18n TODO */
diff --git a/ntsc_decode/decode.h b/ntsc_decode/debug/test_so/decode.h
index d7c0247..d7c0247 100755
--- a/ntsc_decode/decode.h
+++ b/ntsc_decode/debug/test_so/decode.h
diff --git a/ntsc_decode/ntsc_dmx/test/Android.mk b/ntsc_decode/ntsc_dmx/test/Android.mk
index 024b30c..3f3b975 100755
--- a/ntsc_decode/ntsc_dmx/test/Android.mk
+++ b/ntsc_decode/ntsc_dmx/test/Android.mk
@@ -6,7 +6,7 @@ LOCAL_SHARED_LIBRARIES+= libzvbi libntsc_decode
LOCAL_C_INCLUDES:=$(LOCAL_PATH)/../../../src \
- $(LOCAL_PATH)/../ \
+ $(LOCAL_PATH)/../../debug/test_so \
$(LOCAL_PATH)/../../ \
$(LOCAL_PATH)/../include
diff --git a/ntsc_decode/readme.txt b/ntsc_decode/readme.txt
deleted file mode 100755
index 5efe585..0000000
--- a/ntsc_decode/readme.txt
+++ b/dev/null
@@ -1,5 +0,0 @@
-./caption.c caption.h decode.c decode.c是测试文件
-./test/目录是测试文件
-./ntsc_dmx/test/目录是测试文件
-am_ntsc_cc.c是提供调用接口
-ntsc_dmx目录是获取底层数据函数
diff --git a/ntsc_decode/sliced1.c b/ntsc_decode/sliced_vbi.c
index 62e684a..8c33514 100755
--- a/ntsc_decode/sliced1.c
+++ b/ntsc_decode/sliced_vbi.c
@@ -51,7 +51,7 @@
#include "io-sim.h"
#include "raw_decoder.h"
#include "vbi.h"
-#include "sliced1.h"
+#include "sliced_vbi.h"
#if 2 == VBI_VERSION_MINOR
# include "proxy-msg.h"
diff --git a/ntsc_decode/sliced1.h b/ntsc_decode/sliced_vbi.h
index 1b884fd..1b884fd 100755
--- a/ntsc_decode/sliced1.h
+++ b/ntsc_decode/sliced_vbi.h