Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2016-06-23 01:29:25 +0300
committerClément Bœsch <u@pkh.me>2016-06-23 01:29:25 +0300
commitbcafc41a5aa838ff4a88cc020bd55aa6e0790723 (patch)
tree2bd1cab9a06c4a265adcc040cbcee20d99f1ed6d /libavcodec/get_bits.h
parente799e2270cb899c991866894c64893012f2d7adb (diff)
parentffa190d0479d2370dd89c95692f822cbff2cc24c (diff)
Merge commit 'ffa190d0479d2370dd89c95692f822cbff2cc24c'
* commit 'ffa190d0479d2370dd89c95692f822cbff2cc24c': Move VLC and RL_VLC_ELEM structure definitions to a separate header Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec/get_bits.h')
-rw-r--r--libavcodec/get_bits.h42
1 files changed, 1 insertions, 41 deletions
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index 881dadd4f2..d566b9c4d0 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -33,6 +33,7 @@
#include "libavutil/log.h"
#include "libavutil/avassert.h"
#include "mathops.h"
+#include "vlc.h"
/*
* Safe bitstream reading:
@@ -58,20 +59,6 @@ typedef struct GetBitContext {
int size_in_bits_plus8;
} GetBitContext;
-#define VLC_TYPE int16_t
-
-typedef struct VLC {
- int bits;
- VLC_TYPE (*table)[2]; ///< code, bits
- int table_size, table_allocated;
-} VLC;
-
-typedef struct RL_VLC_ELEM {
- int16_t level;
- int8_t len;
- uint8_t run;
-} RL_VLC_ELEM;
-
/* Bitstream reader API docs:
* name
* arbitrary name which is used as prefix for the internal variables
@@ -463,33 +450,6 @@ static inline const uint8_t *align_get_bits(GetBitContext *s)
return s->buffer + (s->index >> 3);
}
-#define init_vlc(vlc, nb_bits, nb_codes, \
- bits, bits_wrap, bits_size, \
- codes, codes_wrap, codes_size, \
- flags) \
- ff_init_vlc_sparse(vlc, nb_bits, nb_codes, \
- bits, bits_wrap, bits_size, \
- codes, codes_wrap, codes_size, \
- NULL, 0, 0, flags)
-
-int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
- const void *bits, int bits_wrap, int bits_size,
- const void *codes, int codes_wrap, int codes_size,
- const void *symbols, int symbols_wrap, int symbols_size,
- int flags);
-void ff_free_vlc(VLC *vlc);
-
-#define INIT_VLC_LE 2
-#define INIT_VLC_USE_NEW_STATIC 4
-
-#define INIT_VLC_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \
- do { \
- static VLC_TYPE table[static_size][2]; \
- (vlc)->table = table; \
- (vlc)->table_allocated = static_size; \
- init_vlc(vlc, bits, a, b, c, d, e, f, g, INIT_VLC_USE_NEW_STATIC); \
- } while (0)
-
/**
* If the vlc code is invalid and max_depth=1, then no bits will be removed.
* If the vlc code is invalid and max_depth>1, then the number of bits removed