[x265-commits] [x265] entropy: fix bug in coding HRD parameters based on the te...
Aarthi at videolan.org
Aarthi at videolan.org
Tue Feb 10 18:04:35 CET 2015
details: http://hg.videolan.org/x265/rev/494200c9cbf5
branches:
changeset: 9331:494200c9cbf5
user: Aarthi Thirumalai
date: Tue Feb 10 13:51:13 2015 +0530
description:
entropy: fix bug in coding HRD parameters based on the temporal layers.
Subject: [x265] entropy: w/s nits
details: http://hg.videolan.org/x265/rev/81dce2618dc0
branches:
changeset: 9332:81dce2618dc0
user: Steve Borho <steve at borho.org>
date: Tue Feb 10 09:44:15 2015 -0600
description:
entropy: w/s nits
diffstat:
source/encoder/entropy.cpp | 32 ++++++++++++++++----------------
source/encoder/entropy.h | 4 ++--
2 files changed, 18 insertions(+), 18 deletions(-)
diffs (80 lines):
diff -r da3302cc67fb -r 81dce2618dc0 source/encoder/entropy.cpp
--- a/source/encoder/entropy.cpp Mon Feb 09 16:45:31 2015 -0600
+++ b/source/encoder/entropy.cpp Tue Feb 10 09:44:15 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);
+ codeVUI(sps.vuiParameters, sps.maxTempSubLayers - 1);
WRITE_FLAG(0, "sps_extension_flag");
}
@@ -239,7 +239,7 @@ void Entropy::codeProfileTier(const Prof
}
}
-void Entropy::codeVUI(const VUI& vui)
+void Entropy::codeVUI(const VUI& vui, int maxSubTLayersMinusOne)
{
WRITE_FLAG(vui.aspectRatioInfoPresentFlag, "aspect_ratio_info_present_flag");
if (vui.aspectRatioInfoPresentFlag)
@@ -297,7 +297,7 @@ void Entropy::codeVUI(const VUI& vui)
WRITE_FLAG(vui.hrdParametersPresentFlag, "vui_hrd_parameters_present_flag");
if (vui.hrdParametersPresentFlag)
- codeHrdParameters(vui.hrdParameters);
+ codeHrdParameters(vui.hrdParameters, maxSubTLayersMinusOne);
WRITE_FLAG(0, "bitstream_restriction_flag");
}
@@ -344,21 +344,21 @@ void Entropy::codeScalingList(const Scal
}
}
-void Entropy::codeHrdParameters(const HRDInfo& hrd)
+void Entropy::codeHrdParameters(const HRDInfo& hrd, int maxSubTLayersMinusOne)
{
- for (int i = 0; i <= 1; i++)
+ WRITE_FLAG(1, "nal_hrd_parameters_present_flag");
+ WRITE_FLAG(0, "vcl_hrd_parameters_present_flag");
+ WRITE_FLAG(0, "sub_pic_hrd_params_present_flag");
+
+ WRITE_CODE(hrd.bitRateScale, 4, "bit_rate_scale");
+ WRITE_CODE(hrd.cpbSizeScale, 4, "cpb_size_scale");
+
+ WRITE_CODE(hrd.initialCpbRemovalDelayLength - 1, 5, "initial_cpb_removal_delay_length_minus1");
+ 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++)
{
- WRITE_FLAG(1, "nal_hrd_parameters_present_flag");
- WRITE_FLAG(0, "vcl_hrd_parameters_present_flag");
- WRITE_FLAG(0, "sub_pic_hrd_params_present_flag");
-
- WRITE_CODE(hrd.bitRateScale, 4, "bit_rate_scale");
- WRITE_CODE(hrd.cpbSizeScale, 4, "cpb_size_scale");
-
- WRITE_CODE(hrd.initialCpbRemovalDelayLength - 1, 5, "initial_cpb_removal_delay_length_minus1");
- WRITE_CODE(hrd.cpbRemovalDelayLength - 1, 5, "au_cpb_removal_delay_length_minus1");
- WRITE_CODE(hrd.dpbOutputDelayLength - 1, 5, "dpb_output_delay_length_minus1");
-
WRITE_FLAG(1, "fixed_pic_rate_general_flag");
WRITE_UVLC(0, "elemental_duration_in_tc_minus1");
WRITE_UVLC(0, "cpb_cnt_minus1");
diff -r da3302cc67fb -r 81dce2618dc0 source/encoder/entropy.h
--- a/source/encoder/entropy.h Mon Feb 09 16:45:31 2015 -0600
+++ b/source/encoder/entropy.h Tue Feb 10 09:44:15 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);
+ void codeVUI(const VUI& vui, int maxSubTLayersMinusOne);
void codeAUD(const Slice& slice);
- void codeHrdParameters(const HRDInfo& hrd);
+ void codeHrdParameters(const HRDInfo& hrd, int maxSubTLayersMinusOne);
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