1908 lines
34 KiB
Smali
1908 lines
34 KiB
Smali
.class public Lcom/google/zxing/qrcode/detector/FinderPatternFinder;
|
|
.super Ljava/lang/Object;
|
|
.source "FinderPatternFinder.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/google/zxing/qrcode/detector/FinderPatternFinder$CenterComparator;,
|
|
Lcom/google/zxing/qrcode/detector/FinderPatternFinder$FurthestFromAverageComparator;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final CENTER_QUORUM:I = 0x2
|
|
|
|
.field private static final INTEGER_MATH_SHIFT:I = 0x8
|
|
|
|
.field public static final MAX_MODULES:I = 0x39
|
|
|
|
.field public static final MIN_SKIP:I = 0x3
|
|
|
|
|
|
# instance fields
|
|
.field private final crossCheckStateCount:[I
|
|
|
|
.field private hasSkipped:Z
|
|
|
|
.field private final image:Lcom/google/zxing/common/BitMatrix;
|
|
|
|
.field private final possibleCenters:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/google/zxing/qrcode/detector/FinderPattern;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final resultPointCallback:Lcom/google/zxing/ResultPointCallback;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/google/zxing/common/BitMatrix;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1, v0}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;-><init>(Lcom/google/zxing/common/BitMatrix;Lcom/google/zxing/ResultPointCallback;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/google/zxing/common/BitMatrix;Lcom/google/zxing/ResultPointCallback;)V
|
|
.locals 0
|
|
|
|
.line 2
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 3
|
|
iput-object p1, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->image:Lcom/google/zxing/common/BitMatrix;
|
|
|
|
.line 4
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
const/4 p1, 0x5
|
|
|
|
new-array p1, p1, [I
|
|
|
|
.line 5
|
|
iput-object p1, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->crossCheckStateCount:[I
|
|
|
|
.line 6
|
|
iput-object p2, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->resultPointCallback:Lcom/google/zxing/ResultPointCallback;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static centerFromEnd([II)F
|
|
.locals 1
|
|
|
|
const/4 v0, 0x4
|
|
|
|
.line 1
|
|
aget v0, p0, v0
|
|
|
|
sub-int/2addr p1, v0
|
|
|
|
const/4 v0, 0x3
|
|
|
|
aget v0, p0, v0
|
|
|
|
sub-int/2addr p1, v0
|
|
|
|
int-to-float p1, p1
|
|
|
|
const/4 v0, 0x2
|
|
|
|
aget p0, p0, v0
|
|
|
|
int-to-float p0, p0
|
|
|
|
const/high16 v0, 0x40000000 # 2.0f
|
|
|
|
div-float/2addr p0, v0
|
|
|
|
sub-float/2addr p1, p0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method private crossCheckHorizontal(IIII)F
|
|
.locals 10
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->image:Lcom/google/zxing/common/BitMatrix;
|
|
|
|
.line 2
|
|
invoke-virtual {v0}, Lcom/google/zxing/common/BitMatrix;->getWidth()I
|
|
|
|
move-result v1
|
|
|
|
.line 3
|
|
invoke-direct {p0}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->getCrossCheckStateCount()[I
|
|
|
|
move-result-object v2
|
|
|
|
move v3, p1
|
|
|
|
:goto_0
|
|
const/4 v4, 0x2
|
|
|
|
const/4 v5, 0x1
|
|
|
|
if-ltz v3, :cond_1
|
|
|
|
.line 4
|
|
invoke-virtual {v0, v3, p2}, Lcom/google/zxing/common/BitMatrix;->get(II)Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
.line 5
|
|
:cond_0
|
|
aget v6, v2, v4
|
|
|
|
add-int/2addr v6, v5
|
|
|
|
aput v6, v2, v4
|
|
|
|
add-int/lit8 v3, v3, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
:goto_1
|
|
const/high16 v6, 0x7fc00000 # Float.NaN
|
|
|
|
if-gez v3, :cond_2
|
|
|
|
return v6
|
|
|
|
:cond_2
|
|
:goto_2
|
|
if-ltz v3, :cond_4
|
|
|
|
.line 6
|
|
invoke-virtual {v0, v3, p2}, Lcom/google/zxing/common/BitMatrix;->get(II)Z
|
|
|
|
move-result v7
|
|
|
|
if-nez v7, :cond_4
|
|
|
|
aget v7, v2, v5
|
|
|
|
if-le v7, p3, :cond_3
|
|
|
|
goto :goto_3
|
|
|
|
.line 7
|
|
:cond_3
|
|
aget v7, v2, v5
|
|
|
|
add-int/2addr v7, v5
|
|
|
|
aput v7, v2, v5
|
|
|
|
add-int/lit8 v3, v3, -0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
:goto_3
|
|
if-ltz v3, :cond_13
|
|
|
|
.line 8
|
|
aget v7, v2, v5
|
|
|
|
if-le v7, p3, :cond_5
|
|
|
|
goto/16 :goto_c
|
|
|
|
:cond_5
|
|
:goto_4
|
|
const/4 v7, 0x0
|
|
|
|
if-ltz v3, :cond_7
|
|
|
|
.line 9
|
|
invoke-virtual {v0, v3, p2}, Lcom/google/zxing/common/BitMatrix;->get(II)Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_7
|
|
|
|
aget v8, v2, v7
|
|
|
|
if-le v8, p3, :cond_6
|
|
|
|
goto :goto_5
|
|
|
|
.line 10
|
|
:cond_6
|
|
aget v8, v2, v7
|
|
|
|
add-int/2addr v8, v5
|
|
|
|
aput v8, v2, v7
|
|
|
|
add-int/lit8 v3, v3, -0x1
|
|
|
|
goto :goto_4
|
|
|
|
.line 11
|
|
:cond_7
|
|
:goto_5
|
|
aget v3, v2, v7
|
|
|
|
if-le v3, p3, :cond_8
|
|
|
|
return v6
|
|
|
|
:cond_8
|
|
add-int/2addr p1, v5
|
|
|
|
:goto_6
|
|
if-ge p1, v1, :cond_a
|
|
|
|
.line 12
|
|
invoke-virtual {v0, p1, p2}, Lcom/google/zxing/common/BitMatrix;->get(II)Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_9
|
|
|
|
goto :goto_7
|
|
|
|
.line 13
|
|
:cond_9
|
|
aget v3, v2, v4
|
|
|
|
add-int/2addr v3, v5
|
|
|
|
aput v3, v2, v4
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_6
|
|
|
|
:cond_a
|
|
:goto_7
|
|
if-ne p1, v1, :cond_b
|
|
|
|
return v6
|
|
|
|
:cond_b
|
|
:goto_8
|
|
const/4 v3, 0x3
|
|
|
|
if-ge p1, v1, :cond_d
|
|
|
|
.line 14
|
|
invoke-virtual {v0, p1, p2}, Lcom/google/zxing/common/BitMatrix;->get(II)Z
|
|
|
|
move-result v8
|
|
|
|
if-nez v8, :cond_d
|
|
|
|
aget v8, v2, v3
|
|
|
|
if-lt v8, p3, :cond_c
|
|
|
|
goto :goto_9
|
|
|
|
.line 15
|
|
:cond_c
|
|
aget v8, v2, v3
|
|
|
|
add-int/2addr v8, v5
|
|
|
|
aput v8, v2, v3
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_8
|
|
|
|
:cond_d
|
|
:goto_9
|
|
if-eq p1, v1, :cond_13
|
|
|
|
.line 16
|
|
aget v8, v2, v3
|
|
|
|
if-lt v8, p3, :cond_e
|
|
|
|
goto :goto_c
|
|
|
|
:cond_e
|
|
:goto_a
|
|
const/4 v8, 0x4
|
|
|
|
if-ge p1, v1, :cond_10
|
|
|
|
.line 17
|
|
invoke-virtual {v0, p1, p2}, Lcom/google/zxing/common/BitMatrix;->get(II)Z
|
|
|
|
move-result v9
|
|
|
|
if-eqz v9, :cond_10
|
|
|
|
aget v9, v2, v8
|
|
|
|
if-lt v9, p3, :cond_f
|
|
|
|
goto :goto_b
|
|
|
|
.line 18
|
|
:cond_f
|
|
aget v9, v2, v8
|
|
|
|
add-int/2addr v9, v5
|
|
|
|
aput v9, v2, v8
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_a
|
|
|
|
.line 19
|
|
:cond_10
|
|
:goto_b
|
|
aget p2, v2, v8
|
|
|
|
if-lt p2, p3, :cond_11
|
|
|
|
return v6
|
|
|
|
.line 20
|
|
:cond_11
|
|
aget p2, v2, v7
|
|
|
|
aget p3, v2, v5
|
|
|
|
add-int/2addr p2, p3
|
|
|
|
aget p3, v2, v4
|
|
|
|
add-int/2addr p2, p3
|
|
|
|
aget p3, v2, v3
|
|
|
|
add-int/2addr p2, p3
|
|
|
|
.line 21
|
|
aget p3, v2, v8
|
|
|
|
add-int/2addr p2, p3
|
|
|
|
sub-int/2addr p2, p4
|
|
|
|
.line 22
|
|
invoke-static {p2}, Ljava/lang/Math;->abs(I)I
|
|
|
|
move-result p2
|
|
|
|
mul-int/lit8 p2, p2, 0x5
|
|
|
|
if-lt p2, p4, :cond_12
|
|
|
|
return v6
|
|
|
|
.line 23
|
|
:cond_12
|
|
invoke-static {v2}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->foundPatternCross([I)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_13
|
|
|
|
invoke-static {v2, p1}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->centerFromEnd([II)F
|
|
|
|
move-result v6
|
|
|
|
:cond_13
|
|
:goto_c
|
|
return v6
|
|
.end method
|
|
|
|
.method private crossCheckVertical(IIII)F
|
|
.locals 10
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->image:Lcom/google/zxing/common/BitMatrix;
|
|
|
|
.line 2
|
|
invoke-virtual {v0}, Lcom/google/zxing/common/BitMatrix;->getHeight()I
|
|
|
|
move-result v1
|
|
|
|
.line 3
|
|
invoke-direct {p0}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->getCrossCheckStateCount()[I
|
|
|
|
move-result-object v2
|
|
|
|
move v3, p1
|
|
|
|
:goto_0
|
|
const/4 v4, 0x2
|
|
|
|
const/4 v5, 0x1
|
|
|
|
if-ltz v3, :cond_1
|
|
|
|
.line 4
|
|
invoke-virtual {v0, p2, v3}, Lcom/google/zxing/common/BitMatrix;->get(II)Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
.line 5
|
|
:cond_0
|
|
aget v6, v2, v4
|
|
|
|
add-int/2addr v6, v5
|
|
|
|
aput v6, v2, v4
|
|
|
|
add-int/lit8 v3, v3, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
:goto_1
|
|
const/high16 v6, 0x7fc00000 # Float.NaN
|
|
|
|
if-gez v3, :cond_2
|
|
|
|
return v6
|
|
|
|
:cond_2
|
|
:goto_2
|
|
if-ltz v3, :cond_4
|
|
|
|
.line 6
|
|
invoke-virtual {v0, p2, v3}, Lcom/google/zxing/common/BitMatrix;->get(II)Z
|
|
|
|
move-result v7
|
|
|
|
if-nez v7, :cond_4
|
|
|
|
aget v7, v2, v5
|
|
|
|
if-le v7, p3, :cond_3
|
|
|
|
goto :goto_3
|
|
|
|
.line 7
|
|
:cond_3
|
|
aget v7, v2, v5
|
|
|
|
add-int/2addr v7, v5
|
|
|
|
aput v7, v2, v5
|
|
|
|
add-int/lit8 v3, v3, -0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
:goto_3
|
|
if-ltz v3, :cond_13
|
|
|
|
.line 8
|
|
aget v7, v2, v5
|
|
|
|
if-le v7, p3, :cond_5
|
|
|
|
goto/16 :goto_c
|
|
|
|
:cond_5
|
|
:goto_4
|
|
const/4 v7, 0x0
|
|
|
|
if-ltz v3, :cond_7
|
|
|
|
.line 9
|
|
invoke-virtual {v0, p2, v3}, Lcom/google/zxing/common/BitMatrix;->get(II)Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_7
|
|
|
|
aget v8, v2, v7
|
|
|
|
if-le v8, p3, :cond_6
|
|
|
|
goto :goto_5
|
|
|
|
.line 10
|
|
:cond_6
|
|
aget v8, v2, v7
|
|
|
|
add-int/2addr v8, v5
|
|
|
|
aput v8, v2, v7
|
|
|
|
add-int/lit8 v3, v3, -0x1
|
|
|
|
goto :goto_4
|
|
|
|
.line 11
|
|
:cond_7
|
|
:goto_5
|
|
aget v3, v2, v7
|
|
|
|
if-le v3, p3, :cond_8
|
|
|
|
return v6
|
|
|
|
:cond_8
|
|
add-int/2addr p1, v5
|
|
|
|
:goto_6
|
|
if-ge p1, v1, :cond_a
|
|
|
|
.line 12
|
|
invoke-virtual {v0, p2, p1}, Lcom/google/zxing/common/BitMatrix;->get(II)Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_9
|
|
|
|
goto :goto_7
|
|
|
|
.line 13
|
|
:cond_9
|
|
aget v3, v2, v4
|
|
|
|
add-int/2addr v3, v5
|
|
|
|
aput v3, v2, v4
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_6
|
|
|
|
:cond_a
|
|
:goto_7
|
|
if-ne p1, v1, :cond_b
|
|
|
|
return v6
|
|
|
|
:cond_b
|
|
:goto_8
|
|
const/4 v3, 0x3
|
|
|
|
if-ge p1, v1, :cond_d
|
|
|
|
.line 14
|
|
invoke-virtual {v0, p2, p1}, Lcom/google/zxing/common/BitMatrix;->get(II)Z
|
|
|
|
move-result v8
|
|
|
|
if-nez v8, :cond_d
|
|
|
|
aget v8, v2, v3
|
|
|
|
if-lt v8, p3, :cond_c
|
|
|
|
goto :goto_9
|
|
|
|
.line 15
|
|
:cond_c
|
|
aget v8, v2, v3
|
|
|
|
add-int/2addr v8, v5
|
|
|
|
aput v8, v2, v3
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_8
|
|
|
|
:cond_d
|
|
:goto_9
|
|
if-eq p1, v1, :cond_13
|
|
|
|
.line 16
|
|
aget v8, v2, v3
|
|
|
|
if-lt v8, p3, :cond_e
|
|
|
|
goto :goto_c
|
|
|
|
:cond_e
|
|
:goto_a
|
|
const/4 v8, 0x4
|
|
|
|
if-ge p1, v1, :cond_10
|
|
|
|
.line 17
|
|
invoke-virtual {v0, p2, p1}, Lcom/google/zxing/common/BitMatrix;->get(II)Z
|
|
|
|
move-result v9
|
|
|
|
if-eqz v9, :cond_10
|
|
|
|
aget v9, v2, v8
|
|
|
|
if-lt v9, p3, :cond_f
|
|
|
|
goto :goto_b
|
|
|
|
.line 18
|
|
:cond_f
|
|
aget v9, v2, v8
|
|
|
|
add-int/2addr v9, v5
|
|
|
|
aput v9, v2, v8
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_a
|
|
|
|
.line 19
|
|
:cond_10
|
|
:goto_b
|
|
aget p2, v2, v8
|
|
|
|
if-lt p2, p3, :cond_11
|
|
|
|
return v6
|
|
|
|
.line 20
|
|
:cond_11
|
|
aget p2, v2, v7
|
|
|
|
aget p3, v2, v5
|
|
|
|
add-int/2addr p2, p3
|
|
|
|
aget p3, v2, v4
|
|
|
|
add-int/2addr p2, p3
|
|
|
|
aget p3, v2, v3
|
|
|
|
add-int/2addr p2, p3
|
|
|
|
.line 21
|
|
aget p3, v2, v8
|
|
|
|
add-int/2addr p2, p3
|
|
|
|
sub-int/2addr p2, p4
|
|
|
|
.line 22
|
|
invoke-static {p2}, Ljava/lang/Math;->abs(I)I
|
|
|
|
move-result p2
|
|
|
|
mul-int/lit8 p2, p2, 0x5
|
|
|
|
mul-int/2addr p4, v4
|
|
|
|
if-lt p2, p4, :cond_12
|
|
|
|
return v6
|
|
|
|
.line 23
|
|
:cond_12
|
|
invoke-static {v2}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->foundPatternCross([I)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_13
|
|
|
|
invoke-static {v2, p1}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->centerFromEnd([II)F
|
|
|
|
move-result v6
|
|
|
|
:cond_13
|
|
:goto_c
|
|
return v6
|
|
.end method
|
|
|
|
.method private findRowSkip()I
|
|
.locals 7
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-gt v0, v2, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
iget-object v3, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v3}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v3
|
|
|
|
:cond_1
|
|
:goto_0
|
|
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_2
|
|
|
|
return v1
|
|
|
|
:cond_2
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
|
|
.line 3
|
|
invoke-virtual {v4}, Lcom/google/zxing/qrcode/detector/FinderPattern;->getCount()I
|
|
|
|
move-result v5
|
|
|
|
const/4 v6, 0x2
|
|
|
|
if-lt v5, v6, :cond_1
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
move-object v0, v4
|
|
|
|
goto :goto_0
|
|
|
|
.line 4
|
|
:cond_3
|
|
iput-boolean v2, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->hasSkipped:Z
|
|
|
|
.line 5
|
|
invoke-virtual {v0}, Lcom/google/zxing/ResultPoint;->getX()F
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v4}, Lcom/google/zxing/ResultPoint;->getX()F
|
|
|
|
move-result v2
|
|
|
|
sub-float/2addr v1, v2
|
|
|
|
invoke-static {v1}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result v1
|
|
|
|
.line 6
|
|
invoke-virtual {v0}, Lcom/google/zxing/ResultPoint;->getY()F
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {v4}, Lcom/google/zxing/ResultPoint;->getY()F
|
|
|
|
move-result v2
|
|
|
|
sub-float/2addr v0, v2
|
|
|
|
invoke-static {v0}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result v0
|
|
|
|
sub-float/2addr v1, v0
|
|
|
|
float-to-int v0, v1
|
|
|
|
.line 7
|
|
div-int/2addr v0, v6
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public static foundPatternCross([I)Z
|
|
.locals 6
|
|
|
|
const/4 v0, 0x0
|
|
|
|
move v1, v0
|
|
|
|
move v2, v1
|
|
|
|
:goto_0
|
|
const/4 v3, 0x5
|
|
|
|
if-lt v1, v3, :cond_2
|
|
|
|
const/4 v1, 0x7
|
|
|
|
if-ge v2, v1, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
shl-int/lit8 v2, v2, 0x8
|
|
|
|
.line 1
|
|
div-int/2addr v2, v1
|
|
|
|
.line 2
|
|
div-int/lit8 v1, v2, 0x2
|
|
|
|
.line 3
|
|
aget v3, p0, v0
|
|
|
|
shl-int/lit8 v3, v3, 0x8
|
|
|
|
sub-int v3, v2, v3
|
|
|
|
invoke-static {v3}, Ljava/lang/Math;->abs(I)I
|
|
|
|
move-result v3
|
|
|
|
if-ge v3, v1, :cond_1
|
|
|
|
const/4 v3, 0x1
|
|
|
|
.line 4
|
|
aget v4, p0, v3
|
|
|
|
shl-int/lit8 v4, v4, 0x8
|
|
|
|
sub-int v4, v2, v4
|
|
|
|
invoke-static {v4}, Ljava/lang/Math;->abs(I)I
|
|
|
|
move-result v4
|
|
|
|
if-ge v4, v1, :cond_1
|
|
|
|
mul-int/lit8 v4, v2, 0x3
|
|
|
|
const/4 v5, 0x2
|
|
|
|
.line 5
|
|
aget v5, p0, v5
|
|
|
|
shl-int/lit8 v5, v5, 0x8
|
|
|
|
sub-int/2addr v4, v5
|
|
|
|
invoke-static {v4}, Ljava/lang/Math;->abs(I)I
|
|
|
|
move-result v4
|
|
|
|
mul-int/lit8 v5, v1, 0x3
|
|
|
|
if-ge v4, v5, :cond_1
|
|
|
|
const/4 v4, 0x3
|
|
|
|
.line 6
|
|
aget v4, p0, v4
|
|
|
|
shl-int/lit8 v4, v4, 0x8
|
|
|
|
sub-int v4, v2, v4
|
|
|
|
invoke-static {v4}, Ljava/lang/Math;->abs(I)I
|
|
|
|
move-result v4
|
|
|
|
if-ge v4, v1, :cond_1
|
|
|
|
const/4 v4, 0x4
|
|
|
|
.line 7
|
|
aget p0, p0, v4
|
|
|
|
shl-int/lit8 p0, p0, 0x8
|
|
|
|
sub-int/2addr v2, p0
|
|
|
|
invoke-static {v2}, Ljava/lang/Math;->abs(I)I
|
|
|
|
move-result p0
|
|
|
|
if-ge p0, v1, :cond_1
|
|
|
|
return v3
|
|
|
|
:cond_1
|
|
return v0
|
|
|
|
.line 8
|
|
:cond_2
|
|
aget v3, p0, v1
|
|
|
|
if-nez v3, :cond_3
|
|
|
|
return v0
|
|
|
|
:cond_3
|
|
add-int/2addr v2, v3
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method private getCrossCheckStateCount()[I
|
|
.locals 3
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->crossCheckStateCount:[I
|
|
|
|
const/4 v1, 0x0
|
|
|
|
aput v1, v0, v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
.line 2
|
|
aput v1, v0, v2
|
|
|
|
const/4 v2, 0x2
|
|
|
|
.line 3
|
|
aput v1, v0, v2
|
|
|
|
const/4 v2, 0x3
|
|
|
|
.line 4
|
|
aput v1, v0, v2
|
|
|
|
const/4 v2, 0x4
|
|
|
|
.line 5
|
|
aput v1, v0, v2
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private haveMultiplyConfirmedCenters()Z
|
|
.locals 9
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
.line 2
|
|
iget-object v1, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
move v5, v2
|
|
|
|
move v4, v3
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_4
|
|
|
|
const/4 v1, 0x3
|
|
|
|
if-ge v4, v1, :cond_1
|
|
|
|
return v3
|
|
|
|
:cond_1
|
|
int-to-float v0, v0
|
|
|
|
div-float v6, v5, v0
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v7
|
|
|
|
:goto_1
|
|
invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
const v0, 0x3d4ccccd # 0.05f
|
|
|
|
mul-float/2addr v5, v0
|
|
|
|
cmpg-float v0, v2, v5
|
|
|
|
if-gtz v0, :cond_2
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_2
|
|
return v3
|
|
|
|
:cond_3
|
|
invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
|
|
.line 4
|
|
invoke-virtual {v0}, Lcom/google/zxing/qrcode/detector/FinderPattern;->getEstimatedModuleSize()F
|
|
|
|
move-result v0
|
|
|
|
sub-float/2addr v0, v6
|
|
|
|
invoke-static {v0}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result v0
|
|
|
|
add-float/2addr v2, v0
|
|
|
|
goto :goto_1
|
|
|
|
.line 5
|
|
:cond_4
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
|
|
.line 6
|
|
invoke-virtual {v6}, Lcom/google/zxing/qrcode/detector/FinderPattern;->getCount()I
|
|
|
|
move-result v7
|
|
|
|
const/4 v8, 0x2
|
|
|
|
if-lt v7, v8, :cond_0
|
|
|
|
add-int/lit8 v4, v4, 0x1
|
|
|
|
.line 7
|
|
invoke-virtual {v6}, Lcom/google/zxing/qrcode/detector/FinderPattern;->getEstimatedModuleSize()F
|
|
|
|
move-result v6
|
|
|
|
add-float/2addr v5, v6
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method private selectBestPatterns()[Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
.locals 10
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcom/google/zxing/NotFoundException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x3
|
|
|
|
if-lt v0, v1, :cond_6
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
if-le v0, v1, :cond_3
|
|
|
|
.line 2
|
|
iget-object v6, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v6}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v6
|
|
|
|
move v7, v5
|
|
|
|
move v8, v7
|
|
|
|
:goto_0
|
|
invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v9
|
|
|
|
if-nez v9, :cond_2
|
|
|
|
int-to-float v0, v0
|
|
|
|
div-float/2addr v7, v0
|
|
|
|
div-float/2addr v8, v0
|
|
|
|
mul-float v0, v7, v7
|
|
|
|
sub-float/2addr v8, v0
|
|
|
|
float-to-double v8, v8
|
|
|
|
.line 3
|
|
invoke-static {v8, v9}, Ljava/lang/Math;->sqrt(D)D
|
|
|
|
move-result-wide v8
|
|
|
|
double-to-float v0, v8
|
|
|
|
.line 4
|
|
iget-object v6, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
new-instance v8, Lcom/google/zxing/qrcode/detector/FinderPatternFinder$FurthestFromAverageComparator;
|
|
|
|
invoke-direct {v8, v7, v2}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder$FurthestFromAverageComparator;-><init>(FLcom/google/zxing/qrcode/detector/FinderPatternFinder$FurthestFromAverageComparator;)V
|
|
|
|
invoke-static {v6, v8}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V
|
|
|
|
const v6, 0x3e4ccccd # 0.2f
|
|
|
|
mul-float/2addr v6, v7
|
|
|
|
.line 5
|
|
invoke-static {v6, v0}, Ljava/lang/Math;->max(FF)F
|
|
|
|
move-result v0
|
|
|
|
move v6, v4
|
|
|
|
.line 6
|
|
:goto_1
|
|
iget-object v8, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v8}, Ljava/util/List;->size()I
|
|
|
|
move-result v8
|
|
|
|
if-ge v6, v8, :cond_3
|
|
|
|
iget-object v8, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v8}, Ljava/util/List;->size()I
|
|
|
|
move-result v8
|
|
|
|
if-gt v8, v1, :cond_0
|
|
|
|
goto :goto_2
|
|
|
|
.line 7
|
|
:cond_0
|
|
iget-object v8, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v8, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v8
|
|
|
|
check-cast v8, Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
|
|
.line 8
|
|
invoke-virtual {v8}, Lcom/google/zxing/qrcode/detector/FinderPattern;->getEstimatedModuleSize()F
|
|
|
|
move-result v8
|
|
|
|
sub-float/2addr v8, v7
|
|
|
|
invoke-static {v8}, Ljava/lang/Math;->abs(F)F
|
|
|
|
move-result v8
|
|
|
|
cmpl-float v8, v8, v0
|
|
|
|
if-lez v8, :cond_1
|
|
|
|
.line 9
|
|
iget-object v8, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v8, v6}, Ljava/util/List;->remove(I)Ljava/lang/Object;
|
|
|
|
add-int/lit8 v6, v6, -0x1
|
|
|
|
:cond_1
|
|
add-int/2addr v6, v3
|
|
|
|
goto :goto_1
|
|
|
|
.line 10
|
|
:cond_2
|
|
invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v9
|
|
|
|
check-cast v9, Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
|
|
.line 11
|
|
invoke-virtual {v9}, Lcom/google/zxing/qrcode/detector/FinderPattern;->getEstimatedModuleSize()F
|
|
|
|
move-result v9
|
|
|
|
add-float/2addr v7, v9
|
|
|
|
mul-float/2addr v9, v9
|
|
|
|
add-float/2addr v8, v9
|
|
|
|
goto :goto_0
|
|
|
|
.line 12
|
|
:cond_3
|
|
:goto_2
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
if-le v0, v1, :cond_5
|
|
|
|
.line 13
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_3
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_4
|
|
|
|
.line 14
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
int-to-float v0, v0
|
|
|
|
div-float/2addr v5, v0
|
|
|
|
.line 15
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
new-instance v6, Lcom/google/zxing/qrcode/detector/FinderPatternFinder$CenterComparator;
|
|
|
|
invoke-direct {v6, v5, v2}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder$CenterComparator;-><init>(FLcom/google/zxing/qrcode/detector/FinderPatternFinder$CenterComparator;)V
|
|
|
|
invoke-static {v0, v6}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V
|
|
|
|
.line 16
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v2
|
|
|
|
invoke-interface {v0, v1, v2}, Ljava/util/List;->subList(II)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->clear()V
|
|
|
|
goto :goto_4
|
|
|
|
.line 17
|
|
:cond_4
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
|
|
.line 18
|
|
invoke-virtual {v6}, Lcom/google/zxing/qrcode/detector/FinderPattern;->getEstimatedModuleSize()F
|
|
|
|
move-result v6
|
|
|
|
add-float/2addr v5, v6
|
|
|
|
goto :goto_3
|
|
|
|
:cond_5
|
|
:goto_4
|
|
new-array v0, v1, [Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
|
|
.line 19
|
|
iget-object v1, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v1, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
|
|
aput-object v1, v0, v4
|
|
|
|
.line 20
|
|
iget-object v1, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
|
|
aput-object v1, v0, v3
|
|
|
|
.line 21
|
|
iget-object v1, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
return-object v0
|
|
|
|
.line 22
|
|
:cond_6
|
|
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
|
|
|
|
move-result-object v0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final find(Ljava/util/Map;)Lcom/google/zxing/qrcode/detector/FinderPatternInfo;
|
|
.locals 13
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Lcom/google/zxing/DecodeHintType;",
|
|
"*>;)",
|
|
"Lcom/google/zxing/qrcode/detector/FinderPatternInfo;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcom/google/zxing/NotFoundException;
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 1
|
|
sget-object v2, Lcom/google/zxing/DecodeHintType;->TRY_HARDER:Lcom/google/zxing/DecodeHintType;
|
|
|
|
invoke-interface {p1, v2}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
move p1, v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move p1, v1
|
|
|
|
.line 2
|
|
:goto_0
|
|
iget-object v2, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->image:Lcom/google/zxing/common/BitMatrix;
|
|
|
|
invoke-virtual {v2}, Lcom/google/zxing/common/BitMatrix;->getHeight()I
|
|
|
|
move-result v2
|
|
|
|
.line 3
|
|
iget-object v3, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->image:Lcom/google/zxing/common/BitMatrix;
|
|
|
|
invoke-virtual {v3}, Lcom/google/zxing/common/BitMatrix;->getWidth()I
|
|
|
|
move-result v3
|
|
|
|
mul-int/lit8 v4, v2, 0x3
|
|
|
|
.line 4
|
|
div-int/lit16 v4, v4, 0xe4
|
|
|
|
const/4 v5, 0x3
|
|
|
|
if-lt v4, v5, :cond_1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
:cond_1
|
|
move v4, v5
|
|
|
|
:cond_2
|
|
const/4 p1, 0x5
|
|
|
|
new-array p1, p1, [I
|
|
|
|
add-int/lit8 v6, v4, -0x1
|
|
|
|
move v7, v1
|
|
|
|
:goto_1
|
|
if-ge v6, v2, :cond_e
|
|
|
|
if-eqz v7, :cond_3
|
|
|
|
goto/16 :goto_6
|
|
|
|
:cond_3
|
|
aput v1, p1, v1
|
|
|
|
aput v1, p1, v0
|
|
|
|
const/4 v8, 0x2
|
|
|
|
aput v1, p1, v8
|
|
|
|
aput v1, p1, v5
|
|
|
|
const/4 v9, 0x4
|
|
|
|
aput v1, p1, v9
|
|
|
|
move v10, v1
|
|
|
|
move v11, v10
|
|
|
|
:goto_2
|
|
if-lt v10, v3, :cond_5
|
|
|
|
.line 5
|
|
invoke-static {p1}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->foundPatternCross([I)Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_4
|
|
|
|
.line 6
|
|
invoke-virtual {p0, p1, v6, v3}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->handlePossibleCenter([III)Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_4
|
|
|
|
.line 7
|
|
aget v4, p1, v1
|
|
|
|
.line 8
|
|
iget-boolean v8, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->hasSkipped:Z
|
|
|
|
if-eqz v8, :cond_4
|
|
|
|
.line 9
|
|
invoke-direct {p0}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->haveMultiplyConfirmedCenters()Z
|
|
|
|
move-result v7
|
|
|
|
:cond_4
|
|
add-int/2addr v6, v4
|
|
|
|
goto :goto_1
|
|
|
|
.line 10
|
|
:cond_5
|
|
iget-object v12, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->image:Lcom/google/zxing/common/BitMatrix;
|
|
|
|
invoke-virtual {v12, v10, v6}, Lcom/google/zxing/common/BitMatrix;->get(II)Z
|
|
|
|
move-result v12
|
|
|
|
if-eqz v12, :cond_7
|
|
|
|
and-int/lit8 v12, v11, 0x1
|
|
|
|
if-ne v12, v0, :cond_6
|
|
|
|
add-int/lit8 v11, v11, 0x1
|
|
|
|
.line 11
|
|
:cond_6
|
|
aget v12, p1, v11
|
|
|
|
add-int/2addr v12, v0
|
|
|
|
aput v12, p1, v11
|
|
|
|
goto/16 :goto_5
|
|
|
|
:cond_7
|
|
and-int/lit8 v12, v11, 0x1
|
|
|
|
if-nez v12, :cond_d
|
|
|
|
if-ne v11, v9, :cond_c
|
|
|
|
.line 12
|
|
invoke-static {p1}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->foundPatternCross([I)Z
|
|
|
|
move-result v11
|
|
|
|
if-eqz v11, :cond_b
|
|
|
|
.line 13
|
|
invoke-virtual {p0, p1, v6, v10}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->handlePossibleCenter([III)Z
|
|
|
|
move-result v11
|
|
|
|
if-eqz v11, :cond_a
|
|
|
|
.line 14
|
|
iget-boolean v4, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->hasSkipped:Z
|
|
|
|
if-eqz v4, :cond_8
|
|
|
|
.line 15
|
|
invoke-direct {p0}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->haveMultiplyConfirmedCenters()Z
|
|
|
|
move-result v7
|
|
|
|
goto :goto_3
|
|
|
|
.line 16
|
|
:cond_8
|
|
invoke-direct {p0}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->findRowSkip()I
|
|
|
|
move-result v4
|
|
|
|
.line 17
|
|
aget v11, p1, v8
|
|
|
|
if-le v4, v11, :cond_9
|
|
|
|
.line 18
|
|
aget v10, p1, v8
|
|
|
|
sub-int/2addr v4, v10
|
|
|
|
sub-int/2addr v4, v8
|
|
|
|
add-int/2addr v6, v4
|
|
|
|
add-int/lit8 v4, v3, -0x1
|
|
|
|
move v10, v4
|
|
|
|
:cond_9
|
|
:goto_3
|
|
aput v1, p1, v1
|
|
|
|
aput v1, p1, v0
|
|
|
|
aput v1, p1, v8
|
|
|
|
aput v1, p1, v5
|
|
|
|
aput v1, p1, v9
|
|
|
|
move v11, v1
|
|
|
|
move v4, v8
|
|
|
|
goto :goto_5
|
|
|
|
.line 19
|
|
:cond_a
|
|
aget v11, p1, v8
|
|
|
|
aput v11, p1, v1
|
|
|
|
.line 20
|
|
aget v11, p1, v5
|
|
|
|
aput v11, p1, v0
|
|
|
|
.line 21
|
|
aget v11, p1, v9
|
|
|
|
aput v11, p1, v8
|
|
|
|
aput v0, p1, v5
|
|
|
|
aput v1, p1, v9
|
|
|
|
goto :goto_4
|
|
|
|
.line 22
|
|
:cond_b
|
|
aget v11, p1, v8
|
|
|
|
aput v11, p1, v1
|
|
|
|
.line 23
|
|
aget v11, p1, v5
|
|
|
|
aput v11, p1, v0
|
|
|
|
.line 24
|
|
aget v11, p1, v9
|
|
|
|
aput v11, p1, v8
|
|
|
|
aput v0, p1, v5
|
|
|
|
aput v1, p1, v9
|
|
|
|
:goto_4
|
|
move v11, v5
|
|
|
|
goto :goto_5
|
|
|
|
:cond_c
|
|
add-int/lit8 v11, v11, 0x1
|
|
|
|
.line 25
|
|
aget v12, p1, v11
|
|
|
|
add-int/2addr v12, v0
|
|
|
|
aput v12, p1, v11
|
|
|
|
goto :goto_5
|
|
|
|
.line 26
|
|
:cond_d
|
|
aget v12, p1, v11
|
|
|
|
add-int/2addr v12, v0
|
|
|
|
aput v12, p1, v11
|
|
|
|
:goto_5
|
|
add-int/2addr v10, v0
|
|
|
|
goto/16 :goto_2
|
|
|
|
.line 27
|
|
:cond_e
|
|
:goto_6
|
|
invoke-direct {p0}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->selectBestPatterns()[Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
|
|
move-result-object p1
|
|
|
|
.line 28
|
|
invoke-static {p1}, Lcom/google/zxing/ResultPoint;->orderBestPatterns([Lcom/google/zxing/ResultPoint;)V
|
|
|
|
.line 29
|
|
new-instance v0, Lcom/google/zxing/qrcode/detector/FinderPatternInfo;
|
|
|
|
invoke-direct {v0, p1}, Lcom/google/zxing/qrcode/detector/FinderPatternInfo;-><init>([Lcom/google/zxing/qrcode/detector/FinderPattern;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getImage()Lcom/google/zxing/common/BitMatrix;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->image:Lcom/google/zxing/common/BitMatrix;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getPossibleCenters()Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Lcom/google/zxing/qrcode/detector/FinderPattern;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final handlePossibleCenter([III)Z
|
|
.locals 5
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 1
|
|
aget v1, p1, v0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aget v3, p1, v2
|
|
|
|
add-int/2addr v1, v3
|
|
|
|
const/4 v3, 0x2
|
|
|
|
aget v4, p1, v3
|
|
|
|
add-int/2addr v1, v4
|
|
|
|
const/4 v4, 0x3
|
|
|
|
aget v4, p1, v4
|
|
|
|
add-int/2addr v1, v4
|
|
|
|
const/4 v4, 0x4
|
|
|
|
.line 2
|
|
aget v4, p1, v4
|
|
|
|
add-int/2addr v1, v4
|
|
|
|
.line 3
|
|
invoke-static {p1, p3}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->centerFromEnd([II)F
|
|
|
|
move-result p3
|
|
|
|
float-to-int p3, p3
|
|
|
|
.line 4
|
|
aget v4, p1, v3
|
|
|
|
invoke-direct {p0, p2, p3, v4, v1}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->crossCheckVertical(IIII)F
|
|
|
|
move-result p2
|
|
|
|
.line 5
|
|
invoke-static {p2}, Ljava/lang/Float;->isNaN(F)Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_3
|
|
|
|
float-to-int v4, p2
|
|
|
|
.line 6
|
|
aget p1, p1, v3
|
|
|
|
invoke-direct {p0, p3, v4, p1, v1}, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->crossCheckHorizontal(IIII)F
|
|
|
|
move-result p1
|
|
|
|
.line 7
|
|
invoke-static {p1}, Ljava/lang/Float;->isNaN(F)Z
|
|
|
|
move-result p3
|
|
|
|
if-nez p3, :cond_3
|
|
|
|
int-to-float p3, v1
|
|
|
|
const/high16 v1, 0x40e00000 # 7.0f
|
|
|
|
div-float/2addr p3, v1
|
|
|
|
move v1, v0
|
|
|
|
.line 8
|
|
:goto_0
|
|
iget-object v3, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v3}, Ljava/util/List;->size()I
|
|
|
|
move-result v3
|
|
|
|
if-lt v1, v3, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
.line 9
|
|
:cond_0
|
|
iget-object v3, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
|
|
.line 10
|
|
invoke-virtual {v3, p3, p2, p1}, Lcom/google/zxing/qrcode/detector/FinderPattern;->aboutEquals(FFF)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
.line 11
|
|
iget-object v0, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-virtual {v3, p2, p1, p3}, Lcom/google/zxing/qrcode/detector/FinderPattern;->combineEstimate(FFF)Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v0, v1, v3}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move v0, v2
|
|
|
|
:goto_1
|
|
if-nez v0, :cond_1
|
|
|
|
.line 12
|
|
new-instance v0, Lcom/google/zxing/qrcode/detector/FinderPattern;
|
|
|
|
invoke-direct {v0, p1, p2, p3}, Lcom/google/zxing/qrcode/detector/FinderPattern;-><init>(FFF)V
|
|
|
|
.line 13
|
|
iget-object p1, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->possibleCenters:Ljava/util/List;
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
.line 14
|
|
iget-object p1, p0, Lcom/google/zxing/qrcode/detector/FinderPatternFinder;->resultPointCallback:Lcom/google/zxing/ResultPointCallback;
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 15
|
|
invoke-interface {p1, v0}, Lcom/google/zxing/ResultPointCallback;->foundPossibleResultPoint(Lcom/google/zxing/ResultPoint;)V
|
|
|
|
:cond_1
|
|
return v2
|
|
|
|
:cond_2
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
return v0
|
|
.end method
|