[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-developers] Problem with an infinite loop in bcg729 codec
From: |
BOITEUX, FREDERIC |
Subject: |
Re: [Linphone-developers] Problem with an infinite loop in bcg729 codec |
Date: |
Mon, 14 Sep 2020 14:48:41 +0000 |
Hello,
I've progressed on this bcg729 codec problem :
- the problem is occurring when encoding data coming from a G711 decoded
stream, using VAD on this stream.
- I actually got a [short] stream which let reproduces the bug (endless loop) 😊
- I've seen that the bcg729 codec have intrinsic tests :Â I've compiled and run
them, and I got some « fails » :
$ ./testCampaignAll
Test LP2LSPConversion bloc
speech ... Pass
tame ... Pass
lsp ... Pass
…
Test postFilter bloc
test ... Pass
parity ... Pass
speech ... Pass
erasure ... Pass
tame ... Pass
algthm ... Fail
fixed ... Pass
lsp ... Fail
pitch ... Pass
overflow ... Pass
…
Test decoder bloc
speechDecode 3750 frames in 0.092994 seconds : 24.798400 us/frame
... Pass
lspDecode 2232 frames in 0.055679 seconds : 24.945789 us/frame
... Fail
…
algthmDecode 35 frames in 0.000884 seconds : 25.257143 us/frame
... Fail
…
- When I'm compiling the codec with ASAN checker (included in GCC), I get a lot
of runtime errors about integer overflow or undefined behaviour :
src/qLSP2LP.c:87:10: runtime error: left shift of negative value -67560105
src/qLSP2LP.c:93:10: runtime error: left shift of negative value -10805
src/postFilter.c:226:28: runtime error: left shift of negative value -1032
src/computeLP.c:76:30: runtime error: left shift of negative value -118198051
src/computeLP.c:91:9: runtime error: left shift of negative value -75628195
src/computeLP.c:94:24: runtime error: left shift of negative value -6604576
src/LP2LSPConversion.c:65:11: runtime error: left shift of negative value -7304
src/LP2LSPConversion.c:66:11: runtime error: left shift of negative value -411
src/LP2LSPConversion.c:141:8: runtime error: left shift of negative value -3003
src/LP2LSPConversion.c:105:22: runtime error: left shift of negative value -552
src/LP2LSPConversion.c:105:22: runtime error: left shift of negative value -552
src/LP2LSPConversion.c:137:17: runtime error: left shift of negative value -2057
src/g729FixedPointMath.h:259:7: runtime error: left shift of negative value
-7173
src/g729FixedPointMath.h:300:25: runtime error: left shift of negative value
-2563
src/dtx.c:165:27: runtime error: left shift of negative value -3037
src/g729FixedPointMath.h:259:7: runtime error: left shift of negative value
-7069
src/g729FixedPointMath.h:300:25: runtime error: left shift of negative value
-2664
src/g729FixedPointMath.h:144:6: runtime error: left shift of negative value -5
src/g729FixedPointMath.h:144:6: runtime error: left shift of negative value -5
src/computeWeightedSpeech.c:63:18: runtime error: left shift of negative value
-1
src/utils.c:136:18: runtime error: left shift of negative value -1
src/computeWeightedSpeech.c:55:18: runtime error: left shift of negative value
-1
src/computeLP.c:195:37: runtime error: left shift of negative value -35
src/computeLP.c:75:23: runtime error: left shift of negative value -293242880
src/cng.c:205:8: runtime error: left shift of negative value -1
src/LPSynthesisFilter.c:41:18: runtime error: left shift of negative value -2
src/postFilter.c:106:18: runtime error: left shift of negative value -2
src/g729FixedPointMath.h:144:6: runtime error: left shift of negative value -1
src/g729FixedPointMath.h:144:6: runtime error: left shift of negative value -1
src/g729FixedPointMath.h:144:6: runtime error: left shift of negative value -4
src/g729FixedPointMath.h:144:6: runtime error: left shift of negative value -4
src/fixedCodebookSearch.c:214:28: runtime error: left shift of negative value -1
…
- I've written my failing stream sample in the bcg729 test format, and added an
encoderTest2 which is same as encoderTest but is activating VAD, and I can
reproduce the problem ! I've attached both to this e-mail, hope it will be
accepted by the list system.
Could you confirm that you can also reproduce the problem ?
What about the failed intrinsic tests, do you have the same results ?
About ASAN runtime errors, I've tried to circumvent them checking sign in
left-shift macros, but it leads to get another runtime errors about integer
overflows…
With regards,
Frédéric Boiteux - Odigo IVR product development
This message contains information that may be privileged or confidential and is
the property of the Capgemini Group. It is intended only for the person to whom
it is addressed. If you are not the intended recipient, you are not authorized
to read, print, retain, copy, disseminate, distribute, or use this message or
any part thereof. If you receive this message in error, please notify the
sender immediately and delete all copies of this message.
encoderTest2.c
Description: encoderTest2.c
partie_pb_G729_v4.in.gz
Description: partie_pb_G729_v4.in.gz