diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2009-01-24 15:46:19 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2009-01-24 15:46:19 +0000 |
commit | c5706efd574af2123e9a2f17c31ca0b5dcbfbc8b (patch) | |
tree | 582523fe1854dd841f60f3591001681c22ad5c58 /libavcodec | |
parent | dfcb6b56f9e58106b6520af8c5fa6760556919eb (diff) | |
download | ffmpeg-c5706efd574af2123e9a2f17c31ca0b5dcbfbc8b.tar.gz |
flacdec: remove some unused code
Originally committed as revision 16749 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/flacdec.c | 69 |
1 files changed, 2 insertions, 67 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index 16183f3b00..a78ed10d5c 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -426,21 +426,7 @@ static inline int decode_subframe(FLACContext *s, int channel) return -1; } type = get_bits(&s->gb, 6); -// wasted = get_bits1(&s->gb); - -// if (wasted) -// { -// while (!get_bits1(&s->gb)) -// wasted++; -// if (wasted) -// wasted++; -// s->curr_bps -= wasted; -// } -#if 0 - wasted= 16 - av_log2(show_bits(&s->gb, 17)); - skip_bits(&s->gb, wasted+1); - s->curr_bps -= wasted; -#else + if (get_bits1(&s->gb)) { wasted = 1; @@ -449,7 +435,7 @@ static inline int decode_subframe(FLACContext *s, int channel) s->curr_bps -= wasted; av_log(s->avctx, AV_LOG_DEBUG, "%d wasted bits\n", wasted); } -#endif + //FIXME use av_log2 for types if (type == 0) { @@ -533,12 +519,6 @@ static int decode_frame(FLACContext *s, int alloc_data_size) av_log(s->avctx, AV_LOG_ERROR, "utf8 fscked\n"); return -1; } -#if 0 - if (/*((blocksize_code == 6) || (blocksize_code == 7)) &&*/ - (s->min_blocksize != s->max_blocksize)){ - }else{ - } -#endif if (blocksize_code == 0) blocksize = s->min_blocksize; @@ -666,49 +646,6 @@ static int flac_decode_frame(AVCodecContext *avctx, return -1; } - -#if 0 - /* fix the channel order here */ - if (s->order == MID_SIDE) - { - short *left = samples; - short *right = samples + s->blocksize; - for (i = 0; i < s->blocksize; i += 2) - { - uint32_t x = s->decoded[0][i]; - uint32_t y = s->decoded[0][i+1]; - - right[i] = x - (y / 2); - left[i] = right[i] + y; - } - *data_size = 2 * s->blocksize; - } - else - { - for (i = 0; i < s->channels; i++) - { - switch(s->order) - { - case INDEPENDENT: - for (j = 0; j < s->blocksize; j++) - samples[(s->blocksize*i)+j] = s->decoded[i][j]; - break; - case LEFT_SIDE: - case RIGHT_SIDE: - if (i == 0) - for (j = 0; j < s->blocksize; j++) - samples[(s->blocksize*i)+j] = s->decoded[0][j]; - else - for (j = 0; j < s->blocksize; j++) - samples[(s->blocksize*i)+j] = s->decoded[0][j] - s->decoded[i][j]; - break; -// case MID_SIDE: -// av_log(s->avctx, AV_LOG_DEBUG, "mid-side unsupported\n"); - } - *data_size += s->blocksize; - } - } -#else #define DECORRELATE(left, right)\ assert(s->channels == 2);\ for (i = 0; i < s->blocksize; i++)\ @@ -736,12 +673,10 @@ static int flac_decode_frame(AVCodecContext *avctx, case MID_SIDE: DECORRELATE( (a-=b>>1) + b, a) } -#endif *data_size = (int8_t *)samples - (int8_t *)data; // av_log(s->avctx, AV_LOG_DEBUG, "data size: %d\n", *data_size); -// s->last_blocksize = s->blocksize; end: i= (get_bits_count(&s->gb)+7)/8; if(i > buf_size){ |