[x265] [PATCH] tencsbac: subLayerOrderingInfoPresentFlag always true, the if() loop will never executed

gopu at multicorewareinc.com gopu at multicorewareinc.com
Mon Mar 10 07:40:07 CET 2014


# HG changeset patch
# User Gopu Govindaswamy
# Date 1394433594 -19800
#      Mon Mar 10 12:09:54 2014 +0530
# Node ID e731f70c9e205b8b09a698861bd3fe7ddda377ab
# Parent  50d7910ddd61632deeed969cf8e474561b175622
tencsbac: subLayerOrderingInfoPresentFlag always true, the if() loop will never executed

vps_sub_layer_ordering_info_present_flag is always set to true, not required to have extra storage for this,
removed subLayerOrderingInfoPresentFlag

diff -r 50d7910ddd61 -r e731f70c9e20 source/Lib/TLibEncoder/TEncSbac.cpp
--- a/source/Lib/TLibEncoder/TEncSbac.cpp	Sun Mar 09 22:10:39 2014 -0500
+++ b/source/Lib/TLibEncoder/TEncSbac.cpp	Mon Mar 10 12:09:54 2014 +0530
@@ -294,20 +294,12 @@
     assert(vps->getMaxTLayers() > 1 || vps->getTemporalNestingFlag());
     WRITE_CODE(0xffff,                            16,        "vps_reserved_ffff_16bits");
     codePTL(vps->getPTL(), true, vps->getMaxTLayers() - 1);
-    const bool subLayerOrderingInfoPresentFlag = 1;
-    WRITE_FLAG(subLayerOrderingInfoPresentFlag,             "vps_sub_layer_ordering_info_present_flag");
+    WRITE_FLAG(true,             "vps_sub_layer_ordering_info_present_flag");
     for (uint32_t i = 0; i <= vps->getMaxTLayers() - 1; i++)
     {
         WRITE_UVLC(vps->getMaxDecPicBuffering(i) - 1,       "vps_max_dec_pic_buffering_minus1[i]");
         WRITE_UVLC(vps->getNumReorderPics(i),               "vps_num_reorder_pics[i]");
         WRITE_UVLC(vps->getMaxLatencyIncrease(i),           "vps_max_latency_increase_plus1[i]");
-#if _MSC_VER
-#pragma warning(disable: 4127) // conditional expression is constant
-#endif
-        if (!subLayerOrderingInfoPresentFlag)
-        {
-            break;
-        }
     }
 
     assert(vps->getNumHrdParameters() <= MAX_VPS_NUM_HRD_PARAMETERS);
@@ -445,17 +437,12 @@
 
     WRITE_UVLC(sps->getBitsForPOC() - 4,            "log2_max_pic_order_cnt_lsb_minus4");
 
-    const bool subLayerOrderingInfoPresentFlag = 1;
-    WRITE_FLAG(subLayerOrderingInfoPresentFlag,     "sps_sub_layer_ordering_info_present_flag");
+    WRITE_FLAG(true,     "sps_sub_layer_ordering_info_present_flag");
     for (uint32_t i = 0; i <= sps->getMaxTLayers() - 1; i++)
     {
         WRITE_UVLC(sps->getMaxDecPicBuffering(i) - 1, "sps_max_dec_pic_buffering_minus1[i]");
         WRITE_UVLC(sps->getNumReorderPics(i),       "sps_num_reorder_pics[i]");
         WRITE_UVLC(sps->getMaxLatencyIncrease(i),   "sps_max_latency_increase_plus1[i]");
-        if (!subLayerOrderingInfoPresentFlag)
-        {
-            break;
-        }
     }
 
     WRITE_UVLC(sps->getLog2MinCodingBlockSize() - 3,    "log2_min_coding_block_size_minus3");


More information about the x265-devel mailing list