Libav
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
audio_convert.c File Reference
#include <stdint.h>
#include "config.h"
#include "libavutil/common.h"
#include "libavutil/libm.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/samplefmt.h"
#include "audio_convert.h"
#include "audio_data.h"
#include "dither.h"

Go to the source code of this file.

Data Structures

struct  AudioConvert
 

Macros

#define CONV_FUNC_NAME(dst_fmt, src_fmt)   conv_ ## src_fmt ## _to_ ## dst_fmt
 
#define CONV_LOOP(otype, expr)
 
#define CONV_FUNC_FLAT(ofmt, otype, ifmt, itype, expr)
 
#define CONV_FUNC_INTERLEAVE(ofmt, otype, ifmt, itype, expr)
 
#define CONV_FUNC_DEINTERLEAVE(ofmt, otype, ifmt, itype, expr)
 
#define CONV_FUNC_GROUP(ofmt, otype, ifmt, itype, expr)
 
#define SET_CONV_FUNC_GROUP(ofmt, ifmt)
 

Typedefs

typedef voidconv_func_flat) (uint8_t *out, const uint8_t *in, int len)
 
typedef voidconv_func_interleave) (uint8_t *out, uint8_t *const *in, int len, int channels)
 
typedef voidconv_func_deinterleave) (uint8_t **out, const uint8_t *in, int len, int channels)
 

Enumerations

enum  ConvFuncType { CONV_FUNC_TYPE_FLAT, CONV_FUNC_TYPE_INTERLEAVE, CONV_FUNC_TYPE_DEINTERLEAVE }
 

Functions

void ff_audio_convert_set_func (AudioConvert *ac, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int ptr_align, int samples_align, const char *descr, void *conv)
 Set conversion function if the parameters match. More...
 
 CONV_FUNC_GROUP (AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80)<< 8) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32
 
 if (ac->has_optimized_func)
 
 av_dlog (ac->avr, "%d samples - audio_convert: %s to %s (%s)\, len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic ? ac->func_descr_generic :ac->func_descr)
 

Variables

 int32_t
 
 AV_SAMPLE_FMT_U8
 
 uint8_t
 
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> dc
 
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> out
 
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
 
 else
 
 return
 

Macro Definition Documentation

§ CONV_FUNC_NAME

#define CONV_FUNC_NAME (   dst_fmt,
  src_fmt 
)    conv_ ## src_fmt ## _to_ ## dst_fmt

Definition at line 134 of file audio_convert.c.

§ CONV_LOOP

#define CONV_LOOP (   otype,
  expr 
)
Value:
do { \
*(otype *)po = expr; \
pi += is; \
po += os; \
} while (po < end); \

Definition at line 136 of file audio_convert.c.

§ CONV_FUNC_FLAT

#define CONV_FUNC_FLAT (   ofmt,
  otype,
  ifmt,
  itype,
  expr 
)
Value:
static void CONV_FUNC_NAME(ofmt, ifmt)(uint8_t *out, const uint8_t *in, \
int len) \
{ \
int is = sizeof(itype); \
int os = sizeof(otype); \
const uint8_t *pi = in; \
uint8_t *po = out; \
uint8_t *end = out + os * len; \
CONV_LOOP(otype, expr) \
}
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> out
uint8_t
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
#define CONV_FUNC_NAME(dst_fmt, src_fmt)
int len

Definition at line 143 of file audio_convert.c.

§ CONV_FUNC_INTERLEAVE

#define CONV_FUNC_INTERLEAVE (   ofmt,
  otype,
  ifmt,
  itype,
  expr 
)
Value:
static void CONV_FUNC_NAME(ofmt, ifmt)(uint8_t *out, const uint8_t **in, \
int len, int channels) \
{ \
int ch; \
int out_bps = sizeof(otype); \
int is = sizeof(itype); \
int os = channels * out_bps; \
for (ch = 0; ch < channels; ch++) { \
const uint8_t *pi = in[ch]; \
uint8_t *po = out + ch * out_bps; \
uint8_t *end = po + os * len; \
CONV_LOOP(otype, expr) \
} \
}
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> out
uint8_t
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
#define CONV_FUNC_NAME(dst_fmt, src_fmt)
int len

Definition at line 155 of file audio_convert.c.

§ CONV_FUNC_DEINTERLEAVE

#define CONV_FUNC_DEINTERLEAVE (   ofmt,
  otype,
  ifmt,
  itype,
  expr 
)
Value:
static void CONV_FUNC_NAME(ofmt, ifmt)(uint8_t **out, const uint8_t *in, \
int len, int channels) \
{ \
int ch; \
int in_bps = sizeof(itype); \
int is = channels * in_bps; \
int os = sizeof(otype); \
for (ch = 0; ch < channels; ch++) { \
const uint8_t *pi = in + ch * in_bps; \
uint8_t *po = out[ch]; \
uint8_t *end = po + os * len; \
CONV_LOOP(otype, expr) \
} \
}
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> out
uint8_t
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
#define CONV_FUNC_NAME(dst_fmt, src_fmt)
int len

Definition at line 171 of file audio_convert.c.

§ CONV_FUNC_GROUP

#define CONV_FUNC_GROUP (   ofmt,
  otype,
  ifmt,
  itype,
  expr 
)
Value:
CONV_FUNC_FLAT( ofmt, otype, ifmt, itype, expr) \
CONV_FUNC_INTERLEAVE( ofmt, otype, ifmt ## P, itype, expr) \
CONV_FUNC_DEINTERLEAVE(ofmt ## P, otype, ifmt, itype, expr)
#define CONV_FUNC_FLAT(ofmt, otype, ifmt, itype, expr)

Definition at line 187 of file audio_convert.c.

§ SET_CONV_FUNC_GROUP

#define SET_CONV_FUNC_GROUP (   ofmt,
  ifmt 
)
Value:
ff_audio_convert_set_func(ac, ofmt, ifmt, 0, 1, 1, "C", CONV_FUNC_NAME(ofmt, ifmt)); \
ff_audio_convert_set_func(ac, ofmt ## P, ifmt, 0, 1, 1, "C", CONV_FUNC_NAME(ofmt ## P, ifmt)); \
ff_audio_convert_set_func(ac, ofmt, ifmt ## P, 0, 1, 1, "C", CONV_FUNC_NAME(ofmt, ifmt ## P));
#define CONV_FUNC_NAME(dst_fmt, src_fmt)
void ff_audio_convert_set_func(AudioConvert *ac, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int ptr_align, int samples_align, const char *descr, void *conv)
Set conversion function if the parameters match.
Definition: audio_convert.c:70

Typedef Documentation

§ conv_func_flat

typedef void( conv_func_flat) (uint8_t *out, const uint8_t *in, int len)

Definition at line 40 of file audio_convert.c.

§ conv_func_interleave

typedef void( conv_func_interleave) (uint8_t *out, uint8_t *const *in, int len, int channels)

Definition at line 42 of file audio_convert.c.

§ conv_func_deinterleave

typedef void( conv_func_deinterleave) (uint8_t **out, const uint8_t *in, int len, int channels)

Definition at line 45 of file audio_convert.c.

Enumeration Type Documentation

§ ConvFuncType

Enumerator
CONV_FUNC_TYPE_FLAT 
CONV_FUNC_TYPE_INTERLEAVE 
CONV_FUNC_TYPE_DEINTERLEAVE 

Definition at line 34 of file audio_convert.c.

Function Documentation

§ ff_audio_convert_set_func()

void ff_audio_convert_set_func ( AudioConvert ac,
enum AVSampleFormat  out_fmt,
enum AVSampleFormat  in_fmt,
int  channels,
int  ptr_align,
int  samples_align,
const char *  descr,
void conv 
)

Set conversion function if the parameters match.

This compares the parameters of the conversion function to the parameters in the AudioConvert context. If the parameters do not match, no changes are made to the active functions. If the parameters do match and the alignment is not constrained, the function is set as the generic conversion function. If the parameters match and the alignment is constrained, the function is set as the optimized conversion function.

Parameters
acAudioConvert context
out_fmtoutput sample format
in_fmtinput sample format
channelsnumber of channels, or 0 for any number of channels
ptr_alignbuffer pointer alignment, in bytes
samples_alignbuffer size alignment, in samples
descrfunction type description (e.g. "C" or "SSE")
convconversion function pointer

Definition at line 70 of file audio_convert.c.

Referenced by ff_audio_convert_init_aarch64(), ff_audio_convert_init_arm(), and ff_audio_convert_init_x86().

§ CONV_FUNC_GROUP()

CONV_FUNC_GROUP ( AV_SAMPLE_FMT_S16  ,
int16_t  ,
AV_SAMPLE_FMT_U8  ,
uint8_t  ,
(*(const uint8_t *) pi - 0x80)<<  8 
)

§ if()

if ( ac->  has_optimized_func)

Definition at line 331 of file audio_convert.c.

Referenced by aac_decode_frame_int(), aac_encode_init(), ac3_eac3_probe(), adpcm_encode_init(), adx_encode_frame(), amr_decode_fix_avctx(), amr_wb_encode_frame(), ape_decode_value_3900(), ape_read_header(), apply_lpc(), atrac3p_decode_frame(), av_reduce(), average_quantized_coeffs(), binkb_read_bundle(), blend_subrect(), buffer_offset(), cavsvideo_probe(), celt_decode_allocation(), check_header_mismatch(), cinaudio_decode_frame(), cmv_decode_inter(), cng_encode_frame(), commit_bitstream_and_slice_buffer(), construct_perm_table(), dca_decode_frame(), deblocking_filter_CTB(), decode_5(), decode_cabac_mb_skip(), decode_chunks(), decode_exp_vlc(), decode_frame(), decode_init(), decode_init_thread_copy(), decode_mb_mode(), decode_mode(), decode_ppc(), decode_slice_header(), decode_subframe(), decode_thread(), decode_tilehdr(), dv_extract_audio(), dv_inject_audio(), ebml_parse_elem(), eightsvx_decode_frame(), encode_frame(), encode_mb_internal(), ff_ac3_compute_coupling_strategy(), ff_alloc_picture(), ff_cavs_next_mb(), ff_celt_imdct_init(), ff_combine_frame(), ff_hevc_split_coding_unit_flag_decode(), ff_id3v2_write_apic(), ff_init_poc(), ff_mjpeg_decode_sos(), ff_mpeg4_encode_mb(), ff_mpv_common_init(), ff_rate_control_init(), ff_rate_estimate_qscale(), ff_sws_init_swscale_x86(), ff_thread_await_progress(), ff_thread_report_progress(), fill_picture_parameters(), filter_frame(), find_next_parse_unit(), find_ref_mvs(), flashsv_encode_frame(), flic_decode_init(), flush(), g723_1_decode_frame(), generate_joint_tables(), get_audio_frame(), get_block_sizes(), h263_probe(), h264_decode_frame(), h264_init_dequant_tables(), h264_probe(), handle_packet(), hds_write_packet(), hevc_probe(), hl_decode_mb_444(), hls_coding_unit(), hls_slice_header(), hls_write_header(), hyscale(), imc_refine_bit_allocation(), init(), ipvideo_decode_block_opcode_0x8(), ipvideo_decode_block_opcode_0xA(), ism_write_packet(), ivi_dc_transform(), ivi_decode_coded_blocks(), kempf_decode_tile(), libgsm_encode_frame(), libspeex_decode_frame(), loop_filter(), mask_edges(), matroska_probe(), mc_part_std(), mc_part_weighted(), mlp_parse(), mm_decode_inter(), mmsh_close(), motion_search(), mov_parse_mpeg2_frame(), mov_parse_vc1_frame(), mov_read_extradata(), mp3_read_probe(), mpeg1_encode_sequence_header(), mpeg4_decode_mb(), mpeg4_decode_partitioned_mb(), mpeg4video_probe(), mpeg_decode_mb(), mpeg_decode_slice(), mpeg_mux_init(), mpegps_probe(), mpegvideo_probe(), mtv_read_header(), mxf_interleave_get_packet(), mxf_parse_mpeg2_frame(), nut_probe(), ogg_read_page(), open_input_file(), pcm_dvd_decode_frame(), pcm_encode_frame(), piz_uncompress(), pnm_decode_frame(), pred_spatial_direct_motion(), pred_temp_direct_motion(), put_dc(), qcelp_decode_frame(), qdm2_decode(), qdm2_fft_tone_synthesizer(), ra144_encode_frame(), read_header(), read_major_sync(), read_old_huffman_tables(), read_var_block_data(), remove_wasted_bits(), rpza_decode_stream(), rtmp_calc_swf_verification(), rtsp_read_packet(), s302m_decode_frame(), sbr_hf_calc_npatches(), sbr_make_f_master(), select_input_picture(), seqvideo_decode(), set_channel_info(), set_palette(), set_sps(), shorten_decode_frame(), smc_decode_stream(), store_packet(), svq3_decode_frame(), svq3_decode_init(), svq3_decode_mb(), synth_block_fcb_acb(), synth_superframe(), tm2_decode_blocks(), transcode_init(), uninit_options(), unpack_superblocks(), unpack_vlcs(), vaapi_mpeg4_start_frame(), vc1_decode_b_mb(), vc1_decode_b_mb_intfi(), vc1_decode_b_mb_intfr(), vc1_decode_p_mb_intfi(), vc1_decode_p_mb_intfr(), vc1_put_signed_blocks_clamped(), vda_old_h264_end_frame(), vmd_decode(), vmdaudio_decode_frame(), vorbis_encode_frame(), vorbis_parse_setup_hdr_codebooks(), wiener_denoise(), wma_decode_superframe(), wsvqa_read_header(), XAVS_init(), xvid_ff_2pass_create(), and yuv4_write_packet().

§ av_dlog()

av_dlog ( ac->  avr,
"%d samples - audio_convert: %s to %s (%s)\  ,
len  ,
av_get_sample_fmt_name(ac->in_fmt)  ,
av_get_sample_fmt_name(ac->out_fmt)  ,
use_generic ? ac->func_descr_generic :ac->  func_descr 
)

Referenced by amr_decode_fix_avctx(), asf_get_packet(), asf_parse_packet(), asf_read_frame_header(), asf_read_header(), asf_read_metadata(), av_interleaved_write_frame(), av_new_program(), avi_load_index(), avi_read_header(), avi_read_idx1(), avi_read_packet(), avi_read_seek(), avi_sync(), avpriv_mpegaudio_decode_header(), avresample_convert(), avresample_open(), build_table(), compute_bit_allocation(), compute_pkt_fields(), compute_pkt_fields2(), compute_scale_factors(), compute_target_time(), cook_decode_frame(), create_map(), dca_decode_frame(), dca_subframe_header(), decode(), decode_audio_specific_config(), decode_band(), decode_coeffs(), decode_dvd_subtitles(), decode_format80(), decode_frame(), decode_frame_headers(), decode_init(), decode_init_static(), decode_line(), decode_packet(), decode_pic_hdr(), decode_rle(), decode_slice(), decode_subframe(), decode_tilehdr(), dnxhd_decode_frame(), dnxhd_decode_header(), dprint_options(), dprint_specific_config(), dv1394_read_packet(), dv_decode_ac(), dv_decode_video_segment(), dvbsub_decode(), dvbsub_parse(), dvbsub_parse_clut_segment(), dvbsub_parse_page_segment(), dvbsub_parse_pixel_data_block(), dvbsub_parse_region_segment(), dvdsub_decode(), encode_bitstream(), encode_line(), encode_picture(), encode_thread(), escape130_decode_frame(), estimate_timings(), fbdev_read_packet(), ff_af_queue_close(), ff_audio_mix(), ff_audio_resample(), ff_combine_frame(), ff_dlog_link(), ff_estimate_b_frame_motion(), ff_gen_search(), ff_h263_decode_picture_header(), ff_h264_decode_mb_cabac(), ff_init_vlc_sparse(), ff_jpegls_decode_lse(), ff_jpegls_decode_picture(), ff_jpegls_reset_coding_parameters(), ff_mjpeg_decode_sof(), ff_mjpeg_decode_sos(), ff_mov_read_chan(), ff_mov_read_stsd_entries(), ff_mp4_read_dec_config_descr(), ff_mp4_read_descr(), ff_mpv_frame_start(), ff_msmpeg4_decode_block(), ff_msmpeg4_decode_picture_header(), ff_msmpeg4_encode_picture_header(), ff_parse_mpeg2_descriptor(), ff_rate_estimate_qscale(), ff_rm_read_mdpr_codecdata(), ff_rtp_check_and_send_back_rr(), ff_rtp_send_data(), ff_rtsp_open_transport_ctx(), ff_rtsp_tcp_read_packet(), ff_seek_frame_binary(), ff_vaapi_common_end_frame(), ff_vbv_update(), ff_vc1_parse_frame_header(), ff_wma_init(), ff_wmv2_decode_mb(), filter_frame(), find_marker(), flashsv_decode_frame(), flashsv_encode_frame(), flic_decode_frame_15_16BPP(), flush_packet(), flv_read_packet(), get_http_header_data(), get_packet_size(), get_pts(), get_sockaddr(), get_tcp_server_response(), get_vlc_symbol(), gif_parse_next_image(), gif_read_extension(), gif_read_header1(), gif_read_image(), h261_decode_frame(), h263p_decode_umotion(), handle_buffered_output(), handle_packet_stream_changing_type(), handle_packets(), http_read_header(), http_read_stream(), huffman_decode(), hvcc_write(), if(), imc_get_coeffs(), init_pass2(), ipvideo_decode_block_opcode_0x2(), ipvideo_decode_block_opcode_0x3(), ipvideo_decode_block_opcode_0x4(), ipvideo_decode_block_opcode_0x5(), ipvideo_decode_block_opcode_0x6_16(), ipvideo_decode_opcodes(), ivi_decode_coded_blocks(), load_input_picture(), load_ipmovie_packet(), mjpeg_decode_scan(), mms_open(), mms_read(), mms_safe_send_recv(), mmsh_open(), modify_qscale(), mov_build_index(), mov_find_next_sample(), mov_parse_stsd_audio(), mov_parse_stsd_video(), mov_read_ctts(), mov_read_default(), mov_read_dref(), mov_read_elst(), mov_read_enda(), mov_read_hdlr(), mov_read_header(), mov_read_moof(), mov_read_mvhd(), mov_read_packet(), mov_read_smi(), mov_read_stsc(), mov_read_stss(), mov_read_stsz(), mov_read_stts(), mov_read_tfhd(), mov_read_trun(), mov_read_udta_string(), mov_seek_stream(), movie_get_frame(), mp3lame_encode_frame(), mp_decode_layer2(), mp_decode_layer3(), MPA_encode_init(), mpeg1_decode_block_intra(), mpeg2_decode_block_intra(), mpeg_decode_frame(), mpeg_decode_mb(), mpeg_decode_picture_coding_extension(), mpeg_decode_postinit(), mpeg_decode_quant_matrix_extension(), mpeg_decode_sequence_extension(), mpeg_decode_slice(), mpeg_mux_write_packet(), mpegps_read_dts(), mpegps_read_packet(), mpegts_open_section_filter(), mpegts_probe(), mpegts_push_data(), mpegts_read_header(), mpegts_write_packet_internal(), mpegvideo_parse(), msmpeg4v2_decode_motion(), msmpeg4v34_decode_mb(), mxf_interleave_get_packet(), mxf_parse_handle_essence(), mxf_parse_structural_metadata(), mxf_read_header(), mxf_read_index_table_segment(), mxf_read_local_tags(), mxf_read_packet_old(), mxf_read_partition_pack(), mxf_read_pixel_layout(), mxf_seek_to_previous_partition(), nsv_parse_NSVf_header(), nsv_parse_NSVs_header(), nsv_probe(), nsv_read_chunk(), nsv_read_header(), nsv_read_packet(), nsv_resync(), ogg_get_headers(), ogg_packet(), output_packet(), parse_palette_segment(), parse_presentation_segment(), pat_cb(), pcm_bluray_decode_frame(), pcm_bluray_parse_header(), pcm_dvd_parse_header(), pmt_cb(), process_ipmovie_chunk(), process_line(), put_vlc_symbol(), r3d_read_header(), r3d_read_rdvo(), r3d_read_red1(), r3d_read_reda(), r3d_read_redv(), r3d_read_reos(), r3d_seek(), read_atom(), read_braindead_odml_indx(), read_data_packet(), read_header(), read_huffman_tree(), realloc_buffer(), rm_read_dts(), rm_read_header(), rtcp_send_sr(), rtmp_parse_result(), rtp_write_packet(), rtsp_read_request(), rtsp_read_setup(), rtsp_send_reply(), rv10_decode_frame(), rv10_decode_packet(), rv10_decode_picture_header(), sdt_cb(), setup_classifs(), slice_decode_thread(), svq1_decode_block_intra(), svq1_decode_block_non_intra(), svq1_decode_delta_block(), svq1_decode_frame(), svq1_decode_frame_header(), synchronize_audio(), vaapi_h264_decode_slice(), vaapi_h264_end_frame(), vaapi_h264_start_frame(), vaapi_mpeg2_decode_slice(), vaapi_mpeg2_start_frame(), vaapi_mpeg4_decode_slice(), vaapi_mpeg4_start_frame(), vaapi_vc1_decode_slice(), vaapi_vc1_start_frame(), vc1_decode_frame(), video_thread(), vorbis_decode_frame(), vorbis_floor0_decode(), vorbis_floor1_decode(), vorbis_parse_audio_packet(), vorbis_parse_id_hdr(), vorbis_parse_setup_hdr_codebooks(), vorbis_parse_setup_hdr_floors(), vorbis_parse_setup_hdr_mappings(), vorbis_parse_setup_hdr_modes(), vorbis_parse_setup_hdr_residues(), vorbis_parse_setup_hdr_tdtransforms(), vorbis_residue_decode_internal(), and wma_decode_superframe().

Variable Documentation

§ int32_t

int32_t

Definition at line 194 of file audio_convert.c.

Referenced by ac3_decode_transform_coeffs_ch(), adpcm_decode_frame(), alac_entropy_coder(), alac_linear_predictor(), alac_set_info(), alac_stereo_decorrelation(), allocate_buffers(), ape_decode_frame(), ape_read_header(), ape_unpack_stereo(), apply_channel_coupling(), apply_unsharp(), asf_write_markers(), av_crc_init(), av_display_rotation_set(), bink_decode_plane(), binkb_decode_plane(), calc_predictor_params(), calculate_sign_huff(), celt_decode_band(), channel_decorrelation(), chrRangeFromJpeg16_c(), chrRangeToJpeg16_c(), compute_imdct(), copy_tag(), create_map(), dca_subsubframe(), dctcoef_get(), dctcoef_set(), decode_cabac_residual_internal(), decode_channel(), decode_const_block_data(), decode_element(), decode_frame(), decode_postinit(), decode_residual(), decode_subframe(), decode_var_block_data(), decorrelate(), decorrelate_stereo(), dequantization_int(), dump_sidedata(), dwt_decode53(), dwt_decode97_int(), dxa_read_header(), encode_init(), encode_residual_ch(), entropy_decode_mono_3860(), entropy_decode_mono_3900(), entropy_decode_mono_3990(), entropy_decode_stereo_3860(), entropy_decode_stereo_3900(), entropy_decode_stereo_3930(), entropy_decode_stereo_3990(), estimate_stereo_mode(), ff_ac3_apply_rematrixing(), ff_eac3_apply_spectral_extension(), ff_get_bmp_header(), ff_ivi_inverse_haar_4x4(), ff_ivi_inverse_haar_8x8(), ff_ivi_inverse_slant_4x4(), ff_ivi_inverse_slant_8x8(), ff_ivi_recompose53(), ff_ivi_recompose_haar(), ff_j_rev_dct(), ff_jpeg2000_tag_tree_init(), ff_mlp_pack_output(), ff_rtp_check_and_send_back_rr(), ff_vda_default_init(), filter_3800(), filter_channel(), filter_fast_3320(), filter_frame(), finalize_packet(), flv_read_packet(), get_send_time(), get_xbits(), h264_mp4toannexb_filter(), hScale16To19_c(), hScale8To19_c(), huf_uncompress(), init_offset(), init_sample_buffers(), initFilter(), inter_predict_dc(), ivi_decode_blocks(), ivi_decode_coded_blocks(), jpeg2000_decode_tile(), long_filter_ehigh_3830(), long_filter_high_3800(), lpc_prediction(), lumRangeFromJpeg16_c(), lumRangeToJpeg16_c(), mct_decode(), mlp_filter_channel(), mov_metadata_loci(), mov_read_elst(), mov_read_header(), mov_read_tkhd(), mov_write_tapt_tag(), mp3_parse_info_tag(), mp3_write_xing(), mp3lame_encode_frame(), mpeg1_decode_block_inter(), mpeg1_fast_decode_block_inter(), mpeg2_decode_block_non_intra(), mpeg2_fast_decode_block_non_intra(), msmpeg4_decode_dc(), output_buffer(), parse_value(), pcm_bluray_decode_frame(), pcm_decode_frame(), pcm_dvd_decode_samples(), pcm_encode_frame(), predictor_decode_mono_3800(), predictor_decode_mono_3930(), predictor_decode_mono_3950(), predictor_decode_stereo_3800(), predictor_decode_stereo_3930(), predictor_decode_stereo_3950(), predictor_update_3930(), predictor_update_filter(), quantize_lpc_coefs(), ra144_encode_frame(), read_dct_coeffs(), read_filter_params(), read_mfra(), read_var_block_data(), remove_wasted_bits(), request_frame(), revert_channel_correlation(), rice_count_exact(), rnd_table_init(), rpl_read_header(), rtcp_update_jitter(), scale_samples_s32(), scaling_list_data(), set_side_data(), shorten_decode_frame(), silk_decode_excitation(), silk_is_lpc_stable(), silk_lsf2lpc(), smacker_read_header(), svq1_encode_init(), svq3_mc_dir(), sws_init_context(), swscale(), tag_tree_size(), tak_decode_frame(), tta_decode_frame(), tta_decode_init(), ttafilter_process(), unpack_intraframe(), update_md5_sum(), usePal(), wavpack_encode_frame(), write_element(), write_hint_packets(), write_subframes(), wv_unpack_mono(), wv_unpack_stereo(), x8_decode_intra_mb(), x8_loop_filter(), yuv2rgb48_1_c_template(), yuv2rgb48_2_c_template(), yuv2yuyv422_1(), yuvPlanartouyvy_c(), and yuvPlanartoyuy2_c().

§ AV_SAMPLE_FMT_U8

AV_SAMPLE_FMT_U8

§ uint8_t

uint8_t

Definition at line 194 of file audio_convert.c.

Referenced by a64_compress_colram(), a64_write_header(), a64multi_encode_frame(), a64multi_encode_init(), aac_adtstoasc_filter(), aac_decode_frame(), aac_decode_frame_int(), aac_decode_init(), aac_encode_init(), aac_sync(), aasc_decode_frame(), ac3_decode_frame(), ac3_decode_transform_coeffs_ch(), ac3_eac3_probe(), ac3_exponent_min_c(), ac3_sync(), add_entry(), add_frame_default(), add_hfyu_median_pred_c(), add_lag_median_prediction(), adpcm_compress_trellis(), adpcm_decode_frame(), adpcm_encode_frame(), adpcm_encode_init(), adts_aac_probe(), adts_write_packet(), adx_decode_frame(), adx_encode_frame(), aic_decode_coeffs(), aic_decode_frame(), aic_decode_init(), aic_decode_slice(), alac_encode_init(), alloc_and_copy(), allocate_buffers(), alpha_inverse_prediction(), amr_decode_fix_avctx(), amr_handle_packet(), amr_read_header(), amr_read_packet(), amrnb_decode_frame(), amrwb_decode_frame(), ape_decode_frame(), ape_tag_read_field(), append_flv_data(), apply_8x8(), apply_color_indexing_transform(), apply_color_transform(), apply_delogo(), apply_loop_filter(), apply_param_change(), apply_subtract_green_transform(), apply_unsharp(), asf_parse_packet(), asf_read_picture(), asf_write_header1(), asf_write_markers(), asfrtp_free_context(), asfrtp_parse_packet(), at1_unpack_dequant(), atrac1_decode_frame(), atrac3_decode_frame(), atrac3_decode_init(), audio_decode_example(), audio_encode_example(), audio_write_packet(), aura_decode_frame(), av_aes_init(), av_base64_decode(), av_base64_encode(), av_bitstream_filter_filter(), av_blowfish_crypt(), av_buffer_alloc(), av_buffer_realloc(), av_crc(), av_des_mac(), av_dump_format(), av_fast_padded_malloc(), av_fifo_generic_read(), av_fifo_generic_write(), av_fifo_peek2(), av_find_info_tag(), av_frame_get_plane_buffer(), av_hmac_calc(), av_hmac_final(), av_hmac_init(), av_image_alloc(), av_lfg_init(), av_log(), av_log_default_callback(), av_lzo1x_decode(), av_mallocz_array(), av_md5_final(), av_md5_sum(), av_memcpy_backptr(), av_opt_free(), av_opt_get(), av_opt_get_dict_val(), av_opt_set(), av_opt_set_bin(), av_opt_set_dict_val(), av_packet_copy_props(), av_parser_change(), av_parser_parse2(), av_picture_pad(), av_probe_input_buffer(), AV_RB16(), AV_RB24(), AV_RB32(), av_rc4_crypt(), av_rc4_init(), av_read_image_line(), AV_RL16(), AV_RL24(), AV_RL32(), av_samples_alloc(), av_sha_final(), av_strcasecmp(), av_strncasecmp(), av_tree_enumerate(), av_write_image_line(), av_xtea_crypt(), avcodec_copy_context(), avconv_parse_options(), avg_no_rnd_vc1_chroma_mc4_c(), avi_read_header(), avi_read_packet(), avio_put_str16le(), avpriv_dv_produce_packet(), avpriv_vorbis_parse_extradata(), avpriv_vorbis_parse_reset(), avs_decode_frame(), avs_probe(), avs_read_packet(), backup_mb_border(), bethsoftvid_decode_frame(), bfi_decode_frame(), bgr8torgb8(), bidir_refine(), bilin_1d_fn(), bink_decode_plane(), bink_put_pixels(), binkb_calc_quant(), binkb_decode_plane(), binkb_read_bundle(), bit8x8_c(), bitplane_decoding(), bktr_init(), blend_frame(), blend_subrect(), block_cmp(), blur_power(), bmp_decode_frame(), bmp_encode_frame(), bmv_aud_decode_frame(), buffer_needs_copy(), build_canonical_huff(), build_elision_headers(), build_huff(), build_huff_tree(), build_vlc(), cavs_decode_frame(), cavs_idct8_add_c(), cbr_bit_allocation(), cdata_probe(), cdg_border_preset(), cdg_decode_frame(), cdg_load_palette(), cdg_scroll(), cdg_tile_block(), cdxl_decode_frame(), cdxl_decode_ham6(), cdxl_decode_ham8(), celt_decode_band(), celt_decode_bands(), celt_decode_coarse_energy(), celt_deinterleave_hadamard(), celt_header(), celt_interleave_hadamard(), channelmap_filter_frame(), check_bidir_mv(), check_header_mismatch(), check_intra_mode(), chomp_filter(), chroma_4mv_motion(), chroma_mc(), cinaudio_decode_frame(), cinepak_decode(), cinepak_decode_codebook(), cinepak_decode_frame(), cinepak_decode_strip(), cinepak_decode_vectors(), cinvideo_decode_frame(), cllc_decode_frame(), cmp_direct_inline(), cmp_inline(), cmv_decode_frame(), cmv_decode_inter(), color_config_props(), commit_bitstream_and_slice_buffer(), compare_addr(), compute_exp_strategy(), config_input(), convert_frame(), convert_from_rgb32(), cook_decode_frame(), copy(), copy_backptr(), copy_block(), copy_cell(), copy_frame_default(), copy_input_samples(), copy_moof(), copy_output(), copy_picture_field(), copy_processed_frame(), copy_region_enc(), count_frame_header(), count_pixels(), create_iv(), create_vorbis_context(), cyuv_decode_frame(), dc1394_read_common(), dca_decode_frame(), dca_parse_params(), dct_get(), dct_quantize_refine(), dct_quantize_trellis_c(), dct_sad8x8_c(), deblocking_filter_CTB(), decode(), decode_0(), decode_10bit_pulse(), decode_13(), decode_5(), decode_8(), decode_argb_frame(), decode_audio_block(), decode_audio_s16(), decode_band(), decode_band_hdr(), decode_band_structure(), decode_band_types(), decode_bdlt(), decode_block(), decode_block_coeffs(), decode_block_intra(), decode_bmv_frame(), decode_byterun(), decode_cabac_intra_mb_type(), decode_cabac_luma_residual(), decode_cabac_residual_internal(), decode_cell(), decode_cell_data(), decode_chunks(), decode_coeffs(), decode_dc(), decode_dds1(), decode_dsw1(), decode_dvd_subtitles(), decode_eld_specific_config(), decode_entropy_coded_image(), decode_frame(), decode_frame_byterun1(), decode_frame_header(), decode_frame_headers(), decode_frame_ilbm(), decode_ga_specific_config(), decode_hextile(), decode_hybrid(), decode_i_frame(), decode_init(), decode_init_static(), decode_interframe_v4(), decode_interframe_v4a(), decode_intra4x4_modes(), decode_lt_rps(), decode_luma_residual(), decode_main_header(), decode_mb_i(), decode_mode(), decode_mvc1(), decode_mvc2(), decode_nal_sei_decoded_picture_hash(), decode_nal_units(), decode_p_frame(), decode_packet(), decode_picture_header(), decode_pixel_in_context(), decode_plane(), decode_region(), decode_region_intra(), decode_region_masked(), decode_residual_block(), decode_rgb24_frame(), decode_rle(), decode_scaling_list(), decode_scaling_matrices(), decode_sgirle8(), decode_slice(), decode_slice_header(), decode_splitmvs(), decode_str(), decode_subblock(), decode_sym(), decode_sym_565(), decode_tag(), decode_tdlt(), decode_tilehdr(), decode_tsw1(), decode_unregistered_user_data(), decode_vui(), decode_wdlt(), decode_yuv_frame(), decrypt_init(), deinterlace_bottom_field(), deinterlace_bottom_field_inplace(), deinterlace_line_c(), deinterlace_line_inplace_c(), delta_decode(), denoise_depth(), dequant(), dequant_lsps(), derive_key(), dfa_decode_frame(), dirac_combine_frame(), dnxhd_10bit_dct_quantize(), dnxhd_decode_dct_block(), dnxhd_decode_frame(), dnxhd_decode_header(), dnxhd_decode_macroblock(), dnxhd_encode_init(), dnxhd_encode_picture(), dnxhd_encode_thread(), dnxhd_get_blocks(), dnxhd_init_qmat(), dnxhd_mb_var_thread(), dnxhd_probe(), dnxhd_unquantize_c(), dnxhd_write_header(), do_adobe_auth(), do_llnw_auth(), do_subtitle_out(), do_video_out(), doTest(), dpcm_decode_frame(), draw_edges_8_c(), draw_glyph_rgb(), draw_glyph_yuv(), draw_glyphs(), drawbox(), dtext_prepare_text(), dts_probe(), dump_paramchange(), dv_calc_mb_coordinates(), dv_decode_ac(), dv_decode_video_segment(), dv_encode_video_segment(), dv_extract_audio(), dv_extract_audio_info(), dv_extract_video_info(), dv_init_enc_block(), dv_inject_metadata(), dv_write_dif_id(), dv_write_pack(), dv_write_packet(), dvb_encode_rle2(), dvb_encode_rle4(), dvbsub_decode(), dvbsub_parse(), dvbsub_parse_clut_segment(), dvbsub_parse_object_segment(), dvbsub_parse_page_segment(), dvbsub_parse_pixel_data_block(), dvbsub_parse_region_segment(), dvbsub_read_8bit_string(), dvd_encode_rle(), dvdsub_decode(), dvvideo_decode_frame(), dx2_decode_slice_410(), dx2_decode_slice_420(), dx2_decode_slice_444(), dx2_decode_slice_565(), dx2_decode_slice_rgb(), dxa_read_packet(), dxtory_decode_v1_410(), dxtory_decode_v1_420(), dxtory_decode_v1_444(), dxtory_decode_v1_rgb(), dxtory_decode_v2_410(), dxtory_decode_v2_420(), dxtory_decode_v2_444(), dxtory_decode_v2_565(), dxtory_decode_v2_rgb(), dxva2_get_buffer(), dxva2_retrieve_data(), ebml_parse_nest(), ebml_read_ascii(), ebml_read_num(), encode_422_bitstream(), encode_bitstream(), encode_block(), encode_dvb_subtitles(), encode_dvd_subtitles(), encode_exponents(), encode_exponents_blk_ch(), encode_frame(), encode_init(), encode_mb_hq(), encode_mb_internal(), encode_nals(), encode_picture_ls(), encode_plane(), encode_rgb48_10bit(), encode_slice(), encode_slice_header(), encode_thread(), encrypt_counter(), escape124_decode_frame(), escape130_decode_frame(), escape_FF(), estimate_motion_b(), event_cmp(), expand_rle_row8(), exponents_from_scale_factors(), extract_rbsp(), f_func(), fade(), fbdev_read_packet(), fdk_aac_decode_frame(), ff_ac3_apply_rematrixing(), ff_ac3_group_exponents(), ff_add_param_change(), ff_amf_tag_size(), ff_ape_parse_tag(), ff_asfcrypt_dec(), ff_atrac3p_init_vlcs(), ff_audio_data_add_to_fifo(), ff_audio_data_realloc(), ff_audio_mix(), ff_avc_find_startcode(), ff_avc_find_startcode_internal(), ff_avc_parse_nal_units(), ff_avc_write_annexb_extradata(), ff_bgmc_decode(), ff_cavs_filter(), ff_copy_rectangle(), ff_cos(), ff_dct_quantize_c(), ff_decode_frame_props(), ff_draw_rectangle(), ff_dvvideo_init(), ff_eac3_apply_spectral_extension(), ff_er_add_slice(), ff_er_frame_end(), ff_er_frame_start(), ff_estimate_p_frame_motion(), ff_fill_line_with_color(), ff_flac_parse_picture(), ff_flac_write_header(), ff_generate_avci_extradata(), ff_get_best_fcode(), ff_h261_loop_filter(), ff_h263_decode_frame(), ff_h263_find_resync_marker_reverse(), ff_h263_handle_packet(), ff_h263_loop_filter(), ff_h263_round_chroma(), ff_h264_alloc_tables(), ff_h264_chroma422_dc_dequant_idct(), ff_h264_context_init(), ff_h264_decode_init(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), ff_h264_decode_nal(), ff_h264_decode_slice_header(), ff_h264_filter_mb(), ff_h264_luma_dc_dequant_idct(), ff_h264_unref_picture(), ff_hevc_annexb2mp4(), ff_hevc_deblocking_boundary_strengths(), ff_hevc_decode_nal_pps(), ff_hevc_decode_short_term_rps(), ff_hevc_significant_coeff_flag_decode(), ff_hevc_slice_rpl(), ff_id3v1_read(), ff_id3v2_read(), ff_id3v2_write_apic(), ff_init_range_decoder(), ff_init_rl(), ff_insert_pad(), ff_isom_write_avcc(), ff_isom_write_hvcc(), ff_ivi_decode_frame(), ff_jpeg2000_ceildiv(), ff_jpeg2000_getrefctxno(), ff_jpeg2000_init_component(), ff_jpegls_decode_picture(), ff_log2_q15(), ff_lzw_decode(), ff_lzw_encode(), ff_mjpeg_decode_dht(), ff_mjpeg_decode_frame(), ff_mjpeg_find_marker(), ff_mkv_stereo3d_conv(), ff_mlp_calculate_parity(), ff_mlp_checksum8(), ff_mms_asf_header_parser(), ff_mov_add_hinted_packet(), ff_mov_close_hinting(), ff_mov_iso639_to_lang(), ff_mov_write_packet(), ff_mpeg1_encode_picture_header(), ff_mpeg4_encode_mb(), ff_mpeg4_init_partitions(), ff_mpeg_unref_picture(), ff_mpv_encode_picture(), ff_msmpeg4_encode_block(), ff_msmpeg4_encode_mb(), ff_msmpeg4_pred_dc(), ff_mspel_motion(), ff_mss34_gen_quant_mat(), ff_opus_parse_extradata(), ff_opus_parse_packet(), ff_parse_mpeg2_descriptor(), ff_put_wav_header(), ff_rac_terminate(), ff_rdt_parse_packet(), ff_replaygain_export_raw(), ff_rle_encode(), ff_rtjpeg_decode_frame_yuv420(), ff_rtmp_calc_digest(), ff_rtmp_packet_dump(), ff_rtmp_packet_read(), ff_rtmp_packet_write(), ff_rtmpe_compute_secret_key(), ff_rtp_chain_mux_open(), ff_rtp_check_and_send_back_rr(), ff_rtp_send_aac(), ff_rtp_send_amr(), ff_rtp_send_h263(), ff_rtp_send_h263_rfc2190(), ff_rtp_send_h264(), ff_rtp_send_jpeg(), ff_rtp_send_mpegvideo(), ff_rtp_send_punch_packets(), ff_rtp_send_rtcp_feedback(), ff_rtp_send_xiph(), ff_rtsp_open_transport_ctx(), ff_rtsp_tcp_write_packet(), ff_rtsp_undo_setup(), ff_rv34_decode_frame(), ff_samples_to_time_base(), ff_shrink22(), ff_shrink44(), ff_srtp_decrypt(), ff_srtp_encrypt(), ff_srtp_set_crypto(), ff_svq3_luma_dc_dequant_idct_c(), ff_twinvq_decode_frame(), ff_u8_to_s8(), ff_vaapi_alloc_slice(), ff_vaapi_get_surface_id(), ff_vc1_decode_blocks(), ff_vda_create_decoder(), ff_vda_default_init(), ff_vorbis_comment(), ff_vorbis_len2vlc(), ff_vp56_decode_frame(), ff_vp9_adapt_probs(), ff_wma_init(), ff_wmv2_decode_mb(), ff_wmv2_encode_mb(), ff_yuv2rgb_init_tables_ppc(), ffio_fdopen(), ffio_set_buf_size(), ffio_wfourcc(), ffv1_decode_frame(), ffv1_encode_frame(), ffv1_encode_init(), ffv1_init_slice_state(), fic_decode_frame(), fic_decode_slice(), fic_draw_cursor(), fill_buffer(), fill_decode_caches(), fill_decode_neighbors(), fill_filter_caches(), fill_noise_buffer(), fill_rectangle(), fillPlane(), filter_8tap_1d_fn(), filter_common(), filter_edges(), filter_frame(), filter_line_c(), filter_mb(), filter_mb_dir(), filter_mbedge(), filter_slice(), filter_slice_chroma(), filter_slice_luma(), find_header_idx(), find_headers_search_validate(), find_marker(), find_new_headers(), find_smallest_bounding_rectangle(), flac_decode_frame(), flac_decode_init(), flac_encode_frame(), flac_encode_init(), flac_fifo_read(), flac_fifo_read_wrap(), flac_header(), flac_parse(), flac_read_header(), flac_write_block_comment(), flac_write_header(), flac_write_packet(), flac_write_trailer(), flashsv_decode_block(), flashsv_encode_frame(), flic_decode_frame(), flush(), flush_packet(), flush_put_bits(), flv_probe(), flv_read_packet(), flv_write_packet(), frame_copy_video(), free_fragment_if_needed(), free_frame_if_needed(), g2m_decode_frame(), g2m_load_cursor(), g2m_paint_cursor(), g723_1_decode_frame(), g726_reset(), gather_data_for_cel(), gather_data_for_subcel(), gbr24ptopacked24(), gbr24ptopacked32(), gen_buffer_time(), gen_bytes_read(), gen_check_bw(), gen_connect(), gen_create_stream(), gen_delete_stream(), gen_fcpublish_stream(), gen_fcsubscribe_stream(), gen_fcunpublish_stream(), gen_play(), gen_pong(), gen_publish(), gen_release_stream(), gen_seek(), gen_server_bw(), gen_swf_verification(), generate_joint_tables(), generate_new_codebooks(), get16(), get8(), get_bits1(), get_block(), get_che(), get_chunk_header(), get_cox(), get_exponent_dynamic(), get_generic_seed(), get_last_needed_nal(), get_line(), get_meta(), get_metadata(), get_metadata_size(), get_number(), get_packet_header(), get_packetheader(), get_private_data(), get_pts(), get_siz(), get_slice_data(), get_sot(), get_stats(), get_tlm(), getstr8(), gif_decode_frame(), gif_encode_frame(), gif_image_write_image(), gif_read_header1(), gif_read_image(), gmc1_motion(), gmc_motion(), grow_array(), gsm_decode_frame(), guess_mv(), guess_palette(), gxf_probe(), gxf_write_header(), gxf_write_mpeg_auxiliary(), h261_decode_block(), h261_decode_frame(), h263_decode_block(), h263_free_context(), h263_handle_packet(), h263_mv4_search(), h264_decode_frame(), h264_extradata_to_annexb(), h264_handle_packet(), h264_mp4toannexb_filter(), h_block_filter(), handle_invoke_error(), handle_invoke_status(), handle_metadata(), handle_notify(), handle_packet(), handle_packets(), hcscale(), hevc_probe(), hl_decode_mb(), hl_decode_mb_444(), hl_decode_mb_idct_luma(), hl_decode_mb_predict_luma(), hls_coding_unit(), hls_pcm_sample(), hls_prediction_unit(), hls_residual_coding(), hls_transform_tree(), hnm_flip_buffers(), hnm_update_palette(), horizontal_frame_pack(), html_color_parse(), http_buf_read(), http_seek(), huf_decode(), hvcc_add_nal_unit(), hvcc_array_add_nal_unit(), hvcc_close(), hvcc_parse_pps(), hvcc_parse_ptl(), hvcc_write(), hyscale(), icecast_write(), id3v2_parse(), id3v2_put_ttag(), idcin_decode_frame(), idcin_read_packet(), idct_mb(), idct_put(), iff_probe(), ilbc_decode_frame(), ilbc_read_header(), imc_decode_frame(), imc_read_level_coeffs(), imx_dump_header(), init(), init_coef_vlc(), init_context_frame(), init_dequant4_coeff_table(), init_dequant8_coeff_table(), init_filter_graph(), init_ralf_vlc(), initFilter(), inter_recon(), interlaced_search(), interleaveBytes(), intra_pred(), intra_pred_plane(), intra_predict(), intra_prediction_unit(), intra_recon(), inverse_prediction(), ipmovie_probe(), ipmovie_read_header(), ipvideo_decode_frame(), ir2_decode_frame(), is_intra_more_likely(), isDiffMER(), ivi_create_huff_from_desc(), ivi_decode_blocks(), ivi_decode_coded_blocks(), jpeg2000_decode_packets(), jpeg2000_decode_tile(), jpeg2000_read_main_headers(), jpeg_create_header(), jpeg_parse_packet(), jpeg_put_comments(), jpeg_table_header(), jpg_decode_block(), jpg_decode_data(), jpg_unescape(), kempf_decode_tile(), lag_decode_arith_plane(), lag_decode_frame(), lag_decode_prob(), lag_decode_zero_run_line(), lag_get_rac(), latm_free_context(), latm_parse_packet(), latm_write_packet(), left_predict(), libgsm_decode_frame(), libopenjpeg_copy_to_packed8(), libopenjpeg_copyto8(), libopenjpeg_decode_frame(), libopus_decode_init(), libopus_encode(), libopus_encode_init(), libopus_write_header(), libschroedinger_decode_frame(), libspeex_decode_frame(), libvorbis_encode_init(), libx265_encode_frame(), ljpeg_decode_rgb_scan(), ljpeg_decode_yuv_scan(), ljpeg_encode_bgr(), ljpeg_encode_yuv_mb(), load_cursor(), load_input_picture(), load_ipmovie_packet(), loop_filter(), loopfilter_subblock(), luma_intra_pred_mode(), luma_mc(), lxf_read_header(), m4sl_cb(), mace_decode_frame(), main(), make_digest_auth(), matroska_decode_buffer(), matroska_parse_flac(), matroska_parse_frame(), matroska_parse_laces(), matroska_parse_tracks(), matroska_parse_wavpack(), mb_var_thread(), mc_dir_part(), mc_part_weighted(), md5_close(), md5_finish(), mdec_decode_block_intra(), median_predict(), merge(), mimic_decode_frame(), mix(), mjpeg2jpeg_filter(), mjpeg_decode_scan(), mjpeg_decode_scan_progressive_ac(), mjpega_dump_header(), mjpegb_decode_frame(), mkv_flush_dynbuf(), mkv_strip_wavpack(), mkv_write_ass_blocks(), mkv_write_block(), mkv_write_codecprivate(), mkv_write_simpletag(), mlp_parse(), mm_decode_frame(), motion_arg(), motion_compensation(), mov_create_chapter_track(), mov_flush_fragment(), mov_parse_stsd_video(), mov_parse_vc1_frame(), mov_read_chapters(), mov_read_cmov(), mov_read_custom(), mov_read_dvc1(), mov_read_extradata(), mov_read_ftyp(), mov_read_header(), mov_read_mac_string(), mov_read_packet(), mov_read_replaygain(), mov_read_sbgp(), mov_rewrite_dvd_sub_extradata(), mov_write_ac3_tag(), mov_write_dvc1_structs(), mov_write_dvc1_tag(), mov_write_isml_manifest(), mov_write_tfrf_tag(), mov_write_tfxd_tag(), mov_write_track_udta_tag(), mov_write_trailer(), mov_write_udta_tag(), mp3_read_probe(), mp3_write_trailer(), mp_decode_frame(), mp_decode_layer1(), mp_decode_layer3(), mp_yuv_to_rgb(), mpc7_decode_frame(), mpc7_decode_init(), mpc8_decode_frame(), mpc8_parse_seektable(), mpc8_probe(), mpc_probe(), mpeg1_decode_block_inter(), mpeg1_decode_block_intra(), mpeg1_fast_decode_block_inter(), mpeg2_decode_block_intra(), mpeg2_decode_block_non_intra(), mpeg2_fast_decode_block_intra(), mpeg2_fast_decode_block_non_intra(), mpeg4_decode_block(), mpeg4_encode_block(), mpeg4_get_block_length(), mpeg_decode_a53_cc(), mpeg_decode_frame(), mpeg_decode_postinit(), mpeg_decode_slice(), mpeg_decode_user_data(), mpeg_motion_internal(), mpeg_mux_write_packet(), mpegps_read_packet(), mpegps_read_pes_header(), mpegts_get_pcr(), mpegts_insert_null_packet(), mpegts_insert_pcr_only(), mpegts_push_data(), mpegts_raw_read_packet(), mpegts_read_header(), mpegts_write_packet_internal(), mpegts_write_pat(), mpegts_write_pes(), mpegts_write_pmt(), mpegts_write_sdt(), mpegts_write_section1(), mpegvideo_extract_headers(), mpjpeg_write_header(), mpjpeg_write_packet(), mpv_decode_mb_internal(), mpv_motion_internal(), msmpeg4v34_decode_mb(), msnwc_tcp_probe(), msrle_decode_8_16_24_32(), msrle_decode_frame(), mss1_decode_frame(), mss2_decode_frame(), mss3_decode_frame(), mss4_decode_dct_block(), mss4_decode_frame(), mss4_decode_image_block(), mss4_init_vlc(), msvideo1_decode_frame(), mszh_decomp(), mxf_decrypt_triplet(), mxf_get_d10_aes3_packet(), mxf_probe(), mxf_read_content_storage(), mxf_read_generic_descriptor(), mxf_read_material_package(), mxf_read_sequence(), mxf_read_source_package(), mxf_write_d10_audio_packet(), mxf_write_header(), mxf_write_multi_descriptor(), mxg_read_packet(), mxpeg_decode_frame(), mxpeg_decode_mxm(), nal_send(), nal_unit_extract_rbsp(), nsv_read_chunk(), nuv_packet(), nv12ToPlanarWrapper(), obmc_motion(), ogg_buffer_data(), ogg_build_flac_headers(), ogg_build_opus_headers(), ogg_build_speex_headers(), ogg_new_buf(), ogg_read_page(), ogg_write_header(), ogg_write_page(), ogg_write_vorbiscomment(), ogm_dshow_header(), ogm_header(), ogm_packet(), old_codec1(), old_codec37(), old_codec47(), old_dirac_header(), oma_read_header(), oma_read_probe(), on2avc_decode_frame(), open_input_file(), open_null_ctx(), open_output_file(), opt_filter_complex_script(), opus_decode_frame(), opus_decode_packet(), opus_flush_resample(), opus_header(), opus_init_resample(), opus_packet(), opus_rc_trimodel(), output_frame_end(), output_plane(), pack_yuv(), packedCopyWrapper(), packedtogbr24p(), paf_audio_decode(), paf_video_decode(), paint_mouse_pointer(), palToRgbWrapper(), pam_encode_frame(), parse_adts_frame_header(), parse_chunks(), parse_fmtp_config(), parse_fragment(), parse_media_type(), parse_nal_units(), parse_object_segment(), parse_packed_headers(), parse_packet(), parse_palette_segment(), parse_pcr(), parse_playlist(), parse_rps(), parse_setup_header(), parse_timecode(), parse_transform_color_indexing(), parse_waveformatex(), pat_cb(), pcm_bluray_decode_frame(), pcm_bluray_parse_header(), pcm_decode_frame(), pcm_dvd_decode_frame(), pcm_dvd_decode_samples(), pcm_encode_frame(), pcx_decode_frame(), pcx_encode_frame(), pcx_rle_encode(), picmemset(), picmemset_8bpp(), pix_abs16_xy2_c(), pix_abs16_y2_c(), pix_abs8_xy2_c(), pix_abs8_y2_c(), piz_uncompress(), planarCopyWrapper(), planarRgbToRgbWrapper(), planarToNv12Wrapper(), planarToUyvyWrapper(), planarToYuy2Wrapper(), pmt_cb(), png_choose_filter(), png_get_interlaced_row(), png_handle_row(), png_put_interlaced_row(), png_write_chunk(), pnm_decode_frame(), pnm_encode_frame(), pnm_parse(), pred16x16_tm_vp8_c(), pred4x4_tm_vp8_c(), pred8x8_tm_vp8_c(), pred_spatial_direct_motion(), pred_weight_table(), predictor(), prefetch_motion(), prefetch_ppc(), probe(), process_audio_header_elements(), process_block(), process_input(), process_output(), psy_3gpp_init(), psy_3gpp_window(), ptx_decode_frame(), put16(), put_cursor(), put_flac_codecpriv(), put_main_header(), put_mspel8_mc10_c(), put_mspel8_mc12_c(), put_mspel8_mc22_c(), put_mspel8_mc30_c(), put_mspel8_mc32_c(), put_obmc(), put_packet(), put_pixels8x8_overlapped(), put_signed_pixels_clamped_c(), put_str16(), put_swf_matrix(), put_swf_rect(), put_xiph_codecpriv(), putstr8(), pxr24_uncompress(), qcelp_decode_frame(), qcelp_free_context(), qcp_read_header(), qdm2_decode_frame(), qdm2_decode_init(), qdm2_parse_config(), qdm2_parse_packet(), qdm2_parse_subpacket(), qdm2_restore_block(), qpeg_decode_inter(), qpel_motion(), qtrle_decode_frame(), qtrle_encode_line(), queue_frames(), ra144_decode_frame(), ra144_encode_frame(), ra288_decode_frame(), raw_decode(), rd8x8_c(), read_access_unit(), read_arbitrary(), read_argb_line(), read_audio_mux_element(), read_block_types(), read_chapter(), read_code_table(), read_colors(), read_connect(), read_dcs(), read_decode_convert_and_store(), read_extra_header(), read_file(), read_frame(), read_gab2_sub(), read_header(), read_huffman_tables(), read_kuki_chunk(), read_motion_values(), read_mv_component(), read_old_huffman_tables(), read_packet(), read_patterns(), read_payload_length_info(), read_quant_table(), read_restart_header(), read_rgb24_component_line(), read_rle_sgi(), read_runs(), read_sbr_header(), read_sbr_invf(), read_seek(), read_shape_from_file(), read_tag(), read_tree(), read_ttag(), read_uncompressed_sgi(), read_xing_toc(), reconstruct_and_encode_image(), reconstruct_frame(), remove_extradata(), render_charset(), render_slice(), request_frame(), reset_block_bap(), residual_interp(), restore_median(), restore_median_il(), restore_rgb_planes(), restore_tqb_pixels(), rgb15to16(), rgb15to16_c(), rgb15to24(), rgb15to32(), rgb15to32_c(), rgb15tobgr24(), rgb15tobgr24_c(), rgb15tobgr32(), rgb16to15(), rgb16to15_c(), rgb16to24(), rgb16to32(), rgb16to32_c(), rgb16tobgr24(), rgb16tobgr24_c(), rgb16tobgr32(), rgb24to15(), rgb24to15_c(), rgb24to16(), rgb24to16_c(), rgb24tobgr15(), rgb24tobgr15_c(), rgb24tobgr16(), rgb24tobgr16_c(), rgb24tobgr24(), rgb24tobgr24_c(), rgb24tobgr32(), rgb24tobgr32_c(), rgb32to15(), rgb32to15_c(), rgb32to16(), rgb32to16_c(), rgb32tobgr15(), rgb32tobgr15_c(), rgb32tobgr16(), rgb32tobgr16_c(), rgb32tobgr24(), rgb32tobgr24_c(), rgb_to_yuv(), rgbToPlanarRgbWrapper(), rgbToRgbWrapper(), rl2_decode_frame(), rl2_decode_init(), rl2_rle_decode(), rle_uncompress(), rm_ac3_swap_bytes(), rm_write_audio(), rnd_table_init(), roq_decode_frame(), roq_dpcm_encode_frame(), roq_write_header(), rotate_luts(), rpza_decode_stream(), rtmp_calc_swf_verification(), rtmp_calc_swfhash(), rtmp_handshake(), rtmp_http_close(), rtmp_http_send_cmd(), rtmp_open(), rtmp_packet_read_one_chunk(), rtmp_server_handshake(), rtmp_validate_digest(), rtmp_write(), rtmpe8_sig(), rtp_asf_fix_header(), rtp_parse_one_packet(), rtp_write_packet(), rv10_decode_frame(), rv10_decode_init(), rv20_decode_picture_header(), rv30_loop_filter(), rv30_weak_loop_filter(), rv34_decode_inter_macroblock(), rv34_gen_vlc(), rv34_mc(), rv34_output_i16x16(), rv34_output_intra(), rv34_pred_4x4_block(), rv40_loop_filter(), rv40_loop_filter_strength(), rv40_weak_loop_filter(), s302m_decode_frame(), sad_hpel_motion_search(), sample_queue_retain(), sao_edge_filter_0(), sao_edge_filter_1(), sao_edge_filter_2(), sao_edge_filter_3(), sao_filter_CTB(), sap_fetch_packet(), sap_read_header(), scaling_list_data(), sdl_audio_callback(), sdp_parse_fmtp_config_h264(), sdt_cb(), send_invoke_response(), seqvideo_decode_frame(), set_bandwidth(), set_encoder_id(), set_mvs(), set_number(), set_param(), set_string_binary(), setup_partitions(), shall_we_drop(), shift_data(), shorten_decode_frame(), shuffle_bytes_2103(), shuffle_bytes_2103_c(), shuffleplanes_filter_frame(), silk_decode_excitation(), silk_decode_lpc(), sipr_decode_frame(), skeleton_header(), skip_bytes(), skip_check(), skip_hrd_parameters(), slice_decode_thread(), smacker_read_packet(), smc_decode_frame(), smka_decode_frame(), sp5x_decode_frame(), spdif_header_eac3(), spdif_probe(), speex_header(), store_icy(), str_probe(), sub_hfyu_median_pred_c(), sunrast_decode_frame(), sunrast_image_write_image(), svq1_decode_block_intra(), svq1_decode_block_non_intra(), svq1_decode_frame(), svq1_decode_frame_header(), svq1_decode_init(), svq1_encode_init(), svq1_encode_plane(), svq1_motion_inter_4v_block(), svq1_motion_inter_block(), svq1_parse_string(), svq1_skip_block(), svq3_decode_block(), svq3_decode_frame(), svq3_decode_init(), svq3_decode_mb(), svq3_decode_slice_header(), svq3_extradata_free(), svq3_mc_dir_part(), svq3_parse_packet(), swf_write_header(), sws_scale(), swscale(), sync(), synchronize_audio(), synth_block_fcb_acb(), tak_decode_frame(), tak_parse(), tak_read_header(), targa_decode_rle(), targa_encode_frame(), targa_encode_normal(), targa_encode_rle(), tget(), tgq_decode_block(), tgq_decode_frame(), tgq_decode_init(), tgq_idct_put_mb(), tgq_idct_put_mb_dconly(), tgv_decode_frame(), tgv_decode_inter(), theora_header(), tiff_unpack_fax(), tm2_decode_blocks(), tmv_decode_frame(), to_meta_with_crop(), tqi_decode_frame(), tqi_idct_put(), truemotion1_decode_frame(), truemotion1_decode_header(), truespeech_decode_frame(), tscc2_decode_frame(), tta_decode_frame(), tta_probe(), txd_decode_frame(), ulti_convert_yuv(), ulti_decode_frame(), ulti_grad(), ulti_pattern(), unescape(), uninit_options(), unpack(), unpack_parse_unit(), update_md5_sum(), update_size(), upsample_plane_c(), usePal(), utvideo_encode_frame(), uyvyToYuv420Wrapper(), uyvyToYuv422Wrapper(), v410_decode_frame(), v410_encode_frame(), v_block_filter(), vaapi_vc1_start_frame(), vb_decode_framedata(), vble_decode_frame(), vble_read_reverse_unary(), vble_restore_plane(), vc1_apply_p_h_loop_filter(), vc1_apply_p_v_loop_filter(), vc1_decode_frame(), vc1_decode_i_block(), vc1_decode_i_block_adv(), vc1_decode_i_blocks(), vc1_decode_i_blocks_adv(), vc1_decode_init(), vc1_interp_mc(), vc1_mc_1mv(), vc1_mc_4mv_chroma(), vc1_mc_4mv_chroma4(), vc1_mc_4mv_luma(), vc1_pack_bitplanes(), vc1_parse(), vc1_pred_b_mv(), vcr1_decode_frame(), vda_h264_end_frame(), vda_retrieve_data(), vdpau_get_buffer(), vdpau_retrieve_data(), verify_md5(), very_broken_op(), video_decode_example(), video_encode_example(), vmdaudio_decode_frame(), vmdvideo_decode_frame(), vorbis_decode_frame(), vorbis_decode_init(), vorbis_encode_init(), vorbis_header(), vorbis_packet(), vorbis_parse_audio_packet(), vorbis_parse_setup_hdr_codebooks(), vorbis_parse_setup_hdr_residues(), vorbis_residue_decode_internal(), vp3_decode_frame(), vp3_dequant(), vp3_init_thread_copy(), vp56_mc(), vp56_parse_mb_type(), vp5_parse_coeff(), vp5_parse_coeff_models(), vp6_filter_diag2(), vp6_parse_coeff(), vp6_parse_coeff_huffman(), vp6_parse_vector_adjustment(), vp7_decode_mvs(), vp8_decode_mb_row_no_filter(), vp8_decode_mvs(), vp8_filter_mb_row(), vp8_free_buffer(), vp8_lossy_decode_alpha(), vp8_mc_chroma(), vp8_mc_luma(), vp9_decode_packet(), vqf_read_header(), vu9_to_vu12(), vu9_to_vu12_c(), wavpack_decode_block(), wavpack_decode_frame(), wc3_read_header(), wc3_read_packet(), wma_decode_init(), wma_decode_superframe(), wmavoice_init_static_data(), wmv2_decode_inter_block(), wmv2_mspel8_h_lowpass(), wmv2_mspel8_v_lowpass(), write_back_motion(), write_back_motion_list(), write_back_non_zero_count(), write_chapter(), write_codebooks(), write_element(), write_escape_str(), write_extradata(), write_frame(), write_globalinfo(), write_header(), write_headers(), write_mb_info(), write_option(), write_quant_table(), write_status(), write_streaminfo(), write_utf8(), write_video_frame(), ws_snd_decode_frame(), wtvfile_open2(), wtvfile_open_sector(), X264_init(), x8_decode_intra_mb(), x8_get_ac_rlf(), x8_setup_spatial_compensation(), x8_setup_spatial_predictor(), xan_decode_chroma(), xan_decode_frame(), xan_decode_frame_type0(), xan_decode_frame_type1(), xan_unpack(), xan_unpack_luma(), xan_wc3_decode_frame(), XAVS_init(), xbm_decode_frame(), xbm_encode_frame(), xchg_mb_border(), xiph_parse_fmtp_pair(), xmv_process_packet_header(), xsub_encode(), xwd_decode_frame(), xwd_encode_frame(), yop_copy_previous_block(), yuv2mono_1_c_template(), yuv2mono_2_c_template(), yuv2mono_X_c_template(), yuv2nv12cX_c(), yuv2rgb_write(), yuv2yuyv422_1(), yuv420_bgr32(), yuv420_rgb32(), yuv422pToUyvyWrapper(), yuv422pToYuy2Wrapper(), yuv4_write_packet(), yuv_a_to_rgba(), yuv_to_rgba(), yuvPlanartouyvy_c(), yuvPlanartoyuy2_c(), yuy2toyv12(), yuyvToYuv420Wrapper(), yuyvToYuv422Wrapper(), yvu9_to_yuy2(), yvu9_to_yuy2_c(), ZERO8x2(), zerocodec_decode_frame(), zmbv_decode_intra(), zmbv_decode_xor_16(), zmbv_decode_xor_32(), and zmbv_decode_xor_8().

§ dc

uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t, (*(const uint8_t *)pi - 0x80) * (1.0f / (1 << 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t, (*(const uint8_t *)pi - 0x80) * (1.0 / (1 << 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t, (*(const int16_t *)pi >> 8) + 0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *)pi * (1.0f / (1 << 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *)pi * (1.0 / (1 << 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t, (*(const int32_t *)pi >> 24) + 0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *)pi * (1.0f / (1U << 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *)pi * (1.0 / (1U << 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8( lrintf(*(const float *)pi * (1 << 7)) + 0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16( lrintf(*(const float *)pi * (1 << 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *)pi * (1U << 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8( lrint(*(const double *)pi * (1 << 7)) + 0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16( lrint(*(const double *)pi * (1 << 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *)pi * (1U << 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if (!*ac) return; ff_dither_free(&(*ac)->dc); av_freep(ac); } AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac; int in_planar, out_planar; ac = av_mallocz(sizeof(*ac)); if (!ac) return NULL; ac->avr = avr; ac->out_fmt = out_fmt; ac->in_fmt = in_fmt; ac->channels = channels; ac->apply_map = apply_map; if (avr->dither_method != AV_RESAMPLE_DITHER_NONE && av_get_packed_sample_fmt(out_fmt) == AV_SAMPLE_FMT_S16 && av_get_bytes_per_sample(in_fmt) > 2) { ac->dc = ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map); if (!ac->dc) { av_free(ac); return NULL; } return ac; } in_planar = ff_sample_fmt_is_planar(in_fmt, channels); out_planar = ff_sample_fmt_is_planar(out_fmt, channels); if (in_planar == out_planar) { ac->func_type = CONV_FUNC_TYPE_FLAT; ac->planes = in_planar ? ac->channels : 1; } else if (in_planar) ac->func_type = CONV_FUNC_TYPE_INTERLEAVE; else ac->func_type = CONV_FUNC_TYPE_DEINTERLEAVE; set_generic_function(ac); if (ARCH_AARCH64) ff_audio_convert_init_aarch64(ac); if (ARCH_ARM) ff_audio_convert_init_arm(ac); if (ARCH_X86) ff_audio_convert_init_x86(ac); return ac; } int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic = 1; int len = in->nb_samples; int p; if (ac->dc) { av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt)); return ff_convert_dither(ac-> dc

§ out

uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t, (*(const uint8_t *)pi - 0x80) * (1.0f / (1 << 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t, (*(const uint8_t *)pi - 0x80) * (1.0 / (1 << 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t, (*(const int16_t *)pi >> 8) + 0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *)pi * (1.0f / (1 << 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *)pi * (1.0 / (1 << 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t, (*(const int32_t *)pi >> 24) + 0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *)pi * (1.0f / (1U << 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *)pi * (1.0 / (1U << 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8( lrintf(*(const float *)pi * (1 << 7)) + 0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16( lrintf(*(const float *)pi * (1 << 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *)pi * (1U << 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8( lrint(*(const double *)pi * (1 << 7)) + 0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16( lrint(*(const double *)pi * (1 << 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *)pi * (1U << 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if (!*ac) return; ff_dither_free(&(*ac)->dc); av_freep(ac); } AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac; int in_planar, out_planar; ac = av_mallocz(sizeof(*ac)); if (!ac) return NULL; ac->avr = avr; ac->out_fmt = out_fmt; ac->in_fmt = in_fmt; ac->channels = channels; ac->apply_map = apply_map; if (avr->dither_method != AV_RESAMPLE_DITHER_NONE && av_get_packed_sample_fmt(out_fmt) == AV_SAMPLE_FMT_S16 && av_get_bytes_per_sample(in_fmt) > 2) { ac->dc = ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map); if (!ac->dc) { av_free(ac); return NULL; } return ac; } in_planar = ff_sample_fmt_is_planar(in_fmt, channels); out_planar = ff_sample_fmt_is_planar(out_fmt, channels); if (in_planar == out_planar) { ac->func_type = CONV_FUNC_TYPE_FLAT; ac->planes = in_planar ? ac->channels : 1; } else if (in_planar) ac->func_type = CONV_FUNC_TYPE_INTERLEAVE; else ac->func_type = CONV_FUNC_TYPE_DEINTERLEAVE; set_generic_function(ac); if (ARCH_AARCH64) ff_audio_convert_init_aarch64(ac); if (ARCH_ARM) ff_audio_convert_init_arm(ac); if (ARCH_X86) ff_audio_convert_init_x86(ac); return ac; } int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic = 1; int len = in->nb_samples; int p; if (ac->dc) { av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt)); return ff_convert_dither(ac-> out

Definition at line 194 of file audio_convert.c.

Referenced by anti_sparseness(), av_base64_decode(), av_base64_encode(), av_get_token(), av_hmac_calc(), av_mlfg_get(), avs_decode_frame(), cdg_scroll(), cdxl_decode_ham6(), cdxl_decode_ham8(), clear_index_entries(), cmdutils_read_file(), copy_moof(), dc1394_read_common(), dca_subframe_footer(), decode_frame(), decode_ics(), decode_postinit(), decode_residual_spectrum(), decorrelation(), doTest(), dpcm_decode_frame(), dump_attachment(), evaluate_lls(), f_func(), ff_avc_find_startcode(), ff_avc_write_annexb_extradata(), ff_filter_frame(), ff_get_cpu_flags_ppc(), ff_ref_fdct(), ff_ref_idct(), ff_rle_encode(), ff_srtp_encrypt(), ff_twinvq_decode_frame(), ff_yuv2rgb_init_tables_ppc(), fft_ref(), filter(), filter_frame(), find_header_idx(), flac_decorrelate_indep_c(), flac_decorrelate_ls_c(), flac_decorrelate_ms_c(), flac_decorrelate_rs_c(), g723_1_decode_frame(), grab_read_header(), gxf_resync_media(), h264_decode_frame(), h264_extradata_to_annexb(), huf_decode(), hybrid2_re(), hybrid4_8_12_cx(), hybrid6_cx(), imdct_and_window(), imdct_and_windowing(), imdct_and_windowing_eld(), imdct_and_windowing_ld(), ir2_decode_plane(), ir2_decode_plane_inter(), jpg_decode_data(), log16(), md5_close(), mjpeg2jpeg_filter(), mjpeg_decode_app(), mss4_decode_dct_block(), mxf_interleave_get_packet(), on2avc_reconstruct_channel(), on2avc_reconstruct_stereo(), open_output_file(), opus_decode_packet(), output_buffer(), output_client_manifest(), output_server_manifest(), paf_video_decode(), piz_uncompress(), pmt_cb(), pretwiddle(), ps_hybrid_analysis_c(), ps_hybrid_analysis_ileave_c(), put_main_header(), pxr24_uncompress(), qdm2_calculate_fft(), qdm2_decode_frame(), r3d_read_header(), ra288_decode_frame(), read_tree(), return_audio_frame(), rl2_rle_decode(), roq_dpcm_encode_frame(), sbr_make_f_tablelim(), set_side_data(), targa_encode_frame(), targa_encode_normal(), targa_encode_rle(), WINDOW_FUNC(), write_abst(), write_fragment(), write_manifest(), x11grab_read_header(), zmbv_decode_xor_16(), zmbv_decode_xor_32(), and zmbv_decode_xor_8().

§ in

uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t, (*(const uint8_t *)pi - 0x80) * (1.0f / (1 << 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t, (*(const uint8_t *)pi - 0x80) * (1.0 / (1 << 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t, (*(const int16_t *)pi >> 8) + 0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *)pi * (1.0f / (1 << 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *)pi * (1.0 / (1 << 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t, (*(const int32_t *)pi >> 24) + 0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *)pi * (1.0f / (1U << 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *)pi * (1.0 / (1U << 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8( lrintf(*(const float *)pi * (1 << 7)) + 0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16( lrintf(*(const float *)pi * (1 << 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *)pi * (1U << 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8( lrint(*(const double *)pi * (1 << 7)) + 0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16( lrint(*(const double *)pi * (1 << 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *)pi * (1U << 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if (!*ac) return; ff_dither_free(&(*ac)->dc); av_freep(ac); } AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac; int in_planar, out_planar; ac = av_mallocz(sizeof(*ac)); if (!ac) return NULL; ac->avr = avr; ac->out_fmt = out_fmt; ac->in_fmt = in_fmt; ac->channels = channels; ac->apply_map = apply_map; if (avr->dither_method != AV_RESAMPLE_DITHER_NONE && av_get_packed_sample_fmt(out_fmt) == AV_SAMPLE_FMT_S16 && av_get_bytes_per_sample(in_fmt) > 2) { ac->dc = ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map); if (!ac->dc) { av_free(ac); return NULL; } return ac; } in_planar = ff_sample_fmt_is_planar(in_fmt, channels); out_planar = ff_sample_fmt_is_planar(out_fmt, channels); if (in_planar == out_planar) { ac->func_type = CONV_FUNC_TYPE_FLAT; ac->planes = in_planar ? ac->channels : 1; } else if (in_planar) ac->func_type = CONV_FUNC_TYPE_INTERLEAVE; else ac->func_type = CONV_FUNC_TYPE_DEINTERLEAVE; set_generic_function(ac); if (ARCH_AARCH64) ff_audio_convert_init_aarch64(ac); if (ARCH_ARM) ff_audio_convert_init_arm(ac); if (ARCH_X86) ff_audio_convert_init_x86(ac); return ac; } int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic = 1; int len = in->nb_samples; int p; if (ac->dc) { av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt)); return ff_convert_dither(ac-> in

§ else

else

Definition at line 382 of file audio_convert.c.

§ return

return

Definition at line 415 of file audio_convert.c.