Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3e1f8258
authored
Mar 01, 2023
by
ibaker
Committed by
tonihei
Mar 01, 2023
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Delete VorbisUtil.CodeBook since it's not used
PiperOrigin-RevId: 513186205
parent
ef5a1ce9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
34 deletions
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/VorbisUtil.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/VorbisUtil.java
View file @
3e1f8258
...
...
@@ -370,7 +370,7 @@ public final class VorbisUtil {
bitArray
.
skipBits
(
headerData
.
getPosition
()
*
8
);
for
(
int
i
=
0
;
i
<
numberOfBooks
;
i
++)
{
read
Book
(
bitArray
);
skip
Book
(
bitArray
);
}
int
timeCount
=
bitArray
.
readBits
(
6
)
+
1
;
...
...
@@ -534,7 +534,7 @@ public final class VorbisUtil {
}
}
private
static
CodeBook
read
Book
(
VorbisBitArray
bitArray
)
throws
ParserException
{
private
static
void
skip
Book
(
VorbisBitArray
bitArray
)
throws
ParserException
{
if
(
bitArray
.
readBits
(
24
)
!=
0x564342
)
{
throw
ParserException
.
createForMalformedContainer
(
"expected code book to start with [0x56, 0x43, 0x42] at "
+
bitArray
.
getPosition
(),
...
...
@@ -542,30 +542,23 @@ public final class VorbisUtil {
}
int
dimensions
=
bitArray
.
readBits
(
16
);
int
entries
=
bitArray
.
readBits
(
24
);
long
[]
lengthMap
=
new
long
[
entries
];
boolean
isOrdered
=
bitArray
.
readBit
();
if
(!
isOrdered
)
{
boolean
isSparse
=
bitArray
.
readBit
();
for
(
int
i
=
0
;
i
<
lengthMap
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
entries
;
i
++)
{
if
(
isSparse
)
{
if
(
bitArray
.
readBit
())
{
lengthMap
[
i
]
=
(
long
)
(
bitArray
.
readBits
(
5
)
+
1
);
}
else
{
// entry unused
lengthMap
[
i
]
=
0
;
bitArray
.
skipBits
(
5
);
// lengthMap entry
}
}
else
{
// not sparse
lengthMap
[
i
]
=
(
long
)
(
bitArray
.
readBits
(
5
)
+
1
);
bitArray
.
skipBits
(
5
);
// lengthMap entry
}
}
}
else
{
int
length
=
bitArray
.
readBits
(
5
)
+
1
;
for
(
int
i
=
0
;
i
<
lengthMap
.
length
;
)
{
int
num
=
bitArray
.
readBits
(
iLog
(
entries
-
i
));
for
(
int
j
=
0
;
j
<
num
&&
i
<
lengthMap
.
length
;
i
++,
j
++)
{
lengthMap
[
i
]
=
length
;
}
length
++;
bitArray
.
skipBits
(
5
);
// length
for
(
int
i
=
0
;
i
<
entries
;
)
{
i
+=
bitArray
.
readBits
(
iLog
(
entries
-
i
));
// num
}
}
...
...
@@ -591,7 +584,6 @@ public final class VorbisUtil {
// discard (no decoding required yet)
bitArray
.
skipBits
((
int
)
(
lookupValuesCount
*
valueBits
));
}
return
new
CodeBook
(
dimensions
,
entries
,
lengthMap
,
lookupType
,
isOrdered
);
}
/**
...
...
@@ -605,22 +597,4 @@ public final class VorbisUtil {
private
VorbisUtil
()
{
// Prevent instantiation.
}
private
static
final
class
CodeBook
{
public
final
int
dimensions
;
public
final
int
entries
;
public
final
long
[]
lengthMap
;
public
final
int
lookupType
;
public
final
boolean
isOrdered
;
public
CodeBook
(
int
dimensions
,
int
entries
,
long
[]
lengthMap
,
int
lookupType
,
boolean
isOrdered
)
{
this
.
dimensions
=
dimensions
;
this
.
entries
=
entries
;
this
.
lengthMap
=
lengthMap
;
this
.
lookupType
=
lookupType
;
this
.
isOrdered
=
isOrdered
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment