Skip to content

Commit

Permalink
remove unnecessary zero clear.
Browse files Browse the repository at this point in the history
  • Loading branch information
hecomi committed Jan 9, 2021
1 parent ae4d16c commit e6fca68
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Assets/uLipSync/Scripts/Core/LipSyncJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public void Execute()

// auto correlational function
var r = new NativeArray<float>(lpcOrder + 1, Allocator.Temp);
Algorithm.ZeroClear(ref r);
for (int l = 0; l < lpcOrder + 1; ++l)
{
for (int n = 0; n < input.Length - l; ++n)
Expand All @@ -67,8 +66,6 @@ public void Execute()
// calculate LPC factors using Levinson-Durbin algorithm
var a = new NativeArray<float>(lpcOrder + 1, Allocator.Temp);
var e = new NativeArray<float>(lpcOrder + 1, Allocator.Temp);
Algorithm.ZeroClear(ref a);
Algorithm.ZeroClear(ref e);
a[0] = 1f;
a[1] = -r[1] / r[0];
e[1] = r[0] + r[1] * a[1];
Expand Down Expand Up @@ -109,7 +106,6 @@ public void Execute()
// calculate frequency characteristics
int Nf = (int)((float)H.Length * sampleRate / maxFreq);
var Htmp = new NativeArray<float>(H.Length, Allocator.Temp);
Algorithm.ZeroClear(ref Htmp);
float numerator = math.sqrt(math.abs(e[e.Length - 1]));
for (int n = 0; n < H.Length; ++n)
{
Expand Down

0 comments on commit e6fca68

Please sign in to comment.