Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
ec89f35e
Commit
ec89f35e
authored
Apr 13, 2015
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x265: Map color parameters
parent
0cbb1473
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
libx265.c
libavcodec/libx265.c
+16
-0
No files found.
libavcodec/libx265.c
View file @
ec89f35e
...
@@ -124,6 +124,22 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
...
@@ -124,6 +124,22 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
ctx
->
params
->
sourceHeight
=
avctx
->
height
;
ctx
->
params
->
sourceHeight
=
avctx
->
height
;
ctx
->
params
->
bEnablePsnr
=
!!
(
avctx
->
flags
&
CODEC_FLAG_PSNR
);
ctx
->
params
->
bEnablePsnr
=
!!
(
avctx
->
flags
&
CODEC_FLAG_PSNR
);
if
((
avctx
->
color_primaries
<=
AVCOL_PRI_BT2020
&&
avctx
->
color_primaries
!=
AVCOL_PRI_UNSPECIFIED
)
||
(
avctx
->
color_trc
<=
AVCOL_TRC_BT2020_12
&&
avctx
->
color_trc
!=
AVCOL_TRC_UNSPECIFIED
)
||
(
avctx
->
colorspace
<=
AVCOL_SPC_BT2020_CL
&&
avctx
->
colorspace
!=
AVCOL_SPC_UNSPECIFIED
))
{
ctx
->
params
->
vui
.
bEnableVideoSignalTypePresentFlag
=
1
;
ctx
->
params
->
vui
.
bEnableColorDescriptionPresentFlag
=
1
;
// x265 validates the parameters internally
ctx
->
params
->
vui
.
colorPrimaries
=
avctx
->
color_primaries
;
ctx
->
params
->
vui
.
transferCharacteristics
=
avctx
->
color_trc
;
ctx
->
params
->
vui
.
matrixCoeffs
=
avctx
->
colorspace
;
}
if
(
avctx
->
sample_aspect_ratio
.
num
>
0
&&
avctx
->
sample_aspect_ratio
.
den
>
0
)
{
if
(
avctx
->
sample_aspect_ratio
.
num
>
0
&&
avctx
->
sample_aspect_ratio
.
den
>
0
)
{
char
sar
[
12
];
char
sar
[
12
];
int
sar_num
,
sar_den
;
int
sar_num
,
sar_den
;
...
...
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