FFmpeg
Macros | Functions | Variables
ac3enc_float.c File Reference
#include "audiodsp.h"
#include "ac3enc.h"
#include "codec_internal.h"
#include "eac3enc.h"
#include "kbdwin.h"
#include "ac3enc_template.c"

Go to the source code of this file.

Macros

#define AC3ENC_FLOAT   1
 

Functions

static void scale_coefficients (AC3EncodeContext *s)
 
static void clip_coefficients (AudioDSPContext *adsp, float *coef, unsigned int len)
 
static CoefType calc_cpl_coord (CoefSumType energy_ch, CoefSumType energy_cpl)
 
static void sum_square_butterfly (AC3EncodeContext *s, float sum[4], const float *coef0, const float *coef1, int len)
 
static av_cold int ac3_float_mdct_init (AC3EncodeContext *s)
 Initialize MDCT tables. More...
 
av_cold int ff_ac3_float_encode_init (AVCodecContext *avctx)
 

Variables

const FFCodec ff_ac3_encoder
 

Detailed Description

floating-point AC-3 encoder.

Definition in file ac3enc_float.c.

Macro Definition Documentation

◆ AC3ENC_FLOAT

#define AC3ENC_FLOAT   1

Definition at line 29 of file ac3enc_float.c.

Function Documentation

◆ scale_coefficients()

static void scale_coefficients ( AC3EncodeContext s)
static

Definition at line 40 of file ac3enc_float.c.

Referenced by encode_frame().

◆ clip_coefficients()

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

Definition at line 53 of file ac3enc_float.c.

◆ calc_cpl_coord()

static CoefType calc_cpl_coord ( CoefSumType  energy_ch,
CoefSumType  energy_cpl 
)
static

Definition at line 63 of file ac3enc_float.c.

◆ sum_square_butterfly()

static void sum_square_butterfly ( AC3EncodeContext s,
float  sum[4],
const float coef0,
const float coef1,
int  len 
)
static

Definition at line 71 of file ac3enc_float.c.

◆ ac3_float_mdct_init()

static av_cold int ac3_float_mdct_init ( AC3EncodeContext s)
static

Initialize MDCT tables.

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

Definition at line 86 of file ac3enc_float.c.

Referenced by ff_ac3_float_encode_init().

◆ ff_ac3_float_encode_init()

av_cold int ff_ac3_float_encode_init ( AVCodecContext avctx)

Definition at line 97 of file ac3enc_float.c.

Referenced by eac3_encode_init().

Variable Documentation

◆ ff_ac3_encoder

const FFCodec ff_ac3_encoder
Initial value:
= {
.p.name = "ac3",
CODEC_LONG_NAME("ATSC A/52A (AC-3)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_AC3,
.priv_data_size = sizeof(AC3EncodeContext),
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
.p.priv_class = &ff_ac3enc_class,
.p.supported_samplerates = ff_ac3_sample_rate_tab,
.p.ch_layouts = ff_ac3_ch_layouts,
.defaults = ff_ac3_enc_defaults,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 114 of file ac3enc_float.c.

AV_SAMPLE_FMT_FLTP
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:66
AV_CODEC_ID_AC3
@ AV_CODEC_ID_AC3
Definition: codec_id.h:443
FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: codec_internal.h:43
ff_ac3_encode_frame
int ff_ac3_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition: ac3enc.c:1985
FF_CODEC_ENCODE_CB
#define FF_CODEC_ENCODE_CB(func)
Definition: codec_internal.h:320
ff_ac3_ch_layouts
const AVChannelLayout ff_ac3_ch_layouts[19]
List of supported channel layouts.
Definition: ac3enc.c:156
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
Definition: codec.h:159
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
AC3EncodeContext
AC-3 encoder private context.
Definition: ac3enc.h:158
ff_ac3_float_encode_init
av_cold int ff_ac3_float_encode_init(AVCodecContext *avctx)
Definition: ac3enc_float.c:97
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:56
ff_ac3_sample_rate_tab
const int ff_ac3_sample_rate_tab[]
Definition: ac3tab.c:95
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
ff_ac3enc_class
const AVClass ff_ac3enc_class
Definition: ac3enc.c:134
ff_ac3_enc_defaults
const FFCodecDefault ff_ac3_enc_defaults[]
Definition: ac3enc.c:141
ff_ac3_encode_close
av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
Finalize encoding and free any memory allocated by the encoder.
Definition: ac3enc.c:2158