Follow-up from "Resolve "Complexity Overhead Stereo to Stereo - 32kbps FB FLOAT vs BASOP" - Bitexact Changes"
The following discussion from !1375 (merged) should be addressed:
-
@vaillancour started a discussion: (+4 comments) @bauerfa, @venkateshsa, I know this has been merged but I just stumble accross some of the modifications :
#ifdef FIX_1439_SPEEDUP_synthesise_fb_high_band_fx L_tmp = Mult_32_16( ratio2, tmp[i] ); /* Q(16-exp+exp_tmp-15 = 1-exp+exp_tmp) */ Word32 L_tmp32; Word16 tmp16; // if (L_tmp < 0) if ( L_tmp < 0 ) { L_tmp32 = L_negate( L_tmp ); } if ( L_tmp < 0 ) { L_tmp32 = L_shl_sat( L_tmp32, tmp3 ); } if ( L_tmp < 0 ) { tmp16 = extract_h( L_tmp32 ); } if ( L_tmp < 0 ) { tmp16 = negate( tmp16 ); } ...
To me this code looks a bit like trying to cheat the wmops counting of the basop library, but using multiple time the "if" instead of "IF". In the best scenario, the compiler will recognize this and will regroup all the "if" within the same bloc, thus effectively costing an IF. In the worst case, it might try to parallelize it which could lead to some unknown behavior.