Libav
Macros | Functions | Variables
ac3enc_fixed.c File Reference

fixed-point AC-3 encoder. More...

#include "internal.h"
#include "audiodsp.h"
#include "ac3enc.h"
#include "eac3enc.h"
#include "ac3enc_opts_template.c"
#include "ac3enc_template.c"

Go to the source code of this file.

Macros

#define FFT_FLOAT   0
 
#define AC3ENC_TYPE   AC3ENC_TYPE_AC3_FIXED
 

Functions

av_cold void AC3_NAME() mdct_end (AC3EncodeContext *s)
 Finalize MDCT and free allocated memory. More...
 
av_cold int AC3_NAME() mdct_init (AC3EncodeContext *s)
 Initialize MDCT tables. More...
 
static int normalize_samples (AC3EncodeContext *s)
 
static void scale_coefficients (AC3EncodeContext *s)
 
static void clip_coefficients (AudioDSPContext *adsp, int32_t *coef, unsigned int len)
 
static CoefType calc_cpl_coord (CoefSumType energy_ch, CoefSumType energy_cpl)
 
static av_cold int ac3_fixed_encode_init (AVCodecContext *avctx)
 

Variables

static const AVClass ac3enc_class
 
AVCodec ff_ac3_fixed_encoder
 

Detailed Description

fixed-point AC-3 encoder.

Definition in file ac3enc_fixed.c.

Macro Definition Documentation

§ FFT_FLOAT

#define FFT_FLOAT   0

Definition at line 29 of file ac3enc_fixed.c.

§ AC3ENC_TYPE

#define AC3ENC_TYPE   AC3ENC_TYPE_AC3_FIXED

Definition at line 36 of file ac3enc_fixed.c.

Function Documentation

§ mdct_end()

av_cold void AC3_NAME() mdct_end ( AC3EncodeContext s)

Finalize MDCT and free allocated memory.

Parameters
sAC-3 encoder private context

Definition at line 49 of file ac3enc_fixed.c.

§ mdct_init()

av_cold int AC3_NAME() mdct_init ( AC3EncodeContext s)

Initialize MDCT tables.

Parameters
sAC-3 encoder private context
Returns
0 on success, negative error code on failure

Definition at line 61 of file ac3enc_fixed.c.

§ normalize_samples()

static int normalize_samples ( AC3EncodeContext s)
static

Definition at line 73 of file ac3enc_fixed.c.

§ scale_coefficients()

static void scale_coefficients ( AC3EncodeContext s)
static

Definition at line 87 of file ac3enc_fixed.c.

§ clip_coefficients()

static void clip_coefficients ( AudioDSPContext adsp,
int32_t coef,
unsigned int  len 
)
static

Definition at line 104 of file ac3enc_fixed.c.

§ calc_cpl_coord()

static CoefType calc_cpl_coord ( CoefSumType  energy_ch,
CoefSumType  energy_cpl 
)
static

Definition at line 114 of file ac3enc_fixed.c.

§ ac3_fixed_encode_init()

static av_cold int ac3_fixed_encode_init ( AVCodecContext avctx)
static

Definition at line 127 of file ac3enc_fixed.c.

Variable Documentation

§ ac3enc_class

const AVClass ac3enc_class
static
Initial value:
= { "Fixed-Point AC-3 Encoder", av_default_item_name,
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
av_default_item_name
Definition: dnxhdenc.c:52
static const AVOption ac3_options[]

Definition at line 38 of file ac3enc_fixed.c.

§ ff_ac3_fixed_encoder

AVCodec ff_ac3_fixed_encoder
Initial value:
= {
.name = "ac3_fixed",
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.priv_data_size = sizeof(AC3EncodeContext),
.priv_class = &ac3enc_class,
.channel_layouts = ff_ac3_channel_layouts,
.defaults = ac3_defaults,
}
static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
Definition: ac3enc_fixed.c:127
av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
Finalize encoding and free any memory allocated by the encoder.
Definition: ac3enc.c:2019
const uint64_t ff_ac3_channel_layouts[19]
List of supported channel layouts.
Definition: ac3enc.c:80
sample_fmts
Definition: avconv_filter.c:68
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:145
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:61
AV_SAMPLE_FMT_NONE
Definition: avconv_filter.c:68
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:490
int ff_ac3_fixed_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
static const AVCodecDefault ac3_defaults[]
AC-3 encoder private context.
Definition: ac3enc.h:160
static const AVClass ac3enc_class
Definition: ac3enc_fixed.c:38
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:499
signed 16 bits, planar
Definition: samplefmt.h:70

Definition at line 135 of file ac3enc_fixed.c.