Go to the documentation of this file.
23 #include "config_components.h"
46 subbands[0] = low_subband_input + high_subband_input;
47 subbands[1] = low_subband_input - high_subband_input;
64 int32_t intermediate_samples[4];
68 for (
i = 0;
i < 2;
i++)
71 subband_samples[2*
i+0],
72 subband_samples[2*
i+1],
73 &intermediate_samples[2*
i]);
76 for (
i = 0;
i < 2;
i++)
79 intermediate_samples[0+
i],
80 intermediate_samples[2+
i],
90 subband_samples[subband] =
channel->prediction[subband].previous_reconstructed_sample;
100 channel->quantize[3].quantized_sample = (
channel->quantize[3].quantized_sample & ~1)
110 channel->quantize[3].quantized_sample = (
channel->quantize[3].quantized_sample & ~1)
115 const uint8_t *
input,
141 int *got_frame_ptr,
AVPacket *avpkt)
146 if (avpkt->
size <
s->block_size) {
176 #if CONFIG_APTX_DECODER
193 #if CONFIG_APTX_HD_DECODER
196 CODEC_LONG_NAME(
"aptX HD (Audio Processing Technology for Bluetooth)"),
#define AV_CHANNEL_LAYOUT_STEREO
static int32_t aptx_quantized_parity(Channel *channel)
This structure describes decoded (raw) audio or video data.
void ff_aptx_generate_dither(Channel *channel)
@ AV_SAMPLE_FMT_S32P
signed 32 bits, planar
static void aptx_decode_channel(Channel *channel, int32_t samples[4])
int nb_channels
Number of channels in this layout.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
FilterSignal inner_filter_signal[NB_FILTERS][NB_FILTERS]
AVCodec p
The public AVCodec.
AVChannelLayout ch_layout
Channel layout of the audio data.
#define AV_CH_LAYOUT_STEREO
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FF_CODEC_DECODE_CB(func)
int(* init)(AVBSFContext *ctx)
#define CODEC_OLD_CHANNEL_LAYOUTS(...)
static void aptx_qmf_tree_synthesis(QMFAnalysis *qmf, int32_t subband_samples[4], int32_t samples[4])
#define CODEC_LONG_NAME(str)
const FFCodec ff_aptx_decoder
FilterSignal outer_filter_signal[NB_FILTERS]
static av_always_inline int32_t aptx_qmf_convolution(FilterSignal *signal, const int32_t coeffs[FILTER_TAPS], int shift)
static const int32_t aptx_qmf_outer_coeffs[NB_FILTERS][FILTER_TAPS]
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
An AVChannelLayout holds information about the channel layout of audio data.
static int shift(int a, int b)
static const int32_t aptx_qmf_inner_coeffs[NB_FILTERS][FILTER_TAPS]
static int aptx_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames,...
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
int nb_samples
number of audio samples (per channel) described by this frame
#define i(width, name, range_min, range_max)
static void aptx_unpack_codeword(Channel *channel, uint16_t codeword)
AVSampleFormat
Audio sample formats.
static void aptxhd_unpack_codeword(Channel *channel, uint32_t codeword)
static av_always_inline void aptx_qmf_filter_signal_push(FilterSignal *signal, int32_t sample)
const char * name
Name of the codec implementation.
av_cold int ff_aptx_init(AVCodecContext *avctx)
main external API structure.
void ff_aptx_invert_quantize_and_prediction(Channel *channel, int hd)
static int aptx_decode_samples(AptXContext *ctx, const uint8_t *input, int32_t samples[NB_CHANNELS][4])
static av_const int sign_extend(int val, unsigned bits)
const FFCodec ff_aptx_hd_decoder
Filter the word “frame” indicates either a video frame or a group of audio samples
This structure stores compressed data.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_RB24
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
static av_always_inline void aptx_qmf_polyphase_synthesis(FilterSignal signal[NB_FILTERS], const int32_t coeffs[NB_FILTERS][FILTER_TAPS], int shift, int32_t low_subband_input, int32_t high_subband_input, int32_t samples[NB_FILTERS])
static int aptx_check_parity(Channel channels[NB_CHANNELS], int32_t *idx)