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
30c55875
Commit
30c55875
authored
Oct 12, 2016
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvenc: add support for forcing intra/idr frames
parent
03d6d5f3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
2 deletions
+13
-2
nvenc.c
libavcodec/nvenc.c
+7
-1
nvenc.h
libavcodec/nvenc.h
+1
-0
nvenc_h264.c
libavcodec/nvenc_h264.c
+2
-0
nvenc_hevc.c
libavcodec/nvenc_hevc.c
+2
-0
version.h
libavcodec/version.h
+1
-1
No files found.
libavcodec/nvenc.c
View file @
30c55875
...
...
@@ -1737,7 +1737,13 @@ int ff_nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
pic_params
.
pictureStruct
=
NV_ENC_PIC_STRUCT_FRAME
;
}
pic_params
.
encodePicFlags
=
0
;
if
(
ctx
->
forced_idr
>=
0
&&
frame
->
pict_type
==
AV_PICTURE_TYPE_I
)
{
pic_params
.
encodePicFlags
=
ctx
->
forced_idr
?
NV_ENC_PIC_FLAG_FORCEIDR
:
NV_ENC_PIC_FLAG_FORCEINTRA
;
}
else
{
pic_params
.
encodePicFlags
=
0
;
}
pic_params
.
inputTimeStamp
=
frame
->
pts
;
nvenc_codec_specific_pic_params
(
avctx
,
&
pic_params
);
...
...
libavcodec/nvenc.h
View file @
30c55875
...
...
@@ -185,6 +185,7 @@ typedef struct NvencContext
int
rc_lookahead
;
int
aq
;
int
no_scenecut
;
int
forced_idr
;
int
b_adapt
;
int
temporal_aq
;
int
zerolatency
;
...
...
libavcodec/nvenc_h264.c
View file @
30c55875
...
...
@@ -91,6 +91,8 @@ static const AVOption options[] = {
OFFSET
(
async_depth
),
AV_OPT_TYPE_INT
,
{
.
i64
=
INT_MAX
},
0
,
INT_MAX
,
VE
},
{
"no-scenecut"
,
"When lookahead is enabled, set this to 1 to disable adaptive I-frame insertion at scene cuts"
,
OFFSET
(
no_scenecut
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
VE
},
{
"forced-idr"
,
"If forcing keyframes, force them as IDR frames."
,
OFFSET
(
forced_idr
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
-
1
},
-
1
,
1
,
VE
},
{
"b_adapt"
,
"When lookahead is enabled, set this to 0 to disable adaptive B-frame decision"
,
OFFSET
(
b_adapt
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
1
},
0
,
1
,
VE
},
{
"spatial-aq"
,
"set to 1 to enable Spatial AQ"
,
OFFSET
(
aq
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
VE
},
...
...
libavcodec/nvenc_hevc.c
View file @
30c55875
...
...
@@ -90,6 +90,8 @@ static const AVOption options[] = {
OFFSET
(
async_depth
),
AV_OPT_TYPE_INT
,
{
.
i64
=
INT_MAX
},
0
,
INT_MAX
,
VE
},
{
"no-scenecut"
,
"When lookahead is enabled, set this to 1 to disable adaptive I-frame insertion at scene cuts"
,
OFFSET
(
no_scenecut
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
VE
},
{
"forced-idr"
,
"If forcing keyframes, force them as IDR frames."
,
OFFSET
(
forced_idr
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
-
1
},
-
1
,
1
,
VE
},
{
"spatial_aq"
,
"set to 1 to enable Spatial AQ"
,
OFFSET
(
aq
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
VE
},
{
"zerolatency"
,
"Set 1 to indicate zero latency operation (no reordering delay)"
,
OFFSET
(
zerolatency
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
VE
},
...
...
libavcodec/version.h
View file @
30c55875
...
...
@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 61
#define LIBAVCODEC_VERSION_MICRO 10
2
#define LIBAVCODEC_VERSION_MICRO 10
3
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
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