FFmpeg
Loading...
Searching...
No Matches
aptxenc.c File Reference
#include "config_components.h"
#include "libavutil/channel_layout.h"
#include "aptx.h"
#include "audio_frame_queue.h"
#include "codec_internal.h"
#include "encode.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  AptXEncContext
 

Functions

static av_always_inline void aptx_qmf_polyphase_analysis (FilterSignal signal[NB_FILTERS], const int32_t coeffs[NB_FILTERS][FILTER_TAPS], int shift, int32_t samples[NB_FILTERS], int32_t *low_subband_output, int32_t *high_subband_output)
 
static void aptx_qmf_tree_analysis (QMFAnalysis *qmf, int32_t samples[4], int32_t subband_samples[4])
 
static av_always_inline int32_t aptx_bin_search (int32_t value, int32_t factor, const int32_t *intervals, int32_t nb_intervals)
 
static void aptx_quantize_difference (Quantize *quantize, int32_t sample_difference, int32_t dither, int32_t quantization_factor, ConstTables *tables)
 
static void aptx_encode_channel (Channel *channel, int32_t samples[4], int hd)
 
static void aptx_insert_sync (Channel channels[NB_CHANNELS], int32_t *idx)
 
static uint16_t aptx_pack_codeword (Channel *channel)
 
static uint32_t aptxhd_pack_codeword (Channel *channel)
 
static void aptx_encode_samples (AptXContext *ctx, int32_t samples[NB_CHANNELS][4], uint8_t *output)
 
static int aptx_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
 
static av_cold int aptx_close (AVCodecContext *avctx)
 
static av_cold int aptx_encode_init (AVCodecContext *avctx)
 

Function Documentation

◆ aptx_qmf_polyphase_analysis()

static av_always_inline void aptx_qmf_polyphase_analysis ( FilterSignal signal[NB_FILTERS],
const int32_t coeffs[NB_FILTERS][FILTER_TAPS],
int shift,
int32_t samples[NB_FILTERS],
int32_t * low_subband_output,
int32_t * high_subband_output )
static

Definition at line 44 of file aptxenc.c.

Referenced by aptx_qmf_tree_analysis().

◆ aptx_qmf_tree_analysis()

static void aptx_qmf_tree_analysis ( QMFAnalysis * qmf,
int32_t samples[4],
int32_t subband_samples[4] )
static

Definition at line 69 of file aptxenc.c.

Referenced by aptx_encode_channel().

◆ aptx_bin_search()

static av_always_inline int32_t aptx_bin_search ( int32_t value,
int32_t factor,
const int32_t * intervals,
int32_t nb_intervals )
static

Definition at line 94 of file aptxenc.c.

Referenced by aptx_quantize_difference().

◆ aptx_quantize_difference()

static void aptx_quantize_difference ( Quantize * quantize,
int32_t sample_difference,
int32_t dither,
int32_t quantization_factor,
ConstTables * tables )
static

Definition at line 107 of file aptxenc.c.

Referenced by aptx_encode_channel().

◆ aptx_encode_channel()

static void aptx_encode_channel ( Channel * channel,
int32_t samples[4],
int hd )
static

Definition at line 147 of file aptxenc.c.

Referenced by aptx_encode_samples().

◆ aptx_insert_sync()

static void aptx_insert_sync ( Channel channels[NB_CHANNELS],
int32_t * idx )
static

Definition at line 162 of file aptxenc.c.

Referenced by aptx_encode_samples().

◆ aptx_pack_codeword()

static uint16_t aptx_pack_codeword ( Channel * channel)
static

Definition at line 180 of file aptxenc.c.

Referenced by aptx_encode_samples().

◆ aptxhd_pack_codeword()

static uint32_t aptxhd_pack_codeword ( Channel * channel)
static

Definition at line 189 of file aptxenc.c.

Referenced by aptx_encode_samples().

◆ aptx_encode_samples()

static void aptx_encode_samples ( AptXContext * ctx,
int32_t samples[NB_CHANNELS][4],
uint8_t * output )
static

Definition at line 198 of file aptxenc.c.

Referenced by aptx_encode_frame().

◆ aptx_encode_frame()

static int aptx_encode_frame ( AVCodecContext * avctx,
AVPacket * avpkt,
const AVFrame * frame,
int * got_packet_ptr )
static

Definition at line 219 of file aptxenc.c.

◆ aptx_close()

static av_cold int aptx_close ( AVCodecContext * avctx)
static

Definition at line 251 of file aptxenc.c.

◆ aptx_encode_init()

static av_cold int aptx_encode_init ( AVCodecContext * avctx)
static

Definition at line 258 of file aptxenc.c.