]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ac3enc.c
missing codec long names by Stefano Sabatini, stefano.sabatini-lala poste it
[ffmpeg] / libavcodec / ac3enc.c
index 71bc8d036112bda5c8666ccf64fce9b00da7f81a..e85d86c9018eefaf29be4f6f4f7de26eb90a33e5 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 {
@@ -73,8 +73,6 @@ static int16_t xsin1[128];
 /* new exponents are sent if their Norm 1 exceed this number */
 #define EXP_DIFF_THRESHOLD 1000
 
-static void fft_init(int ln);
-
 static inline int16_t fix15(float a)
 {
     int v;
@@ -92,7 +90,7 @@ typedef struct IComplex {
 
 static void fft_init(int ln)
 {
-    int i, j, m, n;
+    int i, n;
     float alpha;
 
     n = 1 << ln;
@@ -610,7 +608,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;
@@ -678,7 +676,7 @@ static int AC3_encode_init(AVCodecContext *avctx)
     } else {
         /* use default bandwidth setting */
         /* XXX: should compute the bandwidth according to the frame
-           size, so that we avoid anoying high freq artefacts */
+           size, so that we avoid annoying high frequency artifacts */
         bw_code = 50;
     }
     for(ch=0;ch<s->nb_channels;ch++) {
@@ -1257,7 +1255,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;
@@ -1365,4 +1363,5 @@ AVCodec ac3_encoder = {
     AC3_encode_frame,
     AC3_encode_close,
     NULL,
+    .long_name = "ATSC A/52 / AC-3",
 };