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
001a74ff
Commit
001a74ff
authored
Dec 31, 2011
by
Mashiat Sarker Shakkhar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix AC filter buffers and AC filter reversion
parent
70dd5a60
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
wmalosslessdec.c
libavcodec/wmalosslessdec.c
+24
-13
No files found.
libavcodec/wmalosslessdec.c
View file @
001a74ff
...
...
@@ -231,8 +231,8 @@ typedef struct WmallDecodeCtx {
int8_t
acfilter_order
;
int8_t
acfilter_scaling
;
int
acfilter_coeffs
[
16
];
int
acfilter_prevvalues
[
16
];
int
64_t
acfilter_coeffs
[
16
];
int
acfilter_prevvalues
[
2
][
16
];
int8_t
mclms_order
;
int8_t
mclms_scaling
;
...
...
@@ -1023,23 +1023,34 @@ static void revert_inter_ch_decorr(WmallDecodeCtx *s, int tile_size)
static
void
revert_acfilter
(
WmallDecodeCtx
*
s
,
int
tile_size
)
{
int
ich
,
icoef
;
int
pred
=
0
,
itap
;
int
**
ch_coeffs
=
s
->
channel_residues
;
int
*
filter_coeffs
=
s
->
acfilter_coeffs
;
int
*
prevvalues
=
s
->
acfilter_prevvalues
;
int
pred
;
int
i
,
j
;
int64_t
*
filter_coeffs
=
s
->
acfilter_coeffs
;
int
scaling
=
s
->
acfilter_scaling
;
int
order
=
s
->
acfilter_order
;
for
(
ich
=
0
;
ich
<
s
->
num_channels
;
ich
++
)
{
for
(
icoef
=
0
;
icoef
<
tile_size
;
icoef
++
)
{
for
(
itap
=
0
;
itap
<
order
;
itap
++
)
pred
+=
filter_coeffs
[
itap
]
*
prevvalues
[
itap
];
int
*
prevvalues
=
s
->
acfilter_prevvalues
[
ich
];
for
(
i
=
0
;
i
<
order
;
i
++
)
{
pred
=
0
;
for
(
j
=
0
;
j
<
order
;
j
++
)
{
if
(
i
<=
j
)
pred
+=
filter_coeffs
[
j
]
*
prevvalues
[
j
-
i
];
else
pred
+=
s
->
channel_residues
[
ich
][
i
-
j
-
1
]
*
filter_coeffs
[
j
];
}
pred
>>=
scaling
;
s
->
channel_residues
[
ich
][
i
]
+=
pred
;
}
for
(
i
=
order
;
i
<
tile_size
;
i
++
)
{
pred
=
0
;
for
(
j
=
0
;
j
<
order
;
j
++
)
pred
+=
s
->
channel_residues
[
ich
][
i
-
j
-
1
]
*
filter_coeffs
[
j
];
pred
>>=
scaling
;
ch_coeffs
[
ich
][
icoef
]
+=
pred
;
for
(
itap
=
1
;
itap
<
order
;
itap
++
)
prevvalues
[
itap
]
=
prevvalues
[
itap
-
1
];
prevvalues
[
0
]
=
ch_coeffs
[
ich
][
icoef
];
s
->
channel_residues
[
ich
][
i
]
+=
pred
;
}
for
(
j
=
0
;
j
<
order
;
j
++
)
prevvalues
[
j
]
=
s
->
channel_residues
[
ich
][
tile_size
-
j
-
1
];
}
}
...
...
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