Initial commit
This commit is contained in:
67
sources/com/google/zxing/qrcode/decoder/DataMask.java
Normal file
67
sources/com/google/zxing/qrcode/decoder/DataMask.java
Normal file
@@ -0,0 +1,67 @@
|
||||
package com.google.zxing.qrcode.decoder;
|
||||
|
||||
import com.google.zxing.common.BitMatrix;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
enum DataMask {
|
||||
DATA_MASK_000 { // from class: com.google.zxing.qrcode.decoder.DataMask.1
|
||||
@Override // com.google.zxing.qrcode.decoder.DataMask
|
||||
boolean a(int i, int i2) {
|
||||
return ((i + i2) & 1) == 0;
|
||||
}
|
||||
},
|
||||
DATA_MASK_001 { // from class: com.google.zxing.qrcode.decoder.DataMask.2
|
||||
@Override // com.google.zxing.qrcode.decoder.DataMask
|
||||
boolean a(int i, int i2) {
|
||||
return (i & 1) == 0;
|
||||
}
|
||||
},
|
||||
DATA_MASK_010 { // from class: com.google.zxing.qrcode.decoder.DataMask.3
|
||||
@Override // com.google.zxing.qrcode.decoder.DataMask
|
||||
boolean a(int i, int i2) {
|
||||
return i2 % 3 == 0;
|
||||
}
|
||||
},
|
||||
DATA_MASK_011 { // from class: com.google.zxing.qrcode.decoder.DataMask.4
|
||||
@Override // com.google.zxing.qrcode.decoder.DataMask
|
||||
boolean a(int i, int i2) {
|
||||
return (i + i2) % 3 == 0;
|
||||
}
|
||||
},
|
||||
DATA_MASK_100 { // from class: com.google.zxing.qrcode.decoder.DataMask.5
|
||||
@Override // com.google.zxing.qrcode.decoder.DataMask
|
||||
boolean a(int i, int i2) {
|
||||
return (((i / 2) + (i2 / 3)) & 1) == 0;
|
||||
}
|
||||
},
|
||||
DATA_MASK_101 { // from class: com.google.zxing.qrcode.decoder.DataMask.6
|
||||
@Override // com.google.zxing.qrcode.decoder.DataMask
|
||||
boolean a(int i, int i2) {
|
||||
return (i * i2) % 6 == 0;
|
||||
}
|
||||
},
|
||||
DATA_MASK_110 { // from class: com.google.zxing.qrcode.decoder.DataMask.7
|
||||
@Override // com.google.zxing.qrcode.decoder.DataMask
|
||||
boolean a(int i, int i2) {
|
||||
return (i * i2) % 6 < 3;
|
||||
}
|
||||
},
|
||||
DATA_MASK_111 { // from class: com.google.zxing.qrcode.decoder.DataMask.8
|
||||
@Override // com.google.zxing.qrcode.decoder.DataMask
|
||||
boolean a(int i, int i2) {
|
||||
return (((i + i2) + ((i * i2) % 3)) & 1) == 0;
|
||||
}
|
||||
};
|
||||
|
||||
final void a(BitMatrix bitMatrix, int i2) {
|
||||
for (int i3 = 0; i3 < i2; i3++) {
|
||||
for (int i4 = 0; i4 < i2; i4++) {
|
||||
if (a(i3, i4)) {
|
||||
bitMatrix.a(i4, i3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
abstract boolean a(int i2, int i3);
|
||||
}
|
Reference in New Issue
Block a user