From 23431c75c8cc5df8712834e59dd80bd19b5fc298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Fri, 29 Jun 2012 13:01:27 -0700 Subject: codec: make data tables constant. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When declaring them constant, they are written on the .rodata section instead of .data, which means that they can be mapped directly from disk to memory. Signed-off-by: Diego Elio Pettenò --- src/codec/gsm610.c | 2 +- src/codec/gsm620.c | 4 ++-- src/codec/gsm660.c | 2 +- src/codec/gsm690.c | 16 ++++++++-------- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/codec') diff --git a/src/codec/gsm610.c b/src/codec/gsm610.c index 09fbeb5a..35f6011d 100644 --- a/src/codec/gsm610.c +++ b/src/codec/gsm610.c @@ -30,7 +30,7 @@ * It converts between serial parameter output by the encoder and the * order needed before channel encoding. */ -uint16_t gsm610_bitorder[260] = { +const uint16_t gsm610_bitorder[260] = { 0, /* LARc0:5 */ 47, /* Xmaxc0:5 */ 103, /* Xmaxc1:5 */ diff --git a/src/codec/gsm620.c b/src/codec/gsm620.c index 09aca502..fa570e4f 100644 --- a/src/codec/gsm620.c +++ b/src/codec/gsm620.c @@ -27,7 +27,7 @@ /* This array encode mapping between GSM 05.03 Table 3a (bits * ordering before channel coding on TCH) and GSM 06.20 Table B.1 * (bit ordering on A-bis */ -uint16_t gsm620_unvoiced_bitorder[112] = { +const uint16_t gsm620_unvoiced_bitorder[112] = { 3, /* R0:1 */ 25, /* LPC 3:7 */ 52, /* GSP 0-1:2 */ @@ -146,7 +146,7 @@ uint16_t gsm620_unvoiced_bitorder[112] = { /* This array encode mapping between GSM 05.03 Table 3b (bits * ordering before channel coding on TCH) and GSM 06.20 Table B.2 * (bit ordering on A-bis */ -uint16_t gsm620_voiced_bitorder[112] = { +const uint16_t gsm620_voiced_bitorder[112] = { 13, /* LPC 1:2 */ 14, /* LPC 1:1 */ 20, /* LPC 2:4 */ diff --git a/src/codec/gsm660.c b/src/codec/gsm660.c index 4fff5ffc..c044a2ab 100644 --- a/src/codec/gsm660.c +++ b/src/codec/gsm660.c @@ -32,7 +32,7 @@ * applied prior to this table, as in GSM 05.03 3.1.1, to get 260 * bits from a 244 bits raw EFR frame. */ -uint16_t gsm660_bitorder[260] = { +const uint16_t gsm660_bitorder[260] = { 38, 39, 40, 41, 42, 43, /* 0 -> LTP-LAG 1: b8..b3 */ 145, 146, 147, 148, 149, 150, /* 6 -> LTP-LAG 3: b8..b3 */ 93, 94, /* 12 -> LTP-LAG 2: b5..b4 */ diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index e5b9bd49..fdf3302f 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -33,7 +33,7 @@ /* This array encodes GSM 05.03 Table 7 * It's also TS 26.101 Table B.8 */ -uint16_t gsm690_12_2_bitorder[244] = { +const uint16_t gsm690_12_2_bitorder[244] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 23, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 38, @@ -65,7 +65,7 @@ uint16_t gsm690_12_2_bitorder[244] = { /* This array encodes GSM 05.03 Table 8 * It's also TS 26.101 Table B.7 */ -uint16_t gsm690_10_2_bitorder[204] = { +const uint16_t gsm690_10_2_bitorder[204] = { 7, 6, 5, 4, 3, 2, 1, 0, 16, 15, 14, 13, 12, 11, 10, 9, 8, 26, 27, 28, 29, 30, 31, 115, 116, 117, 118, 119, 120, 72, @@ -93,7 +93,7 @@ uint16_t gsm690_10_2_bitorder[204] = { /* This array encodes GSM 05.03 Table 9 * It's also TS 26.101 Table B.6 */ -uint16_t gsm690_7_95_bitorder[159] = { +const uint16_t gsm690_7_95_bitorder[159] = { 8, 7, 6, 5, 4, 3, 2, 14, 16, 9, 10, 12, 13, 15, 11, 17, 20, 22, 24, 23, 19, 18, 21, 56, 88, 122, 154, 57, 89, 123, @@ -116,7 +116,7 @@ uint16_t gsm690_7_95_bitorder[159] = { /* This array encodes GSM 05.03 Table 10 * It's also TS 26.101 Table B.5 */ -uint16_t gsm690_7_4_bitorder[148] = { +const uint16_t gsm690_7_4_bitorder[148] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 26, 87, 27, 88, 28, 89, 29, 90, 30, 91, 51, 80, 112, @@ -138,7 +138,7 @@ uint16_t gsm690_7_4_bitorder[148] = { /* This array encodes GSM 05.03 Table 11 * It's also TS 26.101 Table B.4 */ -uint16_t gsm690_6_7_bitorder[134] = { +const uint16_t gsm690_6_7_bitorder[134] = { 0, 1, 4, 3, 5, 6, 13, 7, 2, 8, 9, 11, 15, 12, 14, 10, 28, 82, 29, 83, 27, 81, 26, 80, 30, 84, 16, 55, 109, 56, @@ -159,7 +159,7 @@ uint16_t gsm690_6_7_bitorder[134] = { /* This array encodes GSM 05.03 Table 12 * It's also TS 26.101 Table B.3 */ -uint16_t gsm690_5_9_bitorder[118] = { +const uint16_t gsm690_5_9_bitorder[118] = { 0, 1, 4, 5, 3, 6, 7, 2, 13, 15, 8, 9, 11, 12, 14, 10, 16, 28, 74, 29, 75, 27, 73, 26, 72, 30, 76, 51, 97, 50, @@ -178,7 +178,7 @@ uint16_t gsm690_5_9_bitorder[118] = { /* This array encodes GSM 05.03 Table 13 * It's also TS 26.101 Table B.2 */ -uint16_t gsm690_5_15_bitorder[103] = { +const uint16_t gsm690_5_15_bitorder[103] = { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8, 23, 24, 25, 26, 27, 46, 65, 84, 45, 44, 43, 64, 63, 62, @@ -196,7 +196,7 @@ uint16_t gsm690_5_15_bitorder[103] = { /* This array encodes GSM 05.03 Table 14 * It's also TS 26.101 Table B.1 */ -uint16_t gsm690_4_75_bitorder[95] = { +const uint16_t gsm690_4_75_bitorder[95] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 23, 24, 25, 26, 27, 28, 48, 49, 61, 62, 82, 83, 47, 46, -- cgit v1.2.3