summaryrefslogtreecommitdiff
path: root/libavcodec/on2avcdata.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-10-18 07:20:43 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-10-21 07:47:55 +0200
commit26cc9db744be8d5057a28c81cebb670197ac5692 (patch)
tree8f55c4dd9fd7d3f086f947b90325ff73f0393359 /libavcodec/on2avcdata.h
parentfba8890628ece8a4c7ca479ea86d4ec309557384 (diff)
avcodec/on2avc: Unify initializing quad and pair VLCs
Up until now, quad VLCs are initialized with codes of type uint32_t, pair VLCs with codes of type uint16_t. There were two separate loops in the decoder's init function for each type of VLC. This commit unifies this: The type of the codes are now passed in as void * and the actual size of the codes is obtained from a table. This approach also allows to use the smallest type for each VLC code table: some quad tables actually fitted in uint16_t. This allows to remove about 7KB from the binary. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/on2avcdata.h')
-rw-r--r--libavcodec/on2avcdata.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/libavcodec/on2avcdata.h b/libavcodec/on2avcdata.h
index dc7833feff..2395b80e68 100644
--- a/libavcodec/on2avcdata.h
+++ b/libavcodec/on2avcdata.h
@@ -41,14 +41,11 @@ extern const On2AVCMode ff_on2avc_modes_44[8];
extern const uint32_t ff_on2avc_scale_diff_codes[];
extern const uint8_t ff_on2avc_scale_diff_bits[];
-extern const uint32_t * const ff_on2avc_quad_cb_codes[];
-extern const uint8_t * const ff_on2avc_quad_cb_bits[];
-extern const uint16_t * const ff_on2avc_quad_cb_syms[];
-extern const int ff_on2avc_quad_cb_elems[];
-extern const uint16_t * const ff_on2avc_pair_cb_codes[];
-extern const uint8_t * const ff_on2avc_pair_cb_bits[];
-extern const uint16_t * const ff_on2avc_pair_cb_syms[];
-extern const int ff_on2avc_pair_cb_elems[];
+extern const void * const ff_on2avc_cb_codes[];
+extern const uint8_t * const ff_on2avc_cb_bits[];
+extern const uint16_t * const ff_on2avc_cb_syms[];
+extern const uint8_t ff_on2avc_cb_codes_sizes[];
+extern const int ff_on2avc_cb_elems[];
extern const float ff_on2avc_window_long_32000[1024];
extern const float ff_on2avc_window_long_24000[1024];