115 lines
4.0 KiB
Java
115 lines
4.0 KiB
Java
package c.i.e.n;
|
|
|
|
import com.google.zxing.NotFoundException;
|
|
import java.util.Objects;
|
|
/* compiled from: DefaultGridSampler */
|
|
public final class f {
|
|
public static f a = new f();
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:27:0x009b */
|
|
/* JADX WARNING: Removed duplicated region for block: B:28:0x009e */
|
|
/* JADX WARNING: Removed duplicated region for block: B:49:0x00d4 */
|
|
/* JADX WARNING: Removed duplicated region for block: B:50:0x00d7 */
|
|
public b a(b bVar, int i, int i2, i iVar) throws NotFoundException {
|
|
int i3 = i2;
|
|
if (i <= 0 || i3 <= 0) {
|
|
throw NotFoundException.k;
|
|
}
|
|
b bVar2 = new b(i, i3);
|
|
int i4 = i * 2;
|
|
float[] fArr = new float[i4];
|
|
int i5 = 0;
|
|
while (i5 < i3) {
|
|
float f = ((float) i5) + 0.5f;
|
|
for (int i6 = 0; i6 < i4; i6 += 2) {
|
|
fArr[i6] = ((float) (i6 / 2)) + 0.5f;
|
|
fArr[i6 + 1] = f;
|
|
}
|
|
Objects.requireNonNull(iVar);
|
|
float f2 = iVar.a;
|
|
float f3 = iVar.b;
|
|
float f4 = iVar.f1411c;
|
|
float f5 = iVar.d;
|
|
float f6 = iVar.e;
|
|
float f7 = iVar.f;
|
|
float f8 = iVar.g;
|
|
float f9 = iVar.h;
|
|
float f10 = iVar.i;
|
|
for (int i7 = 0; i7 < i4; i7 += 2) {
|
|
float f11 = fArr[i7];
|
|
int i8 = i7 + 1;
|
|
float f12 = fArr[i8];
|
|
float f13 = (f7 * f12) + (f4 * f11) + f10;
|
|
fArr[i7] = (((f5 * f12) + (f2 * f11)) + f8) / f13;
|
|
fArr[i8] = (((f12 * f6) + (f11 * f3)) + f9) / f13;
|
|
}
|
|
int i9 = bVar.i;
|
|
int i10 = bVar.j;
|
|
boolean z2 = true;
|
|
for (int i11 = 0; i11 < i4 && z2; i11 += 2) {
|
|
int i12 = (int) fArr[i11];
|
|
int i13 = i11 + 1;
|
|
int i14 = (int) fArr[i13];
|
|
if (i12 < -1 || i12 > i9 || i14 < -1 || i14 > i10) {
|
|
throw NotFoundException.k;
|
|
}
|
|
if (i12 == -1) {
|
|
fArr[i11] = 0.0f;
|
|
} else if (i12 == i9) {
|
|
fArr[i11] = (float) (i9 - 1);
|
|
} else {
|
|
z2 = false;
|
|
if (i14 != -1) {
|
|
fArr[i13] = 0.0f;
|
|
} else if (i14 == i10) {
|
|
fArr[i13] = (float) (i10 - 1);
|
|
}
|
|
z2 = true;
|
|
}
|
|
z2 = true;
|
|
if (i14 != -1) {
|
|
}
|
|
z2 = true;
|
|
}
|
|
boolean z3 = true;
|
|
for (int i15 = i4 - 2; i15 >= 0 && z3; i15 -= 2) {
|
|
int i16 = (int) fArr[i15];
|
|
int i17 = i15 + 1;
|
|
int i18 = (int) fArr[i17];
|
|
if (i16 < -1 || i16 > i9 || i18 < -1 || i18 > i10) {
|
|
throw NotFoundException.k;
|
|
}
|
|
if (i16 == -1) {
|
|
fArr[i15] = 0.0f;
|
|
} else if (i16 == i9) {
|
|
fArr[i15] = (float) (i9 - 1);
|
|
} else {
|
|
z3 = false;
|
|
if (i18 != -1) {
|
|
fArr[i17] = 0.0f;
|
|
} else if (i18 == i10) {
|
|
fArr[i17] = (float) (i10 - 1);
|
|
}
|
|
z3 = true;
|
|
}
|
|
z3 = true;
|
|
if (i18 != -1) {
|
|
}
|
|
z3 = true;
|
|
}
|
|
for (int i19 = 0; i19 < i4; i19 += 2) {
|
|
try {
|
|
if (bVar.f((int) fArr[i19], (int) fArr[i19 + 1])) {
|
|
bVar2.j(i19 / 2, i5);
|
|
}
|
|
} catch (ArrayIndexOutOfBoundsException unused) {
|
|
throw NotFoundException.k;
|
|
}
|
|
}
|
|
i5++;
|
|
i3 = i2;
|
|
}
|
|
return bVar2;
|
|
}
|
|
}
|