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
833ae5f4
Commit
833ae5f4
authored
Apr 17, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/dvdec: add frame threads
parent
b272d5b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
dvdec.c
libavcodec/dvdec.c
+10
-9
No files found.
libavcodec/dvdec.c
View file @
833ae5f4
...
...
@@ -49,6 +49,7 @@
#include "internal.h"
#include "put_bits.h"
#include "simple_idct.h"
#include "thread.h"
typedef
struct
BlockInfo
{
const
uint32_t
*
factor_table
;
...
...
@@ -499,7 +500,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data,
uint8_t
*
buf
=
avpkt
->
data
;
int
buf_size
=
avpkt
->
size
;
DVVideoContext
*
s
=
avctx
->
priv_data
;
AVFrame
*
frame
=
data
;
ThreadFrame
frame
=
{
.
f
=
data
}
;
const
uint8_t
*
vsc_pack
;
int
apt
,
is16_9
,
ret
;
const
AVDVProfile
*
sys
;
...
...
@@ -520,9 +521,9 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data,
s
->
sys
=
sys
;
}
s
->
frame
=
frame
;
frame
->
key_frame
=
1
;
frame
->
pict_type
=
AV_PICTURE_TYPE_I
;
s
->
frame
=
frame
.
f
;
frame
.
f
->
key_frame
=
1
;
frame
.
f
->
pict_type
=
AV_PICTURE_TYPE_I
;
avctx
->
pix_fmt
=
s
->
sys
->
pix_fmt
;
avctx
->
framerate
=
av_inv_q
(
s
->
sys
->
time_base
);
...
...
@@ -539,14 +540,14 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data,
ff_set_sar
(
avctx
,
s
->
sys
->
sar
[
is16_9
]);
}
if
((
ret
=
ff_
get_buffer
(
avctx
,
frame
,
0
))
<
0
)
if
((
ret
=
ff_
thread_get_buffer
(
avctx
,
&
frame
,
0
))
<
0
)
return
ret
;
frame
->
interlaced_frame
=
1
;
frame
->
top_field_first
=
0
;
frame
.
f
->
interlaced_frame
=
1
;
frame
.
f
->
top_field_first
=
0
;
/* Determine the codec's field order from the packet */
if
(
*
vsc_pack
==
dv_video_control
)
{
frame
->
top_field_first
=
!
(
vsc_pack
[
3
]
&
0x40
);
frame
.
f
->
top_field_first
=
!
(
vsc_pack
[
3
]
&
0x40
);
}
s
->
buf
=
buf
;
...
...
@@ -569,6 +570,6 @@ AVCodec ff_dvvideo_decoder = {
.
priv_data_size
=
sizeof
(
DVVideoContext
),
.
init
=
dvvideo_decode_init
,
.
decode
=
dvvideo_decode_frame
,
.
capabilities
=
AV_CODEC_CAP_DR1
|
AV_CODEC_CAP_SLICE_THREADS
,
.
capabilities
=
AV_CODEC_CAP_DR1
|
AV_CODEC_CAP_
FRAME_THREADS
|
AV_CODEC_CAP_
SLICE_THREADS
,
.
max_lowres
=
3
,
};
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