]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ac3enc.c
Oma demuxer
[ffmpeg] / libavcodec / ac3enc.c
index facdf8fb691780af2e3f0a544add6bcbc545bb7e..b1710557158b24ffa71848140431d7a5063e726d 100644 (file)
@@ -25,9 +25,9 @@
  */
 //#define DEBUG
 //#define DEBUG_BITALLOC
+#include "libavutil/crc.h"
 #include "avcodec.h"
 #include "bitstream.h"
-#include "crc.h"
 #include "ac3.h"
 
 typedef struct AC3EncodeContext {
@@ -463,7 +463,8 @@ static int bit_alloc(AC3EncodeContext *s,
         for(ch=0;ch<s->nb_all_channels;ch++) {
             ff_ac3_bit_alloc_calc_bap(mask[i][ch], psd[i][ch], 0,
                                       s->nb_coefs[ch], snr_offset,
-                                      s->bit_alloc.floor, bap[i][ch]);
+                                      s->bit_alloc.floor, ff_ac3_bap_tab,
+                                      bap[i][ch]);
             frame_bits += compute_mantissa_size(s, bap[i][ch],
                                                  s->nb_coefs[ch]);
         }
@@ -608,7 +609,7 @@ static int compute_bit_allocation(AC3EncodeContext *s,
     return 0;
 }
 
-static int AC3_encode_init(AVCodecContext *avctx)
+static av_cold int AC3_encode_init(AVCodecContext *avctx)
 {
     int freq = avctx->sample_rate;
     int bitrate = avctx->bit_rate;
@@ -1255,7 +1256,7 @@ static int AC3_encode_frame(AVCodecContext *avctx,
     return output_frame_end(s);
 }
 
-static int AC3_encode_close(AVCodecContext *avctx)
+static av_cold int AC3_encode_close(AVCodecContext *avctx)
 {
     av_freep(&avctx->coded_frame);
     return 0;
@@ -1363,4 +1364,5 @@ AVCodec ac3_encoder = {
     AC3_encode_frame,
     AC3_encode_close,
     NULL,
+    .long_name = "ATSC A/52 / AC-3",
 };