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
7c244349
Commit
7c244349
authored
Jun 13, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/jpeg2000dec: Factorize component out of CPRL loop
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
86efe831
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
jpeg2000dec.c
libavcodec/jpeg2000dec.c
+3
-2
No files found.
libavcodec/jpeg2000dec.c
View file @
7c244349
...
...
@@ -961,6 +961,7 @@ static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile
case
JPEG2000_PGOD_CPRL
:
for
(
compno
=
0
;
compno
<
s
->
ncomponents
;
compno
++
)
{
Jpeg2000Component
*
comp
=
tile
->
comp
+
compno
;
Jpeg2000CodingStyle
*
codsty
=
tile
->
codsty
+
compno
;
Jpeg2000QuantStyle
*
qntsty
=
tile
->
qntsty
+
compno
;
int
step_x
=
32
;
...
...
@@ -968,7 +969,7 @@ static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile
for
(
reslevelno
=
0
;
reslevelno
<
codsty
->
nreslevels
;
reslevelno
++
)
{
uint8_t
reducedresno
=
codsty
->
nreslevels
-
1
-
reslevelno
;
// ==> N_L - r
Jpeg2000ResLevel
*
rlevel
=
tile
->
comp
[
compno
].
reslevel
+
reslevelno
;
Jpeg2000ResLevel
*
rlevel
=
comp
->
reslevel
+
reslevelno
;
step_x
=
FFMIN
(
step_x
,
rlevel
->
log2_prec_width
+
reducedresno
);
step_y
=
FFMIN
(
step_y
,
rlevel
->
log2_prec_height
+
reducedresno
);
}
...
...
@@ -980,7 +981,7 @@ static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile
for
(
reslevelno
=
0
;
reslevelno
<
codsty
->
nreslevels
;
reslevelno
++
)
{
uint16_t
prcx
,
prcy
;
uint8_t
reducedresno
=
codsty
->
nreslevels
-
1
-
reslevelno
;
// ==> N_L - r
Jpeg2000ResLevel
*
rlevel
=
tile
->
comp
[
compno
].
reslevel
+
reslevelno
;
Jpeg2000ResLevel
*
rlevel
=
comp
->
reslevel
+
reslevelno
;
if
(
!
((
y
%
(
1
<<
(
rlevel
->
log2_prec_height
+
reducedresno
))
==
0
)
||
(
y
==
0
)))
// TODO: 2nd condition simplified as try0 always =0 for dcinema
...
...
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