Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.codec.audio.silk
Class Silk_Inlines

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.codec.audio.silk.Silk_Inlines_constants
      extended by net.java.sip.communicator.impl.neomedia.codec.audio.silk.Silk_Inlines

public class Silk_Inlines
extends Silk_Inlines_constants


Field Summary
 
Fields inherited from class net.java.sip.communicator.impl.neomedia.codec.audio.silk.Silk_Inlines_constants
SKP_SIN_APPROX_CONST0, SKP_SIN_APPROX_CONST1, SKP_SIN_APPROX_CONST2, SKP_SIN_APPROX_CONST3
 
Constructor Summary
Silk_Inlines()
           
 
Method Summary
(package private) static int SKP_DIV32_varQ(int a32, int b32, int Qres)
          Divide two int32 values and return result as int32 in a given Q-domain.
(package private) static int SKP_INVERSE32_varQ(int b32, int Qres)
          Invert int32 value and return result as int32 in a given Q-domain.
(package private) static void SKP_Silk_CLZ_FRAC(int in, int[] lz, int[] frac_Q7)
          get number of leading zeros and fractional part (the bits right after the leading one).
(package private) static int SKP_Silk_CLZ64(long in)
          count leading zeros of long.
(package private) static int SKP_Silk_COS_APPROX_Q24(int x)
          Cosine approximation; an input of 65536 corresponds to 2 * pi The relative error is below 1e-5
(package private) static int SKP_Silk_norm16(short a)
          returns the number of left shifts before overflow for a 16 bit number (ITU definition with norm(0)=0).
(package private) static int SKP_Silk_norm32(int a)
          returns the number of left shifts before overflow for a 32 bit number (ITU definition with norm(0)=0)
(package private) static int SKP_Silk_SIN_APPROX_Q24(int x)
          Sine approximation; an input of 65536 corresponds to 2 * pi Uses polynomial expansion of the input to the power 0, 2, 4 and 6 The relative error is below 1e-5
(package private) static int SKP_Silk_SQRT_APPROX(int x)
          Approximation of square root Accuracy: < +/- 10% for output values > 15 < +/- 2.5% for output values > 120
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Silk_Inlines

public Silk_Inlines()
Method Detail

SKP_Silk_CLZ64

static int SKP_Silk_CLZ64(long in)
count leading zeros of long.

Parameters:
in. - input
Returns:

SKP_Silk_CLZ_FRAC

static void SKP_Silk_CLZ_FRAC(int in,
                              int[] lz,
                              int[] frac_Q7)
get number of leading zeros and fractional part (the bits right after the leading one).

Parameters:
in -
lz -
frac_Q7 -

SKP_Silk_SQRT_APPROX

static int SKP_Silk_SQRT_APPROX(int x)
Approximation of square root Accuracy: < +/- 10% for output values > 15 < +/- 2.5% for output values > 120

Parameters:
x -
Returns:

SKP_Silk_norm16

static int SKP_Silk_norm16(short a)
returns the number of left shifts before overflow for a 16 bit number (ITU definition with norm(0)=0).

Parameters:
a -
Returns:

SKP_Silk_norm32

static int SKP_Silk_norm32(int a)
returns the number of left shifts before overflow for a 32 bit number (ITU definition with norm(0)=0)

Parameters:
a -
Returns:

SKP_DIV32_varQ

static int SKP_DIV32_varQ(int a32,
                          int b32,
                          int Qres)
Divide two int32 values and return result as int32 in a given Q-domain.

Parameters:
a32 - numerator (Q0)
b32 - denominator (Q0)
Qres - Q-domain of result (>= 0)
Returns:
returns a good approximation of "(a32 << Qres) / b32"

SKP_INVERSE32_varQ

static int SKP_INVERSE32_varQ(int b32,
                              int Qres)
Invert int32 value and return result as int32 in a given Q-domain.

Parameters:
b32 - denominator (Q0)
Qres - Q-domain of result (> 0)
Returns:
returns a good approximation of "(1 << Qres) / b32"

SKP_Silk_SIN_APPROX_Q24

static int SKP_Silk_SIN_APPROX_Q24(int x)
Sine approximation; an input of 65536 corresponds to 2 * pi Uses polynomial expansion of the input to the power 0, 2, 4 and 6 The relative error is below 1e-5

Parameters:
x -
Returns:
returns approximately 2^24 * sin(x * 2 * pi / 65536).

SKP_Silk_COS_APPROX_Q24

static int SKP_Silk_COS_APPROX_Q24(int x)
Cosine approximation; an input of 65536 corresponds to 2 * pi The relative error is below 1e-5

Parameters:
x -
Returns:
returns approximately 2^24 * cos(x * 2 * pi / 65536).

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.