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
0faae518
Commit
0faae518
authored
Nov 05, 2011
by
Mashiat Sarker Shakkhar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement lms_predict()
parent
03684c8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
wmalosslessdec.c
libavcodec/wmalosslessdec.c
+17
-0
No files found.
libavcodec/wmalosslessdec.c
View file @
0faae518
...
...
@@ -754,6 +754,23 @@ static void reset_codec(WmallDecodeCtx *s)
static
int
lms_predict
(
WmallDecodeCtx
*
s
,
int
ich
,
int
ilms
)
{
int32_t
pred
,
icoef
;
int
recent
=
s
->
cdlms
[
ich
][
ilms
].
recent
;
for
(
icoef
=
0
;
icoef
<
s
->
cdlms
[
ich
][
ilms
].
order
;
icoef
++
)
pred
+=
s
->
cdlms
[
ich
][
ilms
].
coefs
[
icoef
]
*
s
->
cdlms
[
ich
][
ilms
].
lms_prevvalues
[
icoef
+
recent
];
pred
+=
(
1
<<
(
s
->
cdlms
[
ich
][
ilms
].
scaling
-
1
));
/* XXX: Table 29 has:
iPred >= cdlms[iCh][ilms].scaling;
seems to me like a missing > */
pred
>>=
s
->
cdlms
[
ich
][
ilms
].
scaling
;
return
pred
;
}
/**
*@brief Decode a single subframe (block).
*@param s codec context
...
...
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