bitstream.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int getframebits (const lame_global_flags *gfp)
int format_bitstream (lame_global_flags const *gfp)
void flush_bitstream (lame_global_flags const *gfp)
void add_dummy_byte (lame_global_flags const *const gfp, unsigned char val, unsigned int n)
int copy_buffer (lame_internal_flags *gfc, unsigned char *buffer, int buffer_size, int update_crc)
void init_bit_stream_w (lame_internal_flags *gfc)
void CRC_writeheader (lame_internal_flags const *gfc, char *buffer)
int compute_flushbits (const lame_global_flags *gfp, int *nbytes)


Function Documentation

void add_dummy_byte ( lame_global_flags const *const  gfp,
unsigned char  val,
unsigned int  n 
)

Definition at line 862 of file bitstream.c.

References gfc, gfp, lame_internal_flags::header, i, lame_global_struct::internal_flags, MAX_HEADER_BUF, putbits_noheaders(), and lame_internal_flags::write_timing.

Referenced by id3tag_write_v1(), id3tag_write_v2(), and InitVbrTag().

Here is the call graph for this function:

int compute_flushbits ( const lame_global_flags gfp,
int *  nbytes 
)

Definition at line 744 of file bitstream.c.

References lame_internal_flags::bs, bit_stream_struc::buf_byte_idx, DEBUGF, ERRORF, getframebits(), gfc, gfp, lame_internal_flags::h_ptr, lame_internal_flags::header, lame_global_struct::internal_flags, MAX_HEADER_BUF, lame_internal_flags::sideinfo_len, bit_stream_struc::totbit, lame_internal_flags::w_ptr, and lame_internal_flags::write_timing.

Referenced by flush_bitstream(), format_bitstream(), and lame_get_size_mp3buffer().

Here is the call graph for this function:

int copy_buffer ( lame_internal_flags gfc,
unsigned char *  buffer,
int  buffer_size,
int  update_crc 
)

sum number of bytes belonging to the mp3 stream this info will be written into the Xing/LAME header for seeking

Definition at line 967 of file bitstream.c.

References AnalyzeSamples(), lame_internal_flags::bs, bit_stream_struc::buf, bit_stream_struc::buf_bit_idx, bit_stream_struc::buf_byte_idx, lame_internal_flags::channels_out, lame_internal_flags::decode_on_the_fly, lame_internal_flags::findPeakSample, lame_internal_flags::findReplayGain, GAIN_ANALYSIS_ERROR, gfc, i, lame_decode1_unclipped(), memcpy, VBR_seek_info_t::nBytesWritten, lame_internal_flags::nMusicCRC, lame_internal_flags::PeakSample, lame_internal_flags::rgdata, UpdateMusicCRC(), and lame_internal_flags::VBR_seek_table.

Referenced by lame_encode_buffer_sample_t(), lame_encode_flush(), and lame_encode_flush_nogap().

Here is the call graph for this function:

void CRC_writeheader ( lame_internal_flags const *  gfc,
char *  buffer 
)

Definition at line 255 of file bitstream.c.

References CRC_update(), gfc, i, and lame_internal_flags::sideinfo_len.

Referenced by PutVbrTag().

Here is the call graph for this function:

void flush_bitstream ( lame_global_flags const *  gfp  ) 

Definition at line 805 of file bitstream.c.

References lame_internal_flags::bs, compute_flushbits(), drain_into_ancillary(), lame_internal_flags::findPeakSample, lame_internal_flags::findReplayGain, GAIN_NOT_ENOUGH_SAMPLES, getframebits(), GetTitleGain(), gfc, gfp, lame_internal_flags::h_ptr, lame_internal_flags::header, lame_global_struct::internal_flags, lame_internal_flags::l3_side, III_side_info_t::main_data_begin, MAX_HEADER_BUF, lame_internal_flags::noclipGainChange, lame_internal_flags::noclipScale, lame_internal_flags::PeakSample, lame_internal_flags::RadioGain, lame_internal_flags::ResvSize, lame_internal_flags::rgdata, lame_global_struct::scale, bit_stream_struc::totbit, and lame_internal_flags::write_timing.

Referenced by lame_encode_flush(), and lame_encode_flush_nogap().

Here is the call graph for this function:

int format_bitstream ( lame_global_flags const *  gfp  ) 

Definition at line 887 of file bitstream.c.

References lame_internal_flags::bs, compute_flushbits(), drain_into_ancillary(), encodeSideInfo2(), ERRORF, getframebits(), gfc, gfp, lame_internal_flags::header, i, lame_global_struct::internal_flags, lame_internal_flags::l3_side, III_side_info_t::main_data_begin, MAX_HEADER_BUF, III_side_info_t::resvDrain_post, III_side_info_t::resvDrain_pre, lame_internal_flags::ResvSize, lame_internal_flags::sideinfo_len, bit_stream_struc::totbit, lame_internal_flags::write_timing, and writeMainData().

Here is the call graph for this function:

int getframebits ( const lame_global_flags gfp  ) 

Definition at line 65 of file bitstream.c.

References lame_internal_flags::bitrate_index, bitrate_table, lame_global_struct::brate, gfc, gfp, lame_global_struct::internal_flags, lame_global_struct::out_samplerate, lame_internal_flags::padding, and lame_global_struct::version.

Referenced by calc_target_bits(), compute_flushbits(), flush_bitstream(), format_bitstream(), get_framebits(), and ResvFrameBegin().

void init_bit_stream_w ( lame_internal_flags gfc  ) 

Definition at line 1054 of file bitstream.c.

References lame_internal_flags::bs, bit_stream_struc::buf, bit_stream_struc::buf_bit_idx, bit_stream_struc::buf_byte_idx, bit_stream_struc::buf_size, BUFFER_SIZE, gfc, lame_internal_flags::h_ptr, lame_internal_flags::header, bit_stream_struc::totbit, lame_internal_flags::w_ptr, and lame_internal_flags::write_timing.

Referenced by lame_init_params().


Generated on Sun Dec 2 11:35:58 2007 for LAME by  doxygen 1.5.2