[x265-commits] [x265] entropy: we prefer to keep variables without -1/+1 signal...

Steve Borho steve at borho.org
Tue Feb 10 18:25:33 CET 2015


details:   http://hg.videolan.org/x265/rev/6f2220b4c9a5
branches:  
changeset: 9333:6f2220b4c9a5
user:      Steve Borho <steve at borho.org>
date:      Tue Feb 10 11:25:23 2015 -0600
description:
entropy: we prefer to keep variables without -1/+1 signal offsets

diffstat:

 source/encoder/entropy.cpp |  10 +++++-----
 source/encoder/entropy.h   |   4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r 81dce2618dc0 -r 6f2220b4c9a5 source/encoder/entropy.cpp
--- a/source/encoder/entropy.cpp	Tue Feb 10 09:44:15 2015 -0600
+++ b/source/encoder/entropy.cpp	Tue Feb 10 11:25:23 2015 -0600
@@ -136,7 +136,7 @@ void Entropy::codeSPS(const SPS& sps, co
     WRITE_FLAG(sps.bUseStrongIntraSmoothing, "sps_strong_intra_smoothing_enable_flag");
 
     WRITE_FLAG(1, "vui_parameters_present_flag");
-    codeVUI(sps.vuiParameters, sps.maxTempSubLayers - 1);
+    codeVUI(sps.vuiParameters, sps.maxTempSubLayers);
 
     WRITE_FLAG(0, "sps_extension_flag");
 }
@@ -239,7 +239,7 @@ void Entropy::codeProfileTier(const Prof
     }
 }
 
-void Entropy::codeVUI(const VUI& vui, int maxSubTLayersMinusOne)
+void Entropy::codeVUI(const VUI& vui, int maxSubTLayers)
 {
     WRITE_FLAG(vui.aspectRatioInfoPresentFlag,  "aspect_ratio_info_present_flag");
     if (vui.aspectRatioInfoPresentFlag)
@@ -297,7 +297,7 @@ void Entropy::codeVUI(const VUI& vui, in
 
     WRITE_FLAG(vui.hrdParametersPresentFlag,  "vui_hrd_parameters_present_flag");
     if (vui.hrdParametersPresentFlag)
-        codeHrdParameters(vui.hrdParameters, maxSubTLayersMinusOne);
+        codeHrdParameters(vui.hrdParameters, maxSubTLayers);
 
     WRITE_FLAG(0, "bitstream_restriction_flag");
 }
@@ -344,7 +344,7 @@ void Entropy::codeScalingList(const Scal
     }
 }
 
-void Entropy::codeHrdParameters(const HRDInfo& hrd, int maxSubTLayersMinusOne)
+void Entropy::codeHrdParameters(const HRDInfo& hrd, int maxSubTLayers)
 {
     WRITE_FLAG(1, "nal_hrd_parameters_present_flag");
     WRITE_FLAG(0, "vcl_hrd_parameters_present_flag");
@@ -357,7 +357,7 @@ void Entropy::codeHrdParameters(const HR
     WRITE_CODE(hrd.cpbRemovalDelayLength - 1,        5, "au_cpb_removal_delay_length_minus1");
     WRITE_CODE(hrd.dpbOutputDelayLength - 1,         5, "dpb_output_delay_length_minus1");
 
-    for (int i = 0; i <= maxSubTLayersMinusOne; i++)
+    for (int i = 0; i < maxSubTLayers; i++)
     {
         WRITE_FLAG(1, "fixed_pic_rate_general_flag");
         WRITE_UVLC(0, "elemental_duration_in_tc_minus1");
diff -r 81dce2618dc0 -r 6f2220b4c9a5 source/encoder/entropy.h
--- a/source/encoder/entropy.h	Tue Feb 10 09:44:15 2015 -0600
+++ b/source/encoder/entropy.h	Tue Feb 10 11:25:23 2015 -0600
@@ -142,9 +142,9 @@ public:
     void codeVPS(const VPS& vps);
     void codeSPS(const SPS& sps, const ScalingList& scalingList, const ProfileTierLevel& ptl);
     void codePPS(const PPS& pps);
-    void codeVUI(const VUI& vui, int maxSubTLayersMinusOne);
+    void codeVUI(const VUI& vui, int maxSubTLayers);
     void codeAUD(const Slice& slice);
-    void codeHrdParameters(const HRDInfo& hrd, int maxSubTLayersMinusOne);
+    void codeHrdParameters(const HRDInfo& hrd, int maxSubTLayers);
 
     void codeSliceHeader(const Slice& slice, FrameData& encData);
     void codeSliceHeaderWPPEntryPoints(const Slice& slice, const uint32_t *substreamSizes, uint32_t maxOffset);


More information about the x265-commits mailing list