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
70f96615
Commit
70f96615
authored
May 06, 2013
by
Janne Grunau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jpeg2000dec: initialize static data just once
parent
45a1694f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
jpeg2000dec.c
libavcodec/jpeg2000dec.c
+18
-14
No files found.
libavcodec/jpeg2000dec.c
View file @
70f96615
...
...
@@ -1264,8 +1264,6 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, void *data,
// reduction factor, i.e number of resolution levels to skip
s
->
reduction_factor
=
s
->
lowres
;
ff_jpeg2000_init_tier1_luts
();
if
(
s
->
buf_end
-
s
->
buf
<
2
)
return
AVERROR
(
EINVAL
);
...
...
@@ -1308,6 +1306,11 @@ end:
return
ret
?
ret
:
s
->
buf
-
s
->
buf_start
;
}
static
void
jpeg2000_init_static_data
(
AVCodec
*
codec
)
{
ff_jpeg2000_init_tier1_luts
();
}
#define OFFSET(x) offsetof(Jpeg2000DecoderContext, x)
#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
...
...
@@ -1340,6 +1343,7 @@ AVCodec ff_jpeg2000_decoder = {
.
id
=
AV_CODEC_ID_JPEG2000
,
.
capabilities
=
CODEC_CAP_FRAME_THREADS
,
.
priv_data_size
=
sizeof
(
Jpeg2000DecoderContext
),
.
init_static_data
=
jpeg2000_init_static_data
,
.
decode
=
jpeg2000_decode_frame
,
.
priv_class
=
&
class
,
.
pix_fmts
=
(
enum
PixelFormat
[])
{
AV_PIX_FMT_XYZ12
,
...
...
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