FFmpeg
Loading...
Searching...
No Matches
ac3enc_fixed.c File Reference

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

#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   0
 

Functions

static void sum_square_butterfly (AC3EncodeContext *s, int64_t sum[4], const int32_t *coef0, const int32_t *coef1, int len)
 
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_mdct_init (AVCodecContext *avctx, AC3EncodeContext *s)
 Initialize MDCT tables.
 
static av_cold int ac3_fixed_encode_init (AVCodecContext *avctx)
 

Variables

const FFCodec ff_ac3_fixed_encoder
 

Detailed Description

fixed-point AC-3 encoder.

Definition in file ac3enc_fixed.c.

Macro Definition Documentation

◆ AC3ENC_FLOAT

#define AC3ENC_FLOAT   0

Definition at line 29 of file ac3enc_fixed.c.

Function Documentation

◆ sum_square_butterfly()

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

Definition at line 36 of file ac3enc_fixed.c.

Referenced by compute_rematrixing_strategy().

◆ clip_coefficients()

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

Definition at line 46 of file ac3enc_fixed.c.

Referenced by apply_channel_coupling().

◆ calc_cpl_coord()

static CoefType calc_cpl_coord ( CoefSumType energy_ch,
CoefSumType energy_cpl )
static

Definition at line 56 of file ac3enc_fixed.c.

Referenced by apply_channel_coupling().

◆ ac3_fixed_mdct_init()

static av_cold int ac3_fixed_mdct_init ( AVCodecContext * avctx,
AC3EncodeContext * s )
static

Initialize MDCT tables.

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

Definition at line 76 of file ac3enc_fixed.c.

Referenced by ac3_fixed_encode_init().

◆ ac3_fixed_encode_init()

static av_cold int ac3_fixed_encode_init ( AVCodecContext * avctx)
static

Definition at line 96 of file ac3enc_fixed.c.

Variable Documentation

◆ ff_ac3_fixed_encoder

const FFCodec ff_ac3_fixed_encoder
Initial value:
= {
.p.name = "ac3_fixed",
CODEC_LONG_NAME("ATSC A/52A (AC-3)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_AC3,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
.priv_data_size = sizeof(AC3EncodeContext),
.p.priv_class = &ff_ac3enc_class,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.defaults = ff_ac3_enc_defaults,
}
av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
Finalize encoding and free any memory allocated by the encoder.
Definition ac3enc.c:2165
const AVClass ff_ac3enc_class
Definition ac3enc.c:130
const AVChannelLayout ff_ac3_ch_layouts[19]
List of supported channel layouts.
Definition ac3enc.c:152
const FFCodecDefault ff_ac3_enc_defaults[]
Definition ac3enc.c:137
int ff_ac3_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition ac3enc.c:1981
static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
const int ff_ac3_sample_rate_tab[]
Definition ac3tab.c:96
#define CODEC_SAMPLERATES_ARRAY(array)
#define FF_CODEC_ENCODE_CB(func)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
#define CODEC_SAMPLEFMTS(...)
#define CODEC_CH_LAYOUTS_ARRAY(array)
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#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:147
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition codec.h:79
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
#define AV_CODEC_CAP_SMALL_LAST_FRAME
Codec can be fed a final frame with a smaller size.
Definition codec.h:84
@ AV_CODEC_ID_AC3
Definition codec_id.h:456
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
@ AV_SAMPLE_FMT_S32P
signed 32 bits, planar
Definition samplefmt.h:65
AC-3 encoder private context.
Definition ac3enc.h:159

Definition at line 112 of file ac3enc_fixed.c.