52 lines
1.7 KiB
Java
52 lines
1.7 KiB
Java
package com.kofax.mobile.sdk._internal.impl;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class a implements com.kofax.mobile.sdk._internal.a {
|
|
@Override // com.kofax.mobile.sdk._internal.a
|
|
public byte[] a(int[] iArr, int i, int i2) {
|
|
int i3 = i * i2;
|
|
byte[] bArr = new byte[(i3 * 3) / 2];
|
|
int i4 = 0;
|
|
int i5 = 0;
|
|
for (int i6 = 0; i6 < i2; i6++) {
|
|
int i7 = 0;
|
|
while (i7 < i) {
|
|
int i8 = iArr[i4];
|
|
int i9 = (16711680 & i8) >> 16;
|
|
int i10 = (65280 & i8) >> 8;
|
|
int i11 = 255;
|
|
int i12 = i8 & 255;
|
|
int i13 = (((((i9 * 66) + (i10 * 129)) + (i12 * 25)) + 128) >> 8) + 16;
|
|
int i14 = (((((i9 * (-38)) - (i10 * 74)) + (i12 * 112)) + 128) >> 8) + 128;
|
|
int i15 = (((((i9 * 112) - (i10 * 94)) - (i12 * 18)) + 128) >> 8) + 128;
|
|
if (i13 < 0) {
|
|
i13 = 0;
|
|
} else if (i13 > 255) {
|
|
i13 = 255;
|
|
}
|
|
bArr[i5] = (byte) i13;
|
|
if (i6 % 2 == 0 && i4 % 2 == 0) {
|
|
if (i15 < 0) {
|
|
i15 = 0;
|
|
} else if (i15 > 255) {
|
|
i15 = 255;
|
|
}
|
|
bArr[i3] = (byte) i15;
|
|
int i16 = i3 + 2;
|
|
if (i14 < 0) {
|
|
i11 = 0;
|
|
} else if (i14 <= 255) {
|
|
i11 = i14;
|
|
}
|
|
bArr[i3 + 1] = (byte) i11;
|
|
i3 = i16;
|
|
}
|
|
i4++;
|
|
i7++;
|
|
i5++;
|
|
}
|
|
}
|
|
return bArr;
|
|
}
|
|
}
|