summaryrefslogtreecommitdiffstats
path: root/media/ffvpx/libavcodec/vlc.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /media/ffvpx/libavcodec/vlc.h
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'media/ffvpx/libavcodec/vlc.h')
-rw-r--r--media/ffvpx/libavcodec/vlc.h46
1 files changed, 4 insertions, 42 deletions
diff --git a/media/ffvpx/libavcodec/vlc.h b/media/ffvpx/libavcodec/vlc.h
index 679666801a..bf7b0e65b4 100644
--- a/media/ffvpx/libavcodec/vlc.h
+++ b/media/ffvpx/libavcodec/vlc.h
@@ -40,7 +40,10 @@ typedef struct VLC {
} VLC;
typedef struct VLC_MULTI_ELEM {
- uint8_t val[VLC_MULTI_MAX_SYMBOLS];
+ union {
+ uint8_t val8[VLC_MULTI_MAX_SYMBOLS];
+ uint16_t val16[VLC_MULTI_MAX_SYMBOLS / 2];
+ };
int8_t len; // -31,32
uint8_t num;
} VLC_MULTI_ELEM;
@@ -185,47 +188,6 @@ void ff_vlc_free(VLC *vlc);
#define VLC_INIT_OUTPUT_LE 8
#define VLC_INIT_LE (VLC_INIT_INPUT_LE | VLC_INIT_OUTPUT_LE)
-#define VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \
- h, i, j, flags, static_size) \
- do { \
- static VLCElem table[static_size]; \
- (vlc)->table = table; \
- (vlc)->table_allocated = static_size; \
- ff_vlc_init_sparse(vlc, bits, a, b, c, d, e, f, g, h, i, j, \
- flags | VLC_INIT_USE_STATIC); \
- } while (0)
-
-#define VLC_INIT_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, h, i, j, static_size) \
- VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \
- h, i, j, 0, static_size)
-
-#define VLC_INIT_LE_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, h, i, j, static_size) \
- VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \
- h, i, j, VLC_INIT_LE, static_size)
-
-#define VLC_INIT_CUSTOM_STATIC(vlc, bits, a, b, c, d, e, f, g, flags, static_size) \
- VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \
- NULL, 0, 0, flags, static_size)
-
-#define VLC_INIT_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \
- VLC_INIT_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size)
-
-#define VLC_INIT_LE_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \
- VLC_INIT_LE_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size)
-
-#define VLC_INIT_STATIC_FROM_LENGTHS(vlc, bits, nb_codes, lens, len_wrap, \
- symbols, symbols_wrap, symbols_size, \
- offset, flags, static_size) \
- do { \
- static VLCElem table[static_size]; \
- (vlc)->table = table; \
- (vlc)->table_allocated = static_size; \
- ff_vlc_init_from_lengths(vlc, bits, nb_codes, lens, len_wrap, \
- symbols, symbols_wrap, symbols_size, \
- offset, flags | VLC_INIT_USE_STATIC, \
- NULL); \
- } while (0)
-
/**
* For static VLCs, the number of bits can often be hardcoded
* at each get_vlc2() callsite. Then using a full VLC would be uneconomical,