aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2013-08-15 13:13:01 +0200
committerDiego Biurrun <diego@biurrun.de>2013-08-15 14:38:03 +0200
commit060ce0c697e261ca2792a7df30dfd1bae6900a4f (patch)
treefba5ba199dc1876ed7da1a9e515d7b1f3f465357 /libavcodec
parent4b054a3400f728c54470ee6a1eefe1d82420f6a2 (diff)
downloadffmpeg-060ce0c697e261ca2792a7df30dfd1bae6900a4f.tar.gz
ivi_common: Make some tables only used within the file static
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ivi_common.c64
1 files changed, 31 insertions, 33 deletions
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 25ca6b7568..2207fe1643 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -35,8 +35,35 @@
#include "ivi_common.h"
#include "ivi_dsp.h"
-extern const IVIHuffDesc ff_ivi_mb_huff_desc[8]; ///< static macroblock huffman tables
-extern const IVIHuffDesc ff_ivi_blk_huff_desc[8]; ///< static block huffman tables
+/**
+ * These are 2x8 predefined Huffman codebooks for coding macroblock/block
+ * signals. They are specified using "huffman descriptors" in order to
+ * avoid huge static tables. The decoding tables will be generated at
+ * startup from these descriptors.
+ */
+/** static macroblock huffman tables */
+static const IVIHuffDesc ivi_mb_huff_desc[8] = {
+ {8, {0, 4, 5, 4, 4, 4, 6, 6}},
+ {12, {0, 2, 2, 3, 3, 3, 3, 5, 3, 2, 2, 2}},
+ {12, {0, 2, 3, 4, 3, 3, 3, 3, 4, 3, 2, 2}},
+ {12, {0, 3, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2}},
+ {13, {0, 4, 4, 3, 3, 3, 3, 2, 3, 3, 2, 1, 1}},
+ {9, {0, 4, 4, 4, 4, 3, 3, 3, 2}},
+ {10, {0, 4, 4, 4, 4, 3, 3, 2, 2, 2}},
+ {12, {0, 4, 4, 4, 3, 3, 2, 3, 2, 2, 2, 2}}
+};
+
+/** static block huffman tables */
+static const IVIHuffDesc ivi_blk_huff_desc[8] = {
+ {10, {1, 2, 3, 4, 4, 7, 5, 5, 4, 1}},
+ {11, {2, 3, 4, 4, 4, 7, 5, 4, 3, 3, 2}},
+ {12, {2, 4, 5, 5, 5, 5, 6, 4, 4, 3, 1, 1}},
+ {13, {3, 3, 4, 4, 5, 6, 6, 4, 4, 3, 2, 1, 1}},
+ {11, {3, 4, 4, 5, 5, 5, 6, 5, 4, 2, 2}},
+ {13, {3, 4, 5, 5, 5, 5, 6, 4, 3, 3, 2, 1, 1}},
+ {13, {3, 4, 5, 5, 5, 6, 5, 4, 3, 3, 2, 1, 1}},
+ {9, {3, 4, 4, 5, 5, 5, 6, 5, 5}}
+};
static VLC ivi_mb_vlc_tabs [8]; ///< static macroblock Huffman tables
static VLC ivi_blk_vlc_tabs[8]; ///< static block Huffman tables
@@ -135,11 +162,11 @@ av_cold void ff_ivi_init_static_vlc(void)
for (i = 0; i < 8; i++) {
ivi_mb_vlc_tabs[i].table = table_data + i * 2 * 8192;
ivi_mb_vlc_tabs[i].table_allocated = 8192;
- ivi_create_huff_from_desc(&ff_ivi_mb_huff_desc[i],
+ ivi_create_huff_from_desc(&ivi_mb_huff_desc[i],
&ivi_mb_vlc_tabs[i], 1);
ivi_blk_vlc_tabs[i].table = table_data + (i * 2 + 1) * 8192;
ivi_blk_vlc_tabs[i].table_allocated = 8192;
- ivi_create_huff_from_desc(&ff_ivi_blk_huff_desc[i],
+ ivi_create_huff_from_desc(&ivi_blk_huff_desc[i],
&ivi_blk_vlc_tabs[i], 1);
}
initialized_vlcs = 1;
@@ -1040,35 +1067,6 @@ av_cold int ff_ivi_decode_close(AVCodecContext *avctx)
/**
- * These are 2x8 predefined Huffman codebooks for coding macroblock/block
- * signals. They are specified using "huffman descriptors" in order to
- * avoid huge static tables. The decoding tables will be generated at
- * startup from these descriptors.
- */
-const IVIHuffDesc ff_ivi_mb_huff_desc[8] = {
- {8, {0, 4, 5, 4, 4, 4, 6, 6}},
- {12, {0, 2, 2, 3, 3, 3, 3, 5, 3, 2, 2, 2}},
- {12, {0, 2, 3, 4, 3, 3, 3, 3, 4, 3, 2, 2}},
- {12, {0, 3, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2}},
- {13, {0, 4, 4, 3, 3, 3, 3, 2, 3, 3, 2, 1, 1}},
- {9, {0, 4, 4, 4, 4, 3, 3, 3, 2}},
- {10, {0, 4, 4, 4, 4, 3, 3, 2, 2, 2}},
- {12, {0, 4, 4, 4, 3, 3, 2, 3, 2, 2, 2, 2}}
-};
-
-const IVIHuffDesc ff_ivi_blk_huff_desc[8] = {
- {10, {1, 2, 3, 4, 4, 7, 5, 5, 4, 1}},
- {11, {2, 3, 4, 4, 4, 7, 5, 4, 3, 3, 2}},
- {12, {2, 4, 5, 5, 5, 5, 6, 4, 4, 3, 1, 1}},
- {13, {3, 3, 4, 4, 5, 6, 6, 4, 4, 3, 2, 1, 1}},
- {11, {3, 4, 4, 5, 5, 5, 6, 5, 4, 2, 2}},
- {13, {3, 4, 5, 5, 5, 5, 6, 4, 3, 3, 2, 1, 1}},
- {13, {3, 4, 5, 5, 5, 6, 5, 4, 3, 3, 2, 1, 1}},
- {9, {3, 4, 4, 5, 5, 5, 6, 5, 5}}
-};
-
-
-/**
* Scan patterns shared between indeo4 and indeo5
*/
const uint8_t ff_ivi_vertical_scan_8x8[64] = {