#include <stdio.h>#include <stdlib.h>#include <string.h>#include "common.h"#include "encoder.h"#include "musicin.h"#include "options.h"#include "audio_read.h"#include "bitstream.h"#include "mem.h"#include "crc.h"#include "psycho_n1.h"#include "psycho_0.h"#include "psycho_1.h"#include "psycho_2.h"#include "psycho_3.h"#include "psycho_4.h"#include "encode.h"#include "availbits.h"#include "subband.h"#include "encode_new.h"#include "toolame.h"#include <assert.h>

Go to the source code of this file.
Functions | |
| void | toolame_init_buffers () |
| int | toolame_send_buffer (char *data, int bytes) |
| int | toolame_buffer_read (char *dst, int size, int n) |
| void | global_init (void) |
| int | toolame (int argc, char **argv) |
| void | print_config (frame_info *frame, int *psy, char *inPath, char *outPath) |
| void | usage (void) |
| void | short_usage (void) |
| void | proginfo (void) |
| void | parse_args (int argc, char **argv, frame_info *frame, int *psy, unsigned long *num_samples, char inPath[MAX_NAME_SIZE], char outPath[MAX_NAME_SIZE]) |
| void | smr_dump (double smr[2][SBLIMIT], int nch) |
Variables | |
| FILE * | musicin |
| Bit_stream_struc | bs |
| char * | programName |
| char | toolameversion [10] = "0.2l" |
| pthread_mutex_t | toolame_input_lock |
| pthread_mutex_t | toolame_output_lock |
| char * | toolame_buffer = 0 |
| int | toolame_buffer_bytes = 0 |
| int | toolame_error = 0 |
| int | toolame_eof = 0 |
| int | frameNum = 0 |
| void global_init | ( | void | ) |
Definition at line 140 of file toolame.c.
References options::athlevel, options::byteswap, options::channelswap, options::downmix, FALSE, glopts, options::quickcount, options::quickmode, TRUE, options::usepadbit, options::usepsy, options::vbr, options::vbrlevel, and options::verbosity.
| void parse_args | ( | int | argc, | |
| char ** | argv, | |||
| frame_info * | frame, | |||
| int * | psy, | |||
| unsigned long * | num_samples, | |||
| char | inPath[MAX_NAME_SIZE], | |||
| char | outPath[MAX_NAME_SIZE] | |||
| ) |
Definition at line 754 of file toolame.c.
References options::athlevel, bitrate, frame_header::bitrate_index, BUFFER_SIZE, options::byteswap, c, options::channelswap, frame_header::copyright, options::dab, frame_header::dab_extension, frame_header::dab_length, DFLT_EMP, DFLT_EXT, DFLT_LAY, DFLT_MOD, DFLT_PSY, DFLT_SFQ, options::downmix, frame_header::emphasis, frame_header::error_protection, FALSE, FLOAT, fopen(), fprintf, glopts, frame_info::header, header, frame_header::lay, MAX_U_32_NUM, frame_header::mode, frame_header::mode_ext, MPG_MD_DUAL_CHANNEL, MPG_MD_JOINT_STEREO, MPG_MD_MONO, MPG_MD_STEREO, musicin, new_ext(), NULL, open_bit_stream_w(), frame_header::original, frame_header::padding, parse_input_file(), programName, options::quickcount, options::quickmode, frame_header::sampling_frequency, toolame_BitrateIndex(), toolame_SmpFrqIndex(), TRUE, usage(), options::usepadbit, options::usepsy, options::vbr, options::vbrlevel, options::verbosity, and frame_header::version.
Referenced by toolame().

| void print_config | ( | frame_info * | frame, | |
| int * | psy, | |||
| char * | inPath, | |||
| char * | outPath | |||
| ) |
Definition at line 590 of file toolame.c.
References options::athlevel, bitrate, frame_header::bitrate_index, options::byteswap, options::channelswap, frame_header::copyright, options::dab, frame_header::emphasis, frame_header::error_protection, fprintf, glopts, frame_info::header, header, frame_header::mode, frame_header::mode_ext, mode_names, MPG_MD_JOINT_STEREO, frame_header::original, s_freq, frame_header::sampling_frequency, TRUE, options::usepadbit, options::vbr, options::vbrlevel, options::verbosity, frame_header::version, and version_names.
Referenced by toolame().
| void short_usage | ( | void | ) |
Definition at line 698 of file toolame.c.
References fprintf, programName, and toolameversion.
Referenced by toolame().
| void smr_dump | ( | double | smr[2][SBLIMIT], | |
| int | nch | |||
| ) |
| int toolame | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 201 of file toolame.c.
References frame_info::actual_mode, frame_info::alloc, available_bits(), bit_alloc(), bitrate, bit_stream_struc::buf, bit_stream_struc::buf_byte_idx, bit_stream_struc::buf_size, close_bit_stream_w(), combine_LR(), combine_LR_new(), CRC_calc(), CRC_calcDAB(), frame_header::dab_extension, frame_header::dab_length, encode_bit_alloc(), encode_CRC(), encode_info(), encode_scale(), frame_header::error_protection, frame_header::extension, filter_subband(), find_sf_max(), FLOAT, fprintf, frameNum, get_audio(), global_init(), glopts, HAN_SIZE, hdr_to_frps(), frame_info::header, header, main_bit_allocation(), main_bit_allocation_new(), MAX_NAME_SIZE, mem_alloc(), MINIMUM, minimum, model, MPEG_AUDIO_ID, MPG_MD_JOINT_STEREO, musicin, frame_info::nch, NULL, parse_args(), pick_scale(), print_config(), programName, psycho_0(), psycho_1(), psycho_2(), psycho_3(), psycho_4(), psycho_n1(), put1bit(), putbits(), options::quickcount, options::quickmode, s_freq, sample_encoding(), frame_header::sampling_frequency, frame_info::sblimit, SBLIMIT, SCALE_BLOCK, scale_factor_calc(), scalefactor_calc_new(), sf_transmission_pattern(), short_usage(), smr_dump(), sstell(), subband_quantization(), subband_quantization_new(), frame_info::tab_num, toolame_error, toolame_output_lock, transmission_pattern(), TRUE, options::vbr, vbrstats, vbrstats_new, options::verbosity, frame_header::version, window_subband(), WindowFilterSubband(), write_bit_alloc(), write_header(), write_samples_new(), and write_scalefactors().
Referenced by FileMPEGAudio::run().

| int toolame_buffer_read | ( | char * | dst, | |
| int | size, | |||
| int | n | |||
| ) |
Definition at line 95 of file toolame.c.
References memcpy, toolame_buffer, toolame_buffer_bytes, toolame_eof, toolame_error, toolame_input_lock, and toolame_output_lock.
Referenced by read_samples().
| void toolame_init_buffers | ( | ) |
Definition at line 42 of file toolame.c.
References toolame_buffer, toolame_buffer_bytes, TOOLAME_BUFFER_BYTES, toolame_eof, toolame_error, toolame_input_lock, and toolame_output_lock.
Referenced by FileMPEGAudio::FileMPEGAudio().
| int toolame_send_buffer | ( | char * | data, | |
| int | bytes | |||
| ) |
Definition at line 53 of file toolame.c.
References fprintf, memcpy, toolame_buffer, toolame_buffer_bytes, TOOLAME_BUFFER_BYTES, toolame_eof, toolame_error, toolame_input_lock, and toolame_output_lock.
Referenced by FileMPEG::close_file(), and FileMPEG::write_samples().
| void usage | ( | void | ) |
Definition at line 641 of file toolame.c.
References DFLT_EMP, DFLT_MOD, DFLT_PSY, DFLT_SFQ, fprintf, programName, and toolameversion.
| FILE* musicin |
| char* programName |
Definition at line 28 of file toolame.c.
Referenced by parse_args(), short_usage(), toolame(), and usage().
| char* toolame_buffer = 0 |
Definition at line 35 of file toolame.c.
Referenced by toolame_buffer_read(), toolame_init_buffers(), and toolame_send_buffer().
| int toolame_buffer_bytes = 0 |
Definition at line 36 of file toolame.c.
Referenced by toolame_buffer_read(), toolame_init_buffers(), and toolame_send_buffer().
| int toolame_eof = 0 |
Definition at line 38 of file toolame.c.
Referenced by toolame_buffer_read(), toolame_init_buffers(), and toolame_send_buffer().
| int toolame_error = 0 |
Definition at line 37 of file toolame.c.
Referenced by toolame(), toolame_buffer_read(), toolame_init_buffers(), and toolame_send_buffer().
| pthread_mutex_t toolame_input_lock |
Definition at line 33 of file toolame.c.
Referenced by toolame_buffer_read(), toolame_init_buffers(), and toolame_send_buffer().
| pthread_mutex_t toolame_output_lock |
Definition at line 34 of file toolame.c.
Referenced by toolame(), toolame_buffer_read(), toolame_init_buffers(), and toolame_send_buffer().
| char toolameversion[10] = "0.2l" |
1.5.5