summaryrefslogtreecommitdiff
path: root/src/libspucc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libspucc')
-rw-r--r--src/libspucc/Makefile.am10
-rw-r--r--src/libspucc/cc_decoder.c32
2 files changed, 24 insertions, 18 deletions
diff --git a/src/libspucc/Makefile.am b/src/libspucc/Makefile.am
index aefe4d7c1..87266505c 100644
--- a/src/libspucc/Makefile.am
+++ b/src/libspucc/Makefile.am
@@ -1,10 +1,12 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+
+noinst_HEADERS = cc_decoder.h
+
xineplug_LTLIBRARIES = xineplug_decode_spucc.la
xineplug_decode_spucc_la_SOURCES = cc_decoder.c xine_cc_decoder.c
-xineplug_decode_spucc_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -fno-strict-aliasing
xineplug_decode_spucc_la_LIBADD = $(XINE_LIB)
-xineplug_decode_spucc_la_LDFLAGS = -avoid-version -module
-
-noinst_HEADERS = cc_decoder.h
+xineplug_decode_spucc_la_CFLAGS = $(AM_CFLAGS) -fno-strict-aliasing
diff --git a/src/libspucc/cc_decoder.c b/src/libspucc/cc_decoder.c
index 46ea5c02c..dc380c8de 100644
--- a/src/libspucc/cc_decoder.c
+++ b/src/libspucc/cc_decoder.c
@@ -223,10 +223,14 @@ static const uint8_t *const cc_alpha_palettes[NUM_CC_PALETTES] = {
/* mapping from PAC row code to actual CC row */
static const int rowdata[] = {10, -1, 0, 1, 2, 3, 11, 12, 13, 14, 4, 5, 6,
7, 8, 9};
-/* FIXME: do real TM */
-/* must be mapped as a music note in the captioning font */
-static const char specialchar[] = {'®','°','½','¿','T','¢','£','¶','à',
- TRANSP_SPACE,'è','â','ê','î','ô','û'};
+/* FIXME: do real â„¢ (U+2122) */
+/* Code 182 must be mapped as a musical note ('♪', U+266A) in the caption font */
+static const char specialchar[] = {
+ 174 /* ® */, 176 /* ° */, 189 /* ½ */, 191 /* ¿ */,
+ 'T' /* ™ */, 162 /* ¢ */, 163 /* £ */, 182 /* ¶ => ♪ */,
+ 224 /* à */, TRANSP_SPACE,232 /* è */, 226 /* â */,
+ 234 /* ê */, 238 /* î */, 244 /* ô */, 251 /* û */
+};
/* character translation table - EIA 608 codes are not all the same as ASCII */
static char chartbl[128];
@@ -427,16 +431,16 @@ static void build_char_table(void)
for (i = 0; i < 128; i++)
chartbl[i] = (char) i;
/* now the special codes */
- chartbl[0x2a] = 'á';
- chartbl[0x5c] = 'é';
- chartbl[0x5e] = 'í';
- chartbl[0x5f] = 'ó';
- chartbl[0x60] = 'ú';
- chartbl[0x7b] = 'ç';
- chartbl[0x7c] = '÷';
- chartbl[0x7d] = 'Ñ';
- chartbl[0x7e] = 'ñ';
- chartbl[0x7f] = '¤'; /* FIXME: this should be a solid block */
+ chartbl[0x2a] = 225; /* á */
+ chartbl[0x5c] = 233; /* é */
+ chartbl[0x5e] = 237; /* í */
+ chartbl[0x5f] = 243; /* ó */
+ chartbl[0x60] = 250; /* ú */
+ chartbl[0x7b] = 231; /* ç */
+ chartbl[0x7c] = 247; /* ÷ */
+ chartbl[0x7d] = 209; /* Ñ */
+ chartbl[0x7e] = 241; /* ñ */
+ chartbl[0x7f] = 164; /* ¤ FIXME: should be a solid block ('█'; U+2588) */
}