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
585cfabb
Commit
585cfabb
authored
Mar 25, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/jpeg2000dec: add slice threading support
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
e2298b3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
jpeg2000dec.c
libavcodec/jpeg2000dec.c
+8
-7
No files found.
libavcodec/jpeg2000dec.c
View file @
585cfabb
...
...
@@ -1755,9 +1755,12 @@ WRITE_FRAME(16, uint16_t)
#undef WRITE_FRAME
static
int
jpeg2000_decode_tile
(
Jpeg2000DecoderContext
*
s
,
Jpeg2000Tile
*
tile
,
AVFrame
*
picture
)
static
int
jpeg2000_decode_tile
(
AVCodecContext
*
avctx
,
void
*
td
,
int
jobnr
,
int
threadnr
)
{
Jpeg2000DecoderContext
*
s
=
avctx
->
priv_data
;
AVFrame
*
picture
=
td
;
Jpeg2000Tile
*
tile
=
s
->
tile
+
jobnr
;
int
x
;
tile_codeblocks
(
s
,
tile
);
...
...
@@ -2067,7 +2070,7 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, void *data,
Jpeg2000DecoderContext
*
s
=
avctx
->
priv_data
;
ThreadFrame
frame
=
{
.
f
=
data
};
AVFrame
*
picture
=
data
;
int
tileno
,
ret
;
int
ret
;
s
->
avctx
=
avctx
;
bytestream2_init
(
&
s
->
g
,
avpkt
->
data
,
avpkt
->
size
);
...
...
@@ -2114,9 +2117,7 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, void *data,
if
(
ret
=
jpeg2000_read_bitstream_packets
(
s
))
goto
end
;
for
(
tileno
=
0
;
tileno
<
s
->
numXtiles
*
s
->
numYtiles
;
tileno
++
)
if
(
ret
=
jpeg2000_decode_tile
(
s
,
s
->
tile
+
tileno
,
picture
))
goto
end
;
avctx
->
execute2
(
avctx
,
jpeg2000_decode_tile
,
picture
,
NULL
,
s
->
numXtiles
*
s
->
numYtiles
);
jpeg2000_dec_cleanup
(
s
);
...
...
@@ -2159,7 +2160,7 @@ AVCodec ff_jpeg2000_decoder = {
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"JPEG 2000"
),
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
id
=
AV_CODEC_ID_JPEG2000
,
.
capabilities
=
AV_CODEC_CAP_FRAME_THREADS
|
AV_CODEC_CAP_DR1
,
.
capabilities
=
AV_CODEC_CAP_
SLICE_THREADS
|
AV_CODEC_CAP_
FRAME_THREADS
|
AV_CODEC_CAP_DR1
,
.
priv_data_size
=
sizeof
(
Jpeg2000DecoderContext
),
.
init_static_data
=
jpeg2000_init_static_data
,
.
init
=
jpeg2000_decode_init
,
...
...
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