Optimized WebRtcIsacfix_NormLatticeFilterMa() function for iSAC fix for ARM Neon
architecture with intrinsics and assembly code. The total iSAC codec speech improved about 3~5%. Notes (1) The Neon version after this optimization is not bit-exact with the generic C version. The out quality, however, is not worse as verified by test vectors ouput, and undertandably in theory (32bit x 32bit in Neon is more accurate than the approximation C code in the generic version). (2) In Android, a isac neon library will be built. Along with some new function structures, it is partly for preparation of introducing a run time detection of Neon architecture soon. Review URL: http://webrtc-codereview.appspot.com/268016 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1192 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -122,7 +122,6 @@ void WebRtcIsacfix_NormLatticeFilterMa(WebRtc_Word16 orderCoef,
|
||||
WebRtc_Word16 lo_hi,
|
||||
WebRtc_Word16 *lat_outQ9);
|
||||
|
||||
|
||||
void WebRtcIsacfix_NormLatticeFilterAr(WebRtc_Word16 orderCoef,
|
||||
WebRtc_Word16 *stateGQ0,
|
||||
WebRtc_Word32 *lat_inQ25,
|
||||
@@ -131,10 +130,54 @@ void WebRtcIsacfix_NormLatticeFilterAr(WebRtc_Word16 orderCoef,
|
||||
WebRtc_Word16 lo_hi,
|
||||
WebRtc_Word16 *lat_outQ0);
|
||||
|
||||
int WebRtcIsacfix_AutocorrFix(WebRtc_Word32* __restrict r,
|
||||
const WebRtc_Word16* __restrict x,
|
||||
WebRtc_Word16 N,
|
||||
WebRtc_Word16 order,
|
||||
WebRtc_Word16* __restrict scale);
|
||||
int WebRtcIsacfix_AutocorrC(WebRtc_Word32* __restrict r,
|
||||
const WebRtc_Word16* __restrict x,
|
||||
WebRtc_Word16 N,
|
||||
WebRtc_Word16 order,
|
||||
WebRtc_Word16* __restrict scale);
|
||||
|
||||
void WebRtcIsacfix_FilterMaLoopC(int16_t input0,
|
||||
int16_t input1,
|
||||
int32_t input2,
|
||||
int32_t* ptr0,
|
||||
int32_t* ptr1,
|
||||
int32_t* ptr2);
|
||||
|
||||
// Functions for ARM-Neon platforms, in place of the above two generic C ones.
|
||||
#if (defined(WEBRTC_ANDROID) && defined(WEBRTC_ARCH_ARM_NEON))
|
||||
int WebRtcIsacfix_AutocorrNeon(WebRtc_Word32* __restrict r,
|
||||
const WebRtc_Word16* __restrict x,
|
||||
WebRtc_Word16 N,
|
||||
WebRtc_Word16 order,
|
||||
WebRtc_Word16* __restrict scale);
|
||||
|
||||
void WebRtcIsacfix_FilterMaLoopNeon(int16_t input0,
|
||||
int16_t input1,
|
||||
int32_t input2,
|
||||
int32_t* ptr0,
|
||||
int32_t* ptr1,
|
||||
int32_t* ptr2);
|
||||
#endif
|
||||
|
||||
/**** Function pointers associated with
|
||||
**** WebRtcIsacfix_AutocorrC() / WebRtcIsacfix_AutocorrNeon()
|
||||
**** and WebRtcIsacfix_FilterMaLoopC() / WebRtcIsacfix_FilterMaLoopNeon().
|
||||
****/
|
||||
|
||||
typedef int (*AutocorrFix)(WebRtc_Word32* __restrict__ r,
|
||||
const WebRtc_Word16* __restrict__ x,
|
||||
WebRtc_Word16 N,
|
||||
WebRtc_Word16 order,
|
||||
WebRtc_Word16* __restrict__ scale);
|
||||
extern AutocorrFix WebRtcIsacfix_AutocorrFix;
|
||||
|
||||
typedef void (*FilterMaLoopFix)(int16_t input0,
|
||||
int16_t input1,
|
||||
int32_t input2,
|
||||
int32_t* ptr0,
|
||||
int32_t* ptr1,
|
||||
int32_t* ptr2);
|
||||
extern FilterMaLoopFix WebRtcIsacfix_FilterMaLoopFix;
|
||||
|
||||
|
||||
#endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_CODEC_H_ */
|
||||
|
||||
Reference in New Issue
Block a user