Initial commit

This commit is contained in:
2025-05-13 19:24:51 +02:00
commit a950f49678
10604 changed files with 932663 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,73 @@
package com.google.zxing.pdf417;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.BinaryBitmap;
import com.google.zxing.ChecksumException;
import com.google.zxing.DecodeHintType;
import com.google.zxing.FormatException;
import com.google.zxing.NotFoundException;
import com.google.zxing.Reader;
import com.google.zxing.Result;
import com.google.zxing.ResultMetadataType;
import com.google.zxing.ResultPoint;
import com.google.zxing.common.DecoderResult;
import com.google.zxing.multi.MultipleBarcodeReader;
import com.google.zxing.pdf417.decoder.PDF417ScanningDecoder;
import com.google.zxing.pdf417.detector.Detector;
import com.google.zxing.pdf417.detector.PDF417DetectorResult;
import java.util.ArrayList;
import java.util.Map;
/* loaded from: classes.dex */
public final class PDF417Reader implements Reader, MultipleBarcodeReader {
private static int b(ResultPoint resultPoint, ResultPoint resultPoint2) {
if (resultPoint == null || resultPoint2 == null) {
return Integer.MAX_VALUE;
}
return (int) Math.abs(resultPoint.a() - resultPoint2.a());
}
@Override // com.google.zxing.Reader
public Result a(BinaryBitmap binaryBitmap, Map<DecodeHintType, ?> map) throws NotFoundException, FormatException, ChecksumException {
Result[] a = a(binaryBitmap, map, false);
if (a == null || a.length == 0 || a[0] == null) {
throw NotFoundException.getNotFoundInstance();
}
return a[0];
}
@Override // com.google.zxing.Reader
public void reset() {
}
private static int b(ResultPoint[] resultPointArr) {
return Math.min(Math.min(b(resultPointArr[0], resultPointArr[4]), (b(resultPointArr[6], resultPointArr[2]) * 17) / 18), Math.min(b(resultPointArr[1], resultPointArr[5]), (b(resultPointArr[7], resultPointArr[3]) * 17) / 18));
}
private static Result[] a(BinaryBitmap binaryBitmap, Map<DecodeHintType, ?> map, boolean z) throws NotFoundException, FormatException, ChecksumException {
ArrayList arrayList = new ArrayList();
PDF417DetectorResult a = Detector.a(binaryBitmap, map, z);
for (ResultPoint[] resultPointArr : a.b()) {
DecoderResult a2 = PDF417ScanningDecoder.a(a.a(), resultPointArr[4], resultPointArr[5], resultPointArr[6], resultPointArr[7], b(resultPointArr), a(resultPointArr));
Result result = new Result(a2.h(), a2.e(), resultPointArr, BarcodeFormat.PDF_417);
result.a(ResultMetadataType.ERROR_CORRECTION_LEVEL, a2.b());
PDF417ResultMetadata pDF417ResultMetadata = (PDF417ResultMetadata) a2.d();
if (pDF417ResultMetadata != null) {
result.a(ResultMetadataType.PDF417_EXTRA_METADATA, pDF417ResultMetadata);
}
arrayList.add(result);
}
return (Result[]) arrayList.toArray(new Result[arrayList.size()]);
}
private static int a(ResultPoint resultPoint, ResultPoint resultPoint2) {
if (resultPoint == null || resultPoint2 == null) {
return 0;
}
return (int) Math.abs(resultPoint.a() - resultPoint2.a());
}
private static int a(ResultPoint[] resultPointArr) {
return Math.max(Math.max(a(resultPointArr[0], resultPointArr[4]), (a(resultPointArr[6], resultPointArr[2]) * 17) / 18), Math.max(a(resultPointArr[1], resultPointArr[5]), (a(resultPointArr[7], resultPointArr[3]) * 17) / 18));
}
}

View File

@@ -0,0 +1,45 @@
package com.google.zxing.pdf417;
/* loaded from: classes.dex */
public final class PDF417ResultMetadata {
private boolean a;
public void a(int i) {
}
public void a(long j) {
}
public void a(String str) {
}
@Deprecated
public void a(int[] iArr) {
}
public boolean a() {
return this.a;
}
public void b(int i) {
}
public void b(long j) {
}
public void b(String str) {
}
public void c(int i) {
}
public void c(String str) {
}
public void d(String str) {
}
public void a(boolean z) {
this.a = z;
}
}

View File

@@ -0,0 +1,104 @@
package com.google.zxing.pdf417;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
import com.google.zxing.Writer;
import com.google.zxing.WriterException;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.pdf417.encoder.Compaction;
import com.google.zxing.pdf417.encoder.Dimensions;
import com.google.zxing.pdf417.encoder.PDF417;
import java.lang.reflect.Array;
import java.nio.charset.Charset;
import java.util.Map;
/* loaded from: classes.dex */
public final class PDF417Writer implements Writer {
@Override // com.google.zxing.Writer
public BitMatrix a(String str, BarcodeFormat barcodeFormat, int i, int i2, Map<EncodeHintType, ?> map) throws WriterException {
int i3;
int i4;
if (barcodeFormat != BarcodeFormat.PDF_417) {
throw new IllegalArgumentException("Can only encode PDF_417, but got ".concat(String.valueOf(barcodeFormat)));
}
PDF417 pdf417 = new PDF417();
if (map != null) {
if (map.containsKey(EncodeHintType.PDF417_COMPACT)) {
pdf417.a(Boolean.valueOf(map.get(EncodeHintType.PDF417_COMPACT).toString()).booleanValue());
}
if (map.containsKey(EncodeHintType.PDF417_COMPACTION)) {
pdf417.a(Compaction.valueOf(map.get(EncodeHintType.PDF417_COMPACTION).toString()));
}
if (map.containsKey(EncodeHintType.PDF417_DIMENSIONS)) {
Dimensions dimensions = (Dimensions) map.get(EncodeHintType.PDF417_DIMENSIONS);
pdf417.a(dimensions.a(), dimensions.c(), dimensions.b(), dimensions.d());
}
int parseInt = map.containsKey(EncodeHintType.MARGIN) ? Integer.parseInt(map.get(EncodeHintType.MARGIN).toString()) : 30;
int parseInt2 = map.containsKey(EncodeHintType.ERROR_CORRECTION) ? Integer.parseInt(map.get(EncodeHintType.ERROR_CORRECTION).toString()) : 2;
if (map.containsKey(EncodeHintType.CHARACTER_SET)) {
pdf417.a(Charset.forName(map.get(EncodeHintType.CHARACTER_SET).toString()));
}
i4 = parseInt;
i3 = parseInt2;
} else {
i3 = 2;
i4 = 30;
}
return a(pdf417, str, i3, i, i2, i4);
}
private static BitMatrix a(PDF417 pdf417, String str, int i, int i2, int i3, int i4) throws WriterException {
boolean z;
pdf417.a(str, i);
byte[][] a = pdf417.a().a(1, 4);
if ((i3 > i2) != (a[0].length < a.length)) {
a = a(a);
z = true;
} else {
z = false;
}
int length = i2 / a[0].length;
int length2 = i3 / a.length;
if (length >= length2) {
length = length2;
}
if (length > 1) {
byte[][] a2 = pdf417.a().a(length, length << 2);
if (z) {
a2 = a(a2);
}
return a(a2, i4);
}
return a(a, i4);
}
private static BitMatrix a(byte[][] bArr, int i) {
int i2 = i * 2;
BitMatrix bitMatrix = new BitMatrix(bArr[0].length + i2, bArr.length + i2);
bitMatrix.a();
int i3 = (bitMatrix.i() - i) - 1;
int i4 = 0;
while (i4 < bArr.length) {
byte[] bArr2 = bArr[i4];
for (int i5 = 0; i5 < bArr[0].length; i5++) {
if (bArr2[i5] == 1) {
bitMatrix.c(i5 + i, i3);
}
}
i4++;
i3--;
}
return bitMatrix;
}
private static byte[][] a(byte[][] bArr) {
byte[][] bArr2 = (byte[][]) Array.newInstance((Class<?>) byte.class, bArr[0].length, bArr.length);
for (int i = 0; i < bArr.length; i++) {
int length = (bArr.length - i) - 1;
for (int i2 = 0; i2 < bArr[0].length; i2++) {
bArr2[i2][length] = bArr[i][i2];
}
}
return bArr2;
}
}

View File

@@ -0,0 +1,38 @@
package com.google.zxing.pdf417.decoder;
/* loaded from: classes.dex */
final class BarcodeMetadata {
private final int a;
private final int b;
private final int c;
private final int d;
private final int e;
BarcodeMetadata(int i, int i2, int i3, int i4) {
this.a = i;
this.b = i4;
this.c = i2;
this.d = i3;
this.e = i2 + i3;
}
int a() {
return this.a;
}
int b() {
return this.b;
}
int c() {
return this.e;
}
int d() {
return this.d;
}
int e() {
return this.c;
}
}

View File

@@ -0,0 +1,37 @@
package com.google.zxing.pdf417.decoder;
import com.google.zxing.pdf417.PDF417Common;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes.dex */
final class BarcodeValue {
private final Map<Integer, Integer> a = new HashMap();
BarcodeValue() {
}
void a(int i) {
Integer num = this.a.get(Integer.valueOf(i));
if (num == null) {
num = 0;
}
this.a.put(Integer.valueOf(i), Integer.valueOf(num.intValue() + 1));
}
int[] a() {
ArrayList arrayList = new ArrayList();
int i = -1;
for (Map.Entry<Integer, Integer> entry : this.a.entrySet()) {
if (entry.getValue().intValue() > i) {
i = entry.getValue().intValue();
arrayList.clear();
arrayList.add(entry.getKey());
} else if (entry.getValue().intValue() == i) {
arrayList.add(entry.getKey());
}
}
return PDF417Common.a(arrayList);
}
}

View File

@@ -0,0 +1,174 @@
package com.google.zxing.pdf417.decoder;
import com.google.zxing.NotFoundException;
import com.google.zxing.ResultPoint;
import com.google.zxing.common.BitMatrix;
/* loaded from: classes.dex */
final class BoundingBox {
private final BitMatrix a;
private final ResultPoint b;
private final ResultPoint c;
private final ResultPoint d;
private final ResultPoint e;
private final int f;
private final int g;
private final int h;
private final int i;
BoundingBox(BitMatrix bitMatrix, ResultPoint resultPoint, ResultPoint resultPoint2, ResultPoint resultPoint3, ResultPoint resultPoint4) throws NotFoundException {
boolean z = resultPoint == null || resultPoint2 == null;
boolean z2 = resultPoint3 == null || resultPoint4 == null;
if (z && z2) {
throw NotFoundException.getNotFoundInstance();
}
if (z) {
resultPoint = new ResultPoint(0.0f, resultPoint3.b());
resultPoint2 = new ResultPoint(0.0f, resultPoint4.b());
} else if (z2) {
resultPoint3 = new ResultPoint(bitMatrix.k() - 1, resultPoint.b());
resultPoint4 = new ResultPoint(bitMatrix.k() - 1, resultPoint2.b());
}
this.a = bitMatrix;
this.b = resultPoint;
this.c = resultPoint2;
this.d = resultPoint3;
this.e = resultPoint4;
this.f = (int) Math.min(resultPoint.a(), resultPoint2.a());
this.g = (int) Math.max(resultPoint3.a(), resultPoint4.a());
this.h = (int) Math.min(resultPoint.b(), resultPoint3.b());
this.i = (int) Math.max(resultPoint2.b(), resultPoint4.b());
}
static BoundingBox a(BoundingBox boundingBox, BoundingBox boundingBox2) throws NotFoundException {
return boundingBox == null ? boundingBox2 : boundingBox2 == null ? boundingBox : new BoundingBox(boundingBox.a, boundingBox.b, boundingBox.c, boundingBox2.d, boundingBox2.e);
}
ResultPoint b() {
return this.e;
}
int c() {
return this.g;
}
int d() {
return this.i;
}
int e() {
return this.f;
}
int f() {
return this.h;
}
ResultPoint g() {
return this.b;
}
ResultPoint h() {
return this.d;
}
/* JADX WARN: Removed duplicated region for block: B:13:0x002d */
/* JADX WARN: Removed duplicated region for block: B:27:0x005b */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
com.google.zxing.pdf417.decoder.BoundingBox a(int r13, int r14, boolean r15) throws com.google.zxing.NotFoundException {
/*
r12 = this;
com.google.zxing.ResultPoint r0 = r12.b
com.google.zxing.ResultPoint r1 = r12.c
com.google.zxing.ResultPoint r2 = r12.d
com.google.zxing.ResultPoint r3 = r12.e
if (r13 <= 0) goto L29
if (r15 == 0) goto Le
r4 = r0
goto Lf
Le:
r4 = r2
Lf:
float r5 = r4.b()
int r5 = (int) r5
int r5 = r5 - r13
if (r5 >= 0) goto L18
r5 = 0
L18:
com.google.zxing.ResultPoint r13 = new com.google.zxing.ResultPoint
float r4 = r4.a()
float r5 = (float) r5
r13.<init>(r4, r5)
if (r15 == 0) goto L26
r8 = r13
goto L2a
L26:
r10 = r13
r8 = r0
goto L2b
L29:
r8 = r0
L2a:
r10 = r2
L2b:
if (r14 <= 0) goto L5b
if (r15 == 0) goto L32
com.google.zxing.ResultPoint r13 = r12.c
goto L34
L32:
com.google.zxing.ResultPoint r13 = r12.e
L34:
float r0 = r13.b()
int r0 = (int) r0
int r0 = r0 + r14
com.google.zxing.common.BitMatrix r14 = r12.a
int r14 = r14.i()
if (r0 < r14) goto L4a
com.google.zxing.common.BitMatrix r14 = r12.a
int r14 = r14.i()
int r0 = r14 + (-1)
L4a:
com.google.zxing.ResultPoint r14 = new com.google.zxing.ResultPoint
float r13 = r13.a()
float r0 = (float) r0
r14.<init>(r13, r0)
if (r15 == 0) goto L58
r9 = r14
goto L5c
L58:
r11 = r14
r9 = r1
goto L5d
L5b:
r9 = r1
L5c:
r11 = r3
L5d:
com.google.zxing.pdf417.decoder.BoundingBox r13 = new com.google.zxing.pdf417.decoder.BoundingBox
com.google.zxing.common.BitMatrix r7 = r12.a
r6 = r13
r6.<init>(r7, r8, r9, r10, r11)
return r13
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.zxing.pdf417.decoder.BoundingBox.a(int, int, boolean):com.google.zxing.pdf417.decoder.BoundingBox");
}
ResultPoint a() {
return this.c;
}
BoundingBox(BoundingBox boundingBox) {
this.a = boundingBox.a;
this.b = boundingBox.g();
this.c = boundingBox.a();
this.d = boundingBox.h();
this.e = boundingBox.b();
this.f = boundingBox.e();
this.g = boundingBox.c();
this.h = boundingBox.f();
this.i = boundingBox.d();
}
}

View File

@@ -0,0 +1,61 @@
package com.google.zxing.pdf417.decoder;
/* loaded from: classes.dex */
final class Codeword {
private final int a;
private final int b;
private final int c;
private final int d;
private int e = -1;
Codeword(int i, int i2, int i3, int i4) {
this.a = i;
this.b = i2;
this.c = i3;
this.d = i4;
}
boolean a(int i) {
return i != -1 && this.c == (i % 3) * 3;
}
int b() {
return this.b;
}
int c() {
return this.e;
}
int d() {
return this.a;
}
int e() {
return this.d;
}
int f() {
return this.b - this.a;
}
boolean g() {
return a(this.e);
}
void h() {
this.e = ((this.d / 30) * 3) + (this.c / 3);
}
public String toString() {
return this.e + "|" + this.d;
}
int a() {
return this.c;
}
void b(int i) {
this.e = i;
}
}

View File

@@ -0,0 +1,375 @@
package com.google.zxing.pdf417.decoder;
import com.baidu.cloud.media.player.IMediaPlayer;
import com.google.zxing.FormatException;
import com.google.zxing.pdf417.PDF417ResultMetadata;
import java.math.BigInteger;
import java.util.Arrays;
/* loaded from: classes.dex */
final class DecodedBitStreamParser {
private static final char[] a = ";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'".toCharArray();
private static final char[] b = "0123456789&\r\t,:#-.$/+%*=^".toCharArray();
private static final BigInteger[] c;
/* renamed from: com.google.zxing.pdf417.decoder.DecodedBitStreamParser$1, reason: invalid class name */
static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] a = new int[Mode.values().length];
static {
try {
a[Mode.ALPHA.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[Mode.LOWER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[Mode.MIXED.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[Mode.PUNCT.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
a[Mode.ALPHA_SHIFT.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
a[Mode.PUNCT_SHIFT.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
}
}
private enum Mode {
ALPHA,
LOWER,
MIXED,
PUNCT,
ALPHA_SHIFT,
PUNCT_SHIFT
}
static {
BigInteger[] bigIntegerArr = new BigInteger[16];
c = bigIntegerArr;
bigIntegerArr[0] = BigInteger.ONE;
BigInteger valueOf = BigInteger.valueOf(900L);
c[1] = valueOf;
int i = 2;
while (true) {
BigInteger[] bigIntegerArr2 = c;
if (i >= bigIntegerArr2.length) {
return;
}
bigIntegerArr2[i] = bigIntegerArr2[i - 1].multiply(valueOf);
i++;
}
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARN: Removed duplicated region for block: B:24:0x004e */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
static com.google.zxing.common.DecoderResult a(int[] r6, java.lang.String r7) throws com.google.zxing.FormatException {
/*
java.lang.StringBuilder r0 = new java.lang.StringBuilder
int r1 = r6.length
r2 = 1
int r1 = r1 << r2
r0.<init>(r1)
java.nio.charset.Charset r1 = java.nio.charset.StandardCharsets.ISO_8859_1
r2 = r6[r2]
com.google.zxing.pdf417.PDF417ResultMetadata r3 = new com.google.zxing.pdf417.PDF417ResultMetadata
r3.<init>()
r4 = 2
L12:
r5 = 0
r5 = r6[r5]
if (r4 >= r5) goto L6d
r5 = 913(0x391, float:1.28E-42)
if (r2 == r5) goto L58
switch(r2) {
case 900: goto L53;
case 901: goto L4e;
case 902: goto L49;
default: goto L1e;
}
L1e:
switch(r2) {
case 922: goto L44;
case 923: goto L44;
case 924: goto L4e;
case 925: goto L41;
case 926: goto L3e;
case 927: goto L2d;
case 928: goto L28;
default: goto L21;
}
L21:
int r4 = r4 + (-1)
int r2 = b(r6, r4, r0)
goto L60
L28:
int r2 = a(r6, r4, r3)
goto L60
L2d:
int r2 = r4 + 1
r1 = r6[r4]
com.google.zxing.common.CharacterSetECI r1 = com.google.zxing.common.CharacterSetECI.getCharacterSetECIByValue(r1)
java.lang.String r1 = r1.name()
java.nio.charset.Charset r1 = java.nio.charset.Charset.forName(r1)
goto L60
L3e:
int r2 = r4 + 2
goto L60
L41:
int r2 = r4 + 1
goto L60
L44:
com.google.zxing.FormatException r6 = com.google.zxing.FormatException.getFormatInstance()
throw r6
L49:
int r2 = a(r6, r4, r0)
goto L60
L4e:
int r2 = a(r2, r6, r1, r4, r0)
goto L60
L53:
int r2 = b(r6, r4, r0)
goto L60
L58:
int r2 = r4 + 1
r4 = r6[r4]
char r4 = (char) r4
r0.append(r4)
L60:
int r4 = r6.length
if (r2 >= r4) goto L68
int r4 = r2 + 1
r2 = r6[r2]
goto L12
L68:
com.google.zxing.FormatException r6 = com.google.zxing.FormatException.getFormatInstance()
throw r6
L6d:
int r6 = r0.length()
if (r6 == 0) goto L81
com.google.zxing.common.DecoderResult r6 = new com.google.zxing.common.DecoderResult
java.lang.String r0 = r0.toString()
r1 = 0
r6.<init>(r1, r0, r1, r7)
r6.a(r3)
return r6
L81:
com.google.zxing.FormatException r6 = com.google.zxing.FormatException.getFormatInstance()
throw r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.zxing.pdf417.decoder.DecodedBitStreamParser.a(int[], java.lang.String):com.google.zxing.common.DecoderResult");
}
/* JADX WARN: Failed to find 'out' block for switch in B:16:0x0034. Please report as an issue. */
/* JADX WARN: Failed to find 'out' block for switch in B:17:0x0037. Please report as an issue. */
private static int b(int[] iArr, int i, StringBuilder sb) {
int[] iArr2 = new int[(iArr[0] - i) << 1];
int[] iArr3 = new int[(iArr[0] - i) << 1];
boolean z = false;
int i2 = 0;
while (i < iArr[0] && !z) {
int i3 = i + 1;
int i4 = iArr[i];
if (i4 < 900) {
iArr2[i2] = i4 / 30;
iArr2[i2 + 1] = i4 % 30;
i2 += 2;
} else if (i4 != 913) {
if (i4 != 928) {
switch (i4) {
case IMediaPlayer.MEDIA_INFO_TIMED_TEXT_ERROR /* 900 */:
iArr2[i2] = 900;
i2++;
break;
case IMediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE /* 901 */:
case IMediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT /* 902 */:
break;
default:
switch (i4) {
}
}
}
i = i3 - 1;
z = true;
} else {
iArr2[i2] = 913;
i = i3 + 1;
iArr3[i2] = iArr[i3];
i2++;
}
i = i3;
}
a(iArr2, iArr3, i2, sb);
return i;
}
static int a(int[] iArr, int i, PDF417ResultMetadata pDF417ResultMetadata) throws FormatException {
if (i + 2 <= iArr[0]) {
int[] iArr2 = new int[2];
int i2 = i;
int i3 = 0;
while (i3 < 2) {
iArr2[i3] = iArr[i2];
i3++;
i2++;
}
pDF417ResultMetadata.c(Integer.parseInt(a(iArr2, 2)));
StringBuilder sb = new StringBuilder();
int b2 = b(iArr, i2, sb);
pDF417ResultMetadata.b(sb.toString());
int i4 = iArr[b2] == 923 ? b2 + 1 : -1;
while (b2 < iArr[0]) {
int i5 = iArr[b2];
if (i5 == 922) {
b2++;
pDF417ResultMetadata.a(true);
} else if (i5 == 923) {
int i6 = b2 + 1;
switch (iArr[i6]) {
case 0:
StringBuilder sb2 = new StringBuilder();
b2 = b(iArr, i6 + 1, sb2);
pDF417ResultMetadata.c(sb2.toString());
break;
case 1:
StringBuilder sb3 = new StringBuilder();
b2 = a(iArr, i6 + 1, sb3);
pDF417ResultMetadata.b(Integer.parseInt(sb3.toString()));
break;
case 2:
StringBuilder sb4 = new StringBuilder();
b2 = a(iArr, i6 + 1, sb4);
pDF417ResultMetadata.b(Long.parseLong(sb4.toString()));
break;
case 3:
StringBuilder sb5 = new StringBuilder();
b2 = b(iArr, i6 + 1, sb5);
pDF417ResultMetadata.d(sb5.toString());
break;
case 4:
StringBuilder sb6 = new StringBuilder();
b2 = b(iArr, i6 + 1, sb6);
pDF417ResultMetadata.a(sb6.toString());
break;
case 5:
StringBuilder sb7 = new StringBuilder();
b2 = a(iArr, i6 + 1, sb7);
pDF417ResultMetadata.a(Long.parseLong(sb7.toString()));
break;
case 6:
StringBuilder sb8 = new StringBuilder();
b2 = a(iArr, i6 + 1, sb8);
pDF417ResultMetadata.a(Integer.parseInt(sb8.toString()));
break;
default:
throw FormatException.getFormatInstance();
}
} else {
throw FormatException.getFormatInstance();
}
}
if (i4 != -1) {
int i7 = b2 - i4;
if (pDF417ResultMetadata.a()) {
i7--;
}
pDF417ResultMetadata.a(Arrays.copyOfRange(iArr, i4, i7 + i4));
}
return b2;
}
throw FormatException.getFormatInstance();
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARN: Removed duplicated region for block: B:26:0x00dc A[PHI: r2
0x00dc: PHI (r2v15 com.google.zxing.pdf417.decoder.DecodedBitStreamParser$Mode) =
(r2v1 com.google.zxing.pdf417.decoder.DecodedBitStreamParser$Mode)
(r2v1 com.google.zxing.pdf417.decoder.DecodedBitStreamParser$Mode)
(r2v1 com.google.zxing.pdf417.decoder.DecodedBitStreamParser$Mode)
(r2v16 com.google.zxing.pdf417.decoder.DecodedBitStreamParser$Mode)
binds: [B:63:0x00cb, B:53:0x00aa, B:40:0x0083, B:25:0x0052] A[DONT_GENERATE, DONT_INLINE]] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private static void a(int[] r12, int[] r13, int r14, java.lang.StringBuilder r15) {
/*
Method dump skipped, instructions count: 298
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.zxing.pdf417.decoder.DecodedBitStreamParser.a(int[], int[], int, java.lang.StringBuilder):void");
}
/* JADX WARN: Failed to find 'out' block for switch in B:45:0x0078. Please report as an issue. */
/* JADX WARN: Failed to find 'out' block for switch in B:46:0x007b. Please report as an issue. */
/* JADX WARN: Removed duplicated region for block: B:20:0x0046 A[SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:31:0x0021 A[ADDED_TO_REGION, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:45:0x0078 */
/* JADX WARN: Removed duplicated region for block: B:64:0x00aa A[SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private static int a(int r16, int[] r17, java.nio.charset.Charset r18, int r19, java.lang.StringBuilder r20) {
/*
Method dump skipped, instructions count: 258
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.zxing.pdf417.decoder.DecodedBitStreamParser.a(int, int[], java.nio.charset.Charset, int, java.lang.StringBuilder):int");
}
private static int a(int[] iArr, int i, StringBuilder sb) throws FormatException {
int[] iArr2 = new int[15];
boolean z = false;
int i2 = 0;
while (i < iArr[0] && !z) {
int i3 = i + 1;
int i4 = iArr[i];
if (i3 == iArr[0]) {
z = true;
}
if (i4 < 900) {
iArr2[i2] = i4;
i2++;
} else {
if (i4 != 900 && i4 != 901 && i4 != 928) {
switch (i4) {
}
}
i3--;
z = true;
}
if ((i2 % 15 == 0 || i4 == 902 || z) && i2 > 0) {
sb.append(a(iArr2, i2));
i2 = 0;
}
i = i3;
}
return i;
}
private static String a(int[] iArr, int i) throws FormatException {
BigInteger bigInteger = BigInteger.ZERO;
for (int i2 = 0; i2 < i; i2++) {
bigInteger = bigInteger.add(c[(i - i2) - 1].multiply(BigInteger.valueOf(iArr[i2])));
}
String bigInteger2 = bigInteger.toString();
if (bigInteger2.charAt(0) == '1') {
return bigInteger2.substring(1);
}
throw FormatException.getFormatInstance();
}
}

View File

@@ -0,0 +1,261 @@
package com.google.zxing.pdf417.decoder;
import java.util.Formatter;
/* loaded from: classes.dex */
final class DetectionResult {
private final BarcodeMetadata a;
private final DetectionResultColumn[] b;
private BoundingBox c;
private final int d;
DetectionResult(BarcodeMetadata barcodeMetadata, BoundingBox boundingBox) {
this.a = barcodeMetadata;
this.d = barcodeMetadata.a();
this.c = boundingBox;
this.b = new DetectionResultColumn[this.d + 2];
}
private void a(DetectionResultColumn detectionResultColumn) {
if (detectionResultColumn != null) {
((DetectionResultRowIndicatorColumn) detectionResultColumn).a(this.a);
}
}
private int f() {
int g = g();
if (g == 0) {
return 0;
}
for (int i = 1; i < this.d + 1; i++) {
Codeword[] b = this.b[i].b();
for (int i2 = 0; i2 < b.length; i2++) {
if (b[i2] != null && !b[i2].g()) {
a(i, i2, b);
}
}
}
return g;
}
private int g() {
h();
return i() + j();
}
private void h() {
DetectionResultColumn[] detectionResultColumnArr = this.b;
if (detectionResultColumnArr[0] == null || detectionResultColumnArr[this.d + 1] == null) {
return;
}
Codeword[] b = detectionResultColumnArr[0].b();
Codeword[] b2 = this.b[this.d + 1].b();
for (int i = 0; i < b.length; i++) {
if (b[i] != null && b2[i] != null && b[i].c() == b2[i].c()) {
for (int i2 = 1; i2 <= this.d; i2++) {
Codeword codeword = this.b[i2].b()[i];
if (codeword != null) {
codeword.b(b[i].c());
if (!codeword.g()) {
this.b[i2].b()[i] = null;
}
}
}
}
}
}
private int i() {
DetectionResultColumn[] detectionResultColumnArr = this.b;
if (detectionResultColumnArr[0] == null) {
return 0;
}
Codeword[] b = detectionResultColumnArr[0].b();
int i = 0;
for (int i2 = 0; i2 < b.length; i2++) {
if (b[i2] != null) {
int c = b[i2].c();
int i3 = i;
int i4 = 0;
for (int i5 = 1; i5 < this.d + 1 && i4 < 2; i5++) {
Codeword codeword = this.b[i5].b()[i2];
if (codeword != null) {
i4 = a(c, i4, codeword);
if (!codeword.g()) {
i3++;
}
}
}
i = i3;
}
}
return i;
}
private int j() {
DetectionResultColumn[] detectionResultColumnArr = this.b;
int i = this.d;
if (detectionResultColumnArr[i + 1] == null) {
return 0;
}
Codeword[] b = detectionResultColumnArr[i + 1].b();
int i2 = 0;
for (int i3 = 0; i3 < b.length; i3++) {
if (b[i3] != null) {
int c = b[i3].c();
int i4 = i2;
int i5 = 0;
for (int i6 = this.d + 1; i6 > 0 && i5 < 2; i6--) {
Codeword codeword = this.b[i6].b()[i3];
if (codeword != null) {
i5 = a(c, i5, codeword);
if (!codeword.g()) {
i4++;
}
}
}
i2 = i4;
}
}
return i2;
}
int b() {
return this.a.b();
}
int c() {
return this.a.c();
}
BoundingBox d() {
return this.c;
}
DetectionResultColumn[] e() {
a(this.b[0]);
a(this.b[this.d + 1]);
int i = 928;
while (true) {
int f = f();
if (f <= 0 || f >= i) {
break;
}
i = f;
}
return this.b;
}
public String toString() {
DetectionResultColumn[] detectionResultColumnArr = this.b;
DetectionResultColumn detectionResultColumn = detectionResultColumnArr[0];
if (detectionResultColumn == null) {
detectionResultColumn = detectionResultColumnArr[this.d + 1];
}
Formatter formatter = new Formatter();
for (int i = 0; i < detectionResultColumn.b().length; i++) {
try {
formatter.format("CW %3d:", Integer.valueOf(i));
for (int i2 = 0; i2 < this.d + 2; i2++) {
if (this.b[i2] == null) {
formatter.format(" | ", new Object[0]);
} else {
Codeword codeword = this.b[i2].b()[i];
if (codeword == null) {
formatter.format(" | ", new Object[0]);
} else {
formatter.format(" %3d|%3d", Integer.valueOf(codeword.c()), Integer.valueOf(codeword.e()));
}
}
}
formatter.format("%n", new Object[0]);
} catch (Throwable th) {
try {
throw th;
} catch (Throwable th2) {
try {
formatter.close();
} catch (Throwable th3) {
th.addSuppressed(th3);
}
throw th2;
}
}
}
String formatter2 = formatter.toString();
formatter.close();
return formatter2;
}
private static int a(int i, int i2, Codeword codeword) {
if (codeword == null || codeword.g()) {
return i2;
}
if (!codeword.a(i)) {
return i2 + 1;
}
codeword.b(i);
return 0;
}
private void a(int i, int i2, Codeword[] codewordArr) {
Codeword codeword = codewordArr[i2];
Codeword[] b = this.b[i - 1].b();
DetectionResultColumn[] detectionResultColumnArr = this.b;
int i3 = i + 1;
Codeword[] b2 = detectionResultColumnArr[i3] != null ? detectionResultColumnArr[i3].b() : b;
Codeword[] codewordArr2 = new Codeword[14];
codewordArr2[2] = b[i2];
codewordArr2[3] = b2[i2];
if (i2 > 0) {
int i4 = i2 - 1;
codewordArr2[0] = codewordArr[i4];
codewordArr2[4] = b[i4];
codewordArr2[5] = b2[i4];
}
if (i2 > 1) {
int i5 = i2 - 2;
codewordArr2[8] = codewordArr[i5];
codewordArr2[10] = b[i5];
codewordArr2[11] = b2[i5];
}
if (i2 < codewordArr.length - 1) {
int i6 = i2 + 1;
codewordArr2[1] = codewordArr[i6];
codewordArr2[6] = b[i6];
codewordArr2[7] = b2[i6];
}
if (i2 < codewordArr.length - 2) {
int i7 = i2 + 2;
codewordArr2[9] = codewordArr[i7];
codewordArr2[12] = b[i7];
codewordArr2[13] = b2[i7];
}
for (int i8 = 0; i8 < 14 && !a(codeword, codewordArr2[i8]); i8++) {
}
}
private static boolean a(Codeword codeword, Codeword codeword2) {
if (codeword2 == null || !codeword2.g() || codeword2.a() != codeword.a()) {
return false;
}
codeword.b(codeword2.c());
return true;
}
int a() {
return this.d;
}
void a(BoundingBox boundingBox) {
this.c = boundingBox;
}
void a(int i, DetectionResultColumn detectionResultColumn) {
this.b[i] = detectionResultColumn;
}
DetectionResultColumn a(int i) {
return this.b[i];
}
}

View File

@@ -0,0 +1,85 @@
package com.google.zxing.pdf417.decoder;
import java.util.Formatter;
/* loaded from: classes.dex */
class DetectionResultColumn {
private final BoundingBox a;
private final Codeword[] b;
DetectionResultColumn(BoundingBox boundingBox) {
this.a = new BoundingBox(boundingBox);
this.b = new Codeword[(boundingBox.d() - boundingBox.f()) + 1];
}
final void a(int i, Codeword codeword) {
this.b[c(i)] = codeword;
}
final Codeword b(int i) {
Codeword codeword;
Codeword codeword2;
Codeword a = a(i);
if (a != null) {
return a;
}
for (int i2 = 1; i2 < 5; i2++) {
int c = c(i) - i2;
if (c >= 0 && (codeword2 = this.b[c]) != null) {
return codeword2;
}
int c2 = c(i) + i2;
Codeword[] codewordArr = this.b;
if (c2 < codewordArr.length && (codeword = codewordArr[c2]) != null) {
return codeword;
}
}
return null;
}
final int c(int i) {
return i - this.a.f();
}
public String toString() {
Formatter formatter = new Formatter();
try {
int i = 0;
for (Codeword codeword : this.b) {
if (codeword == null) {
formatter.format("%3d: | %n", Integer.valueOf(i));
i++;
} else {
formatter.format("%3d: %3d|%3d%n", Integer.valueOf(i), Integer.valueOf(codeword.c()), Integer.valueOf(codeword.e()));
i++;
}
}
String formatter2 = formatter.toString();
formatter.close();
return formatter2;
} catch (Throwable th) {
try {
throw th;
} catch (Throwable th2) {
try {
formatter.close();
} catch (Throwable th3) {
th.addSuppressed(th3);
}
throw th2;
}
}
}
final Codeword a(int i) {
return this.b[c(i)];
}
final BoundingBox a() {
return this.a;
}
final Codeword[] b() {
return this.b;
}
}

View File

@@ -0,0 +1,184 @@
package com.google.zxing.pdf417.decoder;
import com.google.zxing.ResultPoint;
/* loaded from: classes.dex */
final class DetectionResultRowIndicatorColumn extends DetectionResultColumn {
private final boolean c;
DetectionResultRowIndicatorColumn(BoundingBox boundingBox, boolean z) {
super(boundingBox);
this.c = z;
}
private void b(BarcodeMetadata barcodeMetadata) {
BoundingBox a = a();
ResultPoint g = this.c ? a.g() : a.h();
ResultPoint a2 = this.c ? a.a() : a.b();
int c = c((int) a2.b());
Codeword[] b = b();
int i = -1;
int i2 = 0;
int i3 = 1;
for (int c2 = c((int) g.b()); c2 < c; c2++) {
if (b[c2] != null) {
Codeword codeword = b[c2];
codeword.h();
int c3 = codeword.c() - i;
if (c3 == 0) {
i2++;
} else {
if (c3 == 1) {
i3 = Math.max(i3, i2);
i = codeword.c();
} else if (codeword.c() >= barcodeMetadata.c()) {
b[c2] = null;
} else {
i = codeword.c();
}
i2 = 1;
}
}
}
}
private void f() {
for (Codeword codeword : b()) {
if (codeword != null) {
codeword.h();
}
}
}
void a(BarcodeMetadata barcodeMetadata) {
Codeword[] b = b();
f();
a(b, barcodeMetadata);
BoundingBox a = a();
ResultPoint g = this.c ? a.g() : a.h();
ResultPoint a2 = this.c ? a.a() : a.b();
int c = c((int) g.b());
int c2 = c((int) a2.b());
int i = -1;
int i2 = 0;
int i3 = 1;
while (c < c2) {
if (b[c] != null) {
Codeword codeword = b[c];
int c3 = codeword.c() - i;
if (c3 == 0) {
i2++;
} else {
if (c3 == 1) {
i3 = Math.max(i3, i2);
i = codeword.c();
} else if (c3 < 0 || codeword.c() >= barcodeMetadata.c() || c3 > c) {
b[c] = null;
} else {
if (i3 > 2) {
c3 *= i3 - 2;
}
boolean z = c3 >= c;
for (int i4 = 1; i4 <= c3 && !z; i4++) {
z = b[c - i4] != null;
}
if (z) {
b[c] = null;
} else {
i = codeword.c();
}
}
i2 = 1;
}
}
c++;
}
}
BarcodeMetadata c() {
Codeword[] b = b();
BarcodeValue barcodeValue = new BarcodeValue();
BarcodeValue barcodeValue2 = new BarcodeValue();
BarcodeValue barcodeValue3 = new BarcodeValue();
BarcodeValue barcodeValue4 = new BarcodeValue();
for (Codeword codeword : b) {
if (codeword != null) {
codeword.h();
int e = codeword.e() % 30;
int c = codeword.c();
if (!this.c) {
c += 2;
}
int i = c % 3;
if (i == 0) {
barcodeValue2.a((e * 3) + 1);
} else if (i == 1) {
barcodeValue4.a(e / 3);
barcodeValue3.a(e % 3);
} else if (i == 2) {
barcodeValue.a(e + 1);
}
}
}
if (barcodeValue.a().length == 0 || barcodeValue2.a().length == 0 || barcodeValue3.a().length == 0 || barcodeValue4.a().length == 0 || barcodeValue.a()[0] <= 0 || barcodeValue2.a()[0] + barcodeValue3.a()[0] < 3 || barcodeValue2.a()[0] + barcodeValue3.a()[0] > 90) {
return null;
}
BarcodeMetadata barcodeMetadata = new BarcodeMetadata(barcodeValue.a()[0], barcodeValue2.a()[0], barcodeValue3.a()[0], barcodeValue4.a()[0]);
a(b, barcodeMetadata);
return barcodeMetadata;
}
int[] d() {
int c;
BarcodeMetadata c2 = c();
if (c2 == null) {
return null;
}
b(c2);
int[] iArr = new int[c2.c()];
for (Codeword codeword : b()) {
if (codeword != null && (c = codeword.c()) < iArr.length) {
iArr[c] = iArr[c] + 1;
}
}
return iArr;
}
boolean e() {
return this.c;
}
@Override // com.google.zxing.pdf417.decoder.DetectionResultColumn
public String toString() {
return "IsLeft: " + this.c + '\n' + super.toString();
}
private void a(Codeword[] codewordArr, BarcodeMetadata barcodeMetadata) {
for (int i = 0; i < codewordArr.length; i++) {
Codeword codeword = codewordArr[i];
if (codewordArr[i] != null) {
int e = codeword.e() % 30;
int c = codeword.c();
if (c > barcodeMetadata.c()) {
codewordArr[i] = null;
} else {
if (!this.c) {
c += 2;
}
int i2 = c % 3;
if (i2 != 0) {
if (i2 != 1) {
if (i2 == 2 && e + 1 != barcodeMetadata.a()) {
codewordArr[i] = null;
}
} else if (e / 3 != barcodeMetadata.b() || e % 3 != barcodeMetadata.d()) {
codewordArr[i] = null;
}
} else if ((e * 3) + 1 != barcodeMetadata.e()) {
codewordArr[i] = null;
}
}
}
}
}
}

View File

@@ -0,0 +1,119 @@
package com.google.zxing.pdf417.decoder;
import com.google.zxing.common.detector.MathUtils;
import com.google.zxing.pdf417.PDF417Common;
import java.lang.reflect.Array;
/* loaded from: classes.dex */
final class PDF417CodewordDecoder {
private static final float[][] a = (float[][]) Array.newInstance((Class<?>) float.class, PDF417Common.b.length, 8);
static {
int i;
int i2 = 0;
while (true) {
int[] iArr = PDF417Common.b;
if (i2 >= iArr.length) {
return;
}
int i3 = iArr[i2];
int i4 = i3 & 1;
int i5 = i3;
int i6 = 0;
while (i6 < 8) {
float f = 0.0f;
while (true) {
i = i5 & 1;
if (i == i4) {
f += 1.0f;
i5 >>= 1;
}
}
a[i2][(8 - i6) - 1] = f / 17.0f;
i6++;
i4 = i;
}
i2++;
}
}
private static int a(int[] iArr) {
long j = 0;
int i = 0;
while (i < iArr.length) {
long j2 = j;
for (int i2 = 0; i2 < iArr[i]; i2++) {
int i3 = 1;
long j3 = j2 << 1;
if (i % 2 != 0) {
i3 = 0;
}
j2 = j3 | i3;
}
i++;
j = j2;
}
return (int) j;
}
private static int b(int[] iArr) {
int a2 = MathUtils.a(iArr);
float[] fArr = new float[8];
if (a2 > 1) {
for (int i = 0; i < 8; i++) {
fArr[i] = iArr[i] / a2;
}
}
int i2 = -1;
int i3 = 0;
float f = Float.MAX_VALUE;
while (true) {
float[][] fArr2 = a;
if (i3 >= fArr2.length) {
return i2;
}
float[] fArr3 = fArr2[i3];
float f2 = 0.0f;
for (int i4 = 0; i4 < 8; i4++) {
float f3 = fArr3[i4] - fArr[i4];
f2 += f3 * f3;
if (f2 >= f) {
break;
}
}
if (f2 < f) {
i2 = PDF417Common.b[i3];
f = f2;
}
i3++;
}
}
private static int c(int[] iArr) {
int a2 = a(iArr);
if (PDF417Common.a(a2) == -1) {
return -1;
}
return a2;
}
static int d(int[] iArr) {
int c = c(e(iArr));
return c != -1 ? c : b(iArr);
}
private static int[] e(int[] iArr) {
float a2 = MathUtils.a(iArr);
int[] iArr2 = new int[8];
int i = 0;
int i2 = 0;
for (int i3 = 0; i3 < 17; i3++) {
if (iArr[i2] + i <= (a2 / 34.0f) + ((i3 * a2) / 17.0f)) {
i += iArr[i2];
i2++;
}
iArr2[i2] = iArr2[i2] + 1;
}
return iArr2;
}
}

View File

@@ -0,0 +1,552 @@
package com.google.zxing.pdf417.decoder;
import com.google.zxing.ChecksumException;
import com.google.zxing.FormatException;
import com.google.zxing.NotFoundException;
import com.google.zxing.ResultPoint;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.common.DecoderResult;
import com.google.zxing.common.detector.MathUtils;
import com.google.zxing.pdf417.PDF417Common;
import com.google.zxing.pdf417.decoder.ec.ErrorCorrection;
import java.lang.reflect.Array;
import java.util.ArrayList;
/* loaded from: classes.dex */
public final class PDF417ScanningDecoder {
private static final ErrorCorrection a = new ErrorCorrection();
public static DecoderResult a(BitMatrix bitMatrix, ResultPoint resultPoint, ResultPoint resultPoint2, ResultPoint resultPoint3, ResultPoint resultPoint4, int i, int i2) throws NotFoundException, FormatException, ChecksumException {
DetectionResultRowIndicatorColumn detectionResultRowIndicatorColumn;
int i3;
int i4;
int i5;
DetectionResultRowIndicatorColumn detectionResultRowIndicatorColumn2 = null;
DetectionResult detectionResult = null;
DetectionResultRowIndicatorColumn detectionResultRowIndicatorColumn3 = null;
BoundingBox boundingBox = new BoundingBox(bitMatrix, resultPoint, resultPoint2, resultPoint3, resultPoint4);
int i6 = 0;
while (i6 < 2) {
if (resultPoint != null) {
detectionResultRowIndicatorColumn2 = a(bitMatrix, boundingBox, resultPoint, true, i, i2);
}
detectionResultRowIndicatorColumn = detectionResultRowIndicatorColumn2;
if (resultPoint3 != null) {
detectionResultRowIndicatorColumn3 = a(bitMatrix, boundingBox, resultPoint3, false, i, i2);
}
detectionResult = b(detectionResultRowIndicatorColumn, detectionResultRowIndicatorColumn3);
if (detectionResult == null) {
throw NotFoundException.getNotFoundInstance();
}
if (i6 != 0 || detectionResult.d() == null || (detectionResult.d().f() >= boundingBox.f() && detectionResult.d().d() <= boundingBox.d())) {
detectionResult.a(boundingBox);
break;
}
boundingBox = detectionResult.d();
i6++;
detectionResultRowIndicatorColumn2 = detectionResultRowIndicatorColumn;
}
detectionResultRowIndicatorColumn = detectionResultRowIndicatorColumn2;
int a2 = detectionResult.a() + 1;
detectionResult.a(0, detectionResultRowIndicatorColumn);
detectionResult.a(a2, detectionResultRowIndicatorColumn3);
boolean z = detectionResultRowIndicatorColumn != null;
int i7 = i;
int i8 = i2;
for (int i9 = 1; i9 <= a2; i9++) {
int i10 = z ? i9 : a2 - i9;
if (detectionResult.a(i10) == null) {
DetectionResultColumn detectionResultRowIndicatorColumn4 = (i10 == 0 || i10 == a2) ? new DetectionResultRowIndicatorColumn(boundingBox, i10 == 0) : new DetectionResultColumn(boundingBox);
detectionResult.a(i10, detectionResultRowIndicatorColumn4);
int i11 = -1;
int i12 = i8;
int i13 = -1;
int i14 = i7;
int f = boundingBox.f();
while (f <= boundingBox.d()) {
int a3 = a(detectionResult, i10, f, z);
if (a3 >= 0 && a3 <= boundingBox.c()) {
i5 = a3;
} else if (i13 != i11) {
i5 = i13;
} else {
i3 = i13;
i4 = i12;
i12 = i4;
i13 = i3;
f++;
i11 = -1;
}
i3 = i13;
int i15 = i12;
Codeword a4 = a(bitMatrix, boundingBox.e(), boundingBox.c(), z, i5, f, i14, i15);
if (a4 != null) {
detectionResultRowIndicatorColumn4.a(f, a4);
i14 = Math.min(i14, a4.f());
i12 = Math.max(i15, a4.f());
i13 = i5;
f++;
i11 = -1;
} else {
i4 = i15;
i12 = i4;
i13 = i3;
f++;
i11 = -1;
}
}
i7 = i14;
i8 = i12;
}
}
return b(detectionResult);
}
private static boolean a(int i, int i2, int i3) {
return i2 + (-2) <= i && i <= i3 + 2;
}
private static DetectionResult b(DetectionResultRowIndicatorColumn detectionResultRowIndicatorColumn, DetectionResultRowIndicatorColumn detectionResultRowIndicatorColumn2) throws NotFoundException {
BarcodeMetadata a2;
if ((detectionResultRowIndicatorColumn == null && detectionResultRowIndicatorColumn2 == null) || (a2 = a(detectionResultRowIndicatorColumn, detectionResultRowIndicatorColumn2)) == null) {
return null;
}
return new DetectionResult(a2, BoundingBox.a(a(detectionResultRowIndicatorColumn), a(detectionResultRowIndicatorColumn2)));
}
private static int c(int i) {
return 2 << i;
}
private static int b(int[] iArr) {
int i = -1;
for (int i2 : iArr) {
i = Math.max(i, i2);
}
return i;
}
private static DecoderResult b(DetectionResult detectionResult) throws FormatException, ChecksumException, NotFoundException {
BarcodeValue[][] a2 = a(detectionResult);
a(detectionResult, a2);
ArrayList arrayList = new ArrayList();
int[] iArr = new int[detectionResult.c() * detectionResult.a()];
ArrayList arrayList2 = new ArrayList();
ArrayList arrayList3 = new ArrayList();
for (int i = 0; i < detectionResult.c(); i++) {
int i2 = 0;
while (i2 < detectionResult.a()) {
int i3 = i2 + 1;
int[] a3 = a2[i][i3].a();
int a4 = (detectionResult.a() * i) + i2;
if (a3.length == 0) {
arrayList.add(Integer.valueOf(a4));
} else if (a3.length == 1) {
iArr[a4] = a3[0];
} else {
arrayList3.add(Integer.valueOf(a4));
arrayList2.add(a3);
}
i2 = i3;
}
}
int[][] iArr2 = new int[arrayList2.size()][];
for (int i4 = 0; i4 < iArr2.length; i4++) {
iArr2[i4] = (int[]) arrayList2.get(i4);
}
return a(detectionResult.b(), iArr, PDF417Common.a(arrayList), PDF417Common.a(arrayList3), iArr2);
}
private static BoundingBox a(DetectionResultRowIndicatorColumn detectionResultRowIndicatorColumn) throws NotFoundException {
int[] d;
if (detectionResultRowIndicatorColumn == null || (d = detectionResultRowIndicatorColumn.d()) == null) {
return null;
}
int b = b(d);
int i = 0;
int i2 = 0;
for (int i3 : d) {
i2 += b - i3;
if (i3 > 0) {
break;
}
}
Codeword[] b2 = detectionResultRowIndicatorColumn.b();
for (int i4 = 0; i2 > 0 && b2[i4] == null; i4++) {
i2--;
}
for (int length = d.length - 1; length >= 0; length--) {
i += b - d[length];
if (d[length] > 0) {
break;
}
}
for (int length2 = b2.length - 1; i > 0 && b2[length2] == null; length2--) {
i--;
}
return detectionResultRowIndicatorColumn.a().a(i2, i, detectionResultRowIndicatorColumn.e());
}
/* JADX WARN: Removed duplicated region for block: B:17:0x0027 A[EDGE_INSN: B:17:0x0027->B:18:0x0027 BREAK A[LOOP:0: B:5:0x000c->B:13:0x000c], SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:8:0x0015 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private static int[] b(com.google.zxing.common.BitMatrix r7, int r8, int r9, boolean r10, int r11, int r12) {
/*
r0 = 8
int[] r1 = new int[r0]
r2 = 1
if (r10 == 0) goto L9
r3 = 1
goto La
L9:
r3 = -1
La:
r4 = 0
r5 = r10
Lc:
if (r10 == 0) goto L11
if (r11 >= r9) goto L27
goto L13
L11:
if (r11 < r8) goto L27
L13:
if (r4 >= r0) goto L27
boolean r6 = r7.b(r11, r12)
if (r6 != r5) goto L22
r6 = r1[r4]
int r6 = r6 + r2
r1[r4] = r6
int r11 = r11 + r3
goto Lc
L22:
int r4 = r4 + 1
r5 = r5 ^ 1
goto Lc
L27:
if (r4 == r0) goto L34
if (r10 == 0) goto L2c
r8 = r9
L2c:
if (r11 != r8) goto L32
r7 = 7
if (r4 != r7) goto L32
goto L34
L32:
r7 = 0
return r7
L34:
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.zxing.pdf417.decoder.PDF417ScanningDecoder.b(com.google.zxing.common.BitMatrix, int, int, boolean, int, int):int[]");
}
private static int b(int i) {
return a(a(i));
}
private static BarcodeMetadata a(DetectionResultRowIndicatorColumn detectionResultRowIndicatorColumn, DetectionResultRowIndicatorColumn detectionResultRowIndicatorColumn2) {
BarcodeMetadata c;
BarcodeMetadata c2;
if (detectionResultRowIndicatorColumn == null || (c = detectionResultRowIndicatorColumn.c()) == null) {
if (detectionResultRowIndicatorColumn2 == null) {
return null;
}
return detectionResultRowIndicatorColumn2.c();
}
if (detectionResultRowIndicatorColumn2 == null || (c2 = detectionResultRowIndicatorColumn2.c()) == null || c.a() == c2.a() || c.b() == c2.b() || c.c() == c2.c()) {
return c;
}
return null;
}
private static DetectionResultRowIndicatorColumn a(BitMatrix bitMatrix, BoundingBox boundingBox, ResultPoint resultPoint, boolean z, int i, int i2) {
DetectionResultRowIndicatorColumn detectionResultRowIndicatorColumn = new DetectionResultRowIndicatorColumn(boundingBox, z);
int i3 = 0;
while (i3 < 2) {
int i4 = i3 == 0 ? 1 : -1;
int a2 = (int) resultPoint.a();
for (int b = (int) resultPoint.b(); b <= boundingBox.d() && b >= boundingBox.f(); b += i4) {
Codeword a3 = a(bitMatrix, 0, bitMatrix.k(), z, a2, b, i, i2);
if (a3 != null) {
detectionResultRowIndicatorColumn.a(b, a3);
if (z) {
a2 = a3.d();
} else {
a2 = a3.b();
}
}
}
i3++;
}
return detectionResultRowIndicatorColumn;
}
private static void a(DetectionResult detectionResult, BarcodeValue[][] barcodeValueArr) throws NotFoundException {
BarcodeValue barcodeValue = barcodeValueArr[0][1];
int[] a2 = barcodeValue.a();
int a3 = (detectionResult.a() * detectionResult.c()) - c(detectionResult.b());
if (a2.length != 0) {
if (a2[0] != a3) {
barcodeValue.a(a3);
}
} else {
if (a3 > 0 && a3 <= 928) {
barcodeValue.a(a3);
return;
}
throw NotFoundException.getNotFoundInstance();
}
}
private static DecoderResult a(int i, int[] iArr, int[] iArr2, int[] iArr3, int[][] iArr4) throws FormatException, ChecksumException {
int[] iArr5 = new int[iArr3.length];
int i2 = 100;
while (true) {
int i3 = i2 - 1;
if (i2 > 0) {
for (int i4 = 0; i4 < iArr5.length; i4++) {
iArr[iArr3[i4]] = iArr4[i4][iArr5[i4]];
}
try {
return a(iArr, i, iArr2);
} catch (ChecksumException unused) {
if (iArr5.length == 0) {
throw ChecksumException.getChecksumInstance();
}
int i5 = 0;
while (true) {
if (i5 >= iArr5.length) {
break;
}
if (iArr5[i5] < iArr4[i5].length - 1) {
iArr5[i5] = iArr5[i5] + 1;
break;
}
iArr5[i5] = 0;
if (i5 == iArr5.length - 1) {
throw ChecksumException.getChecksumInstance();
}
i5++;
}
i2 = i3;
}
} else {
throw ChecksumException.getChecksumInstance();
}
}
}
private static BarcodeValue[][] a(DetectionResult detectionResult) {
int c;
BarcodeValue[][] barcodeValueArr = (BarcodeValue[][]) Array.newInstance((Class<?>) BarcodeValue.class, detectionResult.c(), detectionResult.a() + 2);
for (int i = 0; i < barcodeValueArr.length; i++) {
for (int i2 = 0; i2 < barcodeValueArr[i].length; i2++) {
barcodeValueArr[i][i2] = new BarcodeValue();
}
}
int i3 = 0;
for (DetectionResultColumn detectionResultColumn : detectionResult.e()) {
if (detectionResultColumn != null) {
for (Codeword codeword : detectionResultColumn.b()) {
if (codeword != null && (c = codeword.c()) >= 0 && c < barcodeValueArr.length) {
barcodeValueArr[c][i3].a(codeword.e());
}
}
}
i3++;
}
return barcodeValueArr;
}
private static boolean a(DetectionResult detectionResult, int i) {
return i >= 0 && i <= detectionResult.a() + 1;
}
private static int a(DetectionResult detectionResult, int i, int i2, boolean z) {
int i3 = z ? 1 : -1;
int i4 = i - i3;
Codeword a2 = a(detectionResult, i4) ? detectionResult.a(i4).a(i2) : null;
if (a2 != null) {
return z ? a2.b() : a2.d();
}
Codeword b = detectionResult.a(i).b(i2);
if (b != null) {
return z ? b.d() : b.b();
}
if (a(detectionResult, i4)) {
b = detectionResult.a(i4).b(i2);
}
if (b != null) {
return z ? b.b() : b.d();
}
int i5 = 0;
while (true) {
i -= i3;
if (a(detectionResult, i)) {
for (Codeword codeword : detectionResult.a(i).b()) {
if (codeword != null) {
return (z ? codeword.b() : codeword.d()) + (i3 * i5 * (codeword.b() - codeword.d()));
}
}
i5++;
} else {
BoundingBox d = detectionResult.d();
return z ? d.e() : d.c();
}
}
}
private static Codeword a(BitMatrix bitMatrix, int i, int i2, boolean z, int i3, int i4, int i5, int i6) {
int i7;
int d;
int a2;
int a3 = a(bitMatrix, i, i2, z, i3, i4);
int[] b = b(bitMatrix, i, i2, z, a3, i4);
if (b == null) {
return null;
}
int a4 = MathUtils.a(b);
if (z) {
a3 += a4;
i7 = a3;
} else {
for (int i8 = 0; i8 < b.length / 2; i8++) {
int i9 = b[i8];
b[i8] = b[(b.length - 1) - i8];
b[(b.length - 1) - i8] = i9;
}
i7 = a3 - a4;
}
if (a(a4, i5, i6) && (a2 = PDF417Common.a((d = PDF417CodewordDecoder.d(b)))) != -1) {
return new Codeword(i7, a3, b(d), a2);
}
return null;
}
/* JADX WARN: Code restructure failed: missing block: B:16:0x0023, code lost:
continue;
*/
/* JADX WARN: Code restructure failed: missing block: B:17:0x0023, code lost:
r0 = -r0;
r2 = !r2;
r1 = r1 + 1;
*/
/* JADX WARN: Code restructure failed: missing block: B:18:0x0023, code lost:
continue;
*/
/* JADX WARN: Code restructure failed: missing block: B:20:0x0023, code lost:
continue;
*/
/* JADX WARN: Removed duplicated region for block: B:10:0x0018 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private static int a(com.google.zxing.common.BitMatrix r5, int r6, int r7, boolean r8, int r9, int r10) {
/*
if (r8 == 0) goto L4
r0 = -1
goto L5
L4:
r0 = 1
L5:
r1 = 0
r2 = r8
r8 = r9
L8:
r3 = 2
if (r1 >= r3) goto L29
Lb:
if (r2 == 0) goto L10
if (r8 < r6) goto L23
goto L12
L10:
if (r8 >= r7) goto L23
L12:
boolean r4 = r5.b(r8, r10)
if (r2 != r4) goto L23
int r4 = r9 - r8
int r4 = java.lang.Math.abs(r4)
if (r4 <= r3) goto L21
return r9
L21:
int r8 = r8 + r0
goto Lb
L23:
int r0 = -r0
r2 = r2 ^ 1
int r1 = r1 + 1
goto L8
L29:
return r8
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.zxing.pdf417.decoder.PDF417ScanningDecoder.a(com.google.zxing.common.BitMatrix, int, int, boolean, int, int):int");
}
private static DecoderResult a(int[] iArr, int i, int[] iArr2) throws FormatException, ChecksumException {
if (iArr.length != 0) {
int i2 = 1 << (i + 1);
int a2 = a(iArr, iArr2, i2);
a(iArr, i2);
DecoderResult a3 = DecodedBitStreamParser.a(iArr, String.valueOf(i));
a3.b(Integer.valueOf(a2));
a3.a(Integer.valueOf(iArr2.length));
return a3;
}
throw FormatException.getFormatInstance();
}
private static int a(int[] iArr, int[] iArr2, int i) throws ChecksumException {
if ((iArr2 == null || iArr2.length <= (i / 2) + 3) && i >= 0 && i <= 512) {
return a.a(iArr, i, iArr2);
}
throw ChecksumException.getChecksumInstance();
}
private static void a(int[] iArr, int i) throws FormatException {
if (iArr.length >= 4) {
int i2 = iArr[0];
if (i2 > iArr.length) {
throw FormatException.getFormatInstance();
}
if (i2 == 0) {
if (i < iArr.length) {
iArr[0] = iArr.length - i;
return;
}
throw FormatException.getFormatInstance();
}
return;
}
throw FormatException.getFormatInstance();
}
private static int[] a(int i) {
int[] iArr = new int[8];
int i2 = 0;
int i3 = 7;
while (true) {
int i4 = i & 1;
if (i4 != i2) {
i3--;
if (i3 < 0) {
return iArr;
}
i2 = i4;
}
iArr[i3] = iArr[i3] + 1;
i >>= 1;
}
}
private static int a(int[] iArr) {
return ((((iArr[0] - iArr[2]) + iArr[4]) - iArr[6]) + 9) % 9;
}
}

View File

@@ -0,0 +1,117 @@
package com.google.zxing.pdf417.decoder.ec;
import com.google.zxing.ChecksumException;
/* loaded from: classes.dex */
public final class ErrorCorrection {
private final ModulusGF a = ModulusGF.f;
public int a(int[] iArr, int i, int[] iArr2) throws ChecksumException {
ModulusPoly modulusPoly = new ModulusPoly(this.a, iArr);
int[] iArr3 = new int[i];
boolean z = false;
for (int i2 = i; i2 > 0; i2--) {
int a = modulusPoly.a(this.a.a(i2));
iArr3[i - i2] = a;
if (a != 0) {
z = true;
}
}
if (!z) {
return 0;
}
ModulusPoly a2 = this.a.a();
if (iArr2 != null) {
ModulusPoly modulusPoly2 = a2;
for (int i3 : iArr2) {
int a3 = this.a.a((iArr.length - 1) - i3);
ModulusGF modulusGF = this.a;
modulusPoly2 = modulusPoly2.b(new ModulusPoly(modulusGF, new int[]{modulusGF.d(0, a3), 1}));
}
}
ModulusPoly[] a4 = a(this.a.b(i, 1), new ModulusPoly(this.a, iArr3), i);
ModulusPoly modulusPoly3 = a4[0];
ModulusPoly modulusPoly4 = a4[1];
int[] a5 = a(modulusPoly3);
int[] a6 = a(modulusPoly4, modulusPoly3, a5);
for (int i4 = 0; i4 < a5.length; i4++) {
int length = (iArr.length - 1) - this.a.c(a5[i4]);
if (length < 0) {
throw ChecksumException.getChecksumInstance();
}
iArr[length] = this.a.d(iArr[length], a6[i4]);
}
return a5.length;
}
private ModulusPoly[] a(ModulusPoly modulusPoly, ModulusPoly modulusPoly2, int i) throws ChecksumException {
if (modulusPoly.a() < modulusPoly2.a()) {
modulusPoly2 = modulusPoly;
modulusPoly = modulusPoly2;
}
ModulusPoly c = this.a.c();
ModulusPoly a = this.a.a();
while (true) {
ModulusPoly modulusPoly3 = modulusPoly2;
modulusPoly2 = modulusPoly;
modulusPoly = modulusPoly3;
ModulusPoly modulusPoly4 = a;
ModulusPoly modulusPoly5 = c;
c = modulusPoly4;
if (modulusPoly.a() >= i / 2) {
if (!modulusPoly.b()) {
ModulusPoly c2 = this.a.c();
int b = this.a.b(modulusPoly.b(modulusPoly.a()));
while (modulusPoly2.a() >= modulusPoly.a() && !modulusPoly2.b()) {
int a2 = modulusPoly2.a() - modulusPoly.a();
int c3 = this.a.c(modulusPoly2.b(modulusPoly2.a()), b);
c2 = c2.a(this.a.b(a2, c3));
modulusPoly2 = modulusPoly2.c(modulusPoly.a(a2, c3));
}
a = c2.b(c).c(modulusPoly5).c();
} else {
throw ChecksumException.getChecksumInstance();
}
} else {
int b2 = c.b(0);
if (b2 != 0) {
int b3 = this.a.b(b2);
return new ModulusPoly[]{c.c(b3), modulusPoly.c(b3)};
}
throw ChecksumException.getChecksumInstance();
}
}
}
private int[] a(ModulusPoly modulusPoly) throws ChecksumException {
int a = modulusPoly.a();
int[] iArr = new int[a];
int i = 0;
for (int i2 = 1; i2 < this.a.b() && i < a; i2++) {
if (modulusPoly.a(i2) == 0) {
iArr[i] = this.a.b(i2);
i++;
}
}
if (i == a) {
return iArr;
}
throw ChecksumException.getChecksumInstance();
}
private int[] a(ModulusPoly modulusPoly, ModulusPoly modulusPoly2, int[] iArr) {
int a = modulusPoly2.a();
int[] iArr2 = new int[a];
for (int i = 1; i <= a; i++) {
iArr2[a - i] = this.a.c(i, modulusPoly2.b(i));
}
ModulusPoly modulusPoly3 = new ModulusPoly(this.a, iArr2);
int length = iArr.length;
int[] iArr3 = new int[length];
for (int i2 = 0; i2 < length; i2++) {
int b = this.a.b(iArr[i2]);
iArr3[i2] = this.a.c(this.a.d(0, modulusPoly.a(b)), this.a.b(modulusPoly3.a(b)));
}
return iArr3;
}
}

View File

@@ -0,0 +1,87 @@
package com.google.zxing.pdf417.decoder.ec;
/* loaded from: classes.dex */
public final class ModulusGF {
public static final ModulusGF f = new ModulusGF(929, 3);
private final int[] a;
private final int[] b;
private final ModulusPoly c;
private final ModulusPoly d;
private final int e;
private ModulusGF(int i, int i2) {
this.e = i;
this.a = new int[i];
this.b = new int[i];
int i3 = 1;
for (int i4 = 0; i4 < i; i4++) {
this.a[i4] = i3;
i3 = (i3 * i2) % i;
}
for (int i5 = 0; i5 < i - 1; i5++) {
this.b[this.a[i5]] = i5;
}
this.c = new ModulusPoly(this, new int[]{0});
this.d = new ModulusPoly(this, new int[]{1});
}
ModulusPoly a() {
return this.d;
}
ModulusPoly b(int i, int i2) {
if (i < 0) {
throw new IllegalArgumentException();
}
if (i2 == 0) {
return this.c;
}
int[] iArr = new int[i + 1];
iArr[0] = i2;
return new ModulusPoly(this, iArr);
}
ModulusPoly c() {
return this.c;
}
int d(int i, int i2) {
int i3 = this.e;
return ((i + i3) - i2) % i3;
}
int a(int i, int i2) {
return (i + i2) % this.e;
}
int c(int i) {
if (i != 0) {
return this.b[i];
}
throw new IllegalArgumentException();
}
int a(int i) {
return this.a[i];
}
int c(int i, int i2) {
if (i == 0 || i2 == 0) {
return 0;
}
int[] iArr = this.a;
int[] iArr2 = this.b;
return iArr[(iArr2[i] + iArr2[i2]) % (this.e - 1)];
}
int b(int i) {
if (i != 0) {
return this.a[(this.e - this.b[i]) - 1];
}
throw new ArithmeticException();
}
int b() {
return this.e;
}
}

View File

@@ -0,0 +1,184 @@
package com.google.zxing.pdf417.decoder.ec;
/* loaded from: classes.dex */
final class ModulusPoly {
private final ModulusGF a;
private final int[] b;
ModulusPoly(ModulusGF modulusGF, int[] iArr) {
if (iArr.length == 0) {
throw new IllegalArgumentException();
}
this.a = modulusGF;
int length = iArr.length;
if (length <= 1 || iArr[0] != 0) {
this.b = iArr;
return;
}
int i = 1;
while (i < length && iArr[i] == 0) {
i++;
}
if (i == length) {
this.b = new int[]{0};
return;
}
this.b = new int[length - i];
int[] iArr2 = this.b;
System.arraycopy(iArr, i, iArr2, 0, iArr2.length);
}
int a() {
return this.b.length - 1;
}
boolean b() {
return this.b[0] == 0;
}
ModulusPoly c(ModulusPoly modulusPoly) {
if (this.a.equals(modulusPoly.a)) {
return modulusPoly.b() ? this : a(modulusPoly.c());
}
throw new IllegalArgumentException("ModulusPolys do not have same ModulusGF field");
}
public String toString() {
StringBuilder sb = new StringBuilder(a() * 8);
for (int a = a(); a >= 0; a--) {
int b = b(a);
if (b != 0) {
if (b < 0) {
sb.append(" - ");
b = -b;
} else if (sb.length() > 0) {
sb.append(" + ");
}
if (a == 0 || b != 1) {
sb.append(b);
}
if (a != 0) {
if (a == 1) {
sb.append('x');
} else {
sb.append("x^");
sb.append(a);
}
}
}
}
return sb.toString();
}
int a(int i) {
if (i == 0) {
return b(0);
}
if (i == 1) {
int i2 = 0;
for (int i3 : this.b) {
i2 = this.a.a(i2, i3);
}
return i2;
}
int[] iArr = this.b;
int i4 = iArr[0];
int length = iArr.length;
for (int i5 = 1; i5 < length; i5++) {
ModulusGF modulusGF = this.a;
i4 = modulusGF.a(modulusGF.c(i, i4), this.b[i5]);
}
return i4;
}
int b(int i) {
return this.b[(r0.length - 1) - i];
}
ModulusPoly b(ModulusPoly modulusPoly) {
if (this.a.equals(modulusPoly.a)) {
if (!b() && !modulusPoly.b()) {
int[] iArr = this.b;
int length = iArr.length;
int[] iArr2 = modulusPoly.b;
int length2 = iArr2.length;
int[] iArr3 = new int[(length + length2) - 1];
for (int i = 0; i < length; i++) {
int i2 = iArr[i];
for (int i3 = 0; i3 < length2; i3++) {
int i4 = i + i3;
ModulusGF modulusGF = this.a;
iArr3[i4] = modulusGF.a(iArr3[i4], modulusGF.c(i2, iArr2[i3]));
}
}
return new ModulusPoly(this.a, iArr3);
}
return this.a.c();
}
throw new IllegalArgumentException("ModulusPolys do not have same ModulusGF field");
}
ModulusPoly c() {
int length = this.b.length;
int[] iArr = new int[length];
for (int i = 0; i < length; i++) {
iArr[i] = this.a.d(0, this.b[i]);
}
return new ModulusPoly(this.a, iArr);
}
ModulusPoly a(ModulusPoly modulusPoly) {
if (this.a.equals(modulusPoly.a)) {
if (b()) {
return modulusPoly;
}
if (modulusPoly.b()) {
return this;
}
int[] iArr = this.b;
int[] iArr2 = modulusPoly.b;
if (iArr.length > iArr2.length) {
iArr = iArr2;
iArr2 = iArr;
}
int[] iArr3 = new int[iArr2.length];
int length = iArr2.length - iArr.length;
System.arraycopy(iArr2, 0, iArr3, 0, length);
for (int i = length; i < iArr2.length; i++) {
iArr3[i] = this.a.a(iArr[i - length], iArr2[i]);
}
return new ModulusPoly(this.a, iArr3);
}
throw new IllegalArgumentException("ModulusPolys do not have same ModulusGF field");
}
ModulusPoly c(int i) {
if (i == 0) {
return this.a.c();
}
if (i == 1) {
return this;
}
int length = this.b.length;
int[] iArr = new int[length];
for (int i2 = 0; i2 < length; i2++) {
iArr[i2] = this.a.c(this.b[i2], i);
}
return new ModulusPoly(this.a, iArr);
}
ModulusPoly a(int i, int i2) {
if (i < 0) {
throw new IllegalArgumentException();
}
if (i2 == 0) {
return this.a.c();
}
int length = this.b.length;
int[] iArr = new int[i + length];
for (int i3 = 0; i3 < length; i3++) {
iArr[i3] = this.a.c(this.b[i3], i2);
}
return new ModulusPoly(this.a, iArr);
}
}

View File

@@ -0,0 +1,296 @@
package com.google.zxing.pdf417.detector;
import com.google.zxing.BinaryBitmap;
import com.google.zxing.DecodeHintType;
import com.google.zxing.NotFoundException;
import com.google.zxing.ResultPoint;
import com.google.zxing.common.BitMatrix;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/* loaded from: classes.dex */
public final class Detector {
private static final int[] a = {0, 4, 1, 5};
private static final int[] b = {6, 2, 7, 3};
private static final int[] c = {8, 1, 1, 1, 1, 1, 1, 3};
private static final int[] d = {7, 1, 1, 3, 1, 1, 1, 2, 1};
public static PDF417DetectorResult a(BinaryBitmap binaryBitmap, Map<DecodeHintType, ?> map, boolean z) throws NotFoundException {
BitMatrix a2 = binaryBitmap.a();
List<ResultPoint[]> a3 = a(z, a2);
if (a3.isEmpty()) {
a2 = a2.m15clone();
a2.l();
a3 = a(z, a2);
}
return new PDF417DetectorResult(a2, a3);
}
/* JADX WARN: Code restructure failed: missing block: B:10:0x001d, code lost:
if (r5 == false) goto L31;
*/
/* JADX WARN: Code restructure failed: missing block: B:11:0x001f, code lost:
r4 = r0.iterator();
*/
/* JADX WARN: Code restructure failed: missing block: B:13:0x0027, code lost:
if (r4.hasNext() == false) goto L36;
*/
/* JADX WARN: Code restructure failed: missing block: B:14:0x0029, code lost:
r5 = (com.google.zxing.ResultPoint[]) r4.next();
*/
/* JADX WARN: Code restructure failed: missing block: B:15:0x0031, code lost:
if (r5[1] == null) goto L17;
*/
/* JADX WARN: Code restructure failed: missing block: B:16:0x0033, code lost:
r3 = (int) java.lang.Math.max(r3, r5[1].b());
*/
/* JADX WARN: Code restructure failed: missing block: B:18:0x0041, code lost:
if (r5[3] == null) goto L38;
*/
/* JADX WARN: Code restructure failed: missing block: B:20:0x0043, code lost:
r3 = java.lang.Math.max(r3, (int) r5[3].b());
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private static java.util.List<com.google.zxing.ResultPoint[]> a(boolean r8, com.google.zxing.common.BitMatrix r9) {
/*
java.util.ArrayList r0 = new java.util.ArrayList
r0.<init>()
r1 = 1
r2 = 0
r3 = 0
L8:
r4 = 0
r5 = 0
La:
int r6 = r9.i()
if (r3 >= r6) goto L7c
com.google.zxing.ResultPoint[] r4 = a(r9, r3, r4)
r6 = r4[r2]
if (r6 != 0) goto L52
r6 = 3
r7 = r4[r6]
if (r7 != 0) goto L52
if (r5 == 0) goto L7c
java.util.Iterator r4 = r0.iterator()
L23:
boolean r5 = r4.hasNext()
if (r5 == 0) goto L4f
java.lang.Object r5 = r4.next()
com.google.zxing.ResultPoint[] r5 = (com.google.zxing.ResultPoint[]) r5
r7 = r5[r1]
if (r7 == 0) goto L3f
float r3 = (float) r3
r7 = r5[r1]
float r7 = r7.b()
float r3 = java.lang.Math.max(r3, r7)
int r3 = (int) r3
L3f:
r7 = r5[r6]
if (r7 == 0) goto L23
r5 = r5[r6]
float r5 = r5.b()
int r5 = (int) r5
int r3 = java.lang.Math.max(r3, r5)
goto L23
L4f:
int r3 = r3 + 5
goto L8
L52:
r0.add(r4)
if (r8 == 0) goto L7c
r3 = 2
r5 = r4[r3]
if (r5 == 0) goto L6a
r5 = r4[r3]
float r5 = r5.a()
int r5 = (int) r5
r3 = r4[r3]
float r3 = r3.b()
goto L78
L6a:
r3 = 4
r5 = r4[r3]
float r5 = r5.a()
int r5 = (int) r5
r3 = r4[r3]
float r3 = r3.b()
L78:
int r3 = (int) r3
r4 = r5
r5 = 1
goto La
L7c:
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.zxing.pdf417.detector.Detector.a(boolean, com.google.zxing.common.BitMatrix):java.util.List");
}
private static ResultPoint[] a(BitMatrix bitMatrix, int i, int i2) {
int i3 = bitMatrix.i();
int k = bitMatrix.k();
ResultPoint[] resultPointArr = new ResultPoint[8];
a(resultPointArr, a(bitMatrix, i3, k, i, i2, c), a);
if (resultPointArr[4] != null) {
i2 = (int) resultPointArr[4].a();
i = (int) resultPointArr[4].b();
}
a(resultPointArr, a(bitMatrix, i3, k, i, i2, d), b);
return resultPointArr;
}
private static void a(ResultPoint[] resultPointArr, ResultPoint[] resultPointArr2, int[] iArr) {
for (int i = 0; i < iArr.length; i++) {
resultPointArr[iArr[i]] = resultPointArr2[i];
}
}
private static ResultPoint[] a(BitMatrix bitMatrix, int i, int i2, int i3, int i4, int[] iArr) {
boolean z;
int i5;
int[] iArr2;
ResultPoint[] resultPointArr = new ResultPoint[4];
int[] iArr3 = new int[iArr.length];
int i6 = i3;
while (true) {
if (i6 >= i) {
z = false;
break;
}
int[] a2 = a(bitMatrix, i4, i6, i2, false, iArr, iArr3);
if (a2 != null) {
while (true) {
iArr2 = a2;
if (i6 <= 0) {
break;
}
i6--;
a2 = a(bitMatrix, i4, i6, i2, false, iArr, iArr3);
if (a2 == null) {
i6++;
break;
}
}
float f = i6;
resultPointArr[0] = new ResultPoint(iArr2[0], f);
resultPointArr[1] = new ResultPoint(iArr2[1], f);
z = true;
} else {
i6 += 5;
}
}
int i7 = i6 + 1;
if (z) {
int[] iArr4 = {(int) resultPointArr[0].a(), (int) resultPointArr[1].a()};
int i8 = i7;
int i9 = 0;
while (true) {
if (i8 >= i) {
i5 = i9;
break;
}
i5 = i9;
int[] a3 = a(bitMatrix, iArr4[0], i8, i2, false, iArr, iArr3);
if (a3 != null && Math.abs(iArr4[0] - a3[0]) < 5 && Math.abs(iArr4[1] - a3[1]) < 5) {
iArr4 = a3;
i9 = 0;
} else {
if (i5 > 25) {
break;
}
i9 = i5 + 1;
}
i8++;
}
i7 = i8 - (i5 + 1);
float f2 = i7;
resultPointArr[2] = new ResultPoint(iArr4[0], f2);
resultPointArr[3] = new ResultPoint(iArr4[1], f2);
}
if (i7 - i6 < 10) {
Arrays.fill(resultPointArr, (Object) null);
}
return resultPointArr;
}
private static int[] a(BitMatrix bitMatrix, int i, int i2, int i3, boolean z, int[] iArr, int[] iArr2) {
Arrays.fill(iArr2, 0, iArr2.length, 0);
int i4 = 0;
while (bitMatrix.b(i, i2) && i > 0) {
int i5 = i4 + 1;
if (i4 >= 3) {
break;
}
i--;
i4 = i5;
}
int length = iArr.length;
int i6 = i;
boolean z2 = z;
int i7 = 0;
while (i < i3) {
if (bitMatrix.b(i, i2) != z2) {
iArr2[i7] = iArr2[i7] + 1;
} else {
if (i7 != length - 1) {
i7++;
} else {
if (a(iArr2, iArr, 0.8f) < 0.42f) {
return new int[]{i6, i};
}
i6 += iArr2[0] + iArr2[1];
int i8 = i7 - 1;
System.arraycopy(iArr2, 2, iArr2, 0, i8);
iArr2[i8] = 0;
iArr2[i7] = 0;
i7--;
}
iArr2[i7] = 1;
z2 = !z2;
}
i++;
}
if (i7 != length - 1 || a(iArr2, iArr, 0.8f) >= 0.42f) {
return null;
}
return new int[]{i6, i - 1};
}
private static float a(int[] iArr, int[] iArr2, float f) {
int length = iArr.length;
int i = 0;
int i2 = 0;
for (int i3 = 0; i3 < length; i3++) {
i += iArr[i3];
i2 += iArr2[i3];
}
if (i < i2) {
return Float.POSITIVE_INFINITY;
}
float f2 = i;
float f3 = f2 / i2;
float f4 = f * f3;
float f5 = 0.0f;
for (int i4 = 0; i4 < length; i4++) {
float f6 = iArr2[i4] * f3;
float f7 = iArr[i4];
float f8 = f7 > f6 ? f7 - f6 : f6 - f7;
if (f8 > f4) {
return Float.POSITIVE_INFINITY;
}
f5 += f8;
}
return f5 / f2;
}
}

View File

@@ -0,0 +1,24 @@
package com.google.zxing.pdf417.detector;
import com.google.zxing.ResultPoint;
import com.google.zxing.common.BitMatrix;
import java.util.List;
/* loaded from: classes.dex */
public final class PDF417DetectorResult {
private final BitMatrix a;
private final List<ResultPoint[]> b;
public PDF417DetectorResult(BitMatrix bitMatrix, List<ResultPoint[]> list) {
this.a = bitMatrix;
this.b = list;
}
public BitMatrix a() {
return this.a;
}
public List<ResultPoint[]> b() {
return this.b;
}
}

View File

@@ -0,0 +1,39 @@
package com.google.zxing.pdf417.encoder;
import java.lang.reflect.Array;
/* loaded from: classes.dex */
public final class BarcodeMatrix {
private final BarcodeRow[] a;
private int b;
private final int c;
private final int d;
BarcodeMatrix(int i, int i2) {
this.a = new BarcodeRow[i];
int length = this.a.length;
for (int i3 = 0; i3 < length; i3++) {
this.a[i3] = new BarcodeRow(((i2 + 4) * 17) + 1);
}
this.d = i2 * 17;
this.c = i;
this.b = -1;
}
BarcodeRow a() {
return this.a[this.b];
}
void b() {
this.b++;
}
public byte[][] a(int i, int i2) {
byte[][] bArr = (byte[][]) Array.newInstance((Class<?>) byte.class, this.c * i2, this.d * i);
int i3 = this.c * i2;
for (int i4 = 0; i4 < i3; i4++) {
bArr[(i3 - i4) - 1] = this.a[i4 / i2].a(i);
}
return bArr;
}
}

View File

@@ -0,0 +1,31 @@
package com.google.zxing.pdf417.encoder;
/* loaded from: classes.dex */
final class BarcodeRow {
private final byte[] a;
private int b = 0;
BarcodeRow(int i) {
this.a = new byte[i];
}
private void a(int i, boolean z) {
this.a[i] = z ? (byte) 1 : (byte) 0;
}
void a(boolean z, int i) {
for (int i2 = 0; i2 < i; i2++) {
int i3 = this.b;
this.b = i3 + 1;
a(i3, z);
}
}
byte[] a(int i) {
byte[] bArr = new byte[this.a.length * i];
for (int i2 = 0; i2 < bArr.length; i2++) {
bArr[i2] = this.a[i2 / i];
}
return bArr;
}
}

View File

@@ -0,0 +1,9 @@
package com.google.zxing.pdf417.encoder;
/* loaded from: classes.dex */
public enum Compaction {
AUTO,
TEXT,
BYTE,
NUMERIC
}

View File

@@ -0,0 +1,25 @@
package com.google.zxing.pdf417.encoder;
/* loaded from: classes.dex */
public final class Dimensions {
private final int a;
private final int b;
private final int c;
private final int d;
public int a() {
return this.b;
}
public int b() {
return this.d;
}
public int c() {
return this.a;
}
public int d() {
return this.c;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,373 @@
package com.google.zxing.pdf417.encoder;
import com.baidu.cloud.media.player.IMediaPlayer;
import com.google.zxing.WriterException;
import com.google.zxing.common.CharacterSetECI;
import com.ubtrobot.jimu.robotapi.PeripheralType;
import java.math.BigInteger;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
/* loaded from: classes.dex */
final class PDF417HighLevelEncoder {
private static final byte[] a = {48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 38, 13, 9, 44, 58, 35, 45, 46, 36, 47, 43, 37, 42, 61, 94, 0, 32, 0, 0, 0};
private static final byte[] b = {59, 60, 62, 64, 91, 92, 93, 95, 96, 126, 33, 13, 9, 44, 58, 10, 45, 46, 36, 47, 34, 124, 42, 40, 41, 63, 123, 125, 39, 0};
private static final byte[] c = new byte[PeripheralType.SERVO];
private static final byte[] d = new byte[PeripheralType.SERVO];
private static final Charset e = StandardCharsets.ISO_8859_1;
/* renamed from: com.google.zxing.pdf417.encoder.PDF417HighLevelEncoder$1, reason: invalid class name */
static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] a = new int[Compaction.values().length];
static {
try {
a[Compaction.TEXT.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[Compaction.BYTE.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[Compaction.NUMERIC.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
}
}
static {
Arrays.fill(c, (byte) -1);
int i = 0;
int i2 = 0;
while (true) {
byte[] bArr = a;
if (i2 >= bArr.length) {
break;
}
byte b2 = bArr[i2];
if (b2 > 0) {
c[b2] = (byte) i2;
}
i2++;
}
Arrays.fill(d, (byte) -1);
while (true) {
byte[] bArr2 = b;
if (i >= bArr2.length) {
return;
}
byte b3 = bArr2[i];
if (b3 > 0) {
d[b3] = (byte) i;
}
i++;
}
}
static String a(String str, Compaction compaction, Charset charset) throws WriterException {
CharacterSetECI characterSetECIByName;
StringBuilder sb = new StringBuilder(str.length());
if (charset == null) {
charset = e;
} else if (!e.equals(charset) && (characterSetECIByName = CharacterSetECI.getCharacterSetECIByName(charset.name())) != null) {
a(characterSetECIByName.getValue(), sb);
}
int length = str.length();
int i = AnonymousClass1.a[compaction.ordinal()];
if (i == 1) {
a(str, 0, length, sb, 0);
} else if (i == 2) {
byte[] bytes = str.getBytes(charset);
a(bytes, 0, bytes.length, 1, sb);
} else if (i != 3) {
int i2 = 0;
int i3 = 0;
int i4 = 0;
while (i2 < length) {
int a2 = a(str, i2);
if (a2 >= 13) {
sb.append((char) 902);
a(str, i2, a2, sb);
i2 += a2;
i3 = 0;
i4 = 2;
} else {
int b2 = b(str, i2);
if (b2 >= 5 || a2 == length) {
if (i4 != 0) {
sb.append((char) 900);
i3 = 0;
i4 = 0;
}
i3 = a(str, i2, b2, sb, i3);
i2 += b2;
} else {
int a3 = a(str, i2, charset);
if (a3 == 0) {
a3 = 1;
}
int i5 = a3 + i2;
byte[] bytes2 = str.substring(i2, i5).getBytes(charset);
if (bytes2.length == 1 && i4 == 0) {
a(bytes2, 0, 1, 0, sb);
} else {
a(bytes2, 0, bytes2.length, i4, sb);
i3 = 0;
i4 = 1;
}
i2 = i5;
}
}
}
} else {
sb.append((char) 902);
a(str, 0, length, sb);
}
return sb.toString();
}
private static boolean a(char c2) {
if (c2 != ' ') {
return c2 >= 'a' && c2 <= 'z';
}
return true;
}
/* JADX WARN: Code restructure failed: missing block: B:32:0x0027, code lost:
return (r1 - r7) - r3;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private static int b(java.lang.CharSequence r6, int r7) {
/*
int r0 = r6.length()
r1 = r7
L5:
if (r1 >= r0) goto L37
char r2 = r6.charAt(r1)
r3 = 0
Lc:
r4 = 13
if (r3 >= r4) goto L23
boolean r5 = c(r2)
if (r5 == 0) goto L23
if (r1 >= r0) goto L23
int r3 = r3 + 1
int r1 = r1 + 1
if (r1 >= r0) goto Lc
char r2 = r6.charAt(r1)
goto Lc
L23:
if (r3 < r4) goto L28
int r1 = r1 - r7
int r1 = r1 - r3
return r1
L28:
if (r3 > 0) goto L5
char r2 = r6.charAt(r1)
boolean r2 = f(r2)
if (r2 == 0) goto L37
int r1 = r1 + 1
goto L5
L37:
int r1 = r1 - r7
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.zxing.pdf417.encoder.PDF417HighLevelEncoder.b(java.lang.CharSequence, int):int");
}
private static boolean b(char c2) {
if (c2 != ' ') {
return c2 >= 'A' && c2 <= 'Z';
}
return true;
}
private static boolean c(char c2) {
return c2 >= '0' && c2 <= '9';
}
private static boolean d(char c2) {
return c[c2] != -1;
}
private static boolean e(char c2) {
return d[c2] != -1;
}
private static boolean f(char c2) {
if (c2 == '\t' || c2 == '\n' || c2 == '\r') {
return true;
}
return c2 >= ' ' && c2 <= '~';
}
/* JADX WARN: Removed duplicated region for block: B:21:0x00f6 A[EDGE_INSN: B:21:0x00f6->B:22:0x00f6 BREAK A[LOOP:0: B:2:0x0011->B:16:0x0011], SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:40:0x0011 A[SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private static int a(java.lang.CharSequence r16, int r17, int r18, java.lang.StringBuilder r19, int r20) {
/*
Method dump skipped, instructions count: 293
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.zxing.pdf417.encoder.PDF417HighLevelEncoder.a(java.lang.CharSequence, int, int, java.lang.StringBuilder, int):int");
}
private static void a(byte[] bArr, int i, int i2, int i3, StringBuilder sb) {
int i4;
if (i2 == 1 && i3 == 0) {
sb.append((char) 913);
} else if (i2 % 6 == 0) {
sb.append((char) 924);
} else {
sb.append((char) 901);
}
if (i2 >= 6) {
char[] cArr = new char[5];
i4 = i;
while ((i + i2) - i4 >= 6) {
long j = 0;
for (int i5 = 0; i5 < 6; i5++) {
j = (j << 8) + (bArr[i4 + i5] & 255);
}
for (int i6 = 0; i6 < 5; i6++) {
cArr[i6] = (char) (j % 900);
j /= 900;
}
for (int i7 = 4; i7 >= 0; i7--) {
sb.append(cArr[i7]);
}
i4 += 6;
}
} else {
i4 = i;
}
while (i4 < i + i2) {
sb.append((char) (bArr[i4] & 255));
i4++;
}
}
private static void a(String str, int i, int i2, StringBuilder sb) {
StringBuilder sb2 = new StringBuilder((i2 / 3) + 1);
BigInteger valueOf = BigInteger.valueOf(900L);
BigInteger valueOf2 = BigInteger.valueOf(0L);
int i3 = 0;
while (i3 < i2) {
sb2.setLength(0);
int min = Math.min(44, i2 - i3);
StringBuilder sb3 = new StringBuilder("1");
int i4 = i + i3;
sb3.append(str.substring(i4, i4 + min));
BigInteger bigInteger = new BigInteger(sb3.toString());
do {
sb2.append((char) bigInteger.mod(valueOf).intValue());
bigInteger = bigInteger.divide(valueOf);
} while (!bigInteger.equals(valueOf2));
for (int length = sb2.length() - 1; length >= 0; length--) {
sb.append(sb2.charAt(length));
}
i3 += min;
}
}
private static int a(CharSequence charSequence, int i) {
int length = charSequence.length();
int i2 = 0;
if (i < length) {
char charAt = charSequence.charAt(i);
while (c(charAt) && i < length) {
i2++;
i++;
if (i < length) {
charAt = charSequence.charAt(i);
}
}
}
return i2;
}
/* JADX WARN: Code restructure failed: missing block: B:22:0x0028, code lost:
return r1 - r6;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private static int a(java.lang.String r5, int r6, java.nio.charset.Charset r7) throws com.google.zxing.WriterException {
/*
java.nio.charset.CharsetEncoder r7 = r7.newEncoder()
int r0 = r5.length()
r1 = r6
L9:
if (r1 >= r0) goto L57
char r2 = r5.charAt(r1)
r3 = 0
L10:
r4 = 13
if (r3 >= r4) goto L25
boolean r2 = c(r2)
if (r2 == 0) goto L25
int r3 = r3 + 1
int r2 = r1 + r3
if (r2 >= r0) goto L25
char r2 = r5.charAt(r2)
goto L10
L25:
if (r3 < r4) goto L29
int r1 = r1 - r6
return r1
L29:
char r2 = r5.charAt(r1)
boolean r3 = r7.canEncode(r2)
if (r3 == 0) goto L36
int r1 = r1 + 1
goto L9
L36:
com.google.zxing.WriterException r5 = new com.google.zxing.WriterException
java.lang.StringBuilder r6 = new java.lang.StringBuilder
java.lang.String r7 = "Non-encodable character detected: "
r6.<init>(r7)
r6.append(r2)
java.lang.String r7 = " (Unicode: "
r6.append(r7)
r6.append(r2)
r7 = 41
r6.append(r7)
java.lang.String r6 = r6.toString()
r5.<init>(r6)
throw r5
L57:
int r1 = r1 - r6
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.zxing.pdf417.encoder.PDF417HighLevelEncoder.a(java.lang.String, int, java.nio.charset.Charset):int");
}
private static void a(int i, StringBuilder sb) throws WriterException {
if (i >= 0 && i < 900) {
sb.append((char) 927);
sb.append((char) i);
} else if (i < 810900) {
sb.append((char) 926);
sb.append((char) ((i / IMediaPlayer.MEDIA_INFO_TIMED_TEXT_ERROR) - 1));
sb.append((char) (i % IMediaPlayer.MEDIA_INFO_TIMED_TEXT_ERROR));
} else {
if (i < 811800) {
sb.append((char) 925);
sb.append((char) (810900 - i));
return;
}
throw new WriterException("ECI number not in valid range from 0..811799, but was ".concat(String.valueOf(i)));
}
}
}