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
362e05f1
Commit
362e05f1
authored
Mar 04, 2016
by
Agatha Hu
Committed by
Timo Rothenpieler
Mar 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvenc: Fix H264 and HEVC vui info update
Signed-off-by:
Timo Rothenpieler
<
timo@rothenpieler.org
>
parent
79a54f30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
nvenc.c
libavcodec/nvenc.c
+23
-4
No files found.
libavcodec/nvenc.c
View file @
362e05f1
...
...
@@ -868,14 +868,19 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
switch
(
avctx
->
codec
->
id
)
{
case
AV_CODEC_ID_H264
:
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
h264VUIParameters
.
colourDescriptionPresentFlag
=
1
;
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
h264VUIParameters
.
videoSignalTypePresentFlag
=
1
;
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
h264VUIParameters
.
colourMatrix
=
avctx
->
colorspace
;
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
h264VUIParameters
.
colourPrimaries
=
avctx
->
color_primaries
;
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
h264VUIParameters
.
transferCharacteristics
=
avctx
->
color_trc
;
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
h264VUIParameters
.
videoFullRangeFlag
=
(
avctx
->
color_range
==
AVCOL_RANGE_JPEG
||
avctx
->
pix_fmt
==
AV_PIX_FMT_YUVJ420P
||
avctx
->
pix_fmt
==
AV_PIX_FMT_YUVJ422P
||
avctx
->
pix_fmt
==
AV_PIX_FMT_YUVJ444P
);
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
h264VUIParameters
.
colourDescriptionPresentFlag
=
(
avctx
->
colorspace
!=
2
||
avctx
->
color_primaries
!=
2
||
avctx
->
color_trc
!=
2
);
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
h264VUIParameters
.
videoFullRangeFlag
=
avctx
->
color_range
==
AVCOL_RANGE_JPEG
;
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
h264VUIParameters
.
videoSignalTypePresentFlag
=
(
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
h264VUIParameters
.
colourDescriptionPresentFlag
||
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
h264VUIParameters
.
videoFormat
!=
5
||
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
h264VUIParameters
.
videoFullRangeFlag
!=
0
);
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
sliceMode
=
3
;
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
sliceModeData
=
1
;
...
...
@@ -944,6 +949,20 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
break
;
case
AV_CODEC_ID_H265
:
ctx
->
encode_config
.
encodeCodecConfig
.
hevcConfig
.
hevcVUIParameters
.
colourMatrix
=
avctx
->
colorspace
;
ctx
->
encode_config
.
encodeCodecConfig
.
hevcConfig
.
hevcVUIParameters
.
colourPrimaries
=
avctx
->
color_primaries
;
ctx
->
encode_config
.
encodeCodecConfig
.
hevcConfig
.
hevcVUIParameters
.
transferCharacteristics
=
avctx
->
color_trc
;
ctx
->
encode_config
.
encodeCodecConfig
.
hevcConfig
.
hevcVUIParameters
.
videoFullRangeFlag
=
(
avctx
->
color_range
==
AVCOL_RANGE_JPEG
||
avctx
->
pix_fmt
==
AV_PIX_FMT_YUVJ420P
||
avctx
->
pix_fmt
==
AV_PIX_FMT_YUVJ422P
||
avctx
->
pix_fmt
==
AV_PIX_FMT_YUVJ444P
);
ctx
->
encode_config
.
encodeCodecConfig
.
hevcConfig
.
hevcVUIParameters
.
colourDescriptionPresentFlag
=
(
avctx
->
colorspace
!=
2
||
avctx
->
color_primaries
!=
2
||
avctx
->
color_trc
!=
2
);
ctx
->
encode_config
.
encodeCodecConfig
.
hevcConfig
.
hevcVUIParameters
.
videoSignalTypePresentFlag
=
(
ctx
->
encode_config
.
encodeCodecConfig
.
hevcConfig
.
hevcVUIParameters
.
colourDescriptionPresentFlag
||
ctx
->
encode_config
.
encodeCodecConfig
.
hevcConfig
.
hevcVUIParameters
.
videoFormat
!=
5
||
ctx
->
encode_config
.
encodeCodecConfig
.
hevcConfig
.
hevcVUIParameters
.
videoFullRangeFlag
!=
0
);
ctx
->
encode_config
.
encodeCodecConfig
.
hevcConfig
.
sliceMode
=
3
;
ctx
->
encode_config
.
encodeCodecConfig
.
hevcConfig
.
sliceModeData
=
1
;
...
...
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