Skip to content

Resolve [BE] "USAN error in PVQ decoder for OMASA decoding"

Reason why this change is needed

  • Clang usan sanitizer test in pipeline found an error: lib_dec/pvq_core_dec.c:440:82: runtime error: implicit conversion from type 'int' of value -1 (32-bit, signed) to type 'unsigned int' changed the value to 4294967295 (32-bit, unsigned) SUMMARY: UndefinedBehaviorSanitizer: implicit-integer-sign-change lib_dec/pvq_core_dec.c:440:82
*  lib_enc/pvq_core_enc.c:127:23: runtime error: implicit conversion from type 'int' of value 32768 (32-bit, signed) to type 'int16_t' (aka 'short') changed the value to -32768 (16-bit, signed)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior lib_enc/pvq_core_enc.c:127:23 in 

* lib_dec/pvq_core_dec.c:116:23: runtime error: implicit conversion from type 'int' of value 32768 (32-bit, signed) to type 'int16_t' (aka 'short') changed the value to -32768 (16-bit, signed)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior lib_dec/pvq_core_dec.c:116:23 in 


### Description of the change

*  Aligned PVQ tree-parsing float c-code to BASOP and ALT_BASOP to removed undefined behaviour warnings in type conversion [BE] 

### Affected operating points

* All use of  HQ-MDCT mode with PVQ decoding in IVAS 
* EVS float code may also benefit (in code quality) from this BE cleanup/alignment.   


<!--- By default, no labels are added as they often come from the issue. Add labels if there is no issue for this. -->
Edited by Jonas Svedberg

Merge request reports

Loading