| Algorithm 4. Detection process of KCF tracking (calculate the response of the classifier at all shifts), and input and output parameters are vectorized through vector types and keyword “__restrict” |
|
Input: Kf_input_real: The correlation coefficient real part Kf_input_imag: The correlation coefficient imaginary part Alphafm_r: The vector of sample training parameters Size: The product of the image patch width and height Output: Kf_output_real: The correlation coefficient response real part Kf_output_imag: The correlation coefficient response imaginary part Initialize: SIMD_WIDTH = 16; xb_vecN_2x32v* __restrict pKf_output_real = (xb_vecN_2x32v *) ((int32_t *) Kf_output_real); xb_vecN_2x32v* __restrict pKf_output_imag = (xb_vecN_2x32v *) ((int32_t *) Kf_output_imag); xb_vecN_2x32v* __restrict pKf_input_real = (xb_vecN_2x32v *) ((int32_t *) Kf_input_real); xb_vecN_2x32v* __restrict pKf_input_imag = (xb_vecN_2x32v *) ((int32_t *) Kf_input_imag); xb_vecN_2x32v* __restrict pAlphafm_r =(xb_vecN_2x32v *) ((int32_t *) alphafm_r); xb_vecN_2x32v vKf_input_real, vKf_input_imag, vAlphafm_r, vKf_output_real, vKf_output_imag; xb_vecN_2x64w acc1; xb_vecNx16 temp; Process Source-code: foreach i in Size/SIMD_WIDTH do IVP_LVN_2X32_XP(vKf_input_real, pKf_input_real, 64); IVP_LVN_2X32_XP(vKf_input_imag, pKf_input_imag, 64); IVP_LVN_2X32_XP(vAlphafm_r, pAlphafm_r, 64); temp = IVP_MOVNX16_FROMN_2X32(vAlphafm_r); acc1 = IVP_MULUSN_2X16X32_0(temp, vKf_input_real); IVP_MULAHN_2X16X32_1(acc1, temp, vKf_input_real); vKf_output_real = IVP_PACKVRN_2X64W(acc1, 15); acc1 = IVP_MULUSN_2X16X32_0(temp, vKf_input_imag); IVP_MULAHN_2X16X32_1(acc1, temp, vKf_input_imag); vKf_output_imag = IVP_PACKVRN_2X64W(acc1, 15); IVP_SVN_2X32_XP(vKf_output_real, pKf_output_real, 64); IVP_SVN_2X32_XP(vKf_output_imag, pKf_output_imag, 64); end |