Mercurial > libavcodec.hg
comparison ac3enc.c @ 7470:1a93d3bbe3ee libavcodec
cosmetics: make all references to AC-3 capitalized and hyphenated
author | jbr |
---|---|
date | Sun, 03 Aug 2008 16:42:32 +0000 |
parents | 85ab7655ad4d |
children | 8618fb5d9bce |
comparison
equal
deleted
inserted
replaced
7469:856df346b536 | 7470:1a93d3bbe3ee |
---|---|
1 /* | 1 /* |
2 * The simplest AC3 encoder | 2 * The simplest AC-3 encoder |
3 * Copyright (c) 2000 Fabrice Bellard. | 3 * Copyright (c) 2000 Fabrice Bellard. |
4 * | 4 * |
5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
6 * | 6 * |
7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 */ | 20 */ |
21 | 21 |
22 /** | 22 /** |
23 * @file ac3enc.c | 23 * @file ac3enc.c |
24 * The simplest AC3 encoder. | 24 * The simplest AC-3 encoder. |
25 */ | 25 */ |
26 //#define DEBUG | 26 //#define DEBUG |
27 //#define DEBUG_BITALLOC | 27 //#define DEBUG_BITALLOC |
28 #include "libavutil/crc.h" | 28 #include "libavutil/crc.h" |
29 #include "avcodec.h" | 29 #include "avcodec.h" |
703 avctx->coded_frame->key_frame= 1; | 703 avctx->coded_frame->key_frame= 1; |
704 | 704 |
705 return 0; | 705 return 0; |
706 } | 706 } |
707 | 707 |
708 /* output the AC3 frame header */ | 708 /* output the AC-3 frame header */ |
709 static void output_frame_header(AC3EncodeContext *s, unsigned char *frame) | 709 static void output_frame_header(AC3EncodeContext *s, unsigned char *frame) |
710 { | 710 { |
711 init_put_bits(&s->pb, frame, AC3_MAX_CODED_FRAME_SIZE); | 711 init_put_bits(&s->pb, frame, AC3_MAX_CODED_FRAME_SIZE); |
712 | 712 |
713 put_bits(&s->pb, 16, 0x0b77); /* frame header */ | 713 put_bits(&s->pb, 16, 0x0b77); /* frame header */ |
770 v = m - 1; | 770 v = m - 1; |
771 assert(v >= -m); | 771 assert(v >= -m); |
772 return v & ((1 << qbits)-1); | 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 frame */ | 776 frame */ |
777 static void output_audio_block(AC3EncodeContext *s, | 777 static void output_audio_block(AC3EncodeContext *s, |
778 uint8_t exp_strategy[AC3_MAX_CHANNELS], | 778 uint8_t exp_strategy[AC3_MAX_CHANNELS], |
779 uint8_t encoded_exp[AC3_MAX_CHANNELS][N/2], | 779 uint8_t encoded_exp[AC3_MAX_CHANNELS][N/2], |
780 uint8_t bap[AC3_MAX_CHANNELS][N/2], | 780 uint8_t bap[AC3_MAX_CHANNELS][N/2], |