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
14652c08
Commit
14652c08
authored
May 27, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
j2k/jpeg2000: restructure cblk coord
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5161c625
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
j2k.c
libavcodec/j2k.c
+10
-0
jpeg2000.c
libavcodec/jpeg2000.c
+10
-0
jpeg2000dec.c
libavcodec/jpeg2000dec.c
+0
-8
No files found.
libavcodec/j2k.c
View file @
14652c08
...
...
@@ -428,6 +428,16 @@ int ff_j2k_init_component(Jpeg2000Component *comp,
/* Compute Cy1 */
cblk
->
coord
[
1
][
1
]
=
FFMIN
(
Cy0
+
(
1
<<
band
->
log2_cblk_height
),
prec
->
coord
[
1
][
1
]);
if
((
bandno
+
!!
reslevelno
)
&
1
)
{
cblk
->
coord
[
0
][
0
]
+=
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
0
][
1
]
-
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
0
][
0
];
cblk
->
coord
[
0
][
1
]
+=
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
0
][
1
]
-
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
0
][
0
];
}
if
((
bandno
+
!!
reslevelno
)
&
2
)
{
cblk
->
coord
[
1
][
0
]
+=
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
1
][
1
]
-
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
1
][
0
];
cblk
->
coord
[
1
][
1
]
+=
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
1
][
1
]
-
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
1
][
0
];
}
cblk
->
zero
=
0
;
cblk
->
lblock
=
3
;
cblk
->
length
=
0
;
...
...
libavcodec/jpeg2000.c
View file @
14652c08
...
...
@@ -426,6 +426,16 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
/* Compute Cy1 */
cblk
->
coord
[
1
][
1
]
=
FFMIN
(
Cy0
+
(
1
<<
band
->
log2_cblk_height
),
prec
->
coord
[
1
][
1
]);
if
((
bandno
+
!!
reslevelno
)
&
1
)
{
cblk
->
coord
[
0
][
0
]
+=
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
0
][
1
]
-
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
0
][
0
];
cblk
->
coord
[
0
][
1
]
+=
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
0
][
1
]
-
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
0
][
0
];
}
if
((
bandno
+
!!
reslevelno
)
&
2
)
{
cblk
->
coord
[
1
][
0
]
+=
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
1
][
1
]
-
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
1
][
0
];
cblk
->
coord
[
1
][
1
]
+=
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
1
][
1
]
-
comp
->
reslevel
[
reslevelno
-
1
].
coord
[
1
][
0
];
}
cblk
->
zero
=
0
;
cblk
->
lblock
=
3
;
cblk
->
length
=
0
;
...
...
libavcodec/jpeg2000dec.c
View file @
14652c08
...
...
@@ -1063,14 +1063,6 @@ static int jpeg2000_decode_tile(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
/* Manage band offsets */
x
=
cblk
->
coord
[
0
][
0
];
y
=
cblk
->
coord
[
1
][
0
];
if
((
reslevelno
>
0
)
&&
((
bandno
+
1
)
&
1
))
{
Jpeg2000ResLevel
*
pres
=
comp
->
reslevel
+
(
reslevelno
-
1
);
x
+=
pres
->
coord
[
0
][
1
]
-
pres
->
coord
[
0
][
0
];
}
if
((
reslevelno
>
0
)
&&
((
bandno
+
1
)
&
2
))
{
Jpeg2000ResLevel
*
pres
=
comp
->
reslevel
+
(
reslevelno
-
1
);
y
+=
pres
->
coord
[
1
][
1
]
-
pres
->
coord
[
1
][
0
];
}
if
(
s
->
avctx
->
flags
&
CODEC_FLAG_BITEXACT
)
dequantization_int
(
x
,
y
,
cblk
,
comp
,
&
t1
,
band
);
...
...
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