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
3c096ac7
Commit
3c096ac7
authored
Apr 14, 2005
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimizing unpack_coeffs()
Originally committed as revision 4127 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
86e59cc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
snow.c
libavcodec/snow.c
+12
-9
No files found.
libavcodec/snow.c
View file @
3c096ac7
...
...
@@ -1817,10 +1817,21 @@ static inline void unpack_coeffs(SnowContext *s, SubBand *b, SubBand * parent, i
int
context
=
av_log2
(
/*ABS(ll) + */
3
*
(
l
>>
1
)
+
(
lt
>>
1
)
+
(
t
&~
1
)
+
(
rt
>>
1
)
+
(
p
>>
1
));
v
=
get_rac
(
&
s
->
c
,
&
b
->
state
[
0
][
context
]);
if
(
v
){
v
=
2
*
(
get_symbol2
(
&
s
->
c
,
b
->
state
[
context
+
2
],
context
-
4
)
+
1
);
v
+=
get_rac
(
&
s
->
c
,
&
b
->
state
[
0
][
16
+
1
+
3
+
quant3bA
[
l
&
0xFF
]
+
3
*
quant3bA
[
t
&
0xFF
]]);
b
->
x_coeff
[
index
].
x
=
x
;
b
->
x_coeff
[
index
++
].
coeff
=
v
;
}
}
else
{
if
(
!
run
){
run
=
get_symbol2
(
&
s
->
c
,
b
->
state
[
1
],
3
);
v
=
1
;
v
=
2
*
(
get_symbol2
(
&
s
->
c
,
b
->
state
[
0
+
2
],
0
-
4
)
+
1
);
v
+=
get_rac
(
&
s
->
c
,
&
b
->
state
[
0
][
16
+
1
+
3
]);
b
->
x_coeff
[
index
].
x
=
x
;
b
->
x_coeff
[
index
++
].
coeff
=
v
;
}
else
{
run
--
;
v
=
0
;
...
...
@@ -1835,14 +1846,6 @@ static inline void unpack_coeffs(SnowContext *s, SubBand *b, SubBand * parent, i
}
}
}
if
(
v
){
int
context
=
av_log2
(
/*ABS(ll) + */
3
*
(
l
>>
1
)
+
(
lt
>>
1
)
+
(
t
&~
1
)
+
(
rt
>>
1
)
+
(
p
>>
1
));
v
=
2
*
(
get_symbol2
(
&
s
->
c
,
b
->
state
[
context
+
2
],
context
-
4
)
+
1
);
v
+=
get_rac
(
&
s
->
c
,
&
b
->
state
[
0
][
16
+
1
+
3
+
quant3bA
[
l
&
0xFF
]
+
3
*
quant3bA
[
t
&
0xFF
]]);
b
->
x_coeff
[
index
].
x
=
x
;
b
->
x_coeff
[
index
++
].
coeff
=
v
;
}
}
b
->
x_coeff
[
index
++
].
x
=
w
+
1
;
//end marker
prev_index
=
prev2_index
;
...
...
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