.class public final Lz5/ce;
.super Ljava/lang/Object;
.source ""


# instance fields
.field public final a:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "[B>;"
        }
    .end annotation
.end field

.field public final b:I

.field public final c:F


# direct methods
.method public constructor <init>(Ljava/util/List;IF)V
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "[B>;IIIF)V"
        }
    .end annotation

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lz5/ce;->a:Ljava/util/List;

    iput p2, p0, Lz5/ce;->b:I

    iput p3, p0, Lz5/ce;->c:F

    return-void
.end method

.method public static a(Lz5/j7;)Lz5/ce;
    .registers 14

    const/4 v0, 0x4

    :try_start_1
    invoke-virtual {p0, v0}, Lz5/j7;->t(I)V

    invoke-virtual {p0}, Lz5/j7;->w()I

    move-result v0

    const/4 v1, 0x3

    and-int/2addr v0, v1

    const/4 v2, 0x1

    add-int/2addr v0, v2

    if-eq v0, v1, :cond_16c

    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    invoke-virtual {p0}, Lz5/j7;->w()I

    move-result v4

    and-int/lit8 v4, v4, 0x1f

    const/4 v5, 0x0

    move v6, v5

    :goto_1b
    if-ge v6, v4, :cond_27

    invoke-static {p0}, Lz5/ce;->b(Lz5/j7;)[B

    move-result-object v7

    invoke-virtual {v3, v7}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    add-int/lit8 v6, v6, 0x1

    goto :goto_1b

    :cond_27
    invoke-virtual {p0}, Lz5/j7;->w()I

    move-result v6

    move v7, v5

    :goto_2c
    if-ge v7, v6, :cond_38

    invoke-static {p0}, Lz5/ce;->b(Lz5/j7;)[B

    move-result-object v8

    invoke-virtual {v3, v8}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    add-int/lit8 v7, v7, 0x1

    goto :goto_2c

    :cond_38
    const/high16 p0, 0x3f800000    # 1.0f

    if-lez v4, :cond_166

    invoke-virtual {v3, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, [B

    invoke-virtual {v3, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, [B

    array-length v4, v4

    new-instance v7, Lz5/i7;

    invoke-direct {v7, v6, v0, v4, v1}, Lz5/i7;-><init>([BIII)V

    const/16 v4, 0x8

    invoke-virtual {v7, v4}, Lz5/i7;->b(I)V

    invoke-virtual {v7, v4}, Lz5/i7;->j(I)I

    move-result v6

    const/16 v8, 0x10

    invoke-virtual {v7, v8}, Lz5/i7;->b(I)V

    invoke-virtual {v7}, Lz5/i7;->l()I

    const/16 v9, 0x64

    if-eq v6, v9, :cond_87

    const/16 v9, 0x6e

    if-eq v6, v9, :cond_87

    const/16 v9, 0x7a

    if-eq v6, v9, :cond_87

    const/16 v9, 0xf4

    if-eq v6, v9, :cond_87

    const/16 v9, 0x2c

    if-eq v6, v9, :cond_87

    const/16 v9, 0x53

    if-eq v6, v9, :cond_87

    const/16 v9, 0x56

    if-eq v6, v9, :cond_87

    const/16 v9, 0x76

    if-eq v6, v9, :cond_87

    const/16 v9, 0x80

    if-eq v6, v9, :cond_87

    const/16 v9, 0x8a

    if-ne v6, v9, :cond_cf

    :cond_87
    invoke-virtual {v7}, Lz5/i7;->l()I

    move-result v6

    if-ne v6, v1, :cond_91

    invoke-virtual {v7}, Lz5/i7;->h()Z

    move v6, v1

    :cond_91
    invoke-virtual {v7}, Lz5/i7;->l()I

    invoke-virtual {v7}, Lz5/i7;->l()I

    invoke-virtual {v7, v2}, Lz5/i7;->b(I)V

    invoke-virtual {v7}, Lz5/i7;->h()Z

    move-result v9

    if-eqz v9, :cond_cf

    if-eq v6, v1, :cond_a4

    move v1, v4

    goto :goto_a6

    :cond_a4
    const/16 v1, 0xc

    :goto_a6
    move v6, v5

    :goto_a7
    if-ge v6, v1, :cond_cf

    invoke-virtual {v7}, Lz5/i7;->h()Z

    move-result v9

    if-eqz v9, :cond_cc

    const/4 v9, 0x6

    if-ge v6, v9, :cond_b4

    move v9, v8

    goto :goto_b6

    :cond_b4
    const/16 v9, 0x40

    :goto_b6
    move v11, v4

    move v12, v11

    move v10, v5

    :goto_b9
    if-ge v10, v9, :cond_cc

    if-eqz v11, :cond_c6

    invoke-virtual {v7}, Lz5/i7;->o()I

    move-result v11

    add-int/2addr v11, v12

    add-int/lit16 v11, v11, 0x100

    rem-int/lit16 v11, v11, 0x100

    :cond_c6
    if-eqz v11, :cond_c9

    move v12, v11

    :cond_c9
    add-int/lit8 v10, v10, 0x1

    goto :goto_b9

    :cond_cc
    add-int/lit8 v6, v6, 0x1

    goto :goto_a7

    :cond_cf
    invoke-virtual {v7}, Lz5/i7;->l()I

    invoke-virtual {v7}, Lz5/i7;->l()I

    move-result v1

    if-nez v1, :cond_dc

    invoke-virtual {v7}, Lz5/i7;->l()I

    goto :goto_f7

    :cond_dc
    if-ne v1, v2, :cond_f7

    invoke-virtual {v7}, Lz5/i7;->h()Z

    invoke-virtual {v7}, Lz5/i7;->o()I

    invoke-virtual {v7}, Lz5/i7;->o()I

    invoke-virtual {v7}, Lz5/i7;->l()I

    move-result v1

    int-to-long v9, v1

    :goto_ec
    int-to-long v11, v5

    cmp-long v1, v11, v9

    if-gez v1, :cond_f7

    invoke-virtual {v7}, Lz5/i7;->l()I

    add-int/lit8 v5, v5, 0x1

    goto :goto_ec

    :cond_f7
    :goto_f7
    invoke-virtual {v7}, Lz5/i7;->l()I

    invoke-virtual {v7, v2}, Lz5/i7;->b(I)V

    invoke-virtual {v7}, Lz5/i7;->l()I

    invoke-virtual {v7}, Lz5/i7;->l()I

    invoke-virtual {v7}, Lz5/i7;->h()Z

    move-result v1

    if-nez v1, :cond_10c

    invoke-virtual {v7, v2}, Lz5/i7;->b(I)V

    :cond_10c
    invoke-virtual {v7, v2}, Lz5/i7;->b(I)V

    invoke-virtual {v7}, Lz5/i7;->h()Z

    move-result v1

    if-eqz v1, :cond_121

    invoke-virtual {v7}, Lz5/i7;->l()I

    invoke-virtual {v7}, Lz5/i7;->l()I

    invoke-virtual {v7}, Lz5/i7;->l()I

    invoke-virtual {v7}, Lz5/i7;->l()I

    :cond_121
    invoke-virtual {v7}, Lz5/i7;->h()Z

    move-result v1

    if-eqz v1, :cond_166

    invoke-virtual {v7}, Lz5/i7;->h()Z

    move-result v1

    if-eqz v1, :cond_166

    invoke-virtual {v7, v4}, Lz5/i7;->j(I)I

    move-result v1

    const/16 v2, 0xff

    if-ne v1, v2, :cond_145

    invoke-virtual {v7, v8}, Lz5/i7;->j(I)I

    move-result v1

    invoke-virtual {v7, v8}, Lz5/i7;->j(I)I

    move-result v2

    if-eqz v1, :cond_166

    if-eqz v2, :cond_166

    int-to-float p0, v1

    int-to-float v1, v2

    div-float/2addr p0, v1

    goto :goto_166

    :cond_145
    const/16 v2, 0x11

    if-ge v1, v2, :cond_14e

    sget-object p0, Lz5/zd;->b:[F

    aget p0, p0, v1

    goto :goto_166

    :cond_14e
    new-instance v2, Ljava/lang/StringBuilder;

    const/16 v4, 0x2e

    invoke-direct {v2, v4}, Ljava/lang/StringBuilder;-><init>(I)V

    const-string v4, "Unexpected aspect_ratio_idc value: "

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v1, "NalUnitUtil"

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    :cond_166
    :goto_166
    new-instance v1, Lz5/ce;

    invoke-direct {v1, v3, v0, p0}, Lz5/ce;-><init>(Ljava/util/List;IF)V

    return-object v1

    :cond_16c
    new-instance p0, Ljava/lang/IllegalStateException;

    invoke-direct {p0}, Ljava/lang/IllegalStateException;-><init>()V

    throw p0
    :try_end_172
    .catch Ljava/lang/ArrayIndexOutOfBoundsException; {:try_start_1 .. :try_end_172} :catch_172

    :catch_172
    move-exception p0

    new-instance v0, Lz5/k8;

    const-string v1, "Error parsing AVC config"

    invoke-direct {v0, v1, p0}, Lz5/k8;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    throw v0
.end method

.method public static b(Lz5/j7;)[B
    .registers 7

    invoke-virtual {p0}, Lz5/j7;->y()I

    move-result v0

    invoke-virtual {p0}, Lz5/j7;->o()I

    move-result v1

    invoke-virtual {p0, v0}, Lz5/j7;->t(I)V

    iget-object p0, p0, Lz5/j7;->b:[B

    add-int/lit8 v2, v0, 0x4

    .line 1
    new-array v2, v2, [B

    sget-object v3, Lz5/wd;->a:[B

    const/4 v4, 0x0

    const/4 v5, 0x4

    invoke-static {v3, v4, v2, v4, v5}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    invoke-static {p0, v1, v2, v5, v0}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    return-object v2
.end method
