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
28259c13
Commit
28259c13
authored
Jan 30, 2016
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nvenc: factor out the pixel format list
parent
fb25d99b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
16 deletions
+13
-16
nvenc.c
libavcodec/nvenc.c
+7
-0
nvenc.h
libavcodec/nvenc.h
+2
-0
nvenc_h264.c
libavcodec/nvenc_h264.c
+2
-8
nvenc_hevc.c
libavcodec/nvenc_hevc.c
+2
-8
No files found.
libavcodec/nvenc.c
View file @
28259c13
...
...
@@ -76,6 +76,13 @@
} \
} while (0)
const
enum
AVPixelFormat
ff_nvenc_pix_fmts
[]
=
{
AV_PIX_FMT_NV12
,
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_NONE
};
static
const
struct
{
NVENCSTATUS
nverr
;
int
averr
;
...
...
libavcodec/nvenc.h
View file @
28259c13
...
...
@@ -135,4 +135,6 @@ int ff_nvenc_encode_close(AVCodecContext *avctx);
int
ff_nvenc_encode_frame
(
AVCodecContext
*
avctx
,
AVPacket
*
pkt
,
const
AVFrame
*
frame
,
int
*
got_packet
);
extern
const
enum
AVPixelFormat
ff_nvenc_pix_fmts
[];
#endif
/* AVCODEC_NVENC_H */
libavcodec/nvenc_h264.c
View file @
28259c13
...
...
@@ -101,12 +101,9 @@ AVCodec ff_h264_nvenc_encoder = {
.
priv_data_size
=
sizeof
(
NVENCContext
),
.
priv_class
=
&
nvenc_hevc_class
,
.
defaults
=
defaults
,
.
pix_fmts
=
(
const
enum
AVPixelFormat
[]){
AV_PIX_FMT_NV12
,
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_NONE
},
.
capabilities
=
AV_CODEC_CAP_DELAY
,
.
caps_internal
=
FF_CODEC_CAP_INIT_CLEANUP
,
.
pix_fmts
=
ff_nvenc_pix_fmts
,
};
#if FF_API_NVENC_OLD_NAME
...
...
@@ -135,11 +132,8 @@ AVCodec ff_nvenc_h264_encoder = {
.
priv_data_size
=
sizeof
(
NVENCContext
),
.
priv_class
=
&
nvenc_h264_old_class
,
.
defaults
=
defaults
,
.
pix_fmts
=
(
const
enum
AVPixelFormat
[]){
AV_PIX_FMT_NV12
,
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_NONE
},
.
capabilities
=
AV_CODEC_CAP_DELAY
,
.
caps_internal
=
FF_CODEC_CAP_INIT_CLEANUP
,
.
pix_fmts
=
ff_nvenc_pix_fmts
,
};
#endif
libavcodec/nvenc_hevc.c
View file @
28259c13
...
...
@@ -99,10 +99,7 @@ AVCodec ff_hevc_nvenc_encoder = {
.
priv_data_size
=
sizeof
(
NVENCContext
),
.
priv_class
=
&
nvenc_hevc_class
,
.
defaults
=
defaults
,
.
pix_fmts
=
(
const
enum
AVPixelFormat
[]){
AV_PIX_FMT_NV12
,
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_NONE
},
.
pix_fmts
=
ff_nvenc_pix_fmts
,
.
capabilities
=
AV_CODEC_CAP_DELAY
,
.
caps_internal
=
FF_CODEC_CAP_INIT_CLEANUP
,
};
...
...
@@ -133,10 +130,7 @@ AVCodec ff_nvenc_hevc_encoder = {
.
priv_data_size
=
sizeof
(
NVENCContext
),
.
priv_class
=
&
nvenc_hevc_old_class
,
.
defaults
=
defaults
,
.
pix_fmts
=
(
const
enum
AVPixelFormat
[]){
AV_PIX_FMT_NV12
,
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_NONE
},
.
pix_fmts
=
ff_nvenc_pix_fmts
,
.
capabilities
=
AV_CODEC_CAP_DELAY
,
.
caps_internal
=
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