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
40df468a
Commit
40df468a
authored
May 25, 2016
by
Andrey Turkin
Committed by
Timo Rothenpieler
May 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvenc: convert tier to AVOptions
Signed-off-by:
Timo Rothenpieler
<
timo@rothenpieler.org
>
parent
b0172873
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
12 deletions
+5
-12
nvenc.c
libavcodec/nvenc.c
+1
-10
nvenc.h
libavcodec/nvenc.h
+1
-1
nvenc_hevc.c
libavcodec/nvenc_hevc.c
+3
-1
No files found.
libavcodec/nvenc.c
View file @
40df468a
...
...
@@ -708,16 +708,7 @@ static av_cold int nvenc_setup_hevc_config(AVCodecContext *avctx)
hevc
->
level
=
ctx
->
level
;
if
(
ctx
->
tier
)
{
if
(
!
strcmp
(
ctx
->
tier
,
"main"
))
{
hevc
->
tier
=
NV_ENC_TIER_HEVC_MAIN
;
}
else
if
(
!
strcmp
(
ctx
->
tier
,
"high"
))
{
hevc
->
tier
=
NV_ENC_TIER_HEVC_HIGH
;
}
else
{
av_log
(
avctx
,
AV_LOG_FATAL
,
"Tier
\"
%s
\"
is unknown! Supported tiers: main, high
\n
"
,
ctx
->
tier
);
return
AVERROR
(
EINVAL
);
}
}
hevc
->
tier
=
ctx
->
tier
;
return
0
;
}
...
...
libavcodec/nvenc.h
View file @
40df468a
...
...
@@ -169,7 +169,7 @@ typedef struct NvencContext
int
preset
;
int
profile
;
int
level
;
char
*
tier
;
int
tier
;
int
cbr
;
int
twopass
;
int
gpu
;
...
...
libavcodec/nvenc_hevc.c
View file @
40df468a
...
...
@@ -62,7 +62,9 @@ static const AVOption options[] = {
{
"6.0"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
NV_ENC_LEVEL_HEVC_6
},
0
,
0
,
VE
,
"level"
},
{
"6.1"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
NV_ENC_LEVEL_HEVC_61
},
0
,
0
,
VE
,
"level"
},
{
"6.2"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
NV_ENC_LEVEL_HEVC_62
},
0
,
0
,
VE
,
"level"
},
{
"tier"
,
"Set the encoding tier (main or high)"
,
OFFSET
(
tier
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"main"
},
0
,
0
,
VE
},
{
"tier"
,
"Set the encoding tier"
,
OFFSET
(
tier
),
AV_OPT_TYPE_INT
,
{
.
i64
=
NV_ENC_TIER_HEVC_MAIN
},
NV_ENC_TIER_HEVC_MAIN
,
NV_ENC_TIER_HEVC_HIGH
,
VE
,
"tier"
},
{
"main"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
NV_ENC_TIER_HEVC_MAIN
},
0
,
0
,
VE
,
"tier"
},
{
"high"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
NV_ENC_TIER_HEVC_HIGH
},
0
,
0
,
VE
,
"tier"
},
{
"cbr"
,
"Use cbr encoding mode"
,
OFFSET
(
cbr
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
VE
},
{
"2pass"
,
"Use 2pass encoding mode"
,
OFFSET
(
twopass
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
-
1
},
-
1
,
1
,
VE
},
{
"gpu"
,
"Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on."
,
OFFSET
(
gpu
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
VE
},
...
...
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