Mercurial > libavcodec.hg
comparison ac3dec.c @ 7490:bddd15a1d167 libavcodec
cosmetics: change function name and comments to refer to block decoding
instead of block parsing
author | jbr |
---|---|
date | Tue, 05 Aug 2008 01:31:40 +0000 |
parents | f6260f8362f6 |
children | 0dbdc638270e |
comparison
equal
deleted
inserted
replaced
7489:f6260f8362f6 | 7490:bddd15a1d167 |
---|---|
709 break; | 709 break; |
710 } | 710 } |
711 } | 711 } |
712 | 712 |
713 /** | 713 /** |
714 * Parse an audio block from AC-3 bitstream. | 714 * Decode a single audio block from the AC-3 bitstream. |
715 */ | 715 */ |
716 static int ac3_parse_audio_block(AC3DecodeContext *s, int blk) | 716 static int decode_audio_block(AC3DecodeContext *s, int blk) |
717 { | 717 { |
718 int fbw_channels = s->fbw_channels; | 718 int fbw_channels = s->fbw_channels; |
719 int channel_mode = s->channel_mode; | 719 int channel_mode = s->channel_mode; |
720 int i, bnd, seg, ch; | 720 int i, bnd, seg, ch; |
721 int different_transforms; | 721 int different_transforms; |
1162 s->out_channels = avctx->channels; | 1162 s->out_channels = avctx->channels; |
1163 if(s->out_channels < s->channels) | 1163 if(s->out_channels < s->channels) |
1164 s->output_mode = s->out_channels == 1 ? AC3_CHMODE_MONO : AC3_CHMODE_STEREO; | 1164 s->output_mode = s->out_channels == 1 ? AC3_CHMODE_MONO : AC3_CHMODE_STEREO; |
1165 } | 1165 } |
1166 | 1166 |
1167 /* parse the audio blocks */ | 1167 /* decode the audio blocks */ |
1168 for (blk = 0; blk < s->num_blocks; blk++) { | 1168 for (blk = 0; blk < s->num_blocks; blk++) { |
1169 if (!err && ac3_parse_audio_block(s, blk)) { | 1169 if (!err && decode_audio_block(s, blk)) { |
1170 av_log(avctx, AV_LOG_ERROR, "error parsing the audio block\n"); | 1170 av_log(avctx, AV_LOG_ERROR, "error decoding the audio block\n"); |
1171 } | 1171 } |
1172 | 1172 |
1173 /* interleave output samples */ | 1173 /* interleave output samples */ |
1174 for (i = 0; i < 256; i++) | 1174 for (i = 0; i < 256; i++) |
1175 for (ch = 0; ch < s->out_channels; ch++) | 1175 for (ch = 0; ch < s->out_channels; ch++) |