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
6d376346
Commit
6d376346
authored
May 11, 2012
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow decoding of j2k images with bpp<8 and 8<bpp<16 with libopenjpeg.
Fixes one of several problems described in ticket #1279.
parent
75a9479b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
libopenjpegdec.c
libavcodec/libopenjpegdec.c
+6
-4
No files found.
libavcodec/libopenjpegdec.c
View file @
6d376346
...
...
@@ -35,6 +35,8 @@
#define JP2_SIG_TYPE 0x6A502020
#define JP2_SIG_VALUE 0x0D0A870A
// pix_fmts with lower bpp have to be listed before
// similar pix_fmts with higher bpp.
#define RGB_PIXEL_FORMATS PIX_FMT_RGB24,PIX_FMT_RGBA,PIX_FMT_RGB48,PIX_FMT_RGBA64
#define GRAY_PIXEL_FORMATS PIX_FMT_GRAY8,PIX_FMT_GRAY8A,PIX_FMT_GRAY16
#define YUV_PIXEL_FORMATS PIX_FMT_YUV420P,PIX_FMT_YUV422P,PIX_FMT_YUVA420P, \
...
...
@@ -62,16 +64,16 @@ static inline int libopenjpeg_matches_pix_fmt(const opj_image_t *image, enum Pix
}
switch
(
descriptor
.
nb_components
)
{
case
4
:
match
=
match
&&
descriptor
.
comp
[
3
].
depth_minus1
+
1
=
=
image
->
comps
[
3
].
prec
&&
case
4
:
match
=
match
&&
descriptor
.
comp
[
3
].
depth_minus1
+
1
>
=
image
->
comps
[
3
].
prec
&&
1
<<
descriptor
.
log2_chroma_w
==
image
->
comps
[
3
].
dx
&&
1
<<
descriptor
.
log2_chroma_h
==
image
->
comps
[
3
].
dy
;
case
3
:
match
=
match
&&
descriptor
.
comp
[
2
].
depth_minus1
+
1
=
=
image
->
comps
[
2
].
prec
&&
case
3
:
match
=
match
&&
descriptor
.
comp
[
2
].
depth_minus1
+
1
>
=
image
->
comps
[
2
].
prec
&&
1
<<
descriptor
.
log2_chroma_w
==
image
->
comps
[
2
].
dx
&&
1
<<
descriptor
.
log2_chroma_h
==
image
->
comps
[
2
].
dy
;
case
2
:
match
=
match
&&
descriptor
.
comp
[
1
].
depth_minus1
+
1
=
=
image
->
comps
[
1
].
prec
&&
case
2
:
match
=
match
&&
descriptor
.
comp
[
1
].
depth_minus1
+
1
>
=
image
->
comps
[
1
].
prec
&&
1
<<
descriptor
.
log2_chroma_w
==
image
->
comps
[
1
].
dx
&&
1
<<
descriptor
.
log2_chroma_h
==
image
->
comps
[
1
].
dy
;
case
1
:
match
=
match
&&
descriptor
.
comp
[
0
].
depth_minus1
+
1
=
=
image
->
comps
[
0
].
prec
&&
case
1
:
match
=
match
&&
descriptor
.
comp
[
0
].
depth_minus1
+
1
>
=
image
->
comps
[
0
].
prec
&&
1
==
image
->
comps
[
0
].
dx
&&
1
==
image
->
comps
[
0
].
dy
;
default
:
...
...
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