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
5b73916d
Commit
5b73916d
authored
Jul 01, 2013
by
Michael Niedermayer
Committed by
Luca Barbato
Jul 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jpeg2000: Simplify init_tile()
Signed-off-by:
Luca Barbato
<
lu_zero@gentoo.org
>
parent
33e665a6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
jpeg2000dec.c
libavcodec/jpeg2000dec.c
+4
-6
No files found.
libavcodec/jpeg2000dec.c
View file @
5b73916d
...
...
@@ -573,8 +573,6 @@ static int init_tile(Jpeg2000DecoderContext *s, int tileno)
int
tilex
=
tileno
%
s
->
numXtiles
;
int
tiley
=
tileno
/
s
->
numXtiles
;
Jpeg2000Tile
*
tile
=
s
->
tile
+
tileno
;
Jpeg2000CodingStyle
*
codsty
;
Jpeg2000QuantStyle
*
qntsty
;
if
(
!
tile
->
comp
)
return
AVERROR
(
ENOMEM
);
...
...
@@ -582,14 +580,14 @@ static int init_tile(Jpeg2000DecoderContext *s, int tileno)
/* copy codsty, qnsty to tile. TODO: Is it the best way?
* codsty, qnsty is an array of 4 structs Jpeg2000CodingStyle
* and Jpeg2000QuantStyle */
memcpy
(
tile
->
codsty
,
s
->
codsty
,
s
->
ncomponents
*
sizeof
(
*
codsty
));
memcpy
(
tile
->
qntsty
,
s
->
qntsty
,
s
->
ncomponents
*
sizeof
(
*
qntsty
));
memcpy
(
tile
->
codsty
,
s
->
codsty
,
s
->
ncomponents
*
sizeof
(
*
tile
->
codsty
));
memcpy
(
tile
->
qntsty
,
s
->
qntsty
,
s
->
ncomponents
*
sizeof
(
*
tile
->
qntsty
));
for
(
compno
=
0
;
compno
<
s
->
ncomponents
;
compno
++
)
{
Jpeg2000Component
*
comp
=
tile
->
comp
+
compno
;
Jpeg2000CodingStyle
*
codsty
=
tile
->
codsty
+
compno
;
Jpeg2000QuantStyle
*
qntsty
=
tile
->
qntsty
+
compno
;
int
ret
;
// global bandno
codsty
=
tile
->
codsty
+
compno
;
qntsty
=
tile
->
qntsty
+
compno
;
comp
->
coord_o
[
0
][
0
]
=
FFMAX
(
tilex
*
s
->
tile_width
+
s
->
tile_offset_x
,
s
->
image_offset_x
);
comp
->
coord_o
[
0
][
1
]
=
FFMIN
((
tilex
+
1
)
*
s
->
tile_width
+
s
->
tile_offset_x
,
s
->
width
);
...
...
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