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
1dff97b7
Commit
1dff97b7
authored
Apr 13, 2020
by
Mark Thompson
Committed by
Timo Rothenpieler
Apr 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvenc: add hardware config metadata
Signed-off-by:
Timo Rothenpieler
<
timo@rothenpieler.org
>
parent
1128aa87
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
0 deletions
+17
-0
nvenc.c
libavcodec/nvenc.c
+10
-0
nvenc.h
libavcodec/nvenc.h
+2
-0
nvenc_h264.c
libavcodec/nvenc_h264.c
+3
-0
nvenc_hevc.c
libavcodec/nvenc_hevc.c
+2
-0
No files found.
libavcodec/nvenc.c
View file @
1dff97b7
...
...
@@ -55,6 +55,16 @@ const enum AVPixelFormat ff_nvenc_pix_fmts[] = {
AV_PIX_FMT_NONE
};
const
AVCodecHWConfigInternal
*
ff_nvenc_hw_configs
[]
=
{
HW_CONFIG_ENCODER_FRAMES
(
CUDA
,
CUDA
),
HW_CONFIG_ENCODER_DEVICE
(
NONE
,
CUDA
),
#if CONFIG_D3D11VA
HW_CONFIG_ENCODER_FRAMES
(
D3D11
,
D3D11VA
),
HW_CONFIG_ENCODER_DEVICE
(
NONE
,
D3D11VA
),
#endif
NULL
,
};
#define IS_10BIT(pix_fmt) (pix_fmt == AV_PIX_FMT_P010 || \
pix_fmt == AV_PIX_FMT_P016 || \
pix_fmt == AV_PIX_FMT_YUV444P16)
...
...
libavcodec/nvenc.h
View file @
1dff97b7
...
...
@@ -33,6 +33,7 @@ typedef void ID3D11Device;
#include "compat/cuda/dynlink_loader.h"
#include "libavutil/fifo.h"
#include "libavutil/opt.h"
#include "hwconfig.h"
#include "avcodec.h"
...
...
@@ -217,5 +218,6 @@ int ff_nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
void
ff_nvenc_encode_flush
(
AVCodecContext
*
avctx
);
extern
const
enum
AVPixelFormat
ff_nvenc_pix_fmts
[];
extern
const
AVCodecHWConfigInternal
*
ff_nvenc_hw_configs
[];
#endif
/* AVCODEC_NVENC_H */
libavcodec/nvenc_h264.c
View file @
1dff97b7
...
...
@@ -191,6 +191,7 @@ AVCodec ff_nvenc_encoder = {
.
caps_internal
=
FF_CODEC_CAP_INIT_CLEANUP
,
.
pix_fmts
=
ff_nvenc_pix_fmts
,
.
wrapper_name
=
"nvenc"
,
.
hw_configs
=
ff_nvenc_hw_configs
,
};
#endif
...
...
@@ -222,6 +223,7 @@ AVCodec ff_nvenc_h264_encoder = {
.
caps_internal
=
FF_CODEC_CAP_INIT_CLEANUP
,
.
pix_fmts
=
ff_nvenc_pix_fmts
,
.
wrapper_name
=
"nvenc"
,
.
hw_configs
=
ff_nvenc_hw_configs
,
};
#endif
...
...
@@ -253,4 +255,5 @@ AVCodec ff_h264_nvenc_encoder = {
.
caps_internal
=
FF_CODEC_CAP_INIT_CLEANUP
,
.
pix_fmts
=
ff_nvenc_pix_fmts
,
.
wrapper_name
=
"nvenc"
,
.
hw_configs
=
ff_nvenc_hw_configs
,
};
libavcodec/nvenc_hevc.c
View file @
1dff97b7
...
...
@@ -178,6 +178,7 @@ AVCodec ff_nvenc_hevc_encoder = {
AV_CODEC_CAP_ENCODER_FLUSH
,
.
caps_internal
=
FF_CODEC_CAP_INIT_CLEANUP
,
.
wrapper_name
=
"nvenc"
,
.
hw_configs
=
ff_nvenc_hw_configs
,
};
#endif
...
...
@@ -208,4 +209,5 @@ AVCodec ff_hevc_nvenc_encoder = {
AV_CODEC_CAP_ENCODER_FLUSH
,
.
caps_internal
=
FF_CODEC_CAP_INIT_CLEANUP
,
.
wrapper_name
=
"nvenc"
,
.
hw_configs
=
ff_nvenc_hw_configs
,
};
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