libavfilter/af_aconvert.c File Reference

sample format and channel layout conversion audio filter based on code in libavcodec/resample.c by Fabrice Bellard and libavcodec/audioconvert.c by Michael Niedermayer More...

#include "libavutil/audioconvert.h"
#include "libavutil/avstring.h"
#include "libavcodec/audioconvert.h"
#include "avfilter.h"
#include "internal.h"
#include "af_aconvert_rematrix.c"

Go to the source code of this file.

Data Structures

struct  AConvertContext
struct  RematrixFunctionInfo

Defines

#define REMATRIX_FUNC_SIG(NAME)
#define FMT_TYPE   uint8_t
#define REMATRIX_FUNC_NAME(NAME)   NAME ## _u8
#define FMT_TYPE   int16_t
#define REMATRIX_FUNC_NAME(NAME)   NAME ## _s16
#define FMT_TYPE   int32_t
#define REMATRIX_FUNC_NAME(NAME)   NAME ## _s32
#define FLOATING
#define FMT_TYPE   float
#define REMATRIX_FUNC_NAME(NAME)   NAME ## _flt
#define FMT_TYPE   double
#define REMATRIX_FUNC_NAME(NAME)   NAME ## _dbl
#define FMT_TYPE   uint8_t
#define REMATRIX_FUNC_NAME(NAME)   NAME
#define REGISTER_FUNC_PACKING(INCHLAYOUT, OUTCHLAYOUT, FUNC, PACKING)
#define REGISTER_FUNC(INCHLAYOUT, OUTCHLAYOUT, FUNC)

Functions

 REMATRIX_FUNC_SIG (stereo_remix_planar)
static av_cold int init (AVFilterContext *ctx, const char *args0, void *opaque)
static av_cold void uninit (AVFilterContext *ctx)
static int query_formats (AVFilterContext *ctx)
static int config_output (AVFilterLink *outlink)
static int init_buffers (AVFilterLink *inlink, int nb_samples)
static void filter_samples (AVFilterLink *inlink, AVFilterBufferRef *insamplesref)

Variables

static struct RematrixFunctionInfo rematrix_funcs []
AVFilter avfilter_af_aconvert


Detailed Description

sample format and channel layout conversion audio filter based on code in libavcodec/resample.c by Fabrice Bellard and libavcodec/audioconvert.c by Michael Niedermayer

Definition in file af_aconvert.c.


Define Documentation

#define FLOATING

Definition at line 71 of file af_aconvert.c.

#define FMT_TYPE   uint8_t

Definition at line 81 of file af_aconvert.c.

#define FMT_TYPE   double

Definition at line 81 of file af_aconvert.c.

#define FMT_TYPE   float

Definition at line 81 of file af_aconvert.c.

#define FMT_TYPE   int32_t

Definition at line 81 of file af_aconvert.c.

#define FMT_TYPE   int16_t

Definition at line 81 of file af_aconvert.c.

#define FMT_TYPE   uint8_t

Definition at line 81 of file af_aconvert.c.

Referenced by REMATRIX_FUNC_SIG().

#define REGISTER_FUNC ( INCHLAYOUT,
OUTCHLAYOUT,
FUNC   ) 

Value:

REGISTER_FUNC_PACKING(INCHLAYOUT, OUTCHLAYOUT, FUNC##_packed, AVFILTER_PACKED)  \
    REGISTER_FUNC_PACKING(INCHLAYOUT, OUTCHLAYOUT, FUNC##_planar, AVFILTER_PLANAR)

Definition at line 98 of file af_aconvert.c.

#define REGISTER_FUNC_PACKING ( INCHLAYOUT,
OUTCHLAYOUT,
FUNC,
PACKING   ) 

Value:

{INCHLAYOUT, OUTCHLAYOUT, PACKING, AV_SAMPLE_FMT_U8,  FUNC##_u8},   \
    {INCHLAYOUT, OUTCHLAYOUT, PACKING, AV_SAMPLE_FMT_S16, FUNC##_s16},  \
    {INCHLAYOUT, OUTCHLAYOUT, PACKING, AV_SAMPLE_FMT_S32, FUNC##_s32},  \
    {INCHLAYOUT, OUTCHLAYOUT, PACKING, AV_SAMPLE_FMT_FLT, FUNC##_flt},  \
    {INCHLAYOUT, OUTCHLAYOUT, PACKING, AV_SAMPLE_FMT_DBL, FUNC##_dbl},

Definition at line 91 of file af_aconvert.c.

#define REMATRIX_FUNC_NAME ( NAME   )     NAME

Definition at line 82 of file af_aconvert.c.

#define REMATRIX_FUNC_NAME ( NAME   )     NAME ## _dbl

Definition at line 82 of file af_aconvert.c.

#define REMATRIX_FUNC_NAME ( NAME   )     NAME ## _flt

Definition at line 82 of file af_aconvert.c.

#define REMATRIX_FUNC_NAME ( NAME   )     NAME ## _s32

Definition at line 82 of file af_aconvert.c.

#define REMATRIX_FUNC_NAME ( NAME   )     NAME ## _s16

Definition at line 82 of file af_aconvert.c.

#define REMATRIX_FUNC_NAME ( NAME   )     NAME ## _u8

Definition at line 82 of file af_aconvert.c.

#define REMATRIX_FUNC_SIG ( NAME   ) 

Value:

static void REMATRIX_FUNC_NAME(NAME) \
    (FMT_TYPE *outp[], FMT_TYPE *inp[], int nb_samples, AConvertContext *aconvert)

Definition at line 56 of file af_aconvert.c.


Function Documentation

static int config_output ( AVFilterLink outlink  )  [static]

Definition at line 196 of file af_aconvert.c.

static void filter_samples ( AVFilterLink inlink,
AVFilterBufferRef insamplesref 
) [static]

Definition at line 340 of file af_aconvert.c.

static av_cold int init ( AVFilterContext ctx,
const char *  args0,
void *  opaque 
) [static]

Definition at line 118 of file af_aconvert.c.

static int init_buffers ( AVFilterLink inlink,
int  nb_samples 
) [static]

Definition at line 252 of file af_aconvert.c.

Referenced by filter_samples().

static int query_formats ( AVFilterContext ctx  )  [static]

Definition at line 156 of file af_aconvert.c.

Referenced by ff_avfilter_graph_config_formats().

REMATRIX_FUNC_SIG ( stereo_remix_planar   ) 

Definition at line 83 of file af_aconvert.c.

static av_cold void uninit ( AVFilterContext ctx  )  [static]

Definition at line 147 of file af_aconvert.c.


Variable Documentation

Initial value:

 {
    .name          = "aconvert",
    .description   = NULL_IF_CONFIG_SMALL("Convert the input audio to sample_fmt:channel_layout:packed_fmt."),
    .priv_size     = sizeof(AConvertContext),
    .init          = init,
    .uninit        = uninit,
    .query_formats = query_formats,

    .inputs    = (const AVFilterPad[]) {{ .name      = "default",
                                    .type            = AVMEDIA_TYPE_AUDIO,
                                    .filter_samples  = filter_samples,
                                    .min_perms       = AV_PERM_READ, },
                                  { .name = NULL}},
    .outputs   = (const AVFilterPad[]) {{ .name      = "default",
                                    .type            = AVMEDIA_TYPE_AUDIO,
                                    .config_props    = config_output, },
                                  { .name = NULL}},
}

Definition at line 401 of file af_aconvert.c.

Referenced by config_output().


Generated on Fri Oct 26 02:46:11 2012 for FFmpeg by  doxygen 1.5.8