[x265-commits] [x265] param: clip bframe bias range as x264 does
Steve Borho
steve at borho.org
Wed Jun 11 19:34:34 CEST 2014
details: http://hg.videolan.org/x265/rev/d0bacf50eb95
branches:
changeset: 7030:d0bacf50eb95
user: Steve Borho <steve at borho.org>
date: Tue Jun 10 18:37:26 2014 -0500
description:
param: clip bframe bias range as x264 does
Subject: [x265] encoder: set m_totalFrameThreads at the same time as param->frameNumThreads
details: http://hg.videolan.org/x265/rev/20d74192e097
branches:
changeset: 7031:20d74192e097
user: Steve Borho <steve at borho.org>
date: Tue Jun 10 20:07:24 2014 -0500
description:
encoder: set m_totalFrameThreads at the same time as param->frameNumThreads
diffstat:
doc/reST/cli.rst | 4 ++--
source/common/param.cpp | 1 -
source/encoder/encoder.cpp | 5 ++++-
3 files changed, 6 insertions(+), 4 deletions(-)
diffs (54 lines):
diff -r a89e0703e724 -r 20d74192e097 doc/reST/cli.rst
--- a/doc/reST/cli.rst Tue Jun 10 13:58:30 2014 +0530
+++ b/doc/reST/cli.rst Tue Jun 10 20:07:24 2014 -0500
@@ -558,8 +558,8 @@ Slice decision options
.. option:: --bframe-bias <integer>
Bias towards B frames in slicetype decision. The higher the bias the
- more likely x265 is to use B frames. Can be any value between -20
- and 100, but is typically between 10 and 30. Default 0
+ more likely x265 is to use B frames. Can be any value between -90
+ and 100 and is clipped to that range. Default 0
.. option:: --b-pyramid, --no-b-pyramid
diff -r a89e0703e724 -r 20d74192e097 source/common/param.cpp
--- a/source/common/param.cpp Tue Jun 10 13:58:30 2014 +0530
+++ b/source/common/param.cpp Tue Jun 10 20:07:24 2014 -0500
@@ -1043,7 +1043,6 @@ int x265_check_params(x265_param *param)
"Valid initial VBV buffer occupancy must be a fraction 0 - 1, or size in kbits");
CHECK(param->rc.bitrate < 0,
"Target bitrate can not be less than zero");
- CHECK(param->bFrameBias < 0, "Bias towards B frame decisions must be 0 or greater");
if (param->noiseReduction)
CHECK(100 > param->noiseReduction || param->noiseReduction > 1000, "Valid noise reduction range 100 - 1000");
return check_failed;
diff -r a89e0703e724 -r 20d74192e097 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Tue Jun 10 13:58:30 2014 +0530
+++ b/source/encoder/encoder.cpp Tue Jun 10 20:07:24 2014 -0500
@@ -173,7 +173,6 @@ void Encoder::destroy()
void Encoder::init()
{
- m_totalFrameThreads = m_param->frameNumThreads;
if (m_frameEncoder)
{
int numRows = (m_param->sourceHeight + g_maxCUSize - 1) / g_maxCUSize;
@@ -1247,6 +1246,8 @@ void Encoder::configure(x265_param *p)
{
x265_log(p, X265_LOG_INFO, "Warning: picture-based SAO used with frame parallelism\n");
}
+ m_totalFrameThreads = m_param->frameNumThreads;
+
if (p->keyframeMax < 0)
{
/* A negative max GOP size indicates the user wants only one I frame at
@@ -1342,6 +1343,8 @@ void Encoder::configure(x265_param *p)
m_bframeDelay = p->bframes ? (p->bBPyramid ? 2 : 1) : 0;
+ p->bFrameBias = X265_MIN(X265_MAX(-90, p->bFrameBias), 100);
+
//====== Coding Tools ========
uint32_t tuQTMaxLog2Size = g_convertToBit[p->maxCUSize] + 2 - 1;
More information about the x265-commits
mailing list