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
05e5bb61
Commit
05e5bb61
authored
Jan 27, 2014
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix decoding of some 8 < bpc < 16 signed j2k samples with libopenjpeg.
No testcase known. Reviewed-by: Michael Bradshaw
parent
bceeccc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
libopenjpegdec.c
libavcodec/libopenjpegdec.c
+4
-2
No files found.
libavcodec/libopenjpegdec.c
View file @
05e5bb61
...
...
@@ -180,7 +180,8 @@ static inline void libopenjpeg_copy_to_packed16(AVFrame *picture, opj_image_t *i
img_ptr
=
(
uint16_t
*
)
(
picture
->
data
[
0
]
+
y
*
picture
->
linesize
[
0
]);
for
(
x
=
0
;
x
<
picture
->
width
;
x
++
,
index
++
)
{
for
(
c
=
0
;
c
<
image
->
numcomps
;
c
++
)
{
*
img_ptr
++
=
0x8000
*
image
->
comps
[
c
].
sgnd
+
((
unsigned
)
image
->
comps
[
c
].
data
[
index
]
<<
adjust
[
c
]);
*
img_ptr
++
=
(
1
<<
image
->
comps
[
c
].
prec
-
1
)
*
image
->
comps
[
c
].
sgnd
+
(
unsigned
)
image
->
comps
[
c
].
data
[
index
]
<<
adjust
[
c
];
}
}
}
...
...
@@ -217,7 +218,8 @@ static inline void libopenjpeg_copyto16(AVFrame *picture, opj_image_t *image) {
for
(
y
=
0
;
y
<
image
->
comps
[
index
].
h
;
y
++
)
{
img_ptr
=
(
uint16_t
*
)
(
picture
->
data
[
index
]
+
y
*
picture
->
linesize
[
index
]);
for
(
x
=
0
;
x
<
image
->
comps
[
index
].
w
;
x
++
)
{
*
img_ptr
=
0x8000
*
image
->
comps
[
index
].
sgnd
+
((
unsigned
)
*
comp_data
<<
adjust
[
index
]);
*
img_ptr
=
(
1
<<
image
->
comps
[
index
].
prec
-
1
)
*
image
->
comps
[
index
].
sgnd
+
(
unsigned
)
*
comp_data
<<
adjust
[
index
];
img_ptr
++
;
comp_data
++
;
}
...
...
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