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
c2c27e9e
Commit
c2c27e9e
authored
Oct 18, 2014
by
Reimar Döffinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
indeo2: move variable declarations into blocks using them.
Signed-off-by:
Reimar Döffinger
<
Reimar.Doeffinger@gmx.de
>
parent
79be2536
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
indeo2.c
libavcodec/indeo2.c
+3
-5
No files found.
libavcodec/indeo2.c
View file @
c2c27e9e
...
...
@@ -54,15 +54,13 @@ static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst
int
i
;
int
j
;
int
out
=
0
;
int
c
;
int
t
;
if
(
width
&
1
)
return
AVERROR_INVALIDDATA
;
/* first line contain absolute values, other lines contain deltas */
while
(
out
<
width
)
{
c
=
ir2_get_code
(
&
ctx
->
gb
);
int
c
=
ir2_get_code
(
&
ctx
->
gb
);
if
(
c
>=
0x80
)
{
/* we have a run */
c
-=
0x7F
;
if
(
out
+
c
*
2
>
width
)
...
...
@@ -79,7 +77,7 @@ static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst
for
(
j
=
1
;
j
<
height
;
j
++
)
{
out
=
0
;
while
(
out
<
width
)
{
c
=
ir2_get_code
(
&
ctx
->
gb
);
int
c
=
ir2_get_code
(
&
ctx
->
gb
);
if
(
c
>=
0x80
)
{
/* we have a skip */
c
-=
0x7F
;
if
(
out
+
c
*
2
>
width
)
...
...
@@ -89,7 +87,7 @@ static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst
out
++
;
}
}
else
{
/* add two deltas from table */
t
=
dst
[
out
-
pitch
]
+
(
table
[
c
*
2
]
-
128
);
int
t
=
dst
[
out
-
pitch
]
+
(
table
[
c
*
2
]
-
128
);
t
=
av_clip_uint8
(
t
);
dst
[
out
]
=
t
;
out
++
;
...
...
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