FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
rematrix.c File Reference
#include "swresample_internal.h"
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "rematrix_template.c"

Go to the source code of this file.

Macros

#define TEMPLATE_REMATRIX_FLT
 
#define TEMPLATE_REMATRIX_DBL
 
#define TEMPLATE_REMATRIX_S16
 
#define TEMPLATE_REMATRIX_S32
 
#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)
 

Macro Definition Documentation

#define TEMPLATE_REMATRIX_FLT

Definition at line 25 of file rematrix.c.

#define TEMPLATE_REMATRIX_DBL

Definition at line 29 of file rematrix.c.

#define TEMPLATE_REMATRIX_S16

Definition at line 33 of file rematrix.c.

#define TEMPLATE_REMATRIX_S32

Definition at line 37 of file rematrix.c.

#define FRONT_LEFT   0

Definition at line 41 of file rematrix.c.

Referenced by auto_matrix().

#define FRONT_RIGHT   1

Definition at line 42 of file rematrix.c.

Referenced by auto_matrix().

#define FRONT_CENTER   2

Definition at line 43 of file rematrix.c.

Referenced by auto_matrix().

#define LOW_FREQUENCY   3

Definition at line 44 of file rematrix.c.

Referenced by auto_matrix().

#define BACK_LEFT   4

Definition at line 45 of file rematrix.c.

Referenced by auto_matrix().

#define BACK_RIGHT   5

Definition at line 46 of file rematrix.c.

Referenced by auto_matrix().

#define FRONT_LEFT_OF_CENTER   6

Definition at line 47 of file rematrix.c.

Referenced by auto_matrix().

#define FRONT_RIGHT_OF_CENTER   7

Definition at line 48 of file rematrix.c.

Referenced by auto_matrix().

#define BACK_CENTER   8

Definition at line 49 of file rematrix.c.

Referenced by auto_matrix().

#define SIDE_LEFT   9

Definition at line 50 of file rematrix.c.

Referenced by auto_matrix().

#define SIDE_RIGHT   10

Definition at line 51 of file rematrix.c.

Referenced by auto_matrix().

#define TOP_CENTER   11

Definition at line 52 of file rematrix.c.

#define TOP_FRONT_LEFT   12

Definition at line 53 of file rematrix.c.

#define TOP_FRONT_CENTER   13

Definition at line 54 of file rematrix.c.

#define TOP_FRONT_RIGHT   14

Definition at line 55 of file rematrix.c.

#define TOP_BACK_LEFT   15

Definition at line 56 of file rematrix.c.

#define TOP_BACK_CENTER   16

Definition at line 57 of file rematrix.c.

#define TOP_BACK_RIGHT   17

Definition at line 58 of file rematrix.c.

Function Documentation

static int even ( int64_t  layout)
static

Definition at line 78 of file rematrix.c.

Referenced by sane_layout().

static int clean_layout ( SwrContext s,
int64_t  layout 
)
static

Definition at line 84 of file rematrix.c.

Referenced by auto_matrix().

static int sane_layout ( int64_t  layout)
static

Definition at line 95 of file rematrix.c.

Referenced by auto_matrix().

static av_cold int auto_matrix ( SwrContext s)
static

Definition at line 112 of file rematrix.c.

Referenced by swri_rematrix_init().

av_cold int swri_rematrix_init ( SwrContext s)

Definition at line 343 of file rematrix.c.

Referenced by swr_init().

av_cold void swri_rematrix_free ( SwrContext s)

Definition at line 414 of file rematrix.c.

Referenced by clear_context().

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

Definition at line 421 of file rematrix.c.

Referenced by swr_convert_internal().