[x265] [PATCH] correct referring chroma subsampling as color space
Tom Vaughan
tom.vaughan at multicorewareinc.com
Mon Dec 28 20:49:29 CET 2015
Looks good to me. Thanks for fixing this.
-----Original Message-----
From: x265-devel [mailto:x265-devel-bounces at videolan.org] On Behalf Of
mahesh at multicorewareinc.com
Sent: Monday, December 28, 2015 11:14 AM
To: x265-devel at videolan.org
Subject: [x265] [PATCH] correct referring chroma subsampling as color
space
# HG changeset patch
# User Mahesh Pittala <mahesh at multicorewareinc.com> # Date 1451329853
-19800
# Tue Dec 29 00:40:53 2015 +0530
# Node ID 80af9f9afa60c032ce27efacdabfde62f3102a62
# Parent 1471e4e433ccccf71f39a6eb93507c349fb8539e
correct referring chroma subsampling as color space
diff -r 1471e4e433cc -r 80af9f9afa60 doc/reST/cli.rst
--- a/doc/reST/cli.rst Tue Dec 22 19:25:58 2015 +0530
+++ b/doc/reST/cli.rst Tue Dec 29 00:40:53 2015 +0530
@@ -391,15 +391,15 @@
.. option:: --input-csp <integer|string>
- YUV only: Source color space. Only i420, i422, and i444 are
- supported at this time. The internal color space is always the
- same as the source color space (libx265 does not support any color
- space conversions).
+ Chroma Subsampling (YUV only): Only 4:0:0(monochrome), 4:2:0,
4:2:2, and 4:4:4 are supported at this time.
+ The chroma subsampling format of your input must match your
desired output chroma subsampling format
+ (libx265 will not perform any chroma subsampling conversion), and
it must be supported by the
+ HEVC profile you have specified.
- 0. i400
- 1. i420 **(default)**
- 2. i422
- 3. i444
+ 0. i400 (4:0:0 monochrome) - Not supported by Main or Main10
profiles
+ 1. i420 (4:2:0 default) - Supported by all HEVC profiles
+ 2. i422 (4:2:2) - Not supported by Main, Main10 and
Main12 profiles
+ 3. i444 (4:4:4) - Supported by Main 4:4:4, Main 4:4:4
10, Main 4:4:4 12, Main 4:4:4 16 Intra profiles
4. nv12
5. nv16
diff -r 1471e4e433cc -r 80af9f9afa60 source/common/param.cpp
--- a/source/common/param.cpp Tue Dec 22 19:25:58 2015 +0530
+++ b/source/common/param.cpp Tue Dec 29 00:40:53 2015 +0530
@@ -1088,7 +1088,7 @@
CHECK(param->sourceWidth < (int)param->maxCUSize ||
param->sourceHeight < (int)param->maxCUSize,
"Picture size must be at least one CTU");
CHECK(param->internalCsp < X265_CSP_I400 || X265_CSP_I444 <
param->internalCsp,
- "Color space must be i400, i420, i422 or i444");
+ "chroma subsampling must be i400 (4:0:0 monochrome), i420
+ (4:2:0 default), i422 (4:2:0), i444 (4:4:4)");
CHECK(param->sourceWidth & !!CHROMA_H_SHIFT(param->internalCsp),
"Picture width must be an integer multiple of the specified
chroma subsampling");
CHECK(param->sourceHeight & !!CHROMA_V_SHIFT(param->internalCsp),
diff -r 1471e4e433cc -r 80af9f9afa60 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Tue Dec 22 19:25:58 2015 +0530
+++ b/source/encoder/encoder.cpp Tue Dec 29 00:40:53 2015 +0530
@@ -510,7 +510,7 @@
{
if (pic_in->colorSpace != m_param->internalCsp)
{
- x265_log(m_param, X265_LOG_ERROR, "Unsupported color space
(%d) on input\n",
+ x265_log(m_param, X265_LOG_ERROR, "Unsupported chroma
+ subsampling (%d) on input\n",
pic_in->colorSpace);
return -1;
}
@@ -1723,7 +1723,7 @@
if (p->scalingLists && p->internalCsp == X265_CSP_I444)
{
- x265_log(p, X265_LOG_WARNING, "Scaling lists are not yet
supported for 4:4:4 color space\n");
+ x265_log(p, X265_LOG_WARNING, "Scaling lists are not yet
+ supported for 4:4:4 chroma subsampling\n");
p->scalingLists = 0;
}
diff -r 1471e4e433cc -r 80af9f9afa60 source/encoder/level.cpp
--- a/source/encoder/level.cpp Tue Dec 22 19:25:58 2015 +0530
+++ b/source/encoder/level.cpp Tue Dec 29 00:40:53 2015 +0530
@@ -463,7 +463,7 @@
{
if (param->internalCsp != X265_CSP_I420)
{
- x265_log(param, X265_LOG_ERROR, "%s profile not compatible
with %s input color space.\n",
+ x265_log(param, X265_LOG_ERROR, "%s profile not compatible
+ with %s input chroma subsampling.\n",
profile, x265_source_csp_names[param->internalCsp]);
return -1;
}
@@ -473,7 +473,7 @@
{
if (param->internalCsp != X265_CSP_I420 && param->internalCsp !=
X265_CSP_I422)
{
- x265_log(param, X265_LOG_ERROR, "%s profile not compatible
with %s input color space.\n",
+ x265_log(param, X265_LOG_ERROR, "%s profile not compatible
+ with %s input chroma subsampling.\n",
profile, x265_source_csp_names[param->internalCsp]);
return -1;
}
diff -r 1471e4e433cc -r 80af9f9afa60 source/output/y4m.cpp
--- a/source/output/y4m.cpp Tue Dec 22 19:25:58 2015 +0530
+++ b/source/output/y4m.cpp Tue Dec 29 00:40:53 2015 +0530
@@ -70,7 +70,7 @@
x265_log(NULL, X265_LOG_WARNING, "y4m: forcing reconstructed
pixels to 8 bits\n"); #endif
- X265_CHECK(pic.colorSpace == colorSpace, "invalid color space\n");
+ X265_CHECK(pic.colorSpace == colorSpace, "invalid chroma
+ subsampling\n");
#if HIGH_BIT_DEPTH
diff -r 1471e4e433cc -r 80af9f9afa60 source/output/yuv.cpp
--- a/source/output/yuv.cpp Tue Dec 22 19:25:58 2015 +0530
+++ b/source/output/yuv.cpp Tue Dec 29 00:40:53 2015 +0530
@@ -53,7 +53,7 @@
uint64_t fileOffset = pic.poc;
fileOffset *= frameSize;
- X265_CHECK(pic.colorSpace == colorSpace, "invalid color space\n");
+ X265_CHECK(pic.colorSpace == colorSpace, "invalid chroma
+ subsampling\n");
X265_CHECK(pic.bitDepth == (int)depth, "invalid bit depth\n");
#if HIGH_BIT_DEPTH
diff -r 1471e4e433cc -r 80af9f9afa60 source/x265cli.h
--- a/source/x265cli.h Tue Dec 22 19:25:58 2015 +0530
+++ b/source/x265cli.h Tue Dec 29 00:40:53 2015 +0530
@@ -263,7 +263,11 @@
H0(" --fps <float|rational> Source frame rate (float or
num/denom), auto-detected if Y4M\n");
H0(" --input-res WxH Source picture size [w x h],
auto-detected if Y4M\n");
H1(" --input-depth <integer> Bit-depth of input file. Default
8\n");
- H1(" --input-csp <string> Source color space: i420, i444
or i422, auto-detected if Y4M. Default: i420\n");
+ H1(" --input-csp <string> Chroma subsampling,
auto-detected if Y4M\n");
+ H1(" 0 - i400 (4:0:0 monochrome)\n");
+ H1(" 1 - i420 (4:2:0 default)\n");
+ H1(" 2 - i422 (4:2:2)\n");
+ H1(" 3 - i444 (4:4:4)\n");
H0("-f/--frames <integer> Maximum number of frames to
encode. Default all\n");
H0(" --seek <integer> First frame to encode\n");
H1(" --[no-]interlace <bff|tff> Indicate input pictures are
interlace fields in temporal order. Default progressive\n");
_______________________________________________
x265-devel mailing list
x265-devel at videolan.org
https://mailman.videolan.org/listinfo/x265-devel
More information about the x265-devel
mailing list