Commit 9c1e1114 authored by Alexandra Hájková's avatar Alexandra Hájková Committed by Diego Biurrun

flac: Convert to the new bitstream reader

Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
parent 79f64f7e
...@@ -22,8 +22,9 @@ ...@@ -22,8 +22,9 @@
#include "libavutil/channel_layout.h" #include "libavutil/channel_layout.h"
#include "libavutil/crc.h" #include "libavutil/crc.h"
#include "libavutil/log.h" #include "libavutil/log.h"
#include "bitstream.h"
#include "bytestream.h" #include "bytestream.h"
#include "get_bits.h"
#include "flac.h" #include "flac.h"
#include "flacdata.h" #include "flacdata.h"
...@@ -40,33 +41,33 @@ static const uint64_t flac_channel_layouts[8] = { ...@@ -40,33 +41,33 @@ static const uint64_t flac_channel_layouts[8] = {
AV_CH_LAYOUT_7POINT1 AV_CH_LAYOUT_7POINT1
}; };
static int64_t get_utf8(GetBitContext *gb) static int64_t get_utf8(BitstreamContext *bc)
{ {
int64_t val; int64_t val;
GET_UTF8(val, get_bits(gb, 8), return -1;) GET_UTF8(val, bitstream_read(bc, 8), return -1;)
return val; return val;
} }
int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, int ff_flac_decode_frame_header(AVCodecContext *avctx, BitstreamContext *bc,
FLACFrameInfo *fi, int log_level_offset) FLACFrameInfo *fi, int log_level_offset)
{ {
int bs_code, sr_code, bps_code; int bs_code, sr_code, bps_code;
/* frame sync code */ /* frame sync code */
if ((get_bits(gb, 15) & 0x7FFF) != 0x7FFC) { if ((bitstream_read(bc, 15) & 0x7FFF) != 0x7FFC) {
av_log(avctx, AV_LOG_ERROR + log_level_offset, "invalid sync code\n"); av_log(avctx, AV_LOG_ERROR + log_level_offset, "invalid sync code\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
/* variable block size stream code */ /* variable block size stream code */
fi->is_var_size = get_bits1(gb); fi->is_var_size = bitstream_read_bit(bc);
/* block size and sample rate codes */ /* block size and sample rate codes */
bs_code = get_bits(gb, 4); bs_code = bitstream_read(bc, 4);
sr_code = get_bits(gb, 4); sr_code = bitstream_read(bc, 4);
/* channels and decorrelation */ /* channels and decorrelation */
fi->ch_mode = get_bits(gb, 4); fi->ch_mode = bitstream_read(bc, 4);
if (fi->ch_mode < FLAC_MAX_CHANNELS) { if (fi->ch_mode < FLAC_MAX_CHANNELS) {
fi->channels = fi->ch_mode + 1; fi->channels = fi->ch_mode + 1;
fi->ch_mode = FLAC_CHMODE_INDEPENDENT; fi->ch_mode = FLAC_CHMODE_INDEPENDENT;
...@@ -80,7 +81,7 @@ int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, ...@@ -80,7 +81,7 @@ int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,
} }
/* bits per sample */ /* bits per sample */
bps_code = get_bits(gb, 3); bps_code = bitstream_read(bc, 3);
if (bps_code == 3 || bps_code == 7) { if (bps_code == 3 || bps_code == 7) {
av_log(avctx, AV_LOG_ERROR + log_level_offset, av_log(avctx, AV_LOG_ERROR + log_level_offset,
"invalid sample size code (%d)\n", "invalid sample size code (%d)\n",
...@@ -90,14 +91,14 @@ int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, ...@@ -90,14 +91,14 @@ int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,
fi->bps = sample_size_table[bps_code]; fi->bps = sample_size_table[bps_code];
/* reserved bit */ /* reserved bit */
if (get_bits1(gb)) { if (bitstream_read_bit(bc)) {
av_log(avctx, AV_LOG_ERROR + log_level_offset, av_log(avctx, AV_LOG_ERROR + log_level_offset,
"broken stream, invalid padding\n"); "broken stream, invalid padding\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
/* sample or frame count */ /* sample or frame count */
fi->frame_or_sample_num = get_utf8(gb); fi->frame_or_sample_num = get_utf8(bc);
if (fi->frame_or_sample_num < 0) { if (fi->frame_or_sample_num < 0) {
av_log(avctx, AV_LOG_ERROR + log_level_offset, av_log(avctx, AV_LOG_ERROR + log_level_offset,
"sample/frame number invalid; utf8 fscked\n"); "sample/frame number invalid; utf8 fscked\n");
...@@ -110,9 +111,9 @@ int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, ...@@ -110,9 +111,9 @@ int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,
"reserved blocksize code: 0\n"); "reserved blocksize code: 0\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} else if (bs_code == 6) { } else if (bs_code == 6) {
fi->blocksize = get_bits(gb, 8) + 1; fi->blocksize = bitstream_read(bc, 8) + 1;
} else if (bs_code == 7) { } else if (bs_code == 7) {
fi->blocksize = get_bits(gb, 16) + 1; fi->blocksize = bitstream_read(bc, 16) + 1;
} else { } else {
fi->blocksize = ff_flac_blocksize_table[bs_code]; fi->blocksize = ff_flac_blocksize_table[bs_code];
} }
...@@ -121,11 +122,11 @@ int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, ...@@ -121,11 +122,11 @@ int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,
if (sr_code < 12) { if (sr_code < 12) {
fi->samplerate = ff_flac_sample_rate_table[sr_code]; fi->samplerate = ff_flac_sample_rate_table[sr_code];
} else if (sr_code == 12) { } else if (sr_code == 12) {
fi->samplerate = get_bits(gb, 8) * 1000; fi->samplerate = bitstream_read(bc, 8) * 1000;
} else if (sr_code == 13) { } else if (sr_code == 13) {
fi->samplerate = get_bits(gb, 16); fi->samplerate = bitstream_read(bc, 16);
} else if (sr_code == 14) { } else if (sr_code == 14) {
fi->samplerate = get_bits(gb, 16) * 10; fi->samplerate = bitstream_read(bc, 16) * 10;
} else { } else {
av_log(avctx, AV_LOG_ERROR + log_level_offset, av_log(avctx, AV_LOG_ERROR + log_level_offset,
"illegal sample rate code %d\n", "illegal sample rate code %d\n",
...@@ -134,9 +135,9 @@ int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, ...@@ -134,9 +135,9 @@ int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,
} }
/* header CRC-8 check */ /* header CRC-8 check */
skip_bits(gb, 8); bitstream_skip(bc, 8);
if (av_crc(av_crc_get_table(AV_CRC_8_ATM), 0, gb->buffer, if (av_crc(av_crc_get_table(AV_CRC_8_ATM), 0, bc->buffer,
get_bits_count(gb)/8)) { bitstream_tell(bc) / 8)) {
av_log(avctx, AV_LOG_ERROR + log_level_offset, av_log(avctx, AV_LOG_ERROR + log_level_offset,
"header crc mismatch\n"); "header crc mismatch\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
...@@ -204,23 +205,22 @@ void ff_flac_set_channel_layout(AVCodecContext *avctx) ...@@ -204,23 +205,22 @@ void ff_flac_set_channel_layout(AVCodecContext *avctx)
void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s, void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
const uint8_t *buffer) const uint8_t *buffer)
{ {
GetBitContext gb; BitstreamContext bc;
init_get_bits(&gb, buffer, FLAC_STREAMINFO_SIZE*8); bitstream_init8(&bc, buffer, FLAC_STREAMINFO_SIZE);
skip_bits(&gb, 16); /* skip min blocksize */ bitstream_skip(&bc, 16); /* skip min blocksize */
s->max_blocksize = get_bits(&gb, 16); s->max_blocksize = bitstream_read(&bc, 16);
if (s->max_blocksize < FLAC_MIN_BLOCKSIZE) { if (s->max_blocksize < FLAC_MIN_BLOCKSIZE) {
av_log(avctx, AV_LOG_WARNING, "invalid max blocksize: %d\n", av_log(avctx, AV_LOG_WARNING, "invalid max blocksize: %d\n",
s->max_blocksize); s->max_blocksize);
s->max_blocksize = 16; s->max_blocksize = 16;
} }
skip_bits(&gb, 24); /* skip min frame size */ bitstream_skip(&bc, 24); /* skip min frame size */
s->max_framesize = get_bits_long(&gb, 24); s->max_framesize = bitstream_read(&bc, 24);
s->samplerate = bitstream_read(&bc, 20);
s->samplerate = get_bits_long(&gb, 20); s->channels = bitstream_read(&bc, 3) + 1;
s->channels = get_bits(&gb, 3) + 1; s->bps = bitstream_read(&bc, 5) + 1;
s->bps = get_bits(&gb, 5) + 1;
avctx->channels = s->channels; avctx->channels = s->channels;
avctx->sample_rate = s->samplerate; avctx->sample_rate = s->samplerate;
...@@ -230,11 +230,11 @@ void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s, ...@@ -230,11 +230,11 @@ void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
av_get_channel_layout_nb_channels(avctx->channel_layout) != avctx->channels) av_get_channel_layout_nb_channels(avctx->channel_layout) != avctx->channels)
ff_flac_set_channel_layout(avctx); ff_flac_set_channel_layout(avctx);
s->samples = get_bits_long(&gb, 32) << 4; s->samples = bitstream_read(&bc, 32) << 4;
s->samples |= get_bits(&gb, 4); s->samples |= bitstream_read(&bc, 4);
skip_bits_long(&gb, 64); /* md5 sum */ bitstream_skip(&bc, 64); /* md5 sum */
skip_bits_long(&gb, 64); /* md5 sum */ bitstream_skip(&bc, 64); /* md5 sum */
} }
#if LIBAVCODEC_VERSION_MAJOR < 57 #if LIBAVCODEC_VERSION_MAJOR < 57
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
#define AVCODEC_FLAC_H #define AVCODEC_FLAC_H
#include "avcodec.h" #include "avcodec.h"
#include "bitstream.h"
#include "bytestream.h" #include "bytestream.h"
#include "get_bits.h"
#define FLAC_STREAMINFO_SIZE 34 #define FLAC_STREAMINFO_SIZE 34
#define FLAC_MAX_CHANNELS 8 #define FLAC_MAX_CHANNELS 8
...@@ -129,12 +129,12 @@ int ff_flac_get_max_frame_size(int blocksize, int ch, int bps); ...@@ -129,12 +129,12 @@ int ff_flac_get_max_frame_size(int blocksize, int ch, int bps);
/** /**
* Validate and decode a frame header. * Validate and decode a frame header.
* @param avctx AVCodecContext to use as av_log() context * @param avctx AVCodecContext to use as av_log() context
* @param gb GetBitContext from which to read frame header * @param bc BitstreamContext from which to read frame header
* @param[out] fi frame information * @param[out] fi frame information
* @param log_level_offset log level offset. can be used to silence error messages. * @param log_level_offset log level offset. can be used to silence error messages.
* @return non-zero on error, 0 if ok * @return non-zero on error, 0 if ok
*/ */
int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, int ff_flac_decode_frame_header(AVCodecContext *avctx, BitstreamContext *bc,
FLACFrameInfo *fi, int log_level_offset); FLACFrameInfo *fi, int log_level_offset);
void ff_flac_set_channel_layout(AVCodecContext *avctx); void ff_flac_set_channel_layout(AVCodecContext *avctx);
......
...@@ -92,9 +92,9 @@ typedef struct FLACParseContext { ...@@ -92,9 +92,9 @@ typedef struct FLACParseContext {
static int frame_header_is_valid(AVCodecContext *avctx, const uint8_t *buf, static int frame_header_is_valid(AVCodecContext *avctx, const uint8_t *buf,
FLACFrameInfo *fi) FLACFrameInfo *fi)
{ {
GetBitContext gb; BitstreamContext bc;
init_get_bits(&gb, buf, MAX_FRAME_HEADER_SIZE * 8); bitstream_init8(&bc, buf, MAX_FRAME_HEADER_SIZE);
return !ff_flac_decode_frame_header(avctx, &gb, fi, 127); return !ff_flac_decode_frame_header(avctx, &bc, fi, 127);
} }
/** /**
......
...@@ -34,10 +34,10 @@ ...@@ -34,10 +34,10 @@
#include <limits.h> #include <limits.h>
#include "avcodec.h" #include "avcodec.h"
#include "bitstream.h"
#include "internal.h" #include "internal.h"
#include "get_bits.h"
#include "bytestream.h" #include "bytestream.h"
#include "golomb_legacy.h" #include "golomb.h"
#include "flac.h" #include "flac.h"
#include "flacdata.h" #include "flacdata.h"
#include "flacdsp.h" #include "flacdsp.h"
...@@ -46,7 +46,7 @@ typedef struct FLACContext { ...@@ -46,7 +46,7 @@ typedef struct FLACContext {
FLACSTREAMINFO FLACSTREAMINFO
AVCodecContext *avctx; ///< parent AVCodecContext AVCodecContext *avctx; ///< parent AVCodecContext
GetBitContext gb; ///< GetBitContext initialized to start at the current frame BitstreamContext bc; ///< BitstreamContext initialized to start at the current frame
int blocksize; ///< number of samples in the current frame int blocksize; ///< number of samples in the current frame
int sample_shift; ///< shift required to make output samples 16-bit or 32-bit int sample_shift; ///< shift required to make output samples 16-bit or 32-bit
...@@ -203,14 +203,14 @@ static int decode_residuals(FLACContext *s, int32_t *decoded, int pred_order) ...@@ -203,14 +203,14 @@ static int decode_residuals(FLACContext *s, int32_t *decoded, int pred_order)
int rice_bits, rice_esc; int rice_bits, rice_esc;
int samples; int samples;
method_type = get_bits(&s->gb, 2); method_type = bitstream_read(&s->bc, 2);
if (method_type > 1) { if (method_type > 1) {
av_log(s->avctx, AV_LOG_ERROR, "illegal residual coding method %d\n", av_log(s->avctx, AV_LOG_ERROR, "illegal residual coding method %d\n",
method_type); method_type);
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
rice_order = get_bits(&s->gb, 4); rice_order = bitstream_read(&s->bc, 4);
samples= s->blocksize >> rice_order; samples= s->blocksize >> rice_order;
if (pred_order > samples) { if (pred_order > samples) {
...@@ -225,14 +225,14 @@ static int decode_residuals(FLACContext *s, int32_t *decoded, int pred_order) ...@@ -225,14 +225,14 @@ static int decode_residuals(FLACContext *s, int32_t *decoded, int pred_order)
decoded += pred_order; decoded += pred_order;
i= pred_order; i= pred_order;
for (partition = 0; partition < (1 << rice_order); partition++) { for (partition = 0; partition < (1 << rice_order); partition++) {
tmp = get_bits(&s->gb, rice_bits); tmp = bitstream_read(&s->bc, rice_bits);
if (tmp == rice_esc) { if (tmp == rice_esc) {
tmp = get_bits(&s->gb, 5); tmp = bitstream_read(&s->bc, 5);
for (; i < samples; i++) for (; i < samples; i++)
*decoded++ = get_sbits_long(&s->gb, tmp); *decoded++ = bitstream_read_signed(&s->bc, tmp);
} else { } else {
for (; i < samples; i++) { for (; i < samples; i++) {
*decoded++ = get_sr_golomb_flac(&s->gb, tmp, INT_MAX, 0); *decoded++ = get_sr_golomb_flac(&s->bc, tmp, INT_MAX, 0);
} }
} }
i= 0; i= 0;
...@@ -249,7 +249,7 @@ static int decode_subframe_fixed(FLACContext *s, int32_t *decoded, ...@@ -249,7 +249,7 @@ static int decode_subframe_fixed(FLACContext *s, int32_t *decoded,
/* warm up samples */ /* warm up samples */
for (i = 0; i < pred_order; i++) { for (i = 0; i < pred_order; i++) {
decoded[i] = get_sbits_long(&s->gb, bps); decoded[i] = bitstream_read_signed(&s->bc, bps);
} }
if ((ret = decode_residuals(s, decoded, pred_order)) < 0) if ((ret = decode_residuals(s, decoded, pred_order)) < 0)
...@@ -300,15 +300,15 @@ static int decode_subframe_lpc(FLACContext *s, int32_t *decoded, int pred_order, ...@@ -300,15 +300,15 @@ static int decode_subframe_lpc(FLACContext *s, int32_t *decoded, int pred_order,
/* warm up samples */ /* warm up samples */
for (i = 0; i < pred_order; i++) { for (i = 0; i < pred_order; i++) {
decoded[i] = get_sbits_long(&s->gb, bps); decoded[i] = bitstream_read_signed(&s->bc, bps);
} }
coeff_prec = get_bits(&s->gb, 4) + 1; coeff_prec = bitstream_read(&s->bc, 4) + 1;
if (coeff_prec == 16) { if (coeff_prec == 16) {
av_log(s->avctx, AV_LOG_ERROR, "invalid coeff precision\n"); av_log(s->avctx, AV_LOG_ERROR, "invalid coeff precision\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
qlevel = get_sbits(&s->gb, 5); qlevel = bitstream_read_signed(&s->bc, 5);
if (qlevel < 0) { if (qlevel < 0) {
av_log(s->avctx, AV_LOG_ERROR, "qlevel %d not supported, maybe buggy stream\n", av_log(s->avctx, AV_LOG_ERROR, "qlevel %d not supported, maybe buggy stream\n",
qlevel); qlevel);
...@@ -316,7 +316,7 @@ static int decode_subframe_lpc(FLACContext *s, int32_t *decoded, int pred_order, ...@@ -316,7 +316,7 @@ static int decode_subframe_lpc(FLACContext *s, int32_t *decoded, int pred_order,
} }
for (i = 0; i < pred_order; i++) { for (i = 0; i < pred_order; i++) {
coeffs[pred_order - i - 1] = get_sbits(&s->gb, coeff_prec); coeffs[pred_order - i - 1] = bitstream_read_signed(&s->bc, coeff_prec);
} }
if ((ret = decode_residuals(s, decoded, pred_order)) < 0) if ((ret = decode_residuals(s, decoded, pred_order)) < 0)
...@@ -342,24 +342,24 @@ static inline int decode_subframe(FLACContext *s, int channel) ...@@ -342,24 +342,24 @@ static inline int decode_subframe(FLACContext *s, int channel)
bps++; bps++;
} }
if (get_bits1(&s->gb)) { if (bitstream_read_bit(&s->bc)) {
av_log(s->avctx, AV_LOG_ERROR, "invalid subframe padding\n"); av_log(s->avctx, AV_LOG_ERROR, "invalid subframe padding\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
type = get_bits(&s->gb, 6); type = bitstream_read(&s->bc, 6);
if (get_bits1(&s->gb)) { if (bitstream_read_bit(&s->bc)) {
int left = get_bits_left(&s->gb); int left = bitstream_bits_left(&s->bc);
wasted = 1; wasted = 1;
if ( left < 0 || if ( left < 0 ||
(left < bps && !show_bits_long(&s->gb, left)) || (left < bps && !bitstream_peek(&s->bc, left)) ||
!show_bits_long(&s->gb, bps)) { !bitstream_peek(&s->bc, bps)) {
av_log(s->avctx, AV_LOG_ERROR, av_log(s->avctx, AV_LOG_ERROR,
"Invalid number of wasted bits > available bits (%d) - left=%d\n", "Invalid number of wasted bits > available bits (%d) - left=%d\n",
bps, left); bps, left);
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
while (!get_bits1(&s->gb)) while (!bitstream_read_bit(&s->bc))
wasted++; wasted++;
bps -= wasted; bps -= wasted;
} }
...@@ -370,12 +370,12 @@ static inline int decode_subframe(FLACContext *s, int channel) ...@@ -370,12 +370,12 @@ static inline int decode_subframe(FLACContext *s, int channel)
//FIXME use av_log2 for types //FIXME use av_log2 for types
if (type == 0) { if (type == 0) {
tmp = get_sbits_long(&s->gb, bps); tmp = bitstream_read_signed(&s->bc, bps);
for (i = 0; i < s->blocksize; i++) for (i = 0; i < s->blocksize; i++)
decoded[i] = tmp; decoded[i] = tmp;
} else if (type == 1) { } else if (type == 1) {
for (i = 0; i < s->blocksize; i++) for (i = 0; i < s->blocksize; i++)
decoded[i] = get_sbits_long(&s->gb, bps); decoded[i] = bitstream_read_signed(&s->bc, bps);
} else if ((type >= 8) && (type <= 12)) { } else if ((type >= 8) && (type <= 12)) {
if ((ret = decode_subframe_fixed(s, decoded, type & ~0x8, bps)) < 0) if ((ret = decode_subframe_fixed(s, decoded, type & ~0x8, bps)) < 0)
return ret; return ret;
...@@ -399,10 +399,10 @@ static inline int decode_subframe(FLACContext *s, int channel) ...@@ -399,10 +399,10 @@ static inline int decode_subframe(FLACContext *s, int channel)
static int decode_frame(FLACContext *s) static int decode_frame(FLACContext *s)
{ {
int i, ret; int i, ret;
GetBitContext *gb = &s->gb; BitstreamContext *bc = &s->bc;
FLACFrameInfo fi; FLACFrameInfo fi;
if ((ret = ff_flac_decode_frame_header(s->avctx, gb, &fi, 0)) < 0) { if ((ret = ff_flac_decode_frame_header(s->avctx, bc, &fi, 0)) < 0) {
av_log(s->avctx, AV_LOG_ERROR, "invalid frame header\n"); av_log(s->avctx, AV_LOG_ERROR, "invalid frame header\n");
return ret; return ret;
} }
...@@ -471,10 +471,10 @@ static int decode_frame(FLACContext *s) ...@@ -471,10 +471,10 @@ static int decode_frame(FLACContext *s)
return ret; return ret;
} }
align_get_bits(gb); bitstream_align(bc);
/* frame footer */ /* frame footer */
skip_bits(gb, 16); /* data crc */ bitstream_skip(bc, 16); /* data crc */
return 0; return 0;
} }
...@@ -513,12 +513,12 @@ static int flac_decode_frame(AVCodecContext *avctx, void *data, ...@@ -513,12 +513,12 @@ static int flac_decode_frame(AVCodecContext *avctx, void *data,
} }
/* decode frame */ /* decode frame */
init_get_bits(&s->gb, buf, buf_size*8); bitstream_init8(&s->bc, buf, buf_size);
if ((ret = decode_frame(s)) < 0) { if ((ret = decode_frame(s)) < 0) {
av_log(s->avctx, AV_LOG_ERROR, "decode_frame() failed\n"); av_log(s->avctx, AV_LOG_ERROR, "decode_frame() failed\n");
return ret; return ret;
} }
bytes_read = (get_bits_count(&s->gb)+7)/8; bytes_read = (bitstream_tell(&s->bc) + 7) / 8;
/* get output buffer */ /* get output buffer */
frame->nb_samples = s->blocksize; frame->nb_samples = s->blocksize;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "avcodec.h" #include "avcodec.h"
#include "bswapdsp.h" #include "bswapdsp.h"
#include "golomb_legacy.h" #include "golomb.h"
#include "internal.h" #include "internal.h"
#include "lpc.h" #include "lpc.h"
#include "flac.h" #include "flac.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment