[x265] level: correct reference buffer initialisations
Deepthi Nandakumar
deepthi at multicorewareinc.com
Fri Mar 18 09:57:08 CET 2016
# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1458214450 -19800
# Thu Mar 17 17:04:10 2016 +0530
# Node ID 4b0da550a69cb237f1042d913f0d40fd9c8e293e
# Parent b09998b1256ed8e652c4bf2d688cbfab3a84d5cd
level: correct reference buffer initialisations
diff -r b09998b1256e -r 4b0da550a69c source/encoder/level.cpp
--- a/source/encoder/level.cpp Wed Mar 16 14:24:48 2016 +0530
+++ b/source/encoder/level.cpp Thu Mar 17 17:04:10 2016 +0530
@@ -279,7 +279,7 @@
bool enforceLevel(x265_param& param, VPS& vps)
{
vps.numReorderPics = (param.bBPyramid && param.bframes > 1) ? 2 :
!!param.bframes;
- vps.maxDecPicBuffering = X265_MIN(MAX_NUM_REF,
X265_MAX(vps.numReorderPics + 2, (uint32_t)param.maxNumReferences) +
vps.numReorderPics);
+ vps.maxDecPicBuffering = X265_MIN(MAX_NUM_REF,
X265_MAX(vps.numReorderPics + 2, (uint32_t)param.maxNumReferences) + 1);
/* no level specified by user, just auto-detect from the configuration
*/
if (param.levelIdc <= 0)
@@ -379,7 +379,7 @@
while (vps.maxDecPicBuffering > maxDpbSize && param.maxNumReferences >
1)
{
param.maxNumReferences--;
- vps.maxDecPicBuffering = X265_MIN(MAX_NUM_REF,
X265_MAX(vps.numReorderPics + 1, (uint32_t)param.maxNumReferences) +
vps.numReorderPics);
+ vps.maxDecPicBuffering = X265_MIN(MAX_NUM_REF,
X265_MAX(vps.numReorderPics + 1, (uint32_t)param.maxNumReferences) + 1);
}
if (param.maxNumReferences != savedRefCount)
x265_log(¶m, X265_LOG_INFO, "Lowering max references to %d to
meet level requirement\n", param.maxNumReferences);
--
Deepthi Nandakumar
Engineering Manager, x265
Multicoreware, Inc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20160318/e5c5e44d/attachment.html>
More information about the x265-devel
mailing list