aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Pettenò <flameeyes@gmail.com>2008-01-07 12:47:14 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2008-01-07 12:47:14 +0000
commita1f89639a84ceacb922192019bf6519b98c18aa0 (patch)
tree5c48925955ab4670e33eb3dbed7eaaf3d25f3a03
parent31bfd6f34f5b6b2c5bb9641aef33f0a7f9bebc4a (diff)
downloadffmpeg-a1f89639a84ceacb922192019bf6519b98c18aa0.tar.gz
Move wmv1_scantable to .rodata section by making it an array of arrays.
Patch by Diego 'Flameeyes' Pettenò flameeyes ¤ gmail ! com Originally committed as revision 11446 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/msmpeg4data.c88
-rw-r--r--libavcodec/msmpeg4data.h2
2 files changed, 42 insertions, 48 deletions
diff --git a/libavcodec/msmpeg4data.c b/libavcodec/msmpeg4data.c
index 727ff5050d..8ad462c03e 100644
--- a/libavcodec/msmpeg4data.c
+++ b/libavcodec/msmpeg4data.c
@@ -1828,53 +1828,47 @@ const uint8_t old_ff_c_dc_scale_table[32]={
0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22
};
-
-static const uint8_t wmv1_scantable00[64]= {
-0x00, 0x08, 0x01, 0x02, 0x09, 0x10, 0x18, 0x11,
-0x0A, 0x03, 0x04, 0x0B, 0x12, 0x19, 0x20, 0x28,
-0x30, 0x38, 0x29, 0x21, 0x1A, 0x13, 0x0C, 0x05,
-0x06, 0x0D, 0x14, 0x1B, 0x22, 0x31, 0x39, 0x3A,
-0x32, 0x2A, 0x23, 0x1C, 0x15, 0x0E, 0x07, 0x0F,
-0x16, 0x1D, 0x24, 0x2B, 0x33, 0x3B, 0x3C, 0x34,
-0x2C, 0x25, 0x1E, 0x17, 0x1F, 0x26, 0x2D, 0x35,
-0x3D, 0x3E, 0x36, 0x2E, 0x27, 0x2F, 0x37, 0x3F,
-};
-static const uint8_t wmv1_scantable01[64]= {
-0x00, 0x08, 0x01, 0x02, 0x09, 0x10, 0x18, 0x11,
-0x0A, 0x03, 0x04, 0x0B, 0x12, 0x19, 0x20, 0x28,
-0x21, 0x30, 0x1A, 0x13, 0x0C, 0x05, 0x06, 0x0D,
-0x14, 0x1B, 0x22, 0x29, 0x38, 0x31, 0x39, 0x2A,
-0x23, 0x1C, 0x15, 0x0E, 0x07, 0x0F, 0x16, 0x1D,
-0x24, 0x2B, 0x32, 0x3A, 0x33, 0x3B, 0x2C, 0x25,
-0x1E, 0x17, 0x1F, 0x26, 0x2D, 0x34, 0x3C, 0x35,
-0x3D, 0x2E, 0x27, 0x2F, 0x36, 0x3E, 0x37, 0x3F,
-};
-static const uint8_t wmv1_scantable02[64]= {
-0x00, 0x01, 0x08, 0x02, 0x03, 0x09, 0x10, 0x18,
-0x11, 0x0A, 0x04, 0x05, 0x0B, 0x12, 0x19, 0x20,
-0x28, 0x30, 0x21, 0x1A, 0x13, 0x0C, 0x06, 0x07,
-0x0D, 0x14, 0x1B, 0x22, 0x29, 0x38, 0x31, 0x39,
-0x2A, 0x23, 0x1C, 0x15, 0x0E, 0x0F, 0x16, 0x1D,
-0x24, 0x2B, 0x32, 0x3A, 0x33, 0x2C, 0x25, 0x1E,
-0x17, 0x1F, 0x26, 0x2D, 0x34, 0x3B, 0x3C, 0x35,
-0x2E, 0x27, 0x2F, 0x36, 0x3D, 0x3E, 0x37, 0x3F,
-};
-static const uint8_t wmv1_scantable03[64]= {
-0x00, 0x08, 0x10, 0x01, 0x18, 0x20, 0x28, 0x09,
-0x02, 0x03, 0x0A, 0x11, 0x19, 0x30, 0x38, 0x29,
-0x21, 0x1A, 0x12, 0x0B, 0x04, 0x05, 0x0C, 0x13,
-0x1B, 0x22, 0x31, 0x39, 0x32, 0x2A, 0x23, 0x1C,
-0x14, 0x0D, 0x06, 0x07, 0x0E, 0x15, 0x1D, 0x24,
-0x2B, 0x33, 0x3A, 0x3B, 0x34, 0x2C, 0x25, 0x1E,
-0x16, 0x0F, 0x17, 0x1F, 0x26, 0x2D, 0x3C, 0x35,
-0x2E, 0x27, 0x2F, 0x36, 0x3D, 0x3E, 0x37, 0x3F,
-};
-
-const uint8_t *wmv1_scantable[WMV1_SCANTABLE_COUNT+1]={
- wmv1_scantable00,
- wmv1_scantable01,
- wmv1_scantable02,
- wmv1_scantable03,
+const uint8_t wmv1_scantable[WMV1_SCANTABLE_COUNT][64]={
+ {
+ 0x00, 0x08, 0x01, 0x02, 0x09, 0x10, 0x18, 0x11,
+ 0x0A, 0x03, 0x04, 0x0B, 0x12, 0x19, 0x20, 0x28,
+ 0x30, 0x38, 0x29, 0x21, 0x1A, 0x13, 0x0C, 0x05,
+ 0x06, 0x0D, 0x14, 0x1B, 0x22, 0x31, 0x39, 0x3A,
+ 0x32, 0x2A, 0x23, 0x1C, 0x15, 0x0E, 0x07, 0x0F,
+ 0x16, 0x1D, 0x24, 0x2B, 0x33, 0x3B, 0x3C, 0x34,
+ 0x2C, 0x25, 0x1E, 0x17, 0x1F, 0x26, 0x2D, 0x35,
+ 0x3D, 0x3E, 0x36, 0x2E, 0x27, 0x2F, 0x37, 0x3F,
+ },
+ {
+ 0x00, 0x08, 0x01, 0x02, 0x09, 0x10, 0x18, 0x11,
+ 0x0A, 0x03, 0x04, 0x0B, 0x12, 0x19, 0x20, 0x28,
+ 0x21, 0x30, 0x1A, 0x13, 0x0C, 0x05, 0x06, 0x0D,
+ 0x14, 0x1B, 0x22, 0x29, 0x38, 0x31, 0x39, 0x2A,
+ 0x23, 0x1C, 0x15, 0x0E, 0x07, 0x0F, 0x16, 0x1D,
+ 0x24, 0x2B, 0x32, 0x3A, 0x33, 0x3B, 0x2C, 0x25,
+ 0x1E, 0x17, 0x1F, 0x26, 0x2D, 0x34, 0x3C, 0x35,
+ 0x3D, 0x2E, 0x27, 0x2F, 0x36, 0x3E, 0x37, 0x3F,
+ },
+ {
+ 0x00, 0x01, 0x08, 0x02, 0x03, 0x09, 0x10, 0x18,
+ 0x11, 0x0A, 0x04, 0x05, 0x0B, 0x12, 0x19, 0x20,
+ 0x28, 0x30, 0x21, 0x1A, 0x13, 0x0C, 0x06, 0x07,
+ 0x0D, 0x14, 0x1B, 0x22, 0x29, 0x38, 0x31, 0x39,
+ 0x2A, 0x23, 0x1C, 0x15, 0x0E, 0x0F, 0x16, 0x1D,
+ 0x24, 0x2B, 0x32, 0x3A, 0x33, 0x2C, 0x25, 0x1E,
+ 0x17, 0x1F, 0x26, 0x2D, 0x34, 0x3B, 0x3C, 0x35,
+ 0x2E, 0x27, 0x2F, 0x36, 0x3D, 0x3E, 0x37, 0x3F,
+ },
+ {
+ 0x00, 0x08, 0x10, 0x01, 0x18, 0x20, 0x28, 0x09,
+ 0x02, 0x03, 0x0A, 0x11, 0x19, 0x30, 0x38, 0x29,
+ 0x21, 0x1A, 0x12, 0x0B, 0x04, 0x05, 0x0C, 0x13,
+ 0x1B, 0x22, 0x31, 0x39, 0x32, 0x2A, 0x23, 0x1C,
+ 0x14, 0x0D, 0x06, 0x07, 0x0E, 0x15, 0x1D, 0x24,
+ 0x2B, 0x33, 0x3A, 0x3B, 0x34, 0x2C, 0x25, 0x1E,
+ 0x16, 0x0F, 0x17, 0x1F, 0x26, 0x2D, 0x3C, 0x35,
+ 0x2E, 0x27, 0x2F, 0x36, 0x3D, 0x3E, 0x37, 0x3F,
+ }
};
const uint8_t table_inter_intra[4][2]={
diff --git a/libavcodec/msmpeg4data.h b/libavcodec/msmpeg4data.h
index 23640e4d6e..9bfb1ba99c 100644
--- a/libavcodec/msmpeg4data.h
+++ b/libavcodec/msmpeg4data.h
@@ -67,7 +67,7 @@ extern const uint8_t inter_MCBPC_bits[28];
#define WMV1_SCANTABLE_COUNT 4
-extern const uint8_t *wmv1_scantable[WMV1_SCANTABLE_COUNT+1];
+extern const uint8_t wmv1_scantable[WMV1_SCANTABLE_COUNT][64];
#define NB_RL_TABLES 6