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
9e6198f0
Commit
9e6198f0
authored
Feb 13, 2015
by
zhaoxiu.zeng
Committed by
Michael Niedermayer
Feb 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/wmalosslessdec: simplify
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
80f13780
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
wmalosslessdec.c
libavcodec/wmalosslessdec.c
+4
-12
No files found.
libavcodec/wmalosslessdec.c
View file @
9e6198f0
...
@@ -553,10 +553,7 @@ static int decode_channel_residues(WmallDecodeCtx *s, int ch, int tile_size)
...
@@ -553,10 +553,7 @@ static int decode_channel_residues(WmallDecodeCtx *s, int ch, int tile_size)
s
->
ave_sum
[
ch
]
=
residue
+
s
->
ave_sum
[
ch
]
-
s
->
ave_sum
[
ch
]
=
residue
+
s
->
ave_sum
[
ch
]
-
(
s
->
ave_sum
[
ch
]
>>
s
->
movave_scaling
);
(
s
->
ave_sum
[
ch
]
>>
s
->
movave_scaling
);
if
(
residue
&
1
)
residue
=
(
residue
>>
1
)
^
-
(
residue
&
1
);
residue
=
-
(
residue
>>
1
)
-
1
;
else
residue
=
residue
>>
1
;
s
->
channel_residues
[
ch
][
i
]
=
residue
;
s
->
channel_residues
[
ch
][
i
]
=
residue
;
}
}
...
@@ -646,12 +643,8 @@ static void mclms_update(WmallDecodeCtx *s, int icoef, int *pred)
...
@@ -646,12 +643,8 @@ static void mclms_update(WmallDecodeCtx *s, int icoef, int *pred)
for
(
ich
=
num_channels
-
1
;
ich
>=
0
;
ich
--
)
{
for
(
ich
=
num_channels
-
1
;
ich
>=
0
;
ich
--
)
{
s
->
mclms_recent
--
;
s
->
mclms_recent
--
;
s
->
mclms_prevvalues
[
s
->
mclms_recent
]
=
s
->
channel_residues
[
ich
][
icoef
];
s
->
mclms_prevvalues
[
s
->
mclms_recent
]
=
av_clip
(
s
->
channel_residues
[
ich
][
icoef
],
if
(
s
->
channel_residues
[
ich
][
icoef
]
>
range
-
1
)
-
range
,
range
-
1
);
s
->
mclms_prevvalues
[
s
->
mclms_recent
]
=
range
-
1
;
else
if
(
s
->
channel_residues
[
ich
][
icoef
]
<
-
range
)
s
->
mclms_prevvalues
[
s
->
mclms_recent
]
=
-
range
;
s
->
mclms_updates
[
s
->
mclms_recent
]
=
WMASIGN
(
s
->
channel_residues
[
ich
][
icoef
]);
s
->
mclms_updates
[
s
->
mclms_recent
]
=
WMASIGN
(
s
->
channel_residues
[
ich
][
icoef
]);
}
}
...
@@ -1073,7 +1066,6 @@ static int decode_frame(WmallDecodeCtx *s)
...
@@ -1073,7 +1066,6 @@ static int decode_frame(WmallDecodeCtx *s)
av_dlog
(
s
->
avctx
,
"Frame done
\n
"
);
av_dlog
(
s
->
avctx
,
"Frame done
\n
"
);
if
(
s
->
skip_frame
)
s
->
skip_frame
=
0
;
s
->
skip_frame
=
0
;
if
(
s
->
len_prefix
)
{
if
(
s
->
len_prefix
)
{
...
...
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