Originally committed as revision 14523 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -1,5 +1,5 @@ |
| 1 | 1 |
/* |
| 2 |
- * Common AAC and AC3 parser |
|
| 2 |
+ * Common AAC and AC-3 parser |
|
| 3 | 3 |
* Copyright (c) 2003 Fabrice Bellard. |
| 4 | 4 |
* Copyright (c) 2003 Michael Niedermayer. |
| 5 | 5 |
* |
| ... | ... |
@@ -71,7 +71,7 @@ get_next: |
| 71 | 71 |
|
| 72 | 72 |
/* update codec info */ |
| 73 | 73 |
avctx->sample_rate = s->sample_rate; |
| 74 |
- /* allow downmixing to stereo (or mono for AC3) */ |
|
| 74 |
+ /* allow downmixing to stereo (or mono for AC-3) */ |
|
| 75 | 75 |
if(avctx->request_channels > 0 && |
| 76 | 76 |
avctx->request_channels < s->channels && |
| 77 | 77 |
(avctx->request_channels <= 2 || |
| ... | ... |
@@ -1,5 +1,5 @@ |
| 1 | 1 |
/* |
| 2 |
- * Common code between AC3 encoder and decoder |
|
| 2 |
+ * Common code between the AC-3 encoder and decoder |
|
| 3 | 3 |
* Copyright (c) 2000 Fabrice Bellard. |
| 4 | 4 |
* |
| 5 | 5 |
* This file is part of FFmpeg. |
| ... | ... |
@@ -21,7 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
/** |
| 23 | 23 |
* @file ac3.c |
| 24 |
- * Common code between AC3 encoder and decoder. |
|
| 24 |
+ * Common code between the AC-3 encoder and decoder. |
|
| 25 | 25 |
*/ |
| 26 | 26 |
|
| 27 | 27 |
#include "avcodec.h" |
| ... | ... |
@@ -197,7 +197,7 @@ void ff_ac3_bit_alloc_calc_bap(int16_t *mask, int16_t *psd, int start, int end, |
| 197 | 197 |
} while (end > band_start_tab[j++]); |
| 198 | 198 |
} |
| 199 | 199 |
|
| 200 |
-/* AC3 bit allocation. The algorithm is the one described in the AC3 |
|
| 200 |
+/* AC-3 bit allocation. The algorithm is the one described in the AC-3 |
|
| 201 | 201 |
spec. */ |
| 202 | 202 |
void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, uint8_t *bap, |
| 203 | 203 |
int8_t *exp, int start, int end, |
| ... | ... |
@@ -1,5 +1,5 @@ |
| 1 | 1 |
/* |
| 2 |
- * Common code between AC3 encoder and decoder |
|
| 2 |
+ * Common code between the AC-3 encoder and decoder |
|
| 3 | 3 |
* Copyright (c) 2000, 2001, 2002 Fabrice Bellard. |
| 4 | 4 |
* |
| 5 | 5 |
* This file is part of FFmpeg. |
| ... | ... |
@@ -21,7 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
/** |
| 23 | 23 |
* @file ac3.h |
| 24 |
- * Common code between AC3 encoder and decoder. |
|
| 24 |
+ * Common code between the AC-3 encoder and decoder. |
|
| 25 | 25 |
*/ |
| 26 | 26 |
|
| 27 | 27 |
#ifndef FFMPEG_AC3_H |
| ... | ... |
@@ -32,7 +32,7 @@ |
| 32 | 32 |
#define AC3_MAX_CODED_FRAME_SIZE 3840 /* in bytes */ |
| 33 | 33 |
#define AC3_MAX_CHANNELS 6 /* including LFE channel */ |
| 34 | 34 |
|
| 35 |
-#define NB_BLOCKS 6 /* number of PCM blocks inside an AC3 frame */ |
|
| 35 |
+#define NB_BLOCKS 6 /* number of PCM blocks inside an AC-3 frame */ |
|
| 36 | 36 |
#define AC3_FRAME_SIZE (NB_BLOCKS * 256) |
| 37 | 37 |
|
| 38 | 38 |
/* exponent encoding strategy */ |
| ... | ... |
@@ -228,7 +228,7 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx) |
| 228 | 228 |
/** |
| 229 | 229 |
* Parse the 'sync info' and 'bit stream info' from the AC-3 bitstream. |
| 230 | 230 |
* GetBitContext within AC3DecodeContext must point to |
| 231 |
- * start of the synchronized ac3 bitstream. |
|
| 231 |
+ * the start of the synchronized AC-3 bitstream. |
|
| 232 | 232 |
*/ |
| 233 | 233 |
static int ac3_parse_header(AC3DecodeContext *s) |
| 234 | 234 |
{
|
| ... | ... |
@@ -268,7 +268,7 @@ static int ac3_parse_header(AC3DecodeContext *s) |
| 268 | 268 |
} |
| 269 | 269 |
|
| 270 | 270 |
/** |
| 271 |
- * Common function to parse AC3 or E-AC3 frame header |
|
| 271 |
+ * Common function to parse AC-3 or E-AC-3 frame header |
|
| 272 | 272 |
*/ |
| 273 | 273 |
static int parse_frame_header(AC3DecodeContext *s) |
| 274 | 274 |
{
|
| ... | ... |
@@ -1,5 +1,5 @@ |
| 1 | 1 |
/* |
| 2 |
- * Common code between AC3 and E-AC3 decoder |
|
| 2 |
+ * Common code between the AC-3 and E-AC-3 decoders |
|
| 3 | 3 |
* Copyright (c) 2007 Bartlomiej Wolowiec <bartek.wolowiec@gmail.com> |
| 4 | 4 |
* |
| 5 | 5 |
* This file is part of FFmpeg. |
| ... | ... |
@@ -21,7 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
/** |
| 23 | 23 |
* @file ac3.h |
| 24 |
- * Common code between AC3 and E-AC3 decoder. |
|
| 24 |
+ * Common code between the AC-3 and E-AC-3 decoders. |
|
| 25 | 25 |
*/ |
| 26 | 26 |
|
| 27 | 27 |
#ifndef FFMPEG_AC3DEC_H |
| ... | ... |
@@ -1,5 +1,5 @@ |
| 1 | 1 |
/* |
| 2 |
- * AC3 and E-AC3 decoder tables |
|
| 2 |
+ * AC-3 and E-AC-3 decoder tables |
|
| 3 | 3 |
* Copyright (c) 2007 Bartlomiej Wolowiec <bartek.wolowiec@gmail.com> |
| 4 | 4 |
* |
| 5 | 5 |
* This file is part of FFmpeg. |
| ... | ... |
@@ -21,7 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
/** |
| 23 | 23 |
* @file ac3dec_data.c |
| 24 |
- * tables taken directly from AC3 spec. |
|
| 24 |
+ * tables taken directly from the AC-3 spec. |
|
| 25 | 25 |
*/ |
| 26 | 26 |
|
| 27 | 27 |
#include "ac3dec_data.h" |
| ... | ... |
@@ -1,5 +1,5 @@ |
| 1 | 1 |
/* |
| 2 |
- * The simplest AC3 encoder |
|
| 2 |
+ * The simplest AC-3 encoder |
|
| 3 | 3 |
* Copyright (c) 2000 Fabrice Bellard. |
| 4 | 4 |
* |
| 5 | 5 |
* This file is part of FFmpeg. |
| ... | ... |
@@ -21,7 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
/** |
| 23 | 23 |
* @file ac3enc.c |
| 24 |
- * The simplest AC3 encoder. |
|
| 24 |
+ * The simplest AC-3 encoder. |
|
| 25 | 25 |
*/ |
| 26 | 26 |
//#define DEBUG |
| 27 | 27 |
//#define DEBUG_BITALLOC |
| ... | ... |
@@ -705,7 +705,7 @@ static av_cold int AC3_encode_init(AVCodecContext *avctx) |
| 705 | 705 |
return 0; |
| 706 | 706 |
} |
| 707 | 707 |
|
| 708 |
-/* output the AC3 frame header */ |
|
| 708 |
+/* output the AC-3 frame header */ |
|
| 709 | 709 |
static void output_frame_header(AC3EncodeContext *s, unsigned char *frame) |
| 710 | 710 |
{
|
| 711 | 711 |
init_put_bits(&s->pb, frame, AC3_MAX_CODED_FRAME_SIZE); |
| ... | ... |
@@ -772,7 +772,7 @@ static inline int asym_quant(int c, int e, int qbits) |
| 772 | 772 |
return v & ((1 << qbits)-1); |
| 773 | 773 |
} |
| 774 | 774 |
|
| 775 |
-/* Output one audio block. There are NB_BLOCKS audio blocks in one AC3 |
|
| 775 |
+/* Output one audio block. There are NB_BLOCKS audio blocks in one AC-3 |
|
| 776 | 776 |
frame */ |
| 777 | 777 |
static void output_audio_block(AC3EncodeContext *s, |
| 778 | 778 |
uint8_t exp_strategy[AC3_MAX_CHANNELS], |
| ... | ... |
@@ -1,5 +1,5 @@ |
| 1 | 1 |
/* |
| 2 |
- * AC3 tables |
|
| 2 |
+ * AC-3 tables |
|
| 3 | 3 |
* copyright (c) 2001 Fabrice Bellard |
| 4 | 4 |
* |
| 5 | 5 |
* This file is part of FFmpeg. |
| ... | ... |
@@ -21,7 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
/** |
| 23 | 23 |
* @file ac3tab.c |
| 24 |
- * tables taken directly from AC3 spec. |
|
| 24 |
+ * tables taken directly from the AC-3 spec. |
|
| 25 | 25 |
*/ |
| 26 | 26 |
|
| 27 | 27 |
#include "ac3tab.h" |
| ... | ... |
@@ -88,7 +88,7 @@ const uint16_t ff_ac3_bitrate_tab[19] = {
|
| 88 | 88 |
160, 192, 224, 256, 320, 384, 448, 512, 576, 640 |
| 89 | 89 |
}; |
| 90 | 90 |
|
| 91 |
-/* AC3 MDCT window */ |
|
| 91 |
+/* AC-3 MDCT window */ |
|
| 92 | 92 |
|
| 93 | 93 |
/* MDCT window */ |
| 94 | 94 |
const int16_t ff_ac3_window[256] = {
|
| ... | ... |
@@ -154,7 +154,7 @@ ReSampleContext *audio_resample_init(int output_channels, int input_channels, |
| 154 | 154 |
s->filter_channels = s->output_channels; |
| 155 | 155 |
|
| 156 | 156 |
/* |
| 157 |
- * ac3 output is the only case where filter_channels could be greater than 2. |
|
| 157 |
+ * AC-3 output is the only case where filter_channels could be greater than 2. |
|
| 158 | 158 |
* input channels can't be greater than 2, so resample the 2 channels and then |
| 159 | 159 |
* expand to 6 channels after the resampling. |
| 160 | 160 |
*/ |
| ... | ... |
@@ -234,7 +234,7 @@ static int put_system_header(AVFormatContext *ctx, uint8_t *buf,int only_for_str |
| 234 | 234 |
|
| 235 | 235 |
id = stream->id; |
| 236 | 236 |
if (id < 0xc0) {
|
| 237 |
- /* special case for private streams (AC3 use that) */ |
|
| 237 |
+ /* special case for private streams (AC-3 uses that) */ |
|
| 238 | 238 |
if (private_stream_coded) |
| 239 | 239 |
continue; |
| 240 | 240 |
private_stream_coded = 1; |
| ... | ... |
@@ -581,7 +581,7 @@ static int get_packet_payload_size(AVFormatContext *ctx, int stream_index, |
| 581 | 581 |
} |
| 582 | 582 |
|
| 583 | 583 |
if (stream->id < 0xc0) {
|
| 584 |
- /* AC3/LPCM private data header */ |
|
| 584 |
+ /* AC-3/LPCM private data header */ |
|
| 585 | 585 |
buf_index += 4; |
| 586 | 586 |
if (stream->id >= 0xa0) {
|
| 587 | 587 |
int n; |
| ... | ... |
@@ -906,7 +906,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index, |
| 906 | 906 |
put_byte(ctx->pb, stream->lpcm_header[1]); |
| 907 | 907 |
put_byte(ctx->pb, stream->lpcm_header[2]); |
| 908 | 908 |
} else if (id >= 0x40) {
|
| 909 |
- /* AC3 */ |
|
| 909 |
+ /* AC-3 */ |
|
| 910 | 910 |
put_byte(ctx->pb, nb_frames); |
| 911 | 911 |
put_be16(ctx->pb, trailer_size+1); |
| 912 | 912 |
} |
| ... | ... |
@@ -185,7 +185,7 @@ static void rv10_write_header(AVFormatContext *ctx, |
| 185 | 185 |
case 8000: |
| 186 | 186 |
fscode = 3; |
| 187 | 187 |
} |
| 188 |
- put_be16(s, fscode); /* codec additional info, for AC3, seems |
|
| 188 |
+ put_be16(s, fscode); /* codec additional info, for AC-3, seems |
|
| 189 | 189 |
to be a frequency code */ |
| 190 | 190 |
/* special hack to compensate rounding errors... */ |
| 191 | 191 |
if (coded_frame_size == 557) |
| ... | ... |
@@ -325,7 +325,7 @@ static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size, int |
| 325 | 325 |
|
| 326 | 326 |
write_packet_header(s, stream, size, !!(flags & PKT_FLAG_KEY)); |
| 327 | 327 |
|
| 328 |
- /* for AC3, the words seems to be reversed */ |
|
| 328 |
+ /* for AC-3, the words seem to be reversed */ |
|
| 329 | 329 |
for(i=0;i<size;i+=2) {
|
| 330 | 330 |
buf1[i] = buf[i+1]; |
| 331 | 331 |
buf1[i+1] = buf[i]; |