29 #include "libavutil/adler32.h"
30 #include "libavutil/attributes.h"
31 #include "libavutil/channel_layout.h"
32 #include "libavutil/common.h"
33 #include "libavutil/downmix_info.h"
34 #include "libavutil/intreadwrite.h"
35 #include "libavutil/mem.h"
36 #include "libavutil/replaygain.h"
37 #include "libavutil/samplefmt.h"
101 if (sd->
size <
sizeof(*di)) {
117 "surround %f (%f ltrt) - lfe %f",
126 if (gain == INT32_MIN)
148 if (sd->
size <
sizeof(*rg)) {
169 char chlayout_str[128];
170 uint32_t checksum = 0;
174 int data_size = buf->
nb_samples * block_align;
175 int planes = planar ? channels : 1;
178 for (i = 0; i < planes; i++) {
190 "n:%"PRIu64
" pts:%"PRId64
" pts_time:%f "
191 "fmt:%s chlayout:%s rate:%d nb_samples:%d "
192 "checksum:%08"PRIX32
" ",
199 for (i = 0; i < planes; i++)
This structure describes decoded (raw) audio or video data.
const char * name
Filter name.
void * priv
private data for use by the filter
#define AV_LOG_WARNING
Something somehow does not look correct.
static const AVFilterPad outputs[]
static void dump_replaygain(AVFilterContext *ctx, AVFrameSideData *sd)
double center_mix_level_ltrt
Absolute scale factor representing the nominal level of the center channel during an Lt/Rt compatible...
uint8_t ** extended_data
pointers to the data planes/channels.
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
uint32_t track_peak
Peak track amplitude, with 100000 representing full scale (but values may overflow).
void av_freep(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
const char * av_get_sample_fmt_name(enum AVSampleFormat sample_fmt)
Return the name of sample_fmt, or NULL if sample_fmt is not recognized.
unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf, unsigned int len) av_pure
Calculate the Adler32 checksum of a buffer.
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
static double av_q2d(AVRational a)
Convert rational to double.
double surround_mix_level_ltrt
Absolute scale factor representing the nominal level of the surround channels during an Lt/Rt compati...
AVFrameSideData ** side_data
Lt/Rt 2-channel downmix, Dolby Pro Logic II compatible.
Metadata relevant to a downmix procedure.
int32_t album_gain
Same as track_gain, but for the whole album.
double lfe_mix_level
Absolute scale factor representing the level at which the LFE data is mixed into L/R channels during ...
int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
Check if the sample format is planar.
static void print_gain(AVFilterContext *ctx, const char *str, int32_t gain)
This structure describes optional metadata relevant to a downmix procedure.
A link between two filters.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the channel layout.
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
uint64_t channel_layout
Channel layout of the audio data.
static int config_input(AVFilterLink *inlink)
Lt/Rt 2-channel downmix, Dolby Surround compatible.
static void dump_downmix(AVFilterContext *ctx, AVFrameSideData *sd)
void * av_malloc(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static void print_peak(AVFilterContext *ctx, const char *str, uint32_t peak)
Lo/Ro 2-channel downmix (Stereo).
uint64_t frame
Frame counter.
static av_cold void uninit(AVFilterContext *ctx)
AVFrame * ff_null_get_audio_buffer(AVFilterLink *link, int nb_samples)
get_audio_buffer() handler for filters which simply pass audio along
static void dump_matrixenc(AVFilterContext *ctx, AVFrameSideData *sd)
Main libavfilter public API header.
AVFilterLink ** outputs
array of pointers to output links
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
uint32_t * plane_checksums
Scratch space for individual plane checksums for planar audio.
#define AV_LOG_INFO
Standard information.
double surround_mix_level
Absolute scale factor representing the nominal level of the surround channels during a regular downmi...
int sample_rate
Sample rate of the audio data.
static const AVFilterPad inputs[]
AVFilterContext * dst
dest filter
enum AVFrameSideDataType type
int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt)
Return number of bytes per sample.
uint64_t channel_layout
channel layout of current buffer (see libavutil/channel_layout.h)
struct AVFilterPad AVFilterPad
uint32_t album_peak
Same as track_peak, but for the whole album,.
double center_mix_level
Absolute scale factor representing the nominal level of the center channel during a regular downmix...
static void dump_unknown(AVFilterContext *ctx, AVFrameSideData *sd)
int32_t track_gain
Track replay gain in microbels (divide by 100000 to get the value in dB).
ReplayGain information in the form of the AVReplayGain struct.
ReplayGain information (see http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification).
int nb_samples
number of audio samples (per channel) described by this frame
The data is the AVMatrixEncoding enum defined in libavutil/channel_layout.h.
enum AVDownmixType preferred_downmix_type
Type of downmix preferred by the mastering engineer.
void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout)
Return a description of a channel layout.