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
f6943f23
Commit
f6943f23
authored
Feb 06, 2012
by
Hendrik Leppkes
Committed by
Michael Niedermayer
Jun 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lagarith: frame multithreading
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
07d49437
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
lagarith.c
libavcodec/lagarith.c
+8
-7
No files found.
libavcodec/lagarith.c
View file @
f6943f23
...
...
@@ -30,6 +30,7 @@
#include "mathops.h"
#include "dsputil.h"
#include "lagarithrac.h"
#include "thread.h"
enum
LagarithFrameType
{
FRAME_RAW
=
1
,
/**< uncompressed */
...
...
@@ -516,7 +517,7 @@ static int lag_decode_frame(AVCodecContext *avctx,
AVFrame
*
picture
=
data
;
if
(
p
->
data
[
0
])
avctx
->
release_buffer
(
avctx
,
p
);
ff_thread_
release_buffer
(
avctx
,
p
);
p
->
reference
=
0
;
p
->
key_frame
=
1
;
...
...
@@ -530,7 +531,7 @@ static int lag_decode_frame(AVCodecContext *avctx,
case
FRAME_SOLID_RGBA
:
avctx
->
pix_fmt
=
PIX_FMT_RGB32
;
if
(
avctx
->
get_buffer
(
avctx
,
p
)
<
0
)
{
if
(
ff_thread_
get_buffer
(
avctx
,
p
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
}
...
...
@@ -552,7 +553,7 @@ static int lag_decode_frame(AVCodecContext *avctx,
if
(
frametype
==
FRAME_ARITH_RGB24
||
frametype
==
FRAME_U_RGB24
)
avctx
->
pix_fmt
=
PIX_FMT_RGB24
;
if
(
avctx
->
get_buffer
(
avctx
,
p
)
<
0
)
{
if
(
ff_thread_
get_buffer
(
avctx
,
p
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
}
...
...
@@ -611,7 +612,7 @@ static int lag_decode_frame(AVCodecContext *avctx,
case
FRAME_ARITH_YUY2
:
avctx
->
pix_fmt
=
PIX_FMT_YUV422P
;
if
(
avctx
->
get_buffer
(
avctx
,
p
)
<
0
)
{
if
(
ff_thread_
get_buffer
(
avctx
,
p
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
}
...
...
@@ -637,7 +638,7 @@ static int lag_decode_frame(AVCodecContext *avctx,
case
FRAME_ARITH_YV12
:
avctx
->
pix_fmt
=
PIX_FMT_YUV420P
;
if
(
avctx
->
get_buffer
(
avctx
,
p
)
<
0
)
{
if
(
ff_thread_
get_buffer
(
avctx
,
p
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
}
...
...
@@ -690,7 +691,7 @@ static av_cold int lag_decode_end(AVCodecContext *avctx)
LagarithContext
*
l
=
avctx
->
priv_data
;
if
(
l
->
picture
.
data
[
0
])
avctx
->
release_buffer
(
avctx
,
&
l
->
picture
);
ff_thread_
release_buffer
(
avctx
,
&
l
->
picture
);
av_freep
(
&
l
->
rgb_planes
);
return
0
;
...
...
@@ -704,6 +705,6 @@ AVCodec ff_lagarith_decoder = {
.
init
=
lag_decode_init
,
.
close
=
lag_decode_end
,
.
decode
=
lag_decode_frame
,
.
capabilities
=
CODEC_CAP_DR1
,
.
capabilities
=
CODEC_CAP_DR1
|
CODEC_CAP_FRAME_THREADS
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Lagarith lossless"
),
};
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