DtsUtil.smali
.class public final Lcom/google/android/exoplayer2/audio/DtsUtil;
.super Ljava/lang/Object;
.source "DtsUtil.java"
# static fields
.field private static final CHANNELS_BY_AMODE:[I
.field private static final SAMPLE_RATE_BY_SFREQ:[I
.field private static final TWICE_BITRATE_KBPS_BY_RATE:[I
# direct methods
.method static constructor <clinit>()V
.registers 2
const/16 v0, 0x10
new-array v1, v0, [I
.line 32
fill-array-data v1, :array_1a
sput-object v1, Lcom/google/android/exoplayer2/audio/DtsUtil;->CHANNELS_BY_AMODE:[I
new-array v0, v0, [I
.line 38
fill-array-data v0, :array_3e
sput-object v0, Lcom/google/android/exoplayer2/audio/DtsUtil;->SAMPLE_RATE_BY_SFREQ:[I
const/16 v0, 0x1d
new-array v0, v0, [I
.line 44
fill-array-data v0, :array_62
sput-object v0, Lcom/google/android/exoplayer2/audio/DtsUtil;->TWICE_BITRATE_KBPS_BY_RATE:[I
return-void
:array_1a
.array-data 4
0x1
0x2
0x2
0x2
0x2
0x3
0x3
0x4
0x4
0x5
0x6
0x6
0x6
0x7
0x8
0x8
.end array-data
:array_3e
.array-data 4
-0x1
0x1f40
0x3e80
0x7d00
-0x1
-0x1
0x2b11
0x5622
0xac44
-0x1
-0x1
0x2ee0
0x5dc0
0xbb80
-0x1
-0x1
.end array-data
:array_62
.array-data 4
0x40
0x70
0x80
0xc0
0xe0
0x100
0x180
0x1c0
0x200
0x280
0x300
0x380
0x400
0x480
0x500
0x600
0x780
0x800
0x900
0xa00
0xa80
0xb00
0xb07
0xb80
0xc00
0xf00
0x1000
0x1800
0x1e00
.end array-data
.end method
.method private constructor <init>()V
.registers 1
.line 114
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getDtsFrameSize([B)I
.registers 3
const/4 v0, 0x5
.line 109
aget-byte v0, p0, v0
and-int/lit8 v0, v0, 0x2
shl-int/lit8 v0, v0, 0xc
const/4 v1, 0x6
aget-byte v1, p0, v1
and-int/lit16 v1, v1, 0xff
shl-int/lit8 v1, v1, 0x4
or-int/2addr v0, v1
const/4 v1, 0x7
aget-byte p0, p0, v1
and-int/lit16 p0, p0, 0xf0
shr-int/lit8 p0, p0, 0x4
or-int/2addr p0, v0
add-int/lit8 p0, p0, 0x1
return p0
.end method
.method public static parseDtsAudioSampleCount(Ljava/nio/ByteBuffer;)I
.registers 3
.line 96
invoke-virtual {p0}, Ljava/nio/ByteBuffer;->position()I
move-result v0
add-int/lit8 v1, v0, 0x4
.line 97
invoke-virtual {p0, v1}, Ljava/nio/ByteBuffer;->get(I)B
move-result v1
and-int/lit8 v1, v1, 0x1
shl-int/lit8 v1, v1, 0x6
add-int/lit8 v0, v0, 0x5
.line 98
invoke-virtual {p0, v0}, Ljava/nio/ByteBuffer;->get(I)B
move-result p0
and-int/lit16 p0, p0, 0xfc
shr-int/lit8 p0, p0, 0x2
or-int/2addr p0, v1
add-int/lit8 p0, p0, 0x1
mul-int/lit8 p0, p0, 0x20
return p0
.end method
.method public static parseDtsAudioSampleCount([B)I
.registers 3
const/4 v0, 0x4
.line 83
aget-byte v0, p0, v0
and-int/lit8 v0, v0, 0x1
shl-int/lit8 v0, v0, 0x6
const/4 v1, 0x5
aget-byte p0, p0, v1
and-int/lit16 p0, p0, 0xfc
shr-int/lit8 p0, p0, 0x2
or-int/2addr p0, v0
add-int/lit8 p0, p0, 0x1
mul-int/lit8 p0, p0, 0x20
return p0
.end method
.method public static parseDtsFormat([BLjava/lang/String;Ljava/lang/String;Lcom/google/android/exoplayer2/drm/DrmInitData;)Lcom/google/android/exoplayer2/Format;
.registers 19
.line 60
new-instance v0, Lcom/google/android/exoplayer2/util/ParsableBitArray;
move-object v1, p0
invoke-direct {v0, p0}, Lcom/google/android/exoplayer2/util/ParsableBitArray;-><init>([B)V
const/16 v1, 0x3c
.line 61
invoke-virtual {v0, v1}, Lcom/google/android/exoplayer2/util/ParsableBitArray;->skipBits(I)V
const/4 v1, 0x6
.line 62
invoke-virtual {v0, v1}, Lcom/google/android/exoplayer2/util/ParsableBitArray;->readBits(I)I
move-result v1
.line 63
sget-object v2, Lcom/google/android/exoplayer2/audio/DtsUtil;->CHANNELS_BY_AMODE:[I
aget v1, v2, v1
const/4 v2, 0x4
.line 64
invoke-virtual {v0, v2}, Lcom/google/android/exoplayer2/util/ParsableBitArray;->readBits(I)I
move-result v2
.line 65
sget-object v3, Lcom/google/android/exoplayer2/audio/DtsUtil;->SAMPLE_RATE_BY_SFREQ:[I
aget v10, v3, v2
const/4 v2, 0x5
.line 66
invoke-virtual {v0, v2}, Lcom/google/android/exoplayer2/util/ParsableBitArray;->readBits(I)I
move-result v2
.line 67
sget-object v3, Lcom/google/android/exoplayer2/audio/DtsUtil;->TWICE_BITRATE_KBPS_BY_RATE:[I
array-length v4, v3
const/4 v5, 0x2
if-lt v2, v4, :cond_2b
const/4 v2, -0x1
const/4 v7, -0x1
goto :goto_31
:cond_2b
aget v2, v3, v2
mul-int/lit16 v2, v2, 0x3e8
div-int/2addr v2, v5
move v7, v2
:goto_31
const/16 v2, 0xa
.line 69
invoke-virtual {v0, v2}, Lcom/google/android/exoplayer2/util/ParsableBitArray;->skipBits(I)V
.line 70
invoke-virtual {v0, v5}, Lcom/google/android/exoplayer2/util/ParsableBitArray;->readBits(I)I
move-result v0
if-lez v0, :cond_3e
const/4 v0, 0x1
goto :goto_3f
:cond_3e
const/4 v0, 0x0
:goto_3f
add-int v9, v1, v0
const/4 v6, 0x0
const/4 v8, -0x1
const/4 v11, 0x0
const/4 v13, 0x0
const-string v5, "audio/vnd.dts"
move-object/from16 v4, p1
move-object/from16 v12, p3
move-object/from16 v14, p2
.line 71
invoke-static/range {v4 .. v14}, Lcom/google/android/exoplayer2/Format;->createAudioSampleFormat(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IIIILjava/util/List;Lcom/google/android/exoplayer2/drm/DrmInitData;ILjava/lang/String;)Lcom/google/android/exoplayer2/Format;
move-result-object v0
return-object v0
.end method