From 680ede4292dce5893a37703e68ca2fca8b882814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 16:19:13 +0100 Subject: Mark the sub_palette and sub_trans tables constant. --- src/spu_dec/sputext_decoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/spu_dec') diff --git a/src/spu_dec/sputext_decoder.c b/src/spu_dec/sputext_decoder.c index 73d242524..db2236097 100644 --- a/src/spu_dec/sputext_decoder.c +++ b/src/spu_dec/sputext_decoder.c @@ -43,7 +43,7 @@ #define rgb2yuv(R,G,B) ((((((66*R+129*G+25*B+128)>>8)+16)<<8)|(((112*R-94*G-18*B+128)>>8)+128))<<8|(((-38*R-74*G+112*B+128)>>8)+128)) -static uint32_t sub_palette[22]={ +static const uint32_t sub_palette[22]={ /* RED */ rgb2yuv(0,0,0), rgb2yuv(0,0,0), @@ -70,7 +70,7 @@ static uint32_t sub_palette[22]={ rgb2yuv(0,170,255) }; -static uint8_t sub_trans[22]={ +static const uint8_t sub_trans[22]={ 0, 0, 3, 6, 8, 10, 12, 14, 15, 15, 15, 0, 0, 3, 6, 8, 10, 12, 14, 15, 15, 15 }; -- cgit v1.2.3 From 41676eeedee9900244b7750dd38e3a67af710bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 16:24:32 +0100 Subject: Mark text_clut constant. --- src/spu_dec/spudec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/spu_dec') diff --git a/src/spu_dec/spudec.c b/src/spu_dec/spudec.c index 13136a53f..3edf6a9fd 100644 --- a/src/spu_dec/spudec.c +++ b/src/spu_dec/spudec.c @@ -873,7 +873,7 @@ static void spudec_discover_clut(xine_t *xine, spudec_state_t *state, vo_overlay int found[2][16]; - static clut_t text_clut[] = { + static const clut_t text_clut[] = { CLUT_Y_CR_CB_INIT(0x80, 0x90, 0x80), CLUT_Y_CR_CB_INIT(0x00, 0x90, 0x00), CLUT_Y_CR_CB_INIT(0xff, 0x90, 0x00) -- cgit v1.2.3 From 9e0f5443c389736ce490a5e6afaf7b36c44f23c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 16:25:11 +0100 Subject: Initialize found when declaring it. --- src/spu_dec/spudec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/spu_dec') diff --git a/src/spu_dec/spudec.c b/src/spu_dec/spudec.c index 3edf6a9fd..b7a812bc5 100644 --- a/src/spu_dec/spudec.c +++ b/src/spu_dec/spudec.c @@ -871,7 +871,7 @@ static void spudec_discover_clut(xine_t *xine, spudec_state_t *state, vo_overlay int n,i; rle_elem_t *rle; - int found[2][16]; + int found[2][16] = { { 0, }, }; static const clut_t text_clut[] = { CLUT_Y_CR_CB_INIT(0x80, 0x90, 0x80), @@ -879,7 +879,6 @@ static void spudec_discover_clut(xine_t *xine, spudec_state_t *state, vo_overlay CLUT_Y_CR_CB_INIT(0xff, 0x90, 0x00) }; - memset(found,0,sizeof(found)); rle = ovl->rle; /* this seems to be a problem somewhere else, -- cgit v1.2.3 From b969e207d78db34357343626eba99339d874eab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 16:27:17 +0100 Subject: Mark sizes constant. --- src/spu_dec/cmml_decoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/spu_dec') diff --git a/src/spu_dec/cmml_decoder.c b/src/spu_dec/cmml_decoder.c index 6ce6d3f90..a6d79c6d6 100644 --- a/src/spu_dec/cmml_decoder.c +++ b/src/spu_dec/cmml_decoder.c @@ -88,13 +88,13 @@ static void video_frame_format_change_callback (void *user_data, const xine_even static void update_font_size (spucmml_decoder_t *this) { - static int sizes[SUBTITLE_SIZE_NUM][4] = { + static const int sizes[SUBTITLE_SIZE_NUM][4] = { { 16, 16, 16, 20 }, /* SUBTITLE_SIZE_SMALL */ { 16, 16, 20, 24 }, /* SUBTITLE_SIZE_NORMAL */ { 16, 20, 24, 32 }, /* SUBTITLE_SIZE_LARGE */ }; - int *vec = sizes[this->subtitle_size]; + const int *vec = sizes[this->subtitle_size]; int y; if( this->cached_width >= 512 ) -- cgit v1.2.3 From c292a8d56fc0531297775cf64f14190b26b9b216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 17:18:36 +0100 Subject: Mark all supported_types constant. --- src/spu_dec/cmml_decoder.c | 2 +- src/spu_dec/spu_decoder.c | 2 +- src/spu_dec/spudvb_decoder.c | 2 +- src/spu_dec/sputext_decoder.c | 2 +- src/spu_dec/xine_cc_decoder.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/spu_dec') diff --git a/src/spu_dec/cmml_decoder.c b/src/spu_dec/cmml_decoder.c index a6d79c6d6..e63dc561d 100644 --- a/src/spu_dec/cmml_decoder.c +++ b/src/spu_dec/cmml_decoder.c @@ -522,7 +522,7 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) { /* plugin catalog information */ -static uint32_t supported_types[] = { BUF_SPU_CMML, 0 }; +static const uint32_t supported_types[] = { BUF_SPU_CMML, 0 }; static const decoder_info_t spudec_info = { supported_types, /* supported types */ diff --git a/src/spu_dec/spu_decoder.c b/src/spu_dec/spu_decoder.c index e36b39fc8..c4cf3ae78 100644 --- a/src/spu_dec/spu_decoder.c +++ b/src/spu_dec/spu_decoder.c @@ -367,7 +367,7 @@ static void *init_plugin (xine_t *xine, void *data) { } /* plugin catalog information */ -static uint32_t supported_types[] = { BUF_SPU_DVD, 0 }; +static const uint32_t supported_types[] = { BUF_SPU_DVD, 0 }; static const decoder_info_t dec_info_data = { supported_types, /* supported types */ diff --git a/src/spu_dec/spudvb_decoder.c b/src/spu_dec/spudvb_decoder.c index 9008260f7..331c9835d 100644 --- a/src/spu_dec/spudvb_decoder.c +++ b/src/spu_dec/spudvb_decoder.c @@ -984,7 +984,7 @@ static void *init_spu_decoder_plugin (xine_t * xine, void *data) /* plugin catalog information */ -static uint32_t supported_types[] = { BUF_SPU_DVB, 0 }; +static const uint32_t supported_types[] = { BUF_SPU_DVB, 0 }; static const decoder_info_t spudec_info = { supported_types, /* supported types */ diff --git a/src/spu_dec/sputext_decoder.c b/src/spu_dec/sputext_decoder.c index db2236097..0c156d2e9 100644 --- a/src/spu_dec/sputext_decoder.c +++ b/src/spu_dec/sputext_decoder.c @@ -978,7 +978,7 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) { /* plugin catalog information */ -static uint32_t supported_types[] = { BUF_SPU_TEXT, BUF_SPU_OGM, 0 }; +static const uint32_t supported_types[] = { BUF_SPU_TEXT, BUF_SPU_OGM, 0 }; static const decoder_info_t spudec_info = { supported_types, /* supported types */ diff --git a/src/spu_dec/xine_cc_decoder.c b/src/spu_dec/xine_cc_decoder.c index b2750aae2..9b177deeb 100644 --- a/src/spu_dec/xine_cc_decoder.c +++ b/src/spu_dec/xine_cc_decoder.c @@ -337,7 +337,7 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) { } /* plugin catalog information */ -static uint32_t supported_types[] = { BUF_SPU_CC, 0 }; +static const uint32_t supported_types[] = { BUF_SPU_CC, 0 }; static const decoder_info_t spudec_info = { supported_types, /* supported types */ -- cgit v1.2.3 From 6dbb05a4cba3cdc811308762058d722f11464683 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 30 Dec 2007 15:55:03 +0000 Subject: =?UTF-8?q?Manual=20port=20of=20the=20color=E2=86=92colour=20chang?= =?UTF-8?q?e=20to=201.2;=20should=20make=20merging=20easier.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/spu_dec/spudec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/spu_dec') diff --git a/src/spu_dec/spudec.c b/src/spu_dec/spudec.c index b7a812bc5..3e8cd8a07 100644 --- a/src/spu_dec/spudec.c +++ b/src/spu_dec/spudec.c @@ -1009,7 +1009,7 @@ int spudec_copy_nav_to_overlay(xine_t *xine, pci_t* nav_pci, uint32_t* clut, #endif for (i = 0;i < 4; i++) { #ifdef LOG_BUTTON - printf("libspudec:btn_coln = 0, hili_color = color\n"); + printf("libspudec:btn_coln = 0, hili_color = colour\n"); #endif overlay->hili_color[i] = overlay->color[i]; overlay->hili_trans[i] = overlay->trans[i]; -- cgit v1.2.3