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
e06b8b07
Commit
e06b8b07
authored
Apr 01, 2017
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
e0b16457
'
* commit '
e0b16457
': qsv: Add VP8 decoder Merged-by:
Clément Bœsch
<
u@pkh.me
>
parents
fa0a6ce3
e0b16457
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
1 deletion
+61
-1
configure
configure
+3
-0
Makefile
libavcodec/Makefile
+1
-0
allcodecs.c
libavcodec/allcodecs.c
+2
-0
qsv.c
libavcodec/qsv.c
+8
-0
qsvdec_other.c
libavcodec/qsvdec_other.c
+47
-1
No files found.
configure
View file @
e06b8b07
...
...
@@ -2730,6 +2730,7 @@ vp9_cuvid_hwaccel_deps="cuda cuvid"
vp9_cuvid_hwaccel_select
=
"vp9_cuvid_decoder"
vp8_mediacodec_decoder_deps
=
"mediacodec"
vp8_mediacodec_hwaccel_deps
=
"mediacodec"
vp8_qsv_hwaccel_deps
=
"libmfx"
vp9_d3d11va_hwaccel_deps
=
"d3d11va DXVA_PicParams_VP9"
vp9_d3d11va_hwaccel_select
=
"vp9_decoder"
vp9_dxva2_hwaccel_deps
=
"dxva2 DXVA_PicParams_VP9"
...
...
@@ -2792,6 +2793,8 @@ nvenc_hevc_encoder_deps="nvenc"
vc1_cuvid_decoder_deps
=
"cuda cuvid"
vp8_cuvid_decoder_deps
=
"cuda cuvid"
vp8_qsv_decoder_deps
=
"libmfx"
vp8_qsv_decoder_select
=
"qsvdec vp8_qsv_hwaccel vp8_parser"
vp8_vaapi_encoder_deps
=
"VAEncPictureParameterBufferVP8"
vp8_vaapi_encoder_select
=
"vaapi_encode"
vp9_cuvid_decoder_deps
=
"cuda cuvid"
...
...
libavcodec/Makefile
View file @
e06b8b07
...
...
@@ -609,6 +609,7 @@ OBJS-$(CONFIG_VP7_DECODER) += vp8.o vp56rac.o
OBJS-$(CONFIG_VP8_DECODER)
+=
vp8.o
vp56rac.o
OBJS-$(CONFIG_VP8_CUVID_DECODER)
+=
cuvid.o
OBJS-$(CONFIG_VP8_MEDIACODEC_DECODER)
+=
mediacodecdec.o
OBJS-$(CONFIG_VP8_QSV_DECODER)
+=
qsvdec_other.o
OBJS-$(CONFIG_VP8_VAAPI_ENCODER)
+=
vaapi_encode_vp8.o
OBJS-$(CONFIG_VP9_DECODER)
+=
vp9.o
vp9data.o
vp9dsp.o
vp9lpf.o
vp9recon.o
\
vp9block.o
vp9prob.o
vp9mvs.o
vp56rac.o
\
...
...
libavcodec/allcodecs.c
View file @
e06b8b07
...
...
@@ -111,6 +111,7 @@ static void register_all(void)
REGISTER_HWACCEL
(
VC1_QSV
,
vc1_qsv
);
REGISTER_HWACCEL
(
VP8_CUVID
,
vp8_cuvid
);
REGISTER_HWACCEL
(
VP8_MEDIACODEC
,
vp8_mediacodec
);
REGISTER_HWACCEL
(
VP8_QSV
,
vp8_qsv
);
REGISTER_HWACCEL
(
VP9_CUVID
,
vp9_cuvid
);
REGISTER_HWACCEL
(
VP9_D3D11VA
,
vp9_d3d11va
);
REGISTER_HWACCEL
(
VP9_DXVA2
,
vp9_dxva2
);
...
...
@@ -668,6 +669,7 @@ static void register_all(void)
REGISTER_DECODER
(
VC1_CUVID
,
vc1_cuvid
);
REGISTER_DECODER
(
VP8_CUVID
,
vp8_cuvid
);
REGISTER_DECODER
(
VP8_MEDIACODEC
,
vp8_mediacodec
);
REGISTER_DECODER
(
VP8_QSV
,
vp8_qsv
);
REGISTER_ENCODER
(
VP8_VAAPI
,
vp8_vaapi
);
REGISTER_DECODER
(
VP9_CUVID
,
vp9_cuvid
);
REGISTER_DECODER
(
VP9_MEDIACODEC
,
vp9_mediacodec
);
...
...
libavcodec/qsv.c
View file @
e06b8b07
...
...
@@ -34,6 +34,10 @@
#include "avcodec.h"
#include "qsv_internal.h"
#if QSV_VERSION_ATLEAST(1, 12)
#include "mfx/mfxvp8.h"
#endif
int
ff_qsv_codec_id_to_mfx
(
enum
AVCodecID
codec_id
)
{
switch
(
codec_id
)
{
...
...
@@ -48,6 +52,10 @@ int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id)
return
MFX_CODEC_MPEG2
;
case
AV_CODEC_ID_VC1
:
return
MFX_CODEC_VC1
;
#if QSV_VERSION_ATLEAST(1, 12)
case
AV_CODEC_ID_VP8
:
return
MFX_CODEC_VP8
;
#endif
default:
break
;
}
...
...
libavcodec/qsvdec_other.c
View file @
e06b8b07
/*
* Intel MediaSDK QSV based MPEG-2
and VC-1
decoders
* Intel MediaSDK QSV based MPEG-2
, VC-1 and VP8
decoders
*
* copyright (c) 2015 Anton Khirnov
*
...
...
@@ -74,6 +74,17 @@ static av_cold int qsv_decode_init(AVCodecContext *avctx)
QSVOtherContext
*
s
=
avctx
->
priv_data
;
int
ret
;
#if CONFIG_VP8_QSV_DECODER
if
(
avctx
->
codec_id
==
AV_CODEC_ID_VP8
)
{
static
const
char
*
uid_vp8dec_hw
=
"f622394d8d87452f878c51f2fc9b4131"
;
av_freep
(
&
s
->
qsv
.
load_plugins
);
s
->
qsv
.
load_plugins
=
av_strdup
(
uid_vp8dec_hw
);
if
(
!
s
->
qsv
.
load_plugins
)
return
AVERROR
(
ENOMEM
);
}
#endif
s
->
packet_fifo
=
av_fifo_alloc
(
sizeof
(
AVPacket
));
if
(
!
s
->
packet_fifo
)
{
ret
=
AVERROR
(
ENOMEM
);
...
...
@@ -216,3 +227,38 @@ AVCodec ff_vc1_qsv_decoder = {
AV_PIX_FMT_NONE
},
};
#endif
#if CONFIG_VP8_QSV_HWACCEL
AVHWAccel
ff_vp8_qsv_hwaccel
=
{
.
name
=
"vp8_qsv"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
id
=
AV_CODEC_ID_VP8
,
.
pix_fmt
=
AV_PIX_FMT_QSV
,
};
#endif
#if CONFIG_VP8_QSV_DECODER
static
const
AVClass
vp8_qsv_class
=
{
.
class_name
=
"vp8_qsv"
,
.
item_name
=
av_default_item_name
,
.
option
=
options
,
.
version
=
LIBAVUTIL_VERSION_INT
,
};
AVCodec
ff_vp8_qsv_decoder
=
{
.
name
=
"vp8_qsv"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"VP8 video (Intel Quick Sync Video acceleration)"
),
.
priv_data_size
=
sizeof
(
QSVOtherContext
),
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
id
=
AV_CODEC_ID_VP8
,
.
init
=
qsv_decode_init
,
.
decode
=
qsv_decode_frame
,
.
flush
=
qsv_decode_flush
,
.
close
=
qsv_decode_close
,
.
capabilities
=
AV_CODEC_CAP_DELAY
|
AV_CODEC_CAP_DR1
|
AV_CODEC_CAP_AVOID_PROBING
,
.
priv_class
=
&
vp8_qsv_class
,
.
pix_fmts
=
(
const
enum
AVPixelFormat
[]){
AV_PIX_FMT_NV12
,
AV_PIX_FMT_QSV
,
AV_PIX_FMT_NONE
},
};
#endif
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