Assert in RefineThresholdsUsingPitch_fx() -> GetF0()
# Basic info
<!--- Add commit SHA used to reproduce-->
- Float reference:
- Encoder (float): 91dbe989db66081a87dcbd3ed4f9d0167b43dc4e
- Fixed point:
- Decoder (fixed): ce3749b6fafe4b520a120d7583208c3a2f857d53
# Bug description
The decoder aborts with
```
IVAS_dec: lib_basop/basop32.c:2346: L_shl: Assertion `0' failed.
```
Stack trace:
```
#4 0x00007ffff7cd3420 in __assert_fail_base (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=2346, function=<optimized out>) at ./assert/assert.c:118
#5 0x00005555555689b7 in L_shl (L_var1=1073741824, var2=1) at lib_basop/basop32.c:2346
#6 0x00005555557abb61 in GetF0 (nSamples=262, nSamplesCore=640, powerSpectrum=0x7ffffffd3ca0, pitchLag=2621440, pOrigF0=0x7ffffffd1286, pOrigF0_32=0x7ffffffd1280, pF0=0x7ffffffd39a6, pF0_32=0x7ffffffd39a0, element_mode=1)
at lib_dec/TonalComponentDetection_fx.c:476
#7 0x00005555557addba in RefineThresholdsUsingPitch_fx (nSamples=262, nSamplesCore=640, powerSpectrum=0x7ffffffd3ca0, lastPitchLag=2621440, currentPitchLag=2621440, pF0=0x7ffffffd39a6, pF0_32=0x7ffffffd39a0,
thresholdModification=0x7ffffffd2320, thresholdModification32=0x7ffffffd2aa0, element_mode=1) at lib_dec/TonalComponentDetection_fx.c:1461
#8 0x00005555557aad27 in DetectTonalComponents_fx (indexOfTonalPeak=0x555555ded022, lowerIndex=0x555555ded05e, upperIndex=0x555555ded09a, pNumIndexes=0x555555ded020, lastPitchLag=2621440, currentPitchLag=2621440,
lastMDCTSpectrum=0x555555dec120, lastMDCTSpectrum_exp=11, scaleFactors=0x555555debf20, scaleFactors_exp=0x555555dec020, scaleFactors_max_e=5, secondLastPowerSpectrum=0x7ffffffd3ca0, secondLastPowerSpectrum_e=33, nSamples=262,
nSamplesCore=640, floorPowerSpectrum=2303, psychParamsCurrent=0x0, element_mode=1) at lib_dec/TonalComponentDetection_fx.c:148
#9 0x000055555570cbbb in CalcPowerSpecAndDetectTonalComponents_fx (hTonalMDCTConc=0x555555debe90, secondLastMDST=0x7ffffffd5c60, secondLastMDST_exp=15, secondLastMDCT=0x7ffffffd4d60, secondLastMDCT_exp=15, pitchLag=2621440,
psychParamsCurrent=0x0, element_mode=1) at lib_dec/tonalMDCTconcealment_fx.c:976
#10 0x000055555570d827 in TonalMDCTConceal_Detect_fx (hTonalMDCTConc=0x555555debe90, pitchLag=2621440, numIndices=0x7ffffffd6bde, psychParamsCurrent=0x0, element_mode=1) at lib_dec/tonalMDCTconcealment_fx.c:1221
#11 0x00005555557f210c in GetPLCModeDecision_fx (st=0x555555dd3980) at lib_dec/er_util_fx.c:451
#12 0x00005555556d8472 in stereo_tcx_core_dec_fx (st=0x555555dd3980, frameMode=FRAMEMODE_MISSING, signal_out_32_fx=0x555555e3db00, signal_outFB_fx=0x7ffffffdd8f0, pitch_buf_fx=0x7ffffffdfc10, sba_dirac_stereo_flag=0, hStereoTD=0x0,
last_element_mode=1, flag_sec_CNA=-1, hStereoCng=0x0, nchan_out=1, ivas_format=ISM_FORMAT) at lib_dec/ivas_tcx_core_dec_fx.c:326
#13 0x00005555558014ce in ivas_core_dec_fx (st_ivas=0x555555da4300, hSCE=0x555555dd3890, hCPE=0x0, hMCT=0x0, n_channels=1, output_32_fx=0x7ffffffe14a0, hb_synth_32_fx=0x7ffffffe0540, DFT_fx=0x0, sba_dirac_stereo_flag=0)
at lib_dec/ivas_core_dec_fx.c:571
#14 0x000055555569badd in ivas_sce_dec_fx (st_ivas=0x555555da4300, sce_id=0, output=0x7ffffffe14a0, output_frame=960, nb_bits_metadata=0) at lib_dec/ivas_sce_dec_fx.c:291
#15 0x00005555556054af in ivas_dec_fx (st_ivas=0x555555da4300) at lib_dec/ivas_dec_fx.c:154
#16 0x0000555555571399 in IVAS_DEC_GetSamplesDecoder (hIvasDec=0x555555da42a0, splitRendBits=0x0) at lib_dec/lib_dec_fx.c:4084
#17 0x0000555555573eda in ivas_dec_voip_get_samples_common (hIvasDec=0x555555da42a0, nSamplesPerChannel=960, pcmBuf=0x555555dcd6c0, splitRendBits=0x0, p_head_pose_buf=0x0, jbmWriterFn=0x555555564123 <writeJbmTraceFileFrameWrapper>,
jbmWriter=0x555555dd16c0, bitstreamReadDone=0x7ffffffe18eb, nSamplesRendered=0x7ffffffe18e8, parametersAvailableForEditing=0x7ffffffe18ea, systemTimestamp_ms=106520) at lib_dec/lib_dec_fx.c:5042
#18 0x0000555555574252 in IVAS_DEC_VoIP_GetSamples (hIvasDec=0x555555da42a0, nSamplesPerChannel=960, pcmBuf=0x555555dcd6c0, jbmWriterFn=0x555555564123 <writeJbmTraceFileFrameWrapper>, jbmWriter=0x555555dd16c0,
bitstreamReadDone=0x7ffffffe18eb, nSamplesRendered=0x7ffffffe18e8, parametersAvailableForEditing=0x7ffffffe18ea, systemTimestamp_ms=106520) at lib_dec/lib_dec_fx.c:5139
#19 0x00005555555653e9 in decodeVoIP (arg=..., hBsReader=0x555555da48c0, hHrtf=0x7fffffffd750, headRotReader=0x0, externalOrientationFileReader=0x0, refRotReader=0x0, referenceVectorReader=0x0, objectEditFileReader=0x0, splitRendBits=0x0,
phIvasDec=0x7fffffffd7b8, pcmBuf=0x555555dcd6c0) at apps/decoder.c:3305
#20 0x000055555555dc8a in main (argc=11, argv=0x7fffffffe1f8) at apps/decoder.c:708
```
This occurs in frame 5326.
This seems to be a side-effect of `FIX_ISSUE_1966_F0_32BIT`. Disabling the said macro also gets rid of the assert.
# Ways to reproduce
Bitstream:
[ltv48_3ISM\_-10dB_384kbps.zip](/uploads/f280ef60c25be1bbe76e5ad34a99b1eb/ltv48_3ISM_-10dB_384kbps.zip)
<!--Commandline or script-->
```bash
IVAS_dec -obj_edit NULL -no_delay_cmp -Tracefile tracefile_dec -VOIP FOA 48 ltv48_3ISM_-10dB_384kbps.netsimout out.wav
```
<!--- Below are labels that will be added but are not shown in description. This is a template to help fill them.
Add further information to the first row and remove and add labels as necessary.-->
issue