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
37a9015e
Commit
37a9015e
authored
Jun 22, 2016
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qsvenc: add support for p010
parent
21962261
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
qsvenc.c
libavcodec/qsvenc.c
+13
-3
qsvenc_h264.c
libavcodec/qsvenc_h264.c
+1
-0
qsvenc_hevc.c
libavcodec/qsvenc_hevc.c
+1
-0
No files found.
libavcodec/qsvenc.c
View file @
37a9015e
...
...
@@ -385,7 +385,16 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
AVQSVFramesContext
*
frames_hwctx
=
frames_ctx
->
hwctx
;
q
->
param
.
mfx
.
FrameInfo
=
frames_hwctx
->
surfaces
[
0
].
Info
;
}
else
{
q
->
param
.
mfx
.
FrameInfo
.
FourCC
=
MFX_FOURCC_NV12
;
enum
AVPixelFormat
sw_format
=
avctx
->
pix_fmt
==
AV_PIX_FMT_QSV
?
avctx
->
sw_pix_fmt
:
avctx
->
pix_fmt
;
const
AVPixFmtDescriptor
*
desc
;
desc
=
av_pix_fmt_desc_get
(
sw_format
);
if
(
!
desc
)
return
AVERROR_BUG
;
ff_qsv_map_pixfmt
(
sw_format
,
&
q
->
param
.
mfx
.
FrameInfo
.
FourCC
);
q
->
param
.
mfx
.
FrameInfo
.
Width
=
FFALIGN
(
avctx
->
width
,
q
->
width_align
);
q
->
param
.
mfx
.
FrameInfo
.
Height
=
FFALIGN
(
avctx
->
height
,
32
);
q
->
param
.
mfx
.
FrameInfo
.
CropX
=
0
;
...
...
@@ -396,8 +405,9 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
q
->
param
.
mfx
.
FrameInfo
.
AspectRatioH
=
avctx
->
sample_aspect_ratio
.
den
;
q
->
param
.
mfx
.
FrameInfo
.
PicStruct
=
MFX_PICSTRUCT_PROGRESSIVE
;
q
->
param
.
mfx
.
FrameInfo
.
ChromaFormat
=
MFX_CHROMAFORMAT_YUV420
;
q
->
param
.
mfx
.
FrameInfo
.
BitDepthLuma
=
8
;
q
->
param
.
mfx
.
FrameInfo
.
BitDepthChroma
=
8
;
q
->
param
.
mfx
.
FrameInfo
.
BitDepthLuma
=
desc
->
comp
[
0
].
depth
;
q
->
param
.
mfx
.
FrameInfo
.
BitDepthChroma
=
desc
->
comp
[
0
].
depth
;
q
->
param
.
mfx
.
FrameInfo
.
Shift
=
desc
->
comp
[
0
].
depth
>
8
;
}
if
(
avctx
->
framerate
.
den
>
0
&&
avctx
->
framerate
.
num
>
0
)
{
...
...
libavcodec/qsvenc_h264.c
View file @
37a9015e
...
...
@@ -126,6 +126,7 @@ AVCodec ff_h264_qsv_encoder = {
.
close
=
qsv_enc_close
,
.
capabilities
=
AV_CODEC_CAP_DELAY
,
.
pix_fmts
=
(
const
enum
AVPixelFormat
[]){
AV_PIX_FMT_NV12
,
AV_PIX_FMT_P010
,
AV_PIX_FMT_QSV
,
AV_PIX_FMT_NONE
},
.
priv_class
=
&
class
,
...
...
libavcodec/qsvenc_hevc.c
View file @
37a9015e
...
...
@@ -262,6 +262,7 @@ AVCodec ff_hevc_qsv_encoder = {
.
close
=
qsv_enc_close
,
.
capabilities
=
AV_CODEC_CAP_DELAY
,
.
pix_fmts
=
(
const
enum
AVPixelFormat
[]){
AV_PIX_FMT_NV12
,
AV_PIX_FMT_P010
,
AV_PIX_FMT_QSV
,
AV_PIX_FMT_NONE
},
.
priv_class
=
&
class
,
...
...
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