Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ffmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Luma Media Server
ffmpeg
Commits
28259c13
Commit
28259c13
authored
9 years ago
by
Anton Khirnov
Browse files
Options
Downloads
Patches
Plain Diff
nvenc: factor out the pixel format list
parent
fb25d99b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
libavcodec/nvenc.c
+7
-0
7 additions, 0 deletions
libavcodec/nvenc.c
libavcodec/nvenc.h
+2
-0
2 additions, 0 deletions
libavcodec/nvenc.h
libavcodec/nvenc_h264.c
+2
-8
2 additions, 8 deletions
libavcodec/nvenc_h264.c
libavcodec/nvenc_hevc.c
+2
-8
2 additions, 8 deletions
libavcodec/nvenc_hevc.c
with
13 additions
and
16 deletions
libavcodec/nvenc.c
+
7
−
0
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
;
...
...
This diff is collapsed.
Click to expand it.
libavcodec/nvenc.h
+
2
−
0
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 */
This diff is collapsed.
Click to expand it.
libavcodec/nvenc_h264.c
+
2
−
8
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
This diff is collapsed.
Click to expand it.
libavcodec/nvenc_hevc.c
+
2
−
8
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
,
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment