what-the-bank/sources/com/google/android/gms/internal/firebase_ml/zzpv.java

88 lines
2.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.firebase_ml;
import com.google.android.gms.internal.firebase_ml.zzmd;
import org.bouncycastle.crypto.tls.CipherSuite;
/* loaded from: classes2.dex */
public final class zzpv {
public static int zzbm(int i) {
if (i == 0) {
return 0;
}
if (i == 1) {
return 90;
}
if (i == 2) {
return CipherSuite.TLS_DHE_PSK_WITH_NULL_SHA256;
}
if (i == 3) {
return 270;
}
StringBuilder sb = new StringBuilder(29);
sb.append("Invalid rotation: ");
sb.append(i);
throw new IllegalArgumentException(sb.toString());
}
public static int zzbn(int i) {
if (i == 1) {
return 0;
}
if (i == 2) {
return 1;
}
StringBuilder sb = new StringBuilder(34);
sb.append("Invalid landmark type: ");
sb.append(i);
throw new IllegalArgumentException(sb.toString());
}
public static int zzbo(int i) {
if (i == 1) {
return 0;
}
if (i == 2) {
return 1;
}
StringBuilder sb = new StringBuilder(30);
sb.append("Invalid mode type: ");
sb.append(i);
throw new IllegalArgumentException(sb.toString());
}
public static int zzbp(int i) {
if (i == 1) {
return 0;
}
if (i == 2) {
return 1;
}
StringBuilder sb = new StringBuilder(40);
sb.append("Invalid classification type: ");
sb.append(i);
throw new IllegalArgumentException(sb.toString());
}
public static zzmd.zzr zzc(zzpz zzpzVar) {
zzmd.zzr.zzb zzbVar;
int capacity;
if (zzpzVar.zzaxe.getBitmap() != null) {
zzbVar = zzmd.zzr.zzb.BITMAP;
capacity = zzpzVar.zzaxe.getBitmap().getAllocationByteCount();
} else {
int format = zzpzVar.zzaxe.getMetadata().getFormat();
if (format == 16) {
zzbVar = zzmd.zzr.zzb.NV16;
} else if (format == 17) {
zzbVar = zzmd.zzr.zzb.NV21;
} else if (format == 842094169) {
zzbVar = zzmd.zzr.zzb.YV12;
} else {
zzbVar = zzmd.zzr.zzb.UNKNOWN_FORMAT;
}
capacity = zzpzVar.zzaxe.getGrayscaleImageData().capacity();
}
return (zzmd.zzr) ((zzue) zzmd.zzr.zzjz().zzb(zzbVar).zzav(capacity).zzrj());
}
}