package com.google.android.gms.internal.ads;

import androidx.annotation.Nullable;
import java.util.Arrays;
import org.checkerframework.checker.nullness.qual.EnsuresNonNullIf;

/* JADX INFO: loaded from: classes2.dex */
public final class ea2 {

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public static final ea2 f10733g;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final int f10734a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final int f10735b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final int f10736c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final int f10737d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final int f10738e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public int f10739f;

    @Nullable
    public final byte[] zze;

    static {
        fv1 fv1Var = new fv1();
        fv1Var.f11401a = 1;
        fv1Var.f11402b = 2;
        fv1Var.f11403c = 3;
        f10733g = fv1Var.a();
        fv1 fv1Var2 = new fv1();
        fv1Var2.f11401a = 1;
        fv1Var2.f11402b = 1;
        fv1Var2.f11403c = 2;
        fv1Var2.a();
        String str = bb1.f9474a;
        Integer.toString(0, 36);
        Integer.toString(1, 36);
        Integer.toString(2, 36);
        Integer.toString(3, 36);
        Integer.toString(4, 36);
        Integer.toString(5, 36);
    }

    public /* synthetic */ ea2(int i10, int i11, int i12, byte[] bArr, int i13, int i14) {
        this.f10734a = i10;
        this.f10735b = i11;
        this.f10736c = i12;
        this.zze = bArr;
        this.f10737d = i13;
        this.f10738e = i14;
    }

    public static int a(int i10) {
        if (i10 == 1) {
            return 1;
        }
        if (i10 != 9) {
            return (i10 == 4 || i10 == 5 || i10 == 6 || i10 == 7) ? 2 : -1;
        }
        return 6;
    }

    public static int b(int i10) {
        if (i10 == 1) {
            return 3;
        }
        if (i10 == 4) {
            return 10;
        }
        if (i10 == 13) {
            return 2;
        }
        if (i10 == 16) {
            return 6;
        }
        if (i10 != 18) {
            return (i10 == 6 || i10 == 7) ? 3 : -1;
        }
        return 7;
    }

    public static String d(int i10) {
        return i10 != -1 ? i10 != 6 ? i10 != 1 ? i10 != 2 ? defpackage.e.n(new StringBuilder(String.valueOf(i10).length() + 22), "Undefined color space ", i10) : "BT601" : "BT709" : "BT2020" : "Unset color space";
    }

    public static String e(int i10) {
        return i10 != -1 ? i10 != 10 ? i10 != 1 ? i10 != 2 ? i10 != 3 ? i10 != 6 ? i10 != 7 ? defpackage.e.n(new StringBuilder(String.valueOf(i10).length() + 25), "Undefined color transfer ", i10) : "HLG" : "ST2084 PQ" : "SDR SMPTE 170M" : "sRGB" : "Linear" : "Gamma 2.2" : "Unset color transfer";
    }

    public static String f(int i10) {
        return i10 != -1 ? i10 != 1 ? i10 != 2 ? defpackage.e.n(new StringBuilder(String.valueOf(i10).length() + 22), "Undefined color range ", i10) : "Limited range" : "Full range" : "Unset color range";
    }

    @EnsuresNonNullIf(expression = {"#1"}, result = false)
    public static boolean zza(@Nullable ea2 ea2Var) {
        int i10;
        int i11;
        int i12;
        int i13;
        if (ea2Var == null) {
            return true;
        }
        int i14 = ea2Var.f10734a;
        return (i14 == -1 || i14 == 1 || i14 == 2) && ((i10 = ea2Var.f10735b) == -1 || i10 == 2) && (((i11 = ea2Var.f10736c) == -1 || i11 == 3) && ea2Var.zze == null && (((i12 = ea2Var.f10738e) == -1 || i12 == 8) && ((i13 = ea2Var.f10737d) == -1 || i13 == 8)));
    }

    public final boolean c() {
        return (this.f10734a == -1 || this.f10735b == -1 || this.f10736c == -1) ? false : true;
    }

    public final boolean equals(@Nullable Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj != null && ea2.class == obj.getClass()) {
            ea2 ea2Var = (ea2) obj;
            if (this.f10734a == ea2Var.f10734a && this.f10735b == ea2Var.f10735b && this.f10736c == ea2Var.f10736c && Arrays.equals(this.zze, ea2Var.zze) && this.f10737d == ea2Var.f10737d && this.f10738e == ea2Var.f10738e) {
                return true;
            }
        }
        return false;
    }

    public final int hashCode() {
        int i10 = this.f10739f;
        if (i10 != 0) {
            return i10;
        }
        int i11 = (((this.f10734a + 527) * 31) + this.f10735b) * 31;
        byte[] bArr = this.zze;
        int iHashCode = ((((Arrays.hashCode(bArr) + ((i11 + this.f10736c) * 31)) * 31) + this.f10737d) * 31) + this.f10738e;
        this.f10739f = iHashCode;
        return iHashCode;
    }

    public final String toString() {
        String strD = d(this.f10734a);
        String strF = f(this.f10735b);
        String strE = e(this.f10736c);
        int i10 = this.f10737d;
        String strB = i10 != -1 ? u.a.b(new StringBuilder(String.valueOf(i10).length() + 8), i10, "bit Luma") : "NA";
        int i11 = this.f10738e;
        String strB2 = i11 != -1 ? u.a.b(new StringBuilder(String.valueOf(i11).length() + 10), i11, "bit Chroma") : "NA";
        boolean z10 = this.zze != null;
        StringBuilder sb = new StringBuilder(com.google.android.gms.measurement.internal.u1.c(strB2, com.google.android.gms.measurement.internal.u1.c(strB, com.google.android.gms.measurement.internal.u1.c(String.valueOf(z10), com.google.android.gms.measurement.internal.u1.c(strF, strD.length() + 12, 2) + strE.length() + 2, 2), 2), 1));
        sb.append("ColorInfo(");
        sb.append(strD);
        sb.append(", ");
        sb.append(strF);
        sb.append(", ");
        sb.append(strE);
        sb.append(", ");
        sb.append(z10);
        u.a.h(sb, ", ", strB, ", ", strB2);
        sb.append(")");
        return sb.toString();
    }
}
