*/
//#define DEBUG
//#define DEBUG_BITALLOC
+#include "libavutil/crc.h"
#include "avcodec.h"
#include "bitstream.h"
-#include "crc.h"
#include "ac3.h"
typedef struct AC3EncodeContext {
/* 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;
static void fft_init(int ln)
{
- int i, j, m, n;
+ int i, n;
float alpha;
n = 1 << ln;
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;
} 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++) {
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;
AC3_encode_frame,
AC3_encode_close,
NULL,
+ .long_name = "ATSC A/52 / AC-3",
};