FFmpeg  4.3
Macros | Functions | Variables
mpegaudiodsp_template.c File Reference
#include <stdint.h>
#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "dct32.h"
#include "mathops.h"
#include "mpegaudiodsp.h"
#include "mpegaudio.h"

Go to the source code of this file.

Macros

#define RENAME(n)   n##_fixed
 
#define OUT_SHIFT   (WFRAC_BITS + FRAC_BITS - 15)
 
#define MULS(ra, rb)   MUL64(ra, rb)
 
#define MACS(rt, ra, rb)   MAC64(rt, ra, rb)
 
#define MLSS(rt, ra, rb)   MLS64(rt, ra, rb)
 
#define MULH3(x, y, s)   MULH((s)*(x), y)
 
#define MULLx(x, y, s)   MULL((int)(x),(y),s)
 
#define SHR(a, b)   (((int)(a))>>(b))
 
#define FIXR(a)   ((int)((a) * FRAC_ONE + 0.5))
 
#define FIXHR(a)   ((int)((a) * (1LL<<32) + 0.5))
 
#define SUM8(op, sum, w, p)
 
#define SUM8P2(sum1, op1, sum2, op2, w1, w2, p)
 
#define C1   FIXHR(0.98480775301220805936/2)
 
#define C2   FIXHR(0.93969262078590838405/2)
 
#define C3   FIXHR(0.86602540378443864676/2)
 
#define C4   FIXHR(0.76604444311897803520/2)
 
#define C5   FIXHR(0.64278760968653932632/2)
 
#define C6   FIXHR(0.5/2)
 
#define C7   FIXHR(0.34202014332566873304/2)
 
#define C8   FIXHR(0.17364817766693034885/2)
 

Functions

static int round_sample (int64_t *sum)
 
void RENAME() ff_mpadsp_apply_window (MPA_INT *synth_buf, MPA_INT *window, int *dither_state, OUT_INT *samples, ptrdiff_t incr)
 
void RENAME() ff_mpa_synth_filter (MPADSPContext *s, MPA_INT *synth_buf_ptr, int *synth_buf_offset, MPA_INT *window, int *dither_state, OUT_INT *samples, ptrdiff_t incr, MPA_INT *sb_samples)
 
av_cold void RENAME() ff_mpa_synth_init (MPA_INT *window)
 
av_cold void RENAME() ff_init_mpadsp_tabs (void)
 
static void imdct36 (INTFLOAT *out, INTFLOAT *buf, SUINTFLOAT *in, INTFLOAT *win)
 
void RENAME() ff_imdct36_blocks (INTFLOAT *out, INTFLOAT *buf, INTFLOAT *in, int count, int switch_point, int block_type)
 

Variables

int ff_mdct_win_fixed [8][MDCT_BUF_SIZE]
 Window for MDCT. More...
 
MPA_INT ff_mpa_synth_window_fixed [512+256]
 
static const INTFLOAT icos36 [9]
 
static const INTFLOAT icos36h [9]
 

Macro Definition Documentation

◆ RENAME

#define RENAME (   n)    n##_fixed

Definition at line 51 of file mpegaudiodsp_template.c.

◆ OUT_SHIFT

#define OUT_SHIFT   (WFRAC_BITS + FRAC_BITS - 15)

Definition at line 52 of file mpegaudiodsp_template.c.

◆ MULS

#define MULS (   ra,
  rb 
)    MUL64(ra, rb)

Definition at line 62 of file mpegaudiodsp_template.c.

◆ MACS

#define MACS (   rt,
  ra,
  rb 
)    MAC64(rt, ra, rb)

Definition at line 63 of file mpegaudiodsp_template.c.

◆ MLSS

#define MLSS (   rt,
  ra,
  rb 
)    MLS64(rt, ra, rb)

Definition at line 64 of file mpegaudiodsp_template.c.

◆ MULH3

#define MULH3 (   x,
  y,
  s 
)    MULH((s)*(x), y)

Definition at line 65 of file mpegaudiodsp_template.c.

◆ MULLx

#define MULLx (   x,
  y,
  s 
)    MULL((int)(x),(y),s)

Definition at line 66 of file mpegaudiodsp_template.c.

◆ SHR

#define SHR (   a,
  b 
)    (((int)(a))>>(b))

Definition at line 67 of file mpegaudiodsp_template.c.

◆ FIXR

#define FIXR (   a)    ((int)((a) * FRAC_ONE + 0.5))

Definition at line 68 of file mpegaudiodsp_template.c.

◆ FIXHR

#define FIXHR (   a)    ((int)((a) * (1LL<<32) + 0.5))

Definition at line 69 of file mpegaudiodsp_template.c.

◆ SUM8

#define SUM8 (   op,
  sum,
  w,
 
)
Value:
{ \
op(sum, (w)[0 * 64], (p)[0 * 64]); \
op(sum, (w)[1 * 64], (p)[1 * 64]); \
op(sum, (w)[2 * 64], (p)[2 * 64]); \
op(sum, (w)[3 * 64], (p)[3 * 64]); \
op(sum, (w)[4 * 64], (p)[4 * 64]); \
op(sum, (w)[5 * 64], (p)[5 * 64]); \
op(sum, (w)[6 * 64], (p)[6 * 64]); \
op(sum, (w)[7 * 64], (p)[7 * 64]); \
}

Definition at line 80 of file mpegaudiodsp_template.c.

◆ SUM8P2

#define SUM8P2 (   sum1,
  op1,
  sum2,
  op2,
  w1,
  w2,
 
)
Value:
{ \
INTFLOAT tmp;\
tmp = p[0 * 64];\
op1(sum1, (w1)[0 * 64], tmp);\
op2(sum2, (w2)[0 * 64], tmp);\
tmp = p[1 * 64];\
op1(sum1, (w1)[1 * 64], tmp);\
op2(sum2, (w2)[1 * 64], tmp);\
tmp = p[2 * 64];\
op1(sum1, (w1)[2 * 64], tmp);\
op2(sum2, (w2)[2 * 64], tmp);\
tmp = p[3 * 64];\
op1(sum1, (w1)[3 * 64], tmp);\
op2(sum2, (w2)[3 * 64], tmp);\
tmp = p[4 * 64];\
op1(sum1, (w1)[4 * 64], tmp);\
op2(sum2, (w2)[4 * 64], tmp);\
tmp = p[5 * 64];\
op1(sum1, (w1)[5 * 64], tmp);\
op2(sum2, (w2)[5 * 64], tmp);\
tmp = p[6 * 64];\
op1(sum1, (w1)[6 * 64], tmp);\
op2(sum2, (w2)[6 * 64], tmp);\
tmp = p[7 * 64];\
op1(sum1, (w1)[7 * 64], tmp);\
op2(sum2, (w2)[7 * 64], tmp);\
}

Definition at line 92 of file mpegaudiodsp_template.c.

◆ C1

#define C1   FIXHR(0.98480775301220805936/2)

Definition at line 267 of file mpegaudiodsp_template.c.

◆ C2

#define C2   FIXHR(0.93969262078590838405/2)

Definition at line 268 of file mpegaudiodsp_template.c.

◆ C3

#define C3   FIXHR(0.86602540378443864676/2)

Definition at line 269 of file mpegaudiodsp_template.c.

◆ C4

#define C4   FIXHR(0.76604444311897803520/2)

Definition at line 270 of file mpegaudiodsp_template.c.

◆ C5

#define C5   FIXHR(0.64278760968653932632/2)

Definition at line 271 of file mpegaudiodsp_template.c.

◆ C6

#define C6   FIXHR(0.5/2)

Definition at line 272 of file mpegaudiodsp_template.c.

◆ C7

#define C7   FIXHR(0.34202014332566873304/2)

Definition at line 273 of file mpegaudiodsp_template.c.

◆ C8

#define C8   FIXHR(0.17364817766693034885/2)

Definition at line 274 of file mpegaudiodsp_template.c.

Function Documentation

◆ round_sample()

static int round_sample ( int64_t *  sum)
inlinestatic

Definition at line 54 of file mpegaudiodsp_template.c.

Referenced by ff_mpadsp_apply_window().

◆ ff_mpadsp_apply_window()

void RENAME() ff_mpadsp_apply_window ( MPA_INT synth_buf,
MPA_INT window,
int dither_state,
OUT_INT samples,
ptrdiff_t  incr 
)

Definition at line 121 of file mpegaudiodsp_template.c.

◆ ff_mpa_synth_filter()

void RENAME() ff_mpa_synth_filter ( MPADSPContext s,
MPA_INT synth_buf_ptr,
int synth_buf_offset,
MPA_INT window,
int dither_state,
OUT_INT samples,
ptrdiff_t  incr,
MPA_INT sb_samples 
)

Definition at line 176 of file mpegaudiodsp_template.c.

Referenced by mp_decode_frame().

◆ ff_mpa_synth_init()

av_cold void RENAME() ff_mpa_synth_init ( MPA_INT window)

Definition at line 195 of file mpegaudiodsp_template.c.

Referenced by decode_init_static().

◆ ff_init_mpadsp_tabs()

av_cold void RENAME() ff_init_mpadsp_tabs ( void  )

Definition at line 224 of file mpegaudiodsp_template.c.

◆ imdct36()

static void imdct36 ( INTFLOAT out,
INTFLOAT buf,
SUINTFLOAT in,
INTFLOAT win 
)
static

Definition at line 303 of file mpegaudiodsp_template.c.

Referenced by ff_imdct36_blocks().

◆ ff_imdct36_blocks()

void RENAME() ff_imdct36_blocks ( INTFLOAT out,
INTFLOAT buf,
INTFLOAT in,
int  count,
int  switch_point,
int  block_type 
)

Definition at line 383 of file mpegaudiodsp_template.c.

Variable Documentation

◆ ff_mdct_win_fixed

int ff_mdct_win_fixed[8][MDCT_BUF_SIZE]

Window for MDCT.

Actually only the elements in [0,17] and [MDCT_BUF_SIZE/2, MDCT_BUF_SIZE/2 + 17] are actually used. The rest is just to preserve alignment for SIMD implementations.

Definition at line 76 of file mpegaudiodsp_template.c.

◆ ff_mpa_synth_window_fixed

MPA_INT ff_mpa_synth_window_fixed[512+256]

Definition at line 78 of file mpegaudiodsp_template.c.

Referenced by ff_mpc_init(), and mpc_synth().

◆ icos36

const INTFLOAT icos36[9]
static
Initial value:
= {
FIXR(0.50190991877167369479),
FIXR(0.51763809020504152469),
FIXR(0.55168895948124587824),
FIXR(0.61038729438072803416),
FIXR(0.70710678118654752439),
FIXR(0.87172339781054900991),
FIXR(1.18310079157624925896),
FIXR(1.93185165257813657349),
FIXR(5.73685662283492756461),
}

Definition at line 277 of file mpegaudiodsp_template.c.

Referenced by imdct36().

◆ icos36h

const INTFLOAT icos36h[9]
static
Initial value:
= {
FIXHR(0.50190991877167369479/2),
FIXHR(0.51763809020504152469/2),
FIXHR(0.55168895948124587824/2),
FIXHR(0.61038729438072803416/2),
FIXHR(0.70710678118654752439/2),
FIXHR(0.87172339781054900991/2),
FIXHR(1.18310079157624925896/4),
FIXHR(1.93185165257813657349/4),
}

Definition at line 290 of file mpegaudiodsp_template.c.

Referenced by imdct36().

tmp
static uint8_t tmp[11]
Definition: aes_ctr.c:26
FIXHR
#define FIXHR(a)
Definition: mpegaudiodsp_template.c:69
w
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 please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo ug o o w
Definition: fate.txt:150
FIXR
#define FIXR(a)
Definition: mpegaudiodsp_template.c:68