libswresample/rematrix.c File Reference

#include "swresample_internal.h"
#include "libavutil/audioconvert.h"
#include "libavutil/avassert.h"
#include "rematrix_template.c"

Go to the source code of this file.

Defines

#define ONE   (1.0)
#define R(x)   x
#define SAMPLE   float
#define COEFF   float
#define INTER   float
#define RENAME(x)   x ## _float
#define ONE   (1.0)
#define R(x)   x
#define SAMPLE   double
#define COEFF   double
#define INTER   double
#define RENAME(x)   x ## _double
#define ONE   (-32768)
#define R(x)   (((x) + 16384)>>15)
#define SAMPLE   int16_t
#define COEFF   int
#define INTER   int
#define RENAME(x)   x ## _s16
#define FRONT_LEFT   0
#define FRONT_RIGHT   1
#define FRONT_CENTER   2
#define LOW_FREQUENCY   3
#define BACK_LEFT   4
#define BACK_RIGHT   5
#define FRONT_LEFT_OF_CENTER   6
#define FRONT_RIGHT_OF_CENTER   7
#define BACK_CENTER   8
#define SIDE_LEFT   9
#define SIDE_RIGHT   10
#define TOP_CENTER   11
#define TOP_FRONT_LEFT   12
#define TOP_FRONT_CENTER   13
#define TOP_FRONT_RIGHT   14
#define TOP_BACK_LEFT   15
#define TOP_BACK_CENTER   16
#define TOP_BACK_RIGHT   17

Functions

int swr_set_matrix (struct SwrContext *s, const double *matrix, int stride)
 Set a customized remix matrix.
static int even (int64_t layout)
static int clean_layout (SwrContext *s, int64_t layout)
static int sane_layout (int64_t layout)
static av_cold int auto_matrix (SwrContext *s)
av_cold int swri_rematrix_init (SwrContext *s)
av_cold void swri_rematrix_free (SwrContext *s)
int swri_rematrix (SwrContext *s, AudioData *out, AudioData *in, int len, int mustcopy)


Define Documentation

#define BACK_CENTER   8

Definition at line 70 of file rematrix.c.

#define BACK_LEFT   4

Definition at line 66 of file rematrix.c.

#define BACK_RIGHT   5

Definition at line 67 of file rematrix.c.

#define COEFF   int

Definition at line 56 of file rematrix.c.

#define COEFF   double

Definition at line 56 of file rematrix.c.

#define COEFF   float

Definition at line 56 of file rematrix.c.

Referenced by copy_TMPL(), and sum2_TMPL().

#define FRONT_CENTER   2

Definition at line 64 of file rematrix.c.

#define FRONT_LEFT   0

Definition at line 62 of file rematrix.c.

#define FRONT_LEFT_OF_CENTER   6

Definition at line 68 of file rematrix.c.

#define FRONT_RIGHT   1

Definition at line 63 of file rematrix.c.

#define FRONT_RIGHT_OF_CENTER   7

Definition at line 69 of file rematrix.c.

#define INTER   int

Definition at line 57 of file rematrix.c.

#define INTER   double

Definition at line 57 of file rematrix.c.

#define INTER   float

Definition at line 57 of file rematrix.c.

Referenced by mix6to2_TMPL(), and mix8to2_TMPL().

#define LOW_FREQUENCY   3

Definition at line 65 of file rematrix.c.

#define ONE   (-32768)

Definition at line 53 of file rematrix.c.

#define ONE   (1.0)

Definition at line 53 of file rematrix.c.

#define ONE   (1.0)

Definition at line 53 of file rematrix.c.

#define R (  )     (((x) + 16384)>>15)

Definition at line 54 of file rematrix.c.

#define R (  )     x

Definition at line 54 of file rematrix.c.

#define R (  )     x

Definition at line 54 of file rematrix.c.

#define RENAME (  )     x ## _s16

Definition at line 58 of file rematrix.c.

#define RENAME (  )     x ## _double

Definition at line 58 of file rematrix.c.

#define RENAME (  )     x ## _float

Definition at line 58 of file rematrix.c.

#define SAMPLE   int16_t

Definition at line 55 of file rematrix.c.

#define SAMPLE   double

Definition at line 55 of file rematrix.c.

#define SAMPLE   float

Definition at line 55 of file rematrix.c.

#define SIDE_LEFT   9

Definition at line 71 of file rematrix.c.

#define SIDE_RIGHT   10

Definition at line 72 of file rematrix.c.

#define TOP_BACK_CENTER   16

Definition at line 78 of file rematrix.c.

#define TOP_BACK_LEFT   15

Definition at line 77 of file rematrix.c.

#define TOP_BACK_RIGHT   17

Definition at line 79 of file rematrix.c.

#define TOP_CENTER   11

Definition at line 73 of file rematrix.c.

#define TOP_FRONT_CENTER   13

Definition at line 75 of file rematrix.c.

#define TOP_FRONT_LEFT   12

Definition at line 74 of file rematrix.c.

#define TOP_FRONT_RIGHT   14

Definition at line 76 of file rematrix.c.


Function Documentation

static av_cold int auto_matrix ( SwrContext s  )  [static]

Definition at line 136 of file rematrix.c.

Referenced by swri_rematrix_init().

static int clean_layout ( SwrContext s,
int64_t  layout 
) [static]

Definition at line 105 of file rematrix.c.

Referenced by auto_matrix().

static int even ( int64_t  layout  )  [static]

Definition at line 99 of file rematrix.c.

static int sane_layout ( int64_t  layout  )  [static]

Definition at line 119 of file rematrix.c.

int swr_set_matrix ( struct SwrContext s,
const double *  matrix,
int  stride 
)

Set a customized remix matrix.

Parameters:
s allocated Swr context, not yet initialized
matrix remix coefficients; matrix[i + stride * o] is the weight of input channel i in output channel o
stride offset between lines of the matrix
Returns:
AVERROR error code in case of failure.

Definition at line 81 of file rematrix.c.

Referenced by config_props().

int swri_rematrix ( SwrContext s,
AudioData out,
AudioData in,
int  len,
int  mustcopy 
)

Definition at line 418 of file rematrix.c.

Referenced by swr_convert_internal().

av_cold void swri_rematrix_free ( SwrContext s  ) 

Definition at line 412 of file rematrix.c.

Referenced by swr_free(), and swr_init().

av_cold int swri_rematrix_init ( SwrContext s  ) 

Definition at line 352 of file rematrix.c.

Referenced by swr_init().


Generated on Fri Oct 26 02:50:12 2012 for FFmpeg by  doxygen 1.5.8