Go to the documentation of this file.
41 subbands[0] = low_subband_input + high_subband_input;
42 subbands[1] = low_subband_input - high_subband_input;
59 int32_t intermediate_samples[4];
63 for (
i = 0;
i < 2;
i++)
66 subband_samples[2*
i+0],
67 subband_samples[2*
i+1],
68 &intermediate_samples[2*
i]);
71 for (
i = 0;
i < 2;
i++)
74 intermediate_samples[0+
i],
75 intermediate_samples[2+
i],
85 subband_samples[subband] =
channel->prediction[subband].previous_reconstructed_sample;
95 channel->quantize[3].quantized_sample = (
channel->quantize[3].quantized_sample & ~1)
105 channel->quantize[3].quantized_sample = (
channel->quantize[3].quantized_sample & ~1)
136 int *got_frame_ptr,
AVPacket *avpkt)
142 if (avpkt->
size <
s->block_size) {
150 frame->nb_samples = 4 * avpkt->
size /
s->block_size;
154 for (
pos = 0, opos = 0; opos <
frame->nb_samples;
pos +=
s->block_size, opos += 4) {
169 return s->block_size *
frame->nb_samples / 4;
172 #if CONFIG_APTX_DECODER
189 #if CONFIG_APTX_HD_DECODER
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
static av_cold int init(AVCodecContext *avctx)
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])
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new samples
FilterSignal inner_filter_signal[NB_FILTERS][NB_FILTERS]
AVCodec ff_aptx_hd_decoder
#define AV_CH_LAYOUT_STEREO
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
static void aptx_qmf_tree_synthesis(QMFAnalysis *qmf, int32_t subband_samples[4], int32_t samples[4])
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() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static const int32_t aptx_qmf_inner_coeffs[NB_FILTERS][FILTER_TAPS]
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
#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.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
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)
static int aptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
static int shift(int a, int b)
This structure stores compressed data.
static const uint16_t channel_layouts[7]
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
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)