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
d93495c9
Commit
d93495c9
authored
May 21, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/vble: add frame threading support
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
89e93930
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
vble.c
libavcodec/vble.c
+5
-2
No files found.
libavcodec/vble.c
View file @
d93495c9
...
...
@@ -33,6 +33,7 @@
#include "huffyuvdsp.h"
#include "internal.h"
#include "mathops.h"
#include "thread.h"
typedef
struct
VBLEContext
{
AVCodecContext
*
avctx
;
...
...
@@ -125,6 +126,7 @@ static int vble_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
int
offset
=
0
;
int
width_uv
=
avctx
->
width
/
2
,
height_uv
=
avctx
->
height
/
2
;
int
ret
;
ThreadFrame
frame
=
{
.
f
=
data
};
if
(
avpkt
->
size
<
4
||
avpkt
->
size
-
4
>
INT_MAX
/
8
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid packet size
\n
"
);
...
...
@@ -132,7 +134,7 @@ static int vble_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
}
/* Allocate buffer */
if
((
ret
=
ff_
get_buffer
(
avctx
,
pic
,
0
))
<
0
)
if
((
ret
=
ff_
thread_get_buffer
(
avctx
,
&
frame
,
0
))
<
0
)
return
ret
;
/* Set flags */
...
...
@@ -212,5 +214,6 @@ AVCodec ff_vble_decoder = {
.
init
=
vble_decode_init
,
.
close
=
vble_decode_close
,
.
decode
=
vble_decode_frame
,
.
capabilities
=
AV_CODEC_CAP_DR1
,
.
capabilities
=
AV_CODEC_CAP_DR1
|
AV_CODEC_CAP_FRAME_THREADS
,
.
init_thread_copy
=
ONLY_IF_THREADS_ENABLED
(
vble_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