X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fvorbis.c;h=399020eec55178628754f4f25917622183edd03e;hb=3c058f570128dcfa3a68f0860e2be7f098e8d6e1;hp=86d10407f4af2e52077c44efc530e1e0b16fe05a;hpb=8b4d6cc809c2e67e8e32b3e46e011f78282c5710;p=ffmpeg diff --git a/libavcodec/vorbis.c b/libavcodec/vorbis.c index 86d10407f4a..399020eec55 100644 --- a/libavcodec/vorbis.c +++ b/libavcodec/vorbis.c @@ -26,10 +26,9 @@ * @author Denes Balatoni ( dbalatoni programozo hu ) */ -#define BITSTREAM_READER_LE -#include "avcodec.h" -#include "get_bits.h" +#include "libavutil/common.h" +#include "avcodec.h" #include "vorbis.h" @@ -57,13 +56,8 @@ unsigned int ff_vorbis_nth_root(unsigned int x, unsigned int n) int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num) { uint32_t exit_at_level[33] = { 404 }; - unsigned i, j, p, code; -#ifdef DEBUG - GetBitContext gb; -#endif - for (p = 0; (bits[p] == 0) && (p < num); ++p) ; if (p == num) @@ -75,14 +69,6 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num) for (i = 0; i < bits[p]; ++i) exit_at_level[i+1] = 1 << i; -#ifdef DEBUG - av_log(NULL, AV_LOG_INFO, " %u. of %u code len %d code %d - ", p, num, bits[p], codes[p]); - init_get_bits(&gb, (uint8_t *)&codes[p], bits[p]); - for (i = 0; i < bits[p]; ++i) - av_log(NULL, AV_LOG_INFO, "%s", get_bits1(&gb) ? "1" : "0"); - av_log(NULL, AV_LOG_INFO, "\n"); -#endif - ++p; for (i = p; (bits[i] == 0) && (i < num); ++i) @@ -107,15 +93,6 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num) for (j = i + 1 ;j <= bits[p]; ++j) exit_at_level[j] = code + (1 << (j - 1)); codes[p] = code; - -#ifdef DEBUG - av_log(NULL, AV_LOG_INFO, " %d. code len %d code %d - ", p, bits[p], codes[p]); - init_get_bits(&gb, (uint8_t *)&codes[p], bits[p]); - for (i = 0; i < bits[p]; ++i) - av_log(NULL, AV_LOG_INFO, "%s", get_bits1(&gb) ? "1" : "0"); - av_log(NULL, AV_LOG_INFO, "\n"); -#endif - } //no exits should be left (underspecified tree - ie. unused valid vlcs - not allowed by SPEC)