diff options
author | Alexandra Hájková <alexandra.khirnova@gmail.com> | 2022-01-20 11:13:04 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-01-25 10:04:32 +0100 |
commit | f9d58a0659bb75333fe058a991d1adcf838ec5f2 (patch) | |
tree | 03b18f959fe5260445727122f7966f76ad9ad6aa /libavcodec/golomb_common.h | |
parent | e78332a8dccf9e765ebc9020a90937da4d60c6e3 (diff) |
lavc/golomb: unmerge the cached bitstream reader codebitstream_unmerge
Move the cached bitstream reader code to a new header, which can either
be used on its own with the cached bitstream reader, or from get_bits
code by #defining CACHED_BITSTREAM_READER.
Restore proper attribution for this code.
Integration by Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/golomb_common.h')
-rw-r--r-- | libavcodec/golomb_common.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/libavcodec/golomb_common.h b/libavcodec/golomb_common.h new file mode 100644 index 0000000000..19136aae3c --- /dev/null +++ b/libavcodec/golomb_common.h @@ -0,0 +1,35 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_GOLOMB_COMMON_H +#define AVCODEC_GOLOMB_COMMON_H + +#include <stdint.h> + +#define INVALID_VLC 0x80000000 + +extern const uint8_t ff_golomb_vlc_len[512]; +extern const uint8_t ff_ue_golomb_vlc_code[512]; +extern const int8_t ff_se_golomb_vlc_code[512]; + +extern const uint8_t ff_interleaved_golomb_vlc_len[256]; +extern const uint8_t ff_interleaved_ue_golomb_vlc_code[256]; +extern const int8_t ff_interleaved_se_golomb_vlc_code[256]; +extern const uint8_t ff_interleaved_dirac_golomb_vlc_code[256]; + +#endif /* AVCODEC_GOLOMB_COMMON_H */ |