diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-08-27 21:18:46 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-09-07 00:23:30 +0200 |
commit | 29b9fca4b3ca24ee8d8f951a3afe6daa77089096 (patch) | |
tree | e4da7dbf8db012d0a894d82e91fdea660752cdb2 /libavcodec/get_bits.h | |
parent | 3a5be28857de4d523ff95ec07362771a89e00f46 (diff) | |
download | ffmpeg-29b9fca4b3ca24ee8d8f951a3afe6daa77089096.tar.gz |
avcodec: add multi vlc reader
Heavily based and inspired by Christophe's cache branches.
Co-Authored-by: Christophe Gisquet
Diffstat (limited to 'libavcodec/get_bits.h')
-rw-r--r-- | libavcodec/get_bits.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index 65dc080ddb..0594e104bb 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h @@ -93,6 +93,7 @@ typedef BitstreamContext GetBitContext; #define init_get_bits8 bits_init8 #define align_get_bits bits_align #define get_vlc2 bits_read_vlc +#define get_vlc_multi bits_read_vlc_multi #define init_get_bits8_le(s, buffer, byte_size) bits_init8_le((BitstreamContextLE*)s, buffer, byte_size) #define get_bits_le(s, n) bits_read_le((BitstreamContextLE*)s, n) @@ -643,6 +644,15 @@ static av_always_inline int get_vlc2(GetBitContext *s, const VLCElem *table, return code; } +static inline int get_vlc_multi(GetBitContext *s, uint8_t *dst, + const VLC_MULTI_ELEM *const Jtable, + const VLCElem *const table, + const int bits, const int max_depth) +{ + dst[0] = get_vlc2(s, table, bits, max_depth); + return 1; +} + static inline int decode012(GetBitContext *gb) { int n; |