Loading lib_com/frame_ener_fx.c +0 −39 Original line number Diff line number Diff line Loading @@ -47,45 +47,6 @@ * Estimation of pitch-synchronous (voiced sounds) or half-frame energy *----------------------------------------------------------------------------------*/ void fer_energy( const int16_t L_frame, /* i : frame length */ const int16_t clas, /* i : frame classification */ const float *synth, /* i : synthesized speech at Fs = 12k8 Hz */ const float pitch, /* i : pitch period */ float *enr, /* o : pitch-synchronous or half_frame energy */ const int16_t offset /* i : speech pointer offset (0 or L_frame) */ ) { int16_t len; const float *pt_synth; if ( clas == VOICED_CLAS || clas == ONSET || clas == SIN_ONSET ) /* Voiced or Onset current frame */ { len = (int16_t) ( pitch + 0.5f ); /* pitch value */ pt_synth = synth; if ( offset != 0 ) { pt_synth = synth + L_frame - len; } emaximum( pt_synth, len, enr ); /* pitch synchronous E */ } else { pt_synth = synth; if ( offset != 0 ) { pt_synth = synth + L_frame / 2; } *enr = dotp( pt_synth, pt_synth, L_frame / 2 ); *enr /= (float) ( L_frame / 2 ); } return; } void fer_energy_fx( const Word16 L_frame, /* i : frame length */ const Word16 clas, /* i : frame classification */ Loading Loading
lib_com/frame_ener_fx.c +0 −39 Original line number Diff line number Diff line Loading @@ -47,45 +47,6 @@ * Estimation of pitch-synchronous (voiced sounds) or half-frame energy *----------------------------------------------------------------------------------*/ void fer_energy( const int16_t L_frame, /* i : frame length */ const int16_t clas, /* i : frame classification */ const float *synth, /* i : synthesized speech at Fs = 12k8 Hz */ const float pitch, /* i : pitch period */ float *enr, /* o : pitch-synchronous or half_frame energy */ const int16_t offset /* i : speech pointer offset (0 or L_frame) */ ) { int16_t len; const float *pt_synth; if ( clas == VOICED_CLAS || clas == ONSET || clas == SIN_ONSET ) /* Voiced or Onset current frame */ { len = (int16_t) ( pitch + 0.5f ); /* pitch value */ pt_synth = synth; if ( offset != 0 ) { pt_synth = synth + L_frame - len; } emaximum( pt_synth, len, enr ); /* pitch synchronous E */ } else { pt_synth = synth; if ( offset != 0 ) { pt_synth = synth + L_frame / 2; } *enr = dotp( pt_synth, pt_synth, L_frame / 2 ); *enr /= (float) ( L_frame / 2 ); } return; } void fer_energy_fx( const Word16 L_frame, /* i : frame length */ const Word16 clas, /* i : frame classification */ Loading