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
ff765159
Commit
ff765159
authored
Aug 27, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11% faster decode_subband()
Originally committed as revision 3421 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
0cea8a03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
snow.c
libavcodec/snow.c
+15
-15
No files found.
libavcodec/snow.c
View file @
ff765159
...
...
@@ -1921,8 +1921,8 @@ static inline void decode_subband(SnowContext *s, SubBand *b, DWTELEM *src, DWTE
int
v
=
0
;
int
lt
=
0
,
t
=
0
,
rt
=
0
;
if
(
y
){
rt
=
src
[(
y
-
1
)
*
stride
];
if
(
y
&&
b
->
x
[
prev_index
]
==
0
){
rt
=
b
->
coeff
[
prev_index
];
}
for
(
x
=
0
;
x
<
w
;
x
++
){
int
p
=
0
;
...
...
@@ -1930,19 +1930,21 @@ static inline void decode_subband(SnowContext *s, SubBand *b, DWTELEM *src, DWTE
lt
=
t
;
t
=
rt
;
if
(
y
&&
x
+
1
<
w
){
rt
=
src
[
x
+
1
+
(
y
-
1
)
*
stride
];
}
else
rt
=
0
;
if
(
y
){
if
(
b
->
x
[
prev_index
]
<=
x
)
//FIXME if
prev_index
++
;
if
(
b
->
x
[
prev_index
]
==
x
+
1
)
rt
=
b
->
coeff
[
prev_index
];
else
rt
=
0
;
}
if
(
parent
){
int
px
=
x
>>
1
;
int
py
=
y
>>
1
;
if
(
px
<
b
->
parent
->
width
&&
py
<
b
->
parent
->
height
)
p
=
parent
[
px
+
py
*
2
*
stride
];
if
(
x
>>
1
>
b
->
parent
->
x
[
parent_index
]){
parent_index
++
;
}
if
(
x
>>
1
==
b
->
parent
->
x
[
parent_index
]){
p
=
b
->
parent
->
coeff
[
parent_index
];
}
}
if
(
/*ll|*/
l
|
lt
|
t
|
rt
|
p
){
int
context
=
av_log2
(
/*ABS(ll) + */
3
*
ABS
(
l
)
+
ABS
(
lt
)
+
2
*
ABS
(
t
)
+
ABS
(
rt
)
+
ABS
(
p
));
...
...
@@ -1958,8 +1960,6 @@ static inline void decode_subband(SnowContext *s, SubBand *b, DWTELEM *src, DWTE
if
(
y
&&
parent
){
int
max_run
;
while
(
b
->
x
[
prev_index
]
<
x
)
prev_index
++
;
max_run
=
FFMIN
(
run
,
b
->
x
[
prev_index
]
-
x
-
2
);
max_run
=
FFMIN
(
max_run
,
2
*
b
->
parent
->
x
[
parent_index
]
-
x
-
1
);
...
...
@@ -1974,8 +1974,8 @@ static inline void decode_subband(SnowContext *s, SubBand *b, DWTELEM *src, DWTE
if
(
get_cabac
(
&
s
->
c
,
&
b
->
state
[
0
][
16
+
1
+
3
+
quant3b
[
l
&
0xFF
]
+
3
*
quant3b
[
t
&
0xFF
]]))
v
=
-
v
;
src
[
x
+
y
*
stride
]
=
v
;
b
->
x
[
index
++
]
=
x
;
//FIXME interleave x/coeff
//
b->coeff[index++]= v;
b
->
x
[
index
]
=
x
;
//FIXME interleave x/coeff
b
->
coeff
[
index
++
]
=
v
;
}
}
b
->
x
[
index
++
]
=
w
+
1
;
//end marker
...
...
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