2021-07-24 02:37:17 +00:00
|
|
|
package c.i.a.c.j2;
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
/* compiled from: FixedFrameRateEstimator */
|
|
|
|
public final class l {
|
|
|
|
public a a = new a();
|
|
|
|
public a b = new a();
|
|
|
|
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
2021-07-28 07:39:21 +00:00
|
|
|
public boolean f919c;
|
2021-07-24 02:37:17 +00:00
|
|
|
public long d = -9223372036854775807L;
|
|
|
|
public int e;
|
|
|
|
|
|
|
|
/* compiled from: FixedFrameRateEstimator */
|
|
|
|
public static final class a {
|
|
|
|
public long a;
|
|
|
|
public long b;
|
|
|
|
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
2021-07-28 07:39:21 +00:00
|
|
|
public long f920c;
|
2021-07-24 02:37:17 +00:00
|
|
|
public long d;
|
|
|
|
public long e;
|
|
|
|
public long f;
|
|
|
|
public final boolean[] g = new boolean[15];
|
|
|
|
public int h;
|
|
|
|
|
|
|
|
public boolean a() {
|
|
|
|
return this.d > 15 && this.h == 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void b(long j) {
|
|
|
|
long j2 = this.d;
|
|
|
|
if (j2 == 0) {
|
|
|
|
this.a = j;
|
|
|
|
} else if (j2 == 1) {
|
|
|
|
long j3 = j - this.a;
|
|
|
|
this.b = j3;
|
|
|
|
this.f = j3;
|
|
|
|
this.e = 1;
|
|
|
|
} else {
|
2021-07-28 07:39:21 +00:00
|
|
|
long j4 = j - this.f920c;
|
2021-07-24 02:37:17 +00:00
|
|
|
int i = (int) (j2 % 15);
|
|
|
|
if (Math.abs(j4 - this.b) <= 1000000) {
|
|
|
|
this.e++;
|
|
|
|
this.f += j4;
|
|
|
|
boolean[] zArr = this.g;
|
|
|
|
if (zArr[i]) {
|
|
|
|
zArr[i] = false;
|
|
|
|
this.h--;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
boolean[] zArr2 = this.g;
|
|
|
|
if (!zArr2[i]) {
|
|
|
|
zArr2[i] = true;
|
|
|
|
this.h++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.d++;
|
2021-07-28 07:39:21 +00:00
|
|
|
this.f920c = j;
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void c() {
|
|
|
|
this.d = 0;
|
|
|
|
this.e = 0;
|
|
|
|
this.f = 0;
|
|
|
|
this.h = 0;
|
|
|
|
Arrays.fill(this.g, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean a() {
|
|
|
|
return this.a.a();
|
|
|
|
}
|
|
|
|
}
|