[x265] [PATCH] param: add some more validation checks

sagar at multicorewareinc.com sagar at multicorewareinc.com
Wed Feb 26 14:13:11 CET 2014


# HG changeset patch
# User Sagar Kotecha <sagar at multicorewareinc.com>
# Date 1393420384 -19800
#      Wed Feb 26 18:43:04 2014 +0530
# Node ID f5370af44727f2eebde2b412d4cc126d33a7dc1d
# Parent  f36f3bea0472d5f31a40001ac4f22b6b8868b9e2
param: add some more validation checks

diff -r f36f3bea0472 -r f5370af44727 source/common/param.cpp
--- a/source/common/param.cpp	Wed Feb 26 14:13:02 2014 +0530
+++ b/source/common/param.cpp	Wed Feb 26 18:43:04 2014 +0530
@@ -791,12 +791,12 @@
     CHECK((1u << tuQTMaxLog2Size) > param->maxCUSize,
           "QuadtreeTULog2MaxSize must be log2(maxCUSize) or smaller.");
 
-    CHECK(param->tuQTMaxInterDepth < 1,
-          "QuadtreeTUMaxDepthInter must be greater than or equal to 1");
+    CHECK(param->tuQTMaxInterDepth < 1 || param->tuQTMaxInterDepth > 4,
+          "QuadtreeTUMaxDepthInter must be greater than 0 and less than 5");
     CHECK(param->maxCUSize < (1u << (tuQTMinLog2Size + param->tuQTMaxInterDepth - 1)),
           "QuadtreeTUMaxDepthInter must be less than or equal to the difference between log2(maxCUSize) and QuadtreeTULog2MinSize plus 1");
-    CHECK(param->tuQTMaxIntraDepth < 1,
-          "QuadtreeTUMaxDepthIntra must be greater than or equal to 1");
+    CHECK(param->tuQTMaxIntraDepth < 1 || param->tuQTMaxIntraDepth > 4,
+          "QuadtreeTUMaxDepthIntra must be greater 0 and less than 5");
     CHECK(param->maxCUSize < (1u << (tuQTMinLog2Size + param->tuQTMaxIntraDepth - 1)),
           "QuadtreeTUMaxDepthInter must be less than or equal to the difference between log2(maxCUSize) and QuadtreeTULog2MinSize plus 1");
 


More information about the x265-devel mailing list