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
80757bed
Commit
80757bed
authored
May 24, 2019
by
Derek Buitenhuis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/libx265: Support full range videos
Signed-off-by:
Derek Buitenhuis
<
derek.buitenhuis@gmail.com
>
parent
1a74b047
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
libx265.c
libavcodec/libx265.c
+17
-1
No files found.
libavcodec/libx265.c
View file @
80757bed
...
...
@@ -133,6 +133,14 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
return
AVERROR
(
EINVAL
);
}
ctx
->
params
->
vui
.
bEnableVideoSignalTypePresentFlag
=
1
;
ctx
->
params
->
vui
.
bEnableVideoFullRangeFlag
=
avctx
->
pix_fmt
==
AV_PIX_FMT_YUVJ420P
||
avctx
->
pix_fmt
==
AV_PIX_FMT_YUVJ422P
||
avctx
->
pix_fmt
==
AV_PIX_FMT_YUVJ444P
||
avctx
->
color_range
==
AVCOL_RANGE_JPEG
;
if
((
avctx
->
color_primaries
<=
AVCOL_PRI_SMPTE432
&&
avctx
->
color_primaries
!=
AVCOL_PRI_UNSPECIFIED
)
||
(
avctx
->
color_trc
<=
AVCOL_TRC_ARIB_STD_B67
&&
...
...
@@ -140,7 +148,6 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
(
avctx
->
colorspace
<=
AVCOL_SPC_ICTCP
&&
avctx
->
colorspace
!=
AVCOL_SPC_UNSPECIFIED
))
{
ctx
->
params
->
vui
.
bEnableVideoSignalTypePresentFlag
=
1
;
ctx
->
params
->
vui
.
bEnableColorDescriptionPresentFlag
=
1
;
// x265 validates the parameters internally
...
...
@@ -454,8 +461,11 @@ FF_ENABLE_DEPRECATION_WARNINGS
static
const
enum
AVPixelFormat
x265_csp_eight
[]
=
{
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_YUVJ420P
,
AV_PIX_FMT_YUV422P
,
AV_PIX_FMT_YUVJ422P
,
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_YUVJ444P
,
AV_PIX_FMT_GBRP
,
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_NONE
...
...
@@ -463,8 +473,11 @@ static const enum AVPixelFormat x265_csp_eight[] = {
static
const
enum
AVPixelFormat
x265_csp_ten
[]
=
{
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_YUVJ420P
,
AV_PIX_FMT_YUV422P
,
AV_PIX_FMT_YUVJ422P
,
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_YUVJ444P
,
AV_PIX_FMT_GBRP
,
AV_PIX_FMT_YUV420P10
,
AV_PIX_FMT_YUV422P10
,
...
...
@@ -477,8 +490,11 @@ static const enum AVPixelFormat x265_csp_ten[] = {
static
const
enum
AVPixelFormat
x265_csp_twelve
[]
=
{
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_YUVJ420P
,
AV_PIX_FMT_YUV422P
,
AV_PIX_FMT_YUVJ422P
,
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_YUVJ444P
,
AV_PIX_FMT_GBRP
,
AV_PIX_FMT_YUV420P10
,
AV_PIX_FMT_YUV422P10
,
...
...
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