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
4885ff66
Commit
4885ff66
authored
Oct 29, 2018
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/vp3: reindent unpack_superblocks()
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
b5e7e437
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
31 deletions
+31
-31
vp3.c
libavcodec/vp3.c
+31
-31
No files found.
libavcodec/vp3.c
View file @
4885ff66
...
...
@@ -569,43 +569,43 @@ static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb)
}
else
num_coded_frags
=
s
->
num_kf_coded_fragment
[
plane
];
}
else
{
for
(
i
=
sb_start
;
i
<
sb_end
&&
get_bits_left
(
gb
)
>
0
;
i
++
)
{
if
(
get_bits_left
(
gb
)
<
plane0_num_coded_frags
>>
2
)
{
return
AVERROR_INVALIDDATA
;
}
/* iterate through all 16 fragments in a superblock */
for
(
j
=
0
;
j
<
16
;
j
++
)
{
/* if the fragment is in bounds, check its coding status */
current_fragment
=
s
->
superblock_fragments
[
i
*
16
+
j
];
if
(
current_fragment
!=
-
1
)
{
int
coded
=
s
->
superblock_coding
[
i
];
if
(
coded
==
SB_PARTIALLY_CODED
)
{
/* fragment may or may not be coded; this is the case
* that cares about the fragment coding runs */
if
(
current_run
--
==
0
)
{
bit
^=
1
;
current_run
=
get_vlc2
(
gb
,
s
->
fragment_run_length_vlc
.
table
,
5
,
2
);
for
(
i
=
sb_start
;
i
<
sb_end
&&
get_bits_left
(
gb
)
>
0
;
i
++
)
{
if
(
get_bits_left
(
gb
)
<
plane0_num_coded_frags
>>
2
)
{
return
AVERROR_INVALIDDATA
;
}
/* iterate through all 16 fragments in a superblock */
for
(
j
=
0
;
j
<
16
;
j
++
)
{
/* if the fragment is in bounds, check its coding status */
current_fragment
=
s
->
superblock_fragments
[
i
*
16
+
j
];
if
(
current_fragment
!=
-
1
)
{
int
coded
=
s
->
superblock_coding
[
i
];
if
(
coded
==
SB_PARTIALLY_CODED
)
{
/* fragment may or may not be coded; this is the case
* that cares about the fragment coding runs */
if
(
current_run
--
==
0
)
{
bit
^=
1
;
current_run
=
get_vlc2
(
gb
,
s
->
fragment_run_length_vlc
.
table
,
5
,
2
);
}
coded
=
bit
;
}
coded
=
bit
;
}
if
(
coded
)
{
/* default mode; actual mode will be decoded in
* the next phase */
s
->
all_fragments
[
current_fragment
].
coding_method
=
MODE_INTER_NO_MV
;
s
->
coded_fragment_list
[
plane
][
num_coded_frags
++
]
=
current_fragment
;
}
else
{
/* not coded; copy this fragment from the prior frame */
s
->
all_fragments
[
current_fragment
].
coding_method
=
MODE_COPY
;
if
(
coded
)
{
/* default mode; actual mode will be decoded in
* the next phase */
s
->
all_fragments
[
current_fragment
].
coding_method
=
MODE_INTER_NO_MV
;
s
->
coded_fragment_list
[
plane
][
num_coded_frags
++
]
=
current_fragment
;
}
else
{
/* not coded; copy this fragment from the prior frame */
s
->
all_fragments
[
current_fragment
].
coding_method
=
MODE_COPY
;
}
}
}
}
}
}
if
(
!
plane
)
plane0_num_coded_frags
=
num_coded_frags
;
s
->
total_num_coded_frags
+=
num_coded_frags
;
...
...
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