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
726eac1d
Commit
726eac1d
authored
May 26, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
j2kdec: cosmetics from jpeg2000
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
88d2dd00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
j2kdec.c
libavcodec/j2kdec.c
+8
-9
No files found.
libavcodec/j2kdec.c
View file @
726eac1d
...
...
@@ -137,7 +137,7 @@ static int tag_tree_decode(Jpeg2000DecoderContext *s, Jpeg2000TgtNode *node, int
}
/* marker segments */
/*
*
get sizes and offsets of image, tiles; number of components */
/* get sizes and offsets of image, tiles; number of components */
static
int
get_siz
(
Jpeg2000DecoderContext
*
s
)
{
int
i
,
ret
;
...
...
@@ -147,16 +147,15 @@ static int get_siz(Jpeg2000DecoderContext *s)
return
AVERROR
(
EINVAL
);
bytestream2_get_be16u
(
&
s
->
g
);
// Rsiz
s
->
width
=
bytestream2_get_be32u
(
&
s
->
g
);
// Width
s
->
height
=
bytestream2_get_be32u
(
&
s
->
g
);
// Height
s
->
width
=
bytestream2_get_be32u
(
&
s
->
g
);
// Width
s
->
height
=
bytestream2_get_be32u
(
&
s
->
g
);
// Height
s
->
image_offset_x
=
bytestream2_get_be32u
(
&
s
->
g
);
// X0Siz
s
->
image_offset_y
=
bytestream2_get_be32u
(
&
s
->
g
);
// Y0Siz
s
->
tile_width
=
bytestream2_get_be32u
(
&
s
->
g
);
// XTSiz
s
->
tile_height
=
bytestream2_get_be32u
(
&
s
->
g
);
// YTSiz
s
->
tile_offset_x
=
bytestream2_get_be32u
(
&
s
->
g
);
// XT0Siz
s
->
tile_offset_y
=
bytestream2_get_be32u
(
&
s
->
g
);
// YT0Siz
s
->
ncomponents
=
bytestream2_get_be16u
(
&
s
->
g
);
// CSiz
s
->
tile_width
=
bytestream2_get_be32u
(
&
s
->
g
);
// XTSiz
s
->
tile_height
=
bytestream2_get_be32u
(
&
s
->
g
);
// YTSiz
s
->
tile_offset_x
=
bytestream2_get_be32u
(
&
s
->
g
);
// XT0Siz
s
->
tile_offset_y
=
bytestream2_get_be32u
(
&
s
->
g
);
// YT0Siz
s
->
ncomponents
=
bytestream2_get_be16u
(
&
s
->
g
);
// CSiz
if
(
s
->
ncomponents
<=
0
||
s
->
ncomponents
>
4
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"unsupported/invalid ncomponents: %d
\n
"
,
s
->
ncomponents
);
...
...
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