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
18a659d1
Commit
18a659d1
authored
May 10, 2017
by
Ben Chang
Committed by
Timo Rothenpieler
May 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvenc: add fractional CQ support
Signed-off-by:
Timo Rothenpieler
<
timo@rothenpieler.org
>
parent
984e2218
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
+9
-4
nvenc.c
libavcodec/nvenc.c
+6
-1
nvenc.h
libavcodec/nvenc.h
+1
-1
nvenc_h264.c
libavcodec/nvenc_h264.c
+1
-1
nvenc_hevc.c
libavcodec/nvenc_hevc.c
+1
-1
No files found.
libavcodec/nvenc.c
View file @
18a659d1
...
...
@@ -796,7 +796,12 @@ static av_cold void nvenc_setup_rate_control(AVCodecContext *avctx)
ctx
->
encode_config
.
rcParams
.
zeroReorderDelay
=
1
;
if
(
ctx
->
quality
)
ctx
->
encode_config
.
rcParams
.
targetQuality
=
ctx
->
quality
;
{
//convert from float to fixed point 8.8
int
tmp_quality
=
(
int
)(
ctx
->
quality
*
256
.
0
f
);
ctx
->
encode_config
.
rcParams
.
targetQuality
=
(
uint8_t
)(
tmp_quality
>>
8
);
ctx
->
encode_config
.
rcParams
.
targetQualityLSB
=
(
uint8_t
)(
tmp_quality
&
0xff
);
}
}
static
av_cold
int
nvenc_setup_h264_config
(
AVCodecContext
*
avctx
)
...
...
libavcodec/nvenc.h
View file @
18a659d1
...
...
@@ -154,7 +154,7 @@ typedef struct NvencContext
int
nonref_p
;
int
strict_gop
;
int
aq_strength
;
in
t
quality
;
floa
t
quality
;
int
aud
;
int
bluray_compat
;
int
init_qp_p
;
...
...
libavcodec/nvenc_h264.c
View file @
18a659d1
...
...
@@ -109,7 +109,7 @@ static const AVOption options[] = {
{
"aq-strength"
,
"When Spatial AQ is enabled, this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive)"
,
OFFSET
(
aq_strength
),
AV_OPT_TYPE_INT
,
{
.
i64
=
8
},
1
,
15
,
VE
},
{
"cq"
,
"Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control"
,
OFFSET
(
quality
),
AV_OPT_TYPE_
INT
,
{
.
i64
=
0
},
0
,
51
,
VE
},
OFFSET
(
quality
),
AV_OPT_TYPE_
FLOAT
,
{
.
dbl
=
0
.},
0
.,
51
.
,
VE
},
{
"aud"
,
"Use access unit delimiters"
,
OFFSET
(
aud
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
VE
},
{
"bluray-compat"
,
"Bluray compatibility workarounds"
,
OFFSET
(
bluray_compat
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
VE
},
{
"init_qpP"
,
"Initial QP value for P frame"
,
OFFSET
(
init_qp_p
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
51
,
VE
},
...
...
libavcodec/nvenc_hevc.c
View file @
18a659d1
...
...
@@ -106,7 +106,7 @@ static const AVOption options[] = {
{
"aq-strength"
,
"When Spatial AQ is enabled, this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive)"
,
OFFSET
(
aq_strength
),
AV_OPT_TYPE_INT
,
{
.
i64
=
8
},
1
,
15
,
VE
},
{
"cq"
,
"Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control"
,
OFFSET
(
quality
),
AV_OPT_TYPE_
INT
,
{
.
i64
=
0
},
0
,
51
,
VE
},
OFFSET
(
quality
),
AV_OPT_TYPE_
FLOAT
,
{
.
dbl
=
0
.},
0
.,
51
.
,
VE
},
{
"aud"
,
"Use access unit delimiters"
,
OFFSET
(
aud
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
VE
},
{
"bluray-compat"
,
"Bluray compatibility workarounds"
,
OFFSET
(
bluray_compat
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
VE
},
{
"init_qpP"
,
"Initial QP value for P frame"
,
OFFSET
(
init_qp_p
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
51
,
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