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
b67fe48f
Commit
b67fe48f
authored
May 26, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jpeg2000/j2k: merge getsigctxno()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
69b97739
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
67 deletions
+53
-67
j2k.c
libavcodec/j2k.c
+34
-34
jpeg2000.c
libavcodec/jpeg2000.c
+19
-33
No files found.
libavcodec/j2k.c
View file @
b67fe48f
...
...
@@ -107,43 +107,43 @@ static int getsigctxno(int flag, int bandno)
{
int
h
,
v
,
d
;
h
=
((
flag
&
JPEG2000_T1_SIG_E
)
?
1
:
0
)
+
((
flag
&
JPEG2000_T1_SIG_W
)
?
1
:
0
);
v
=
((
flag
&
JPEG2000_T1_SIG_N
)
?
1
:
0
);
v
=
v
+
((
flag
&
JPEG2000_T1_SIG_S
)
?
1
:
0
);
d
=
((
flag
&
JPEG2000_T1_SIG_NE
)
?
1
:
0
)
+
((
flag
&
JPEG2000_T1_SIG_NW
)
?
1
:
0
);
d
=
d
+
((
flag
&
JPEG2000_T1_SIG_SE
)
?
1
:
0
)
+
((
flag
&
JPEG2000_T1_SIG_SW
)
?
1
:
0
);
h
=
((
flag
&
JPEG2000_T1_SIG_E
)
?
1
:
0
)
+
((
flag
&
JPEG2000_T1_SIG_W
)
?
1
:
0
);
v
=
((
flag
&
JPEG2000_T1_SIG_N
)
?
1
:
0
)
+
((
flag
&
JPEG2000_T1_SIG_S
)
?
1
:
0
);
d
=
((
flag
&
JPEG2000_T1_SIG_NE
)
?
1
:
0
)
+
((
flag
&
JPEG2000_T1_SIG_NW
)
?
1
:
0
)
+
((
flag
&
JPEG2000_T1_SIG_SE
)
?
1
:
0
)
+
((
flag
&
JPEG2000_T1_SIG_SW
)
?
1
:
0
);
if
(
bandno
<
3
){
if
(
bandno
==
1
)
FFSWAP
(
int
,
h
,
v
);
if
(
h
==
2
)
return
8
;
if
(
h
==
1
){
if
(
v
>=
1
)
return
7
;
if
(
d
>=
1
)
return
6
;
return
5
;
}
if
(
v
==
2
)
return
4
;
if
(
v
==
1
)
return
3
;
if
(
d
>=
2
)
return
2
;
if
(
d
==
1
)
return
1
;
return
0
;
if
(
bandno
==
1
)
FFSWAP
(
int
,
h
,
v
);
if
(
h
==
2
)
return
8
;
if
(
h
==
1
){
if
(
v
>=
1
)
return
7
;
if
(
d
>=
1
)
return
6
;
return
5
;
}
if
(
v
==
2
)
return
4
;
if
(
v
==
1
)
return
3
;
if
(
d
>=
2
)
return
2
;
if
(
d
==
1
)
return
1
;
}
else
{
if
(
d
>=
3
)
return
8
;
if
(
d
==
2
){
if
(
h
+
v
>=
1
)
return
7
;
return
6
;
}
if
(
d
==
1
){
if
(
h
+
v
>=
2
)
return
5
;
if
(
h
+
v
==
1
)
return
4
;
return
3
;
}
if
(
h
+
v
>=
2
)
return
2
;
if
(
h
+
v
==
1
)
return
1
;
return
0
;
if
(
d
>=
3
)
return
8
;
if
(
d
==
2
){
if
(
h
+
v
>=
1
)
return
7
;
return
6
;
}
if
(
d
==
1
){
if
(
h
+
v
>=
2
)
return
5
;
if
(
h
+
v
==
1
)
return
4
;
return
3
;
}
if
(
h
+
v
>=
2
)
return
2
;
if
(
h
+
v
==
1
)
return
1
;
}
return
0
;
}
static
int
getsgnctxno
(
int
flag
,
uint8_t
*
xorbit
)
...
...
libavcodec/jpeg2000.c
View file @
b67fe48f
...
...
@@ -95,47 +95,33 @@ static int getsigctxno(int flag, int bandno)
((
flag
&
JPEG2000_T1_SIG_NW
)
?
1
:
0
)
+
((
flag
&
JPEG2000_T1_SIG_SE
)
?
1
:
0
)
+
((
flag
&
JPEG2000_T1_SIG_SW
)
?
1
:
0
);
if
(
bandno
<
3
)
{
if
(
bandno
<
3
){
if
(
bandno
==
1
)
FFSWAP
(
int
,
h
,
v
);
if
(
h
==
2
)
return
8
;
if
(
h
==
1
)
{
if
(
v
>=
1
)
return
7
;
if
(
d
>=
1
)
return
6
;
if
(
h
==
2
)
return
8
;
if
(
h
==
1
){
if
(
v
>=
1
)
return
7
;
if
(
d
>=
1
)
return
6
;
return
5
;
}
if
(
v
==
2
)
return
4
;
if
(
v
==
1
)
return
3
;
if
(
d
>=
2
)
return
2
;
if
(
d
==
1
)
return
1
;
return
0
;
}
else
{
if
(
d
>=
3
)
return
8
;
if
(
d
==
2
)
{
if
(
h
+
v
>=
1
)
return
7
;
if
(
v
==
2
)
return
4
;
if
(
v
==
1
)
return
3
;
if
(
d
>=
2
)
return
2
;
if
(
d
==
1
)
return
1
;
}
else
{
if
(
d
>=
3
)
return
8
;
if
(
d
==
2
){
if
(
h
+
v
>=
1
)
return
7
;
return
6
;
}
if
(
d
==
1
)
{
if
(
h
+
v
>=
2
)
return
5
;
if
(
h
+
v
==
1
)
return
4
;
if
(
d
==
1
){
if
(
h
+
v
>=
2
)
return
5
;
if
(
h
+
v
==
1
)
return
4
;
return
3
;
}
if
(
h
+
v
>=
2
)
return
2
;
if
(
h
+
v
==
1
)
return
1
;
return
0
;
if
(
h
+
v
>=
2
)
return
2
;
if
(
h
+
v
==
1
)
return
1
;
}
return
0
;
}
...
...
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