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
9b425bd2
Commit
9b425bd2
authored
Dec 30, 2016
by
Miroslav Slugen
Committed by
Timo Rothenpieler
Jan 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvenc: Add bluray_compat basic implementation
Signed-off-by:
Timo Rothenpieler
<
timo@rothenpieler.org
>
parent
1841eda6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
1 deletion
+19
-1
nvenc.c
libavcodec/nvenc.c
+15
-0
nvenc.h
libavcodec/nvenc.h
+1
-0
nvenc_h264.c
libavcodec/nvenc_h264.c
+1
-0
nvenc_hevc.c
libavcodec/nvenc_hevc.c
+1
-0
version.h
libavcodec/version.h
+1
-1
No files found.
libavcodec/nvenc.c
View file @
9b425bd2
...
...
@@ -958,6 +958,21 @@ static av_cold int nvenc_setup_encoder(AVCodecContext *avctx)
ctx
->
init_encode_params
.
enableEncodeAsync
=
0
;
ctx
->
init_encode_params
.
enablePTD
=
1
;
if
(
ctx
->
bluray_compat
)
{
ctx
->
aud
=
1
;
avctx
->
refs
=
FFMIN
(
FFMAX
(
avctx
->
refs
,
0
),
6
);
avctx
->
max_b_frames
=
FFMIN
(
avctx
->
max_b_frames
,
3
);
switch
(
avctx
->
codec
->
id
)
{
case
AV_CODEC_ID_H264
:
/* maximum level depends on used resolution */
break
;
case
AV_CODEC_ID_HEVC
:
ctx
->
level
=
NV_ENC_LEVEL_HEVC_51
;
ctx
->
tier
=
NV_ENC_TIER_HEVC_HIGH
;
break
;
}
}
if
(
avctx
->
gop_size
>
0
)
{
if
(
avctx
->
max_b_frames
>=
0
)
{
/* 0 is intra-only, 1 is I/P only, 2 is one B-Frame, 3 two B-frames, and so on. */
...
...
libavcodec/nvenc.h
View file @
9b425bd2
...
...
@@ -154,6 +154,7 @@ typedef struct NvencContext
int
aq_strength
;
int
quality
;
int
aud
;
int
bluray_compat
;
}
NvencContext
;
int
ff_nvenc_encode_init
(
AVCodecContext
*
avctx
);
...
...
libavcodec/nvenc_h264.c
View file @
9b425bd2
...
...
@@ -108,6 +108,7 @@ static const AVOption options[] = {
{
"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
},
{
"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
},
{
NULL
}
};
...
...
libavcodec/nvenc_hevc.c
View file @
9b425bd2
...
...
@@ -105,6 +105,7 @@ static const AVOption options[] = {
{
"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
},
{
"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
},
{
NULL
}
};
...
...
libavcodec/version.h
View file @
9b425bd2
...
...
@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 70
#define LIBAVCODEC_VERSION_MICRO 10
0
#define LIBAVCODEC_VERSION_MICRO 10
1
#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