Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b6ca032a
Commit
b6ca032a
authored
May 24, 2019
by
Peter Ross
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/vp3data: combine eob_run_base and eob_run_get_bits tables
parent
ad2745e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
vp3.c
libavcodec/vp3.c
+3
-3
vp3data.h
libavcodec/vp3data.h
+4
-5
No files found.
libavcodec/vp3.c
View file @
b6ca032a
...
@@ -988,9 +988,9 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
...
@@ -988,9 +988,9 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
token
=
get_vlc2
(
gb
,
vlc_table
,
11
,
3
);
token
=
get_vlc2
(
gb
,
vlc_table
,
11
,
3
);
/* use the token to get a zero run, a coefficient, and an eob run */
/* use the token to get a zero run, a coefficient, and an eob run */
if
((
unsigned
)
token
<=
6U
)
{
if
((
unsigned
)
token
<=
6U
)
{
eob_run
=
eob_run_
base
[
token
]
;
eob_run
=
eob_run_
table
[
token
].
base
;
if
(
eob_run_
get_bits
[
token
]
)
if
(
eob_run_
table
[
token
].
bits
)
eob_run
+=
get_bits
(
gb
,
eob_run_
get_bits
[
token
]
);
eob_run
+=
get_bits
(
gb
,
eob_run_
table
[
token
].
bits
);
if
(
!
eob_run
)
if
(
!
eob_run
)
eob_run
=
INT_MAX
;
eob_run
=
INT_MAX
;
...
...
libavcodec/vp3data.h
View file @
b6ca032a
...
@@ -198,11 +198,10 @@ static const int8_t fixed_motion_vector_table[64] = {
...
@@ -198,11 +198,10 @@ static const int8_t fixed_motion_vector_table[64] = {
};
};
/* only tokens 0..6 indicate eob runs */
/* only tokens 0..6 indicate eob runs */
static
const
uint8_t
eob_run_base
[
7
]
=
{
static
const
struct
{
1
,
2
,
3
,
4
,
8
,
16
,
0
uint8_t
base
,
bits
;
};
}
eob_run_table
[
7
]
=
{
static
const
uint8_t
eob_run_get_bits
[
7
]
=
{
{
1
,
0
},
{
2
,
0
},
{
3
,
0
},
{
4
,
2
},
{
8
,
3
},
{
16
,
4
},
{
0
,
12
}
0
,
0
,
0
,
2
,
3
,
4
,
12
};
};
static
const
uint8_t
zero_run_base
[
32
]
=
{
static
const
uint8_t
zero_run_base
[
32
]
=
{
...
...
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