#include <config.h>
#include "lame.h"
#include "machine.h"
#include "encoder.h"
#include "util.h"
#include "lame_global_flags.h"
Include dependency graph for util.c:
Go to the source code of this file.
Defines | |
#define | PRECOMPUTE |
#define | ABS(A) (((A)>0) ? (A) : -(A)) |
Functions | |
void | free_id3tag (lame_internal_flags *const gfc) |
void | freegfc (lame_internal_flags *const gfc) |
void | malloc_aligned (aligned_pointer_t *ptr, unsigned int size, unsigned int bytes) |
void | free_aligned (aligned_pointer_t *ptr) |
FLOAT | ATHformula_GB (FLOAT f, FLOAT value) |
FLOAT | ATHformula (FLOAT f, lame_global_flags const *gfp) |
FLOAT | freq2bark (FLOAT freq) |
FLOAT | freq2cbw (FLOAT freq) |
int | FindNearestBitrate (int bRate, int version, int samplerate) |
int | nearestBitrateFullIndex (const int bitrate) |
int | map2MP3Frequency (int freq) |
int | BitrateIndex (int bRate, int version, int samplerate) |
int | SmpFrqIndex (int sample_freq, int *const version) |
static FLOAT | blackman (FLOAT x, FLOAT fcn, int l) |
int | gcd (int i, int j) |
void | fill_buffer (lame_global_flags const *gfp, sample_t *mfbuf[2], sample_t const *in_buffer[2], int nsamples, int *n_in, int *n_out) |
int | fill_buffer_resample (lame_global_flags const *gfp, sample_t *outbuf, int desired_len, sample_t const *inbuf, int len, int *num_used, int ch) |
void | lame_debugf (const lame_internal_flags *gfc, const char *format,...) |
void | lame_msgf (const lame_internal_flags *gfc, const char *format,...) |
void | lame_errorf (const lame_internal_flags *gfc, const char *format,...) |
int | has_MMX (void) |
int | has_3DNow (void) |
int | has_SSE (void) |
int | has_SSE2 (void) |
void | disable_FPE (void) |
void | init_log_table (void) |
#define ABS | ( | A | ) | (((A)>0) ? (A) : -(A)) |
FLOAT ATHformula | ( | FLOAT | f, | |
lame_global_flags const * | gfp | |||
) |
Definition at line 226 of file util.c.
References lame_global_struct::ATHcurve, ATHformula_GB(), lame_global_struct::ATHtype, and gfp.
Referenced by ATHmdct().
Here is the call graph for this function:
int BitrateIndex | ( | int | bRate, | |
int | version, | |||
int | samplerate | |||
) |
Definition at line 392 of file util.c.
References bitrate_table, and i.
Referenced by lame_init_params(), and PutVbrTag().
void disable_FPE | ( | void | ) |
void fill_buffer | ( | lame_global_flags const * | gfp, | |
sample_t * | mfbuf[2], | |||
sample_t const * | in_buffer[2], | |||
int | nsamples, | |||
int * | n_in, | |||
int * | n_out | |||
) |
Definition at line 508 of file util.c.
References lame_internal_flags::channels_out, fill_buffer_resample(), lame_global_struct::framesize, gfc, gfp, i, lame_global_struct::internal_flags, lame_internal_flags::mf_size, Min, and lame_internal_flags::resample_ratio.
Here is the call graph for this function:
int fill_buffer_resample | ( | lame_global_flags const * | gfp, | |
sample_t * | outbuf, | |||
int | desired_len, | |||
sample_t const * | inbuf, | |||
int | len, | |||
int * | num_used, | |||
int | ch | |||
) |
Definition at line 537 of file util.c.
References lame_internal_flags::blackfilt, blackman(), BPC, lame_internal_flags::fill_buffer_resample_init, gcd(), gfc, gfp, i, lame_global_struct::in_samplerate, lame_internal_flags::inbuf_old, lame_global_struct::internal_flags, lame_internal_flags::itime, Min, lame_global_struct::out_samplerate, lame_global_struct::quality, and lame_internal_flags::resample_ratio.
Referenced by fill_buffer().
Here is the call graph for this function:
int FindNearestBitrate | ( | int | bRate, | |
int | version, | |||
int | samplerate | |||
) |
Definition at line 274 of file util.c.
References ABS, bitrate_table, and i.
Referenced by lame_init_params().
void free_aligned | ( | aligned_pointer_t * | ptr | ) |
Definition at line 168 of file util.c.
References aligned_pointer_t::aligned, and aligned_pointer_t::pointer.
void free_id3tag | ( | lame_internal_flags *const | gfc | ) |
Definition at line 49 of file util.c.
References id3tag_spec::album, id3tag_spec::albumart, id3tag_spec::albumart_mimetype, id3tag_spec::albumart_size, id3tag_spec::artist, id3tag_spec::comment, id3tag_spec::genre_id3v2, gfc, i, MIMETYPE_NONE, id3tag_spec::num_values, lame_internal_flags::tag_spec, id3tag_spec::title, id3tag_spec::track_id3v2, and id3tag_spec::values.
Referenced by id3tag_init().
void freegfc | ( | lame_internal_flags *const | gfc | ) |
Definition at line 95 of file util.c.
References lame_internal_flags::blackfilt, BPC, gfc, and i.
Referenced by lame_close(), and lame_init_params().
int gcd | ( | int | i, | |
int | j | |||
) |
int has_3DNow | ( | void | ) |
int has_MMX | ( | void | ) |
int has_SSE | ( | void | ) |
int has_SSE2 | ( | void | ) |
void init_log_table | ( | void | ) |
void lame_debugf | ( | const lame_internal_flags * | gfc, | |
const char * | format, | |||
... | ||||
) |
Definition at line 673 of file util.c.
References lame_internal_flags::debugf, gfc, and lame_internal_flags::report.
void lame_errorf | ( | const lame_internal_flags * | gfc, | |
const char * | format, | |||
... | ||||
) |
Definition at line 711 of file util.c.
References lame_internal_flags::errorf, gfc, and lame_internal_flags::report.
void lame_msgf | ( | const lame_internal_flags * | gfc, | |
const char * | format, | |||
... | ||||
) |
Definition at line 692 of file util.c.
References gfc, lame_internal_flags::msgf, and lame_internal_flags::report.
void malloc_aligned | ( | aligned_pointer_t * | ptr, | |
unsigned int | size, | |||
unsigned int | bytes | |||
) |
Definition at line 152 of file util.c.
References aligned_pointer_t::aligned, and aligned_pointer_t::pointer.
int map2MP3Frequency | ( | int | freq | ) |
int nearestBitrateFullIndex | ( | const int | bitrate | ) |
Definition at line 316 of file util.c.
References bitrate_table, and Max.
Referenced by apply_abr_preset(), and optimum_bandwidth().
int SmpFrqIndex | ( | int | sample_freq, | |
int *const | version | |||
) |