Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

VAD from G729 and noise level

dmytro_bogovych
Beginner
527 Views
Hi all.

I experiment with VAD from G729 (USC_G729_VAD_Fxns). I want to use this VAD to send Comfort Noise packets in RTP. But I need to know at least noise level for silence packets. Is there way to get current noise level from USC_G729_VAD_Fxns to use it?

Thank you :)
0 Kudos
9 Replies
Ivan_Ryzhachkin__Int
New Contributor I
527 Views
Quoting - dmytro.bogovych
Hi all.

I experiment with VAD from G729 (USC_G729_VAD_Fxns). I want to use this VAD to send Comfort Noise packets in RTP. But I need to know at least noise level for silence packets. Is there way to get current noise level from USC_G729_VAD_Fxns to use it?

Thank you :)

Hello Dmytro,
may suggest to experiment with

ippsFilterNoiseDetect*() functionality. It returns squared noise magnitude when noise pattern detected.
regards,
Ivan

0 Kudos
dmytro_bogovych
Beginner
527 Views

Hello Dmytro,
may suggest to experiment with

ippsFilterNoiseDetect*() functionality. It returns squared noise magnitude when noise pattern detected.
regards,
Ivan


Thank you :)

I think better solution is to investigate G711 codec sources - as I see it implements G711 Appendix 2 (which describes work with comfort noise).


0 Kudos
Vyacheslav_Baranniko
New Contributor II
527 Views
Quoting - dmytro.bogovych
Hi all.

I experiment with VAD from G729 (USC_G729_VAD_Fxns). I want to use this VAD to send Comfort Noise packets in RTP. But I need to know at least noise level for silence packets. Is there way to get current noise level from USC_G729_VAD_Fxns to use it?

Thank you :)


Hi,
Once you got to know a 10 ms frame is inactive you can calculate the frameenergy by summing upits samples.
Or it is possibleto use USC_G729I_Fxns to encodeSID frame.
Vyacheslav, IPP speech
0 Kudos
Vyacheslav_Baranniko
New Contributor II
527 Views
Quoting - dmytro.bogovych
Hi all.

I experiment with VAD from G729 (USC_G729_VAD_Fxns). I want to use this VAD to send Comfort Noise packets in RTP. But I need to know at least noise level for silence packets. Is there way to get current noise level from USC_G729_VAD_Fxns to use it?

Thank you :)

G711 isalso anoption, you are right.
Vyacheslav
0 Kudos
dmytro_bogovych
Beginner
527 Views
Quoting - vbaranni

G711 isalso anoption, you are right.
Vyacheslav


Thank you, guys!

0 Kudos
dmytro_bogovych
Beginner
527 Views
Quoting - vbaranni


Hi,
Once you got to know a 10 ms frame is inactive you can calculate the frameenergy by summing upits samples.
Or it is possibleto use USC_G729I_Fxns to encodeSID frame.
Vyacheslav, IPP speech

To be precise - use of USC_G729I_Fxns will help only if all frames will be processed by this encoder.
If I try to get SID packet only for silence frames (I know about them from USC_G729_VAD_Fxns) - encoder produces SID packet rarely. The reason is speech history, right?


0 Kudos
dmytro_bogovych
Beginner
527 Views
Quoting - vbaranni

G711 isalso anoption, you are right.
Vyacheslav

The question.
ITU document about G711 Appendix II says that SID packet first byte has value from 0 till 127.
The MSB bit in this byte (octet) is zero always.

But as I see from this source code (where SID packet is computed):
[cpp]dst[0] = (Ipp8u)(((anau[0] & 1) << 7) | ((anau[1] & 31) << 2) | ((anau[2] & 15)>>2));
dst[1] = (Ipp8u)(((anau[2] & 3) << 6) | ((anau[3] & 31) << 1));    
[/cpp]
The MSB bit CAN be 1! And it IS 1 in some cases - I see value 0xA0 in first byte very often.

Is it ok?

0 Kudos
Vyacheslav_Baranniko
New Contributor II
527 Views
Quoting - dmytro.bogovych

To be precise - use of USC_G729I_Fxns will help only if all frames will be processed by this encoder.
If I try to get SID packet only for silence frames (I know about them from USC_G729_VAD_Fxns) - encoder produces SID packet rarely. The reason is speech history, right?



Passingall frames thru G729 you will only get the sameSID sequence as afterG729VAD alone. In case "silence" frame after G729VADare only fed to G729 there is no guaranteeSID sequence will be the same,due to hangover, firstly and noise level averaging, secondly.Nevertheless, G729 is expected to generateSIDs mostly once fed by silence frames only.

USC G711wasdesigned to be equivalent to G729 in terms of SID sequence while bypassing largely G729 encoding pipeline.

Vyacheslav
0 Kudos
Vyacheslav_Baranniko
New Contributor II
527 Views
Quoting - dmytro.bogovych

The question.
ITU document about G711 Appendix II says that SID packet first byte has value from 0 till 127.
The MSB bit in this byte (octet) is zero always.

But as I see from this source code (where SID packet is computed):
[cpp]dst[0] = (Ipp8u)(((anau[0] & 1) << 7) | ((anau[1] & 31) << 2) | ((anau[2] & 15)>>2));
dst[1] = (Ipp8u)(((anau[2] & 3) << 6) | ((anau[3] & 31) << 1));    
[/cpp]
The MSB bit CAN be 1! And it IS 1 in some cases - I see value 0xA0 in first byte very often.

Is it ok?


There are two different algo'sG711_II is concerned to, one isVAD/DTX (silence compression) and another CNG (comfort noise generation). USC G711 usesVAD/DTX from G729, i.e. able to generate SIDs packets (two bytes long)described in G729/B. CNalgorithmspecified in G711_II but was not implemented in USC.

SID can have MSB bit equal to 1. CN can not.

Vyacheslav
0 Kudos
Reply