#include <stdint.h>#include <stdio.h>#include "libavutil/avstring.h"#include "libavutil/common.h"#include "libavutil/lfg.h"#include "libavutil/libm.h"#include "libavutil/log.h"#include "libavutil/mem.h"#include "libavutil/opt.h"#include "libavutil/samplefmt.h"#include "avresample.h"Go to the source code of this file.
Defines | |
| #define | PUT_FUNC(name, fmt, type, expr) | 
| #define | PUT_SAMPLE put_sample(data, sample_fmt, channels, k, ch, v); | 
Functions | |
| static double | dbl_rand (AVLFG *lfg) | 
| PUT_FUNC (u8, AV_SAMPLE_FMT_U8, uint8_t, av_clip_uint8(lrint(v_dbl *(1<< 7))+128)) | |
| static void | audiogen (AVLFG *rnd, void **data, enum AVSampleFormat sample_fmt, int channels, int sample_rate, int nb_samples) | 
| int | main (int argc, char **argv) | 
Variables | |
| static enum AVSampleFormat | formats [] | 
| static const int | rates [] | 
| static const uint64_t | layouts [] | 
Value:
static void put_sample_ ## name(void **data, enum AVSampleFormat sample_fmt,\ int channels, int sample, int ch, \ double v_dbl) \ { \ type v = expr; \ type **out = (type **)data; \ if (av_sample_fmt_is_planar(sample_fmt)) \ out[ch][sample] = v; \ else \ out[0][sample * channels + ch] = v; \ }
Definition at line 40 of file avresample-test.c.
| #define PUT_SAMPLE put_sample(data, sample_fmt, channels, k, ch, v); | 
Referenced by audiogen().
| static void audiogen | ( | AVLFG * | rnd, | |
| void ** | data, | |||
| enum AVSampleFormat | sample_fmt, | |||
| int | channels, | |||
| int | sample_rate, | |||
| int | nb_samples | |||
| ) |  [static] | 
        
| static double dbl_rand | ( | AVLFG * | lfg | ) |  [static] | 
        
Definition at line 35 of file avresample-test.c.
Definition at line 188 of file avresample-test.c.
| PUT_FUNC | ( | u8 | , | |
| AV_SAMPLE_FMT_U8 | , | |||
| uint8_t | , | |||
| av_clip_uint8(lrint(v_dbl *(1<< 7))+128) | ||||
| ) | 
Definition at line 53 of file avresample-test.c.
enum AVSampleFormat formats[] [static]           | 
        
Initial value:
 {
    AV_SAMPLE_FMT_S16,
    AV_SAMPLE_FMT_FLTP,
    AV_SAMPLE_FMT_S16P,
    AV_SAMPLE_FMT_FLT,
    AV_SAMPLE_FMT_S32P,
    AV_SAMPLE_FMT_S32,
    AV_SAMPLE_FMT_U8P,
    AV_SAMPLE_FMT_U8,
    AV_SAMPLE_FMT_DBLP,
    AV_SAMPLE_FMT_DBL,
}
Definition at line 162 of file avresample-test.c.
Referenced by asink_query_formats(), avfilter_make_format64_list(), ff_add_format(), ff_formats_unref(), ff_make_format_list(), ff_merge_formats(), ff_merge_samplerates(), ff_set_common_samplerates(), filter_query_formats(), main(), make_format_list(), and query_formats().
Initial value:
Definition at line 181 of file avresample-test.c.
Referenced by asink_query_formats(), ff_mov_get_channel_layout_tag(), ff_mov_write_chan(), join_query_formats(), main(), and query_formats().
Initial value:
 {
    48000,
    44100,
    16000
}
Definition at line 175 of file avresample-test.c.
Referenced by get_wb_bitrate_mode(), main(), and query_formats().
 1.5.8