package u0;

import d5.AbstractC0844a;
import java.util.Arrays;

/* JADX INFO: renamed from: u0.f, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1570f {

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public static final C1570f f17277h = new C1570f(1, 2, 3, -1, -1, null);

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

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

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final byte[] f17281d;

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

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

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

    static {
        AbstractC0844a.r(0, 1, 2, 3, 4);
        x0.v.G(5);
    }

    public C1570f(int i, int i5, int i8, int i9, int i10, byte[] bArr) {
        this.f17278a = i;
        this.f17279b = i5;
        this.f17280c = i8;
        this.f17281d = bArr;
        this.f17282e = i9;
        this.f17283f = i10;
    }

    public static String a(int i) {
        return i != -1 ? i != 1 ? i != 2 ? AbstractC0844a.j("Undefined color range ", i) : "Limited range" : "Full range" : "Unset color range";
    }

    public static String b(int i) {
        return i != -1 ? i != 6 ? i != 1 ? i != 2 ? AbstractC0844a.j("Undefined color space ", i) : "BT601" : "BT709" : "BT2020" : "Unset color space";
    }

    public static String c(int i) {
        return i != -1 ? i != 10 ? i != 1 ? i != 2 ? i != 3 ? i != 6 ? i != 7 ? AbstractC0844a.j("Undefined color transfer ", i) : "HLG" : "ST2084 PQ" : "SDR SMPTE 170M" : "sRGB" : "Linear" : "Gamma 2.2" : "Unset color transfer";
    }

    public static boolean e(C1570f c1570f) {
        if (c1570f == null) {
            return true;
        }
        int i = c1570f.f17278a;
        if (i != -1 && i != 1 && i != 2) {
            return false;
        }
        int i5 = c1570f.f17279b;
        if (i5 != -1 && i5 != 2) {
            return false;
        }
        int i8 = c1570f.f17280c;
        if ((i8 != -1 && i8 != 3) || c1570f.f17281d != null) {
            return false;
        }
        int i9 = c1570f.f17283f;
        if (i9 != -1 && i9 != 8) {
            return false;
        }
        int i10 = c1570f.f17282e;
        return i10 == -1 || i10 == 8;
    }

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

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

    public final boolean d() {
        return (this.f17278a == -1 || this.f17279b == -1 || this.f17280c == -1) ? false : true;
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj != null && C1570f.class == obj.getClass()) {
            C1570f c1570f = (C1570f) obj;
            if (this.f17278a == c1570f.f17278a && this.f17279b == c1570f.f17279b && this.f17280c == c1570f.f17280c && Arrays.equals(this.f17281d, c1570f.f17281d) && this.f17282e == c1570f.f17282e && this.f17283f == c1570f.f17283f) {
                return true;
            }
        }
        return false;
    }

    public final int hashCode() {
        if (this.f17284g == 0) {
            this.f17284g = ((((Arrays.hashCode(this.f17281d) + ((((((527 + this.f17278a) * 31) + this.f17279b) * 31) + this.f17280c) * 31)) * 31) + this.f17282e) * 31) + this.f17283f;
        }
        return this.f17284g;
    }

    public final String toString() {
        String str;
        StringBuilder sb = new StringBuilder("ColorInfo(");
        sb.append(b(this.f17278a));
        sb.append(", ");
        sb.append(a(this.f17279b));
        sb.append(", ");
        sb.append(c(this.f17280c));
        sb.append(", ");
        sb.append(this.f17281d != null);
        sb.append(", ");
        String str2 = "NA";
        int i = this.f17282e;
        if (i != -1) {
            str = i + "bit Luma";
        } else {
            str = "NA";
        }
        sb.append(str);
        sb.append(", ");
        int i5 = this.f17283f;
        if (i5 != -1) {
            str2 = i5 + "bit Chroma";
        }
        return I1.a.r(sb, str2, ")");
    }
}
