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
d554715f
Commit
d554715f
authored
Jul 03, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/jpeg2000dec: Fix decoding of subsampled multi tile images
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
9f4f5787
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
jpeg2000dec.c
libavcodec/jpeg2000dec.c
+8
-8
No files found.
libavcodec/jpeg2000dec.c
View file @
d554715f
...
...
@@ -1702,13 +1702,13 @@ static int jpeg2000_decode_tile(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
plane
=
s
->
cdef
[
compno
]
?
s
->
cdef
[
compno
]
-
1
:
(
s
->
ncomponents
-
1
);
y
=
tile
->
comp
[
compno
].
coord
[
1
][
0
]
-
s
->
image_offset_y
;
line
=
picture
->
data
[
plane
]
+
y
/
s
->
cdy
[
compno
]
*
picture
->
linesize
[
plane
];
y
=
tile
->
comp
[
compno
].
coord
[
1
][
0
]
-
s
->
image_offset_y
/
s
->
cdy
[
compno
]
;
line
=
picture
->
data
[
plane
]
+
y
*
picture
->
linesize
[
plane
];
for
(;
y
<
tile
->
comp
[
compno
].
coord
[
1
][
1
]
-
s
->
image_offset_y
;
y
++
)
{
uint8_t
*
dst
;
x
=
tile
->
comp
[
compno
].
coord
[
0
][
0
]
-
s
->
image_offset_x
;
dst
=
line
+
x
/
s
->
cdx
[
compno
]
*
pixelsize
+
compno
*!
planar
;
x
=
tile
->
comp
[
compno
].
coord
[
0
][
0
]
-
s
->
image_offset_x
/
s
->
cdx
[
compno
]
;
dst
=
line
+
x
*
pixelsize
+
compno
*!
planar
;
if
(
codsty
->
transform
==
FF_DWT97
)
{
for
(;
x
<
w
;
x
++
)
{
...
...
@@ -1751,13 +1751,13 @@ static int jpeg2000_decode_tile(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
if
(
planar
)
plane
=
s
->
cdef
[
compno
]
?
s
->
cdef
[
compno
]
-
1
:
(
s
->
ncomponents
-
1
);
y
=
tile
->
comp
[
compno
].
coord
[
1
][
0
]
-
s
->
image_offset_y
;
linel
=
(
uint16_t
*
)
picture
->
data
[
plane
]
+
y
/
s
->
cdy
[
compno
]
*
(
picture
->
linesize
[
plane
]
>>
1
);
y
=
tile
->
comp
[
compno
].
coord
[
1
][
0
]
-
s
->
image_offset_y
/
s
->
cdy
[
compno
]
;
linel
=
(
uint16_t
*
)
picture
->
data
[
plane
]
+
y
*
(
picture
->
linesize
[
plane
]
>>
1
);
for
(;
y
<
tile
->
comp
[
compno
].
coord
[
1
][
1
]
-
s
->
image_offset_y
;
y
++
)
{
uint16_t
*
dst
;
x
=
tile
->
comp
[
compno
].
coord
[
0
][
0
]
-
s
->
image_offset_x
;
dst
=
linel
+
(
x
/
s
->
cdx
[
compno
]
*
pixelsize
+
compno
*!
planar
);
x
=
tile
->
comp
[
compno
].
coord
[
0
][
0
]
-
s
->
image_offset_x
/
s
->
cdx
[
compno
]
;
dst
=
linel
+
(
x
*
pixelsize
+
compno
*!
planar
);
if
(
codsty
->
transform
==
FF_DWT97
)
{
for
(;
x
<
w
;
x
++
)
{
int
val
=
lrintf
(
*
datap
)
+
(
1
<<
(
cbps
-
1
));
...
...
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