Macros | Functions | Variables
ac3enc_float.c File Reference

floating-point AC-3 encoder. More...

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

Go to the source code of this file.


#define AC3ENC_FLOAT   1


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 void ac3_float_mdct_end (AC3EncodeContext *s)
 Finalize MDCT and free allocated memory. More...
static av_cold int ac3_float_mdct_init (AC3EncodeContext *s)
 Initialize MDCT tables. More...
av_cold int ff_ac3_float_encode_init (AVCodecContext *avctx)


static const AVClass ac3enc_class
AVCodec ff_ac3_encoder

Detailed Description

floating-point AC-3 encoder.

Definition in file ac3enc_float.c.

Macro Definition Documentation

#define AC3ENC_FLOAT   1

Definition at line 29 of file ac3enc_float.c.

Function Documentation

static void scale_coefficients ( AC3EncodeContext s)

Definition at line 48 of file ac3enc_float.c.

Referenced by encode_frame().

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

Definition at line 61 of file ac3enc_float.c.

static CoefType calc_cpl_coord ( CoefSumType  energy_ch,
CoefSumType  energy_cpl 

Definition at line 71 of file ac3enc_float.c.

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

Definition at line 79 of file ac3enc_float.c.

static av_cold void ac3_float_mdct_end ( AC3EncodeContext s)

Finalize MDCT and free allocated memory.

sAC-3 encoder private context

Definition at line 95 of file ac3enc_float.c.

Referenced by ff_ac3_float_encode_init().

static av_cold int ac3_float_mdct_init ( AC3EncodeContext s)

Initialize MDCT tables.

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

Definition at line 107 of file ac3enc_float.c.

Referenced by ff_ac3_float_encode_init().

av_cold int ff_ac3_float_encode_init ( AVCodecContext avctx)

Definition at line 122 of file ac3enc_float.c.

Variable Documentation

const AVClass ac3enc_class
Initial value:
= {
.class_name = "AC-3 Encoder",
.item_name = av_default_item_name,
.option = ff_ac3_enc_options,
Definition: version.h:85
const AVOption ff_ac3_enc_options[]
Definition: ac3enc.c:77
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235

Definition at line 37 of file ac3enc_float.c.

AVCodec ff_ac3_encoder
Initial value:
= {
.name = "ac3",
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.priv_data_size = sizeof(AC3EncodeContext),
.priv_class = &ac3enc_class,
.supported_samplerates = ff_ac3_sample_rate_tab,
.channel_layouts = ff_ac3_channel_layouts,
.defaults = ff_ac3_enc_defaults,
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:49
float, planar
Definition: samplefmt.h:69
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
int ff_ac3_float_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:41
av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
Finalize encoding and free any memory allocated by the encoder.
Definition: ac3enc.c:2115
const AVCodecDefault ff_ac3_enc_defaults[]
Definition: ac3enc.c:127
av_cold int ff_ac3_float_encode_init(AVCodecContext *avctx)
Definition: ac3enc_float.c:122
static const AVClass ac3enc_class
Definition: ac3enc_float.c:37
const uint64_t ff_ac3_channel_layouts[19]
List of supported channel layouts.
Definition: ac3enc.c:142
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:117
Audio sample formats.
Definition: samplefmt.h:58
AC-3 encoder private context.
Definition: ac3enc.h:154
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:941
const int ff_ac3_sample_rate_tab[]
Definition: ac3tab.c:111

Definition at line 134 of file ac3enc_float.c.