Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
20f7872d
Commit
20f7872d
authored
Apr 08, 2017
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/hqx: add support for frame threads
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
24d9b0c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
hqx.c
libavcodec/hqx.c
+8
-2
No files found.
libavcodec/hqx.c
View file @
20f7872d
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "canopus.h"
#include "canopus.h"
#include "get_bits.h"
#include "get_bits.h"
#include "internal.h"
#include "internal.h"
#include "thread.h"
#include "hqx.h"
#include "hqx.h"
#include "hqxdsp.h"
#include "hqxdsp.h"
...
@@ -405,6 +406,7 @@ static int hqx_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -405,6 +406,7 @@ static int hqx_decode_frame(AVCodecContext *avctx, void *data,
int
*
got_picture_ptr
,
AVPacket
*
avpkt
)
int
*
got_picture_ptr
,
AVPacket
*
avpkt
)
{
{
HQXContext
*
ctx
=
avctx
->
priv_data
;
HQXContext
*
ctx
=
avctx
->
priv_data
;
ThreadFrame
frame
=
{
.
f
=
data
};
uint8_t
*
src
=
avpkt
->
data
;
uint8_t
*
src
=
avpkt
->
data
;
uint32_t
info_tag
;
uint32_t
info_tag
;
int
data_start
;
int
data_start
;
...
@@ -491,7 +493,7 @@ static int hqx_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -491,7 +493,7 @@ static int hqx_decode_frame(AVCodecContext *avctx, void *data,
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
}
ret
=
ff_
get_buffer
(
avctx
,
ctx
->
pic
,
0
);
ret
=
ff_
thread_get_buffer
(
avctx
,
&
frame
,
0
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
...
@@ -510,6 +512,9 @@ static av_cold int hqx_decode_close(AVCodecContext *avctx)
...
@@ -510,6 +512,9 @@ static av_cold int hqx_decode_close(AVCodecContext *avctx)
int
i
;
int
i
;
HQXContext
*
ctx
=
avctx
->
priv_data
;
HQXContext
*
ctx
=
avctx
->
priv_data
;
if
(
avctx
->
internal
->
is_copy
)
return
0
;
ff_free_vlc
(
&
ctx
->
cbp_vlc
);
ff_free_vlc
(
&
ctx
->
cbp_vlc
);
for
(
i
=
0
;
i
<
3
;
i
++
)
{
for
(
i
=
0
;
i
<
3
;
i
++
)
{
ff_free_vlc
(
&
ctx
->
dc_vlc
[
i
]);
ff_free_vlc
(
&
ctx
->
dc_vlc
[
i
]);
...
@@ -536,7 +541,8 @@ AVCodec ff_hqx_decoder = {
...
@@ -536,7 +541,8 @@ AVCodec ff_hqx_decoder = {
.
init
=
hqx_decode_init
,
.
init
=
hqx_decode_init
,
.
decode
=
hqx_decode_frame
,
.
decode
=
hqx_decode_frame
,
.
close
=
hqx_decode_close
,
.
close
=
hqx_decode_close
,
.
capabilities
=
AV_CODEC_CAP_DR1
|
AV_CODEC_CAP_SLICE_THREADS
,
.
capabilities
=
AV_CODEC_CAP_DR1
|
AV_CODEC_CAP_SLICE_THREADS
|
AV_CODEC_CAP_FRAME_THREADS
,
.
caps_internal
=
FF_CODEC_CAP_INIT_THREADSAFE
|
.
caps_internal
=
FF_CODEC_CAP_INIT_THREADSAFE
|
FF_CODEC_CAP_INIT_CLEANUP
,
FF_CODEC_CAP_INIT_CLEANUP
,
};
};
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