00001 int encode_init(frame_info *frame);
00002 void scalefactor_calc_new (double sb_sample[][3][SCALE_BLOCK][SBLIMIT],
00003 unsigned int scalar[][3][SBLIMIT], int nch,
00004 int sblimit);
00005
00006 INLINE double mod (double a);
00007
00008 void combine_LR_new (double sb_sample[2][3][SCALE_BLOCK][SBLIMIT],
00009 double joint_sample[3][SCALE_BLOCK][SBLIMIT], int sblimit);
00010
00011 void find_sf_max (unsigned int sf_index[2][3][SBLIMIT], frame_info * frame,
00012 double sf_max[2][SBLIMIT]);
00013
00014 void sf_transmission_pattern (unsigned int sf_index[2][3][SBLIMIT],
00015 unsigned int sf_selectinfo[2][SBLIMIT],
00016 frame_info * frame);
00017
00018 void write_header (frame_info * frame, Bit_stream_struc * bs);
00019
00020 void write_bit_alloc (unsigned int bit_alloc[2][SBLIMIT],
00021 frame_info * frame, Bit_stream_struc * bs);
00022
00023 void write_scalefactors (unsigned int bit_alloc[2][SBLIMIT],
00024 unsigned int sf_selectinfo[2][SBLIMIT],
00025 unsigned int scalar[2][3][SBLIMIT], frame_info * frame,
00026 Bit_stream_struc * bs);
00027
00028 void subband_quantization_new (unsigned int sf_index[2][3][SBLIMIT],
00029 double sb_samples[2][3][SCALE_BLOCK][SBLIMIT],
00030 unsigned int j_scale[3][SBLIMIT],
00031 double j_samps[3][SCALE_BLOCK][SBLIMIT],
00032 unsigned int bit_alloc[2][SBLIMIT],
00033 unsigned int sbband[2][3][SCALE_BLOCK][SBLIMIT],
00034 frame_info * frame);
00035
00036 void write_samples_new (unsigned int sbband[2][3][SCALE_BLOCK][SBLIMIT],
00037 unsigned int bit_alloc[2][SBLIMIT],
00038 frame_info * frame, Bit_stream_struc * bs);
00039
00040
00041
00042
00043
00044 int bits_for_nonoise_new (double SMR[2][SBLIMIT],
00045 unsigned int scfsi[2][SBLIMIT], frame_info * frame, float min_mnr,
00046 unsigned int bit_alloc[2][SBLIMIT]);
00047 void main_bit_allocation_new (double SMR[2][SBLIMIT],
00048 unsigned int scfsi[2][SBLIMIT],
00049 unsigned int bit_alloc[2][SBLIMIT], int *adb,
00050 frame_info * frame, options * glopts);
00051 void VBR_maxmnr_new (double mnr[2][SBLIMIT], char used[2][SBLIMIT], int sblimit,
00052 int nch, int *min_sb, int *min_ch, options * glopts);
00053 int
00054 VBR_bit_allocation_new (double SMR[2][SBLIMIT],
00055 unsigned int scfsi[2][SBLIMIT],
00056 unsigned int bit_alloc[2][SBLIMIT], int *adb,
00057 frame_info * frame, options * glopts);
00058 void maxmnr_new (double mnr[2][SBLIMIT], char used[2][SBLIMIT], int sblimit,
00059 int nch, int *min_sb, int *min_ch);
00060 int a_bit_allocation_new (double SMR[2][SBLIMIT],
00061 unsigned int scfsi[2][SBLIMIT],
00062 unsigned int bit_alloc[2][SBLIMIT], int *adb,
00063 frame_info * frame);