]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
wma: Remove pointless VLC_TYPE define.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 5 Jun 2017 15:08:58 +0000 (17:08 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 6 Jul 2017 19:00:36 +0000 (21:00 +0200)
It was defined to int16_t which only obfuscates the code.

bitstream.c
bitstream.h

index 9cd1273cfd578cf89492012b41cf236ecd32a38d..a2a0537a47a9fe7d2c64ceadbb39bb41c58c0aba 100644 (file)
@@ -47,7 +47,7 @@ static void alloc_table(struct vlc *vlc, int size)
        if (vlc->table_size > vlc->table_allocated) {
                vlc->table_allocated += (1 << vlc->bits);
                vlc->table = para_realloc(vlc->table,
-                       sizeof(VLC_TYPE) * 2 * vlc->table_allocated);
+                       sizeof(int16_t) * 2 * vlc->table_allocated);
        }
 }
 
@@ -57,7 +57,7 @@ static int build_table(struct vlc *vlc, int table_nb_bits, int nb_codes,
 {
        int i, j, k, n, table_size, table_index, nb, n1, idx;
        uint32_t code;
-       VLC_TYPE(*table)[2];
+       int16_t (*table)[2];
 
        table_size = 1 << table_nb_bits;
        table_index = vlc->table_size;
@@ -173,7 +173,7 @@ void free_vlc(struct vlc *vlc)
  *
  * \return The vlc code.
  */
-int get_vlc(struct getbit_context *gbc, VLC_TYPE(*table)[2], int bits)
+int get_vlc(struct getbit_context *gbc, int16_t (*table)[2], int bits)
 {
        int n, idx, nb_bits, code;
 
index 3bcd2759a703ab3d62567d9da4d5ae07dfdc1a71..bed370ff6a5c0f167f3148d91e4049ec1c7b8c39 100644 (file)
@@ -19,14 +19,12 @@ struct getbit_context {
        int index;
 };
 
-#define VLC_TYPE int16_t
-
 /** A variable length code table. */
 struct vlc {
        /** Number of bits of the table. */
        int bits;
        /** The code and the bits table. */
-       VLC_TYPE(*table)[2];
+       int16_t (*table)[2];
        /** The size of the table. */
        int table_size;
        /** Amount of memory allocated so far. */
@@ -98,4 +96,4 @@ static inline void init_get_bits(struct getbit_context *gbc,
 void init_vlc(struct vlc *vlc, int nb_bits, int nb_codes, const void *bits,
                const void *codes, int codes_size);
 void free_vlc(struct vlc *vlc);
-int get_vlc(struct getbit_context *gbc, VLC_TYPE(*table)[2], int bits);
+int get_vlc(struct getbit_context *gbc, int16_t (*table)[2], int bits);