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
3e4901b2
Commit
3e4901b2
authored
Nov 12, 2011
by
Mashiat Sarker Shakkhar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store transient state and position of transient area
parent
3f3d2b5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
wmalosslessdec.c
libavcodec/wmalosslessdec.c
+16
-4
No files found.
libavcodec/wmalosslessdec.c
View file @
3e4901b2
...
@@ -139,6 +139,7 @@ typedef struct {
...
@@ -139,6 +139,7 @@ typedef struct {
float
*
coeffs
;
///< pointer to the subframe decode buffer
float
*
coeffs
;
///< pointer to the subframe decode buffer
uint16_t
num_vec_coeffs
;
///< number of vector coded coefficients
uint16_t
num_vec_coeffs
;
///< number of vector coded coefficients
DECLARE_ALIGNED
(
16
,
float
,
out
)[
WMALL_BLOCK_MAX_SIZE
+
WMALL_BLOCK_MAX_SIZE
/
2
];
///< output buffer
DECLARE_ALIGNED
(
16
,
float
,
out
)[
WMALL_BLOCK_MAX_SIZE
+
WMALL_BLOCK_MAX_SIZE
/
2
];
///< output buffer
int
transient_counter
;
///< number of transient samples from the beginning of transient zone
}
WmallChannelCtx
;
}
WmallChannelCtx
;
/**
/**
...
@@ -660,9 +661,15 @@ static int decode_channel_residues(WmallDecodeCtx *s, int ch, int tile_size)
...
@@ -660,9 +661,15 @@ static int decode_channel_residues(WmallDecodeCtx *s, int ch, int tile_size)
int
i
=
0
;
int
i
=
0
;
unsigned
int
ave_mean
;
unsigned
int
ave_mean
;
s
->
transient
[
ch
]
=
get_bits1
(
&
s
->
gb
);
s
->
transient
[
ch
]
=
get_bits1
(
&
s
->
gb
);
if
(
s
->
transient
[
ch
])
if
(
s
->
transient
[
ch
])
{
s
->
transient_pos
[
ch
]
=
get_bits
(
&
s
->
gb
,
av_log2
(
tile_size
));
s
->
transient_pos
[
ch
]
=
get_bits
(
&
s
->
gb
,
av_log2
(
tile_size
));
if
(
s
->
transient_pos
[
ch
])
s
->
transient
[
ch
]
=
0
;
s
->
channel
[
ch
].
transient_counter
=
FFMAX
(
s
->
channel
[
ch
].
transient_counter
,
s
->
samples_per_frame
/
2
);
}
else
if
(
s
->
channel
[
ch
].
transient_counter
)
s
->
transient
[
ch
]
=
1
;
if
(
s
->
seekable_tile
)
{
if
(
s
->
seekable_tile
)
{
ave_mean
=
get_bits
(
&
s
->
gb
,
s
->
bits_per_sample
);
ave_mean
=
get_bits
(
&
s
->
gb
,
s
->
bits_per_sample
);
s
->
ave_sum
[
ch
]
=
ave_mean
<<
(
s
->
movave_scaling
+
1
);
s
->
ave_sum
[
ch
]
=
ave_mean
<<
(
s
->
movave_scaling
+
1
);
...
@@ -753,9 +760,14 @@ static void reset_codec(WmallDecodeCtx *s)
...
@@ -753,9 +760,14 @@ static void reset_codec(WmallDecodeCtx *s)
{
{
int
ich
,
ilms
;
int
ich
,
ilms
;
s
->
mclms_recent
=
s
->
mclms_order
*
s
->
num_channels
;
s
->
mclms_recent
=
s
->
mclms_order
*
s
->
num_channels
;
for
(
ich
=
0
;
ich
<
s
->
num_channels
;
ich
++
)
for
(
ich
=
0
;
ich
<
s
->
num_channels
;
ich
++
)
{
for
(
ilms
=
0
;
ilms
<
s
->
cdlms_ttl
[
ich
];
ilms
++
)
for
(
ilms
=
0
;
ilms
<
s
->
cdlms_ttl
[
ich
];
ilms
++
)
s
->
cdlms
[
ich
][
ilms
].
recent
=
s
->
cdlms
[
ich
][
ilms
].
order
;
s
->
cdlms
[
ich
][
ilms
].
recent
=
s
->
cdlms
[
ich
][
ilms
].
order
;
/* first sample of a seekable subframe is considered as the starting of
a transient area which is samples_per_frame samples long */
s
->
channel
[
ich
].
transient_counter
=
s
->
samples_per_frame
;
s
->
transient
[
ich
]
=
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