common.c File Reference

#include <config.h>
#include <ctype.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "common.h"

Include dependency graph for common.c:

Go to the source code of this file.

Defines

#define HDRCMPMASK   0xfffffd00

Functions

int head_check (unsigned long head, int check_layer)
int decode_header (struct frame *fr, unsigned long newhead)
void print_header (struct frame *fr)
void print_header_compact (struct frame *fr)
unsigned int getbits (PMPSTR mp, int number_of_bits)
unsigned int getbits_fast (PMPSTR mp, int number_of_bits)
int set_pointer (PMPSTR mp, long backstep)

Variables

const int tabsel_123 [2][3][16]
const long freqs [9]
real muls [27][64]


Define Documentation

#define HDRCMPMASK   0xfffffd00

Definition at line 74 of file common.c.


Function Documentation

int decode_header ( struct frame fr,
unsigned long  newhead 
)

Definition at line 118 of file common.c.

References frame::bitrate_index, frame::copyright, do_layer3(), frame::down_sample, frame::down_sample_sblimit, frame::emphasis, frame::error_protection, frame::extension, frame::framesize, freqs, frame::lay, frame::lsf, frame::mode, frame::mode_ext, frame::mpeg25, MPG_MD_MONO, frame::original, frame::padding, frame::sampling_frequency, SBLIMIT, frame::stereo, and tabsel_123.

Referenced by decodeMP3_clipchoice().

Here is the call graph for this function:

unsigned int getbits ( PMPSTR  mp,
int  number_of_bits 
)

Definition at line 240 of file common.c.

References mpstr_tag::bitindex, and mpstr_tag::wordpointer.

Referenced by decodeMP3_clipchoice(), I_step_one(), I_step_two(), II_step_one(), II_step_two(), III_get_side_info_1(), and III_get_side_info_2().

unsigned int getbits_fast ( PMPSTR  mp,
int  number_of_bits 
)

Definition at line 266 of file common.c.

References mpstr_tag::bitindex, and mpstr_tag::wordpointer.

Referenced by II_step_one(), III_get_scale_factors_1(), III_get_scale_factors_2(), III_get_side_info_1(), and III_get_side_info_2().

int head_check ( unsigned long  head,
int  check_layer 
)

Definition at line 77 of file common.c.

References FALSE, and TRUE.

void print_header ( struct frame fr  ) 

Definition at line 209 of file common.c.

References frame::bitrate_index, frame::copyright, frame::emphasis, frame::error_protection, frame::extension, frame::framesize, freqs, frame::lay, frame::lsf, frame::mode, frame::mode_ext, frame::mpeg25, frame::original, frame::sampling_frequency, frame::stereo, and tabsel_123.

void print_header_compact ( struct frame fr  ) 

Definition at line 226 of file common.c.

References frame::bitrate_index, freqs, frame::lay, frame::lsf, frame::mode, frame::mpeg25, frame::sampling_frequency, and tabsel_123.

int set_pointer ( PMPSTR  mp,
long  backstep 
)

Definition at line 287 of file common.c.

References mpstr_tag::bitindex, mpstr_tag::bsnum, mpstr_tag::bsspace, mpstr_tag::fsizeold, memcpy, MP3_ERR, MP3_OK, and mpstr_tag::wordpointer.

Referenced by do_layer3().


Variable Documentation

const long freqs[9]

Initial value:

 { 44100, 48000, 32000,
                        22050, 24000, 16000,
                        11025, 12000,  8000 }

Definition at line 39 of file common.c.

Referenced by decode_header(), do_layer3(), print_header(), and print_header_compact().

real muls[27][64]

Definition at line 45 of file common.c.

Referenced by I_step_two(), II_step_two(), and init_layer2().

const int tabsel_123[2][3][16]

Initial value:

 {
   { {0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,},
     {0,32,48,56, 64, 80, 96,112,128,160,192,224,256,320,384,},
     {0,32,40,48, 56, 64, 80, 96,112,128,160,192,224,256,320,} },

   { {0,32,48,56,64,80,96,112,128,144,160,176,192,224,256,},
     {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,},
     {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,} }
}

Definition at line 29 of file common.c.

Referenced by decode_header(), do_layer3(), print_header(), and print_header_compact().


Generated on Sun Dec 2 11:37:18 2007 for LAME by  doxygen 1.5.2