diff --git a/EE13.5_forRAHT_readme.txt b/EE13.5_forRAHT_readme.txt
new file mode 100755
index 0000000..72deb74
--- /dev/null
+++ b/EE13.5_forRAHT_readme.txt
@@ -0,0 +1,24 @@
+//Cross Check for EE13.5 on region-wise QP for RAHT
+
+Test: Setting for RAHT
+[Description]
+ 1 region QP control for RAHT
+
+[Test Condition]
+ raht/C1/C2
+
+[Config] 
+  Config Folder: /cfg
+
+[Region Setting] 
+ - in encoder.cpp
+     region_qp_presnt_flag: true, 
+	 region_qp_origin {0, 0, 0}, 
+	 region_qp_whd {seq_bounding_box_whd[0], seq_bounding_box_whd[1] * 1/4, seq_bounding_box_whd[2]}, 
+	 reqion_qp_delta: -6
+
+
+[Result file]
+1. Test (functionality)
+   pcc-tmc3v8.0_octree_raht_template_regionQP_mimus6.xlsm
+
diff --git a/tmc3/Attribute.h b/tmc3/Attribute.h
old mode 100644
new mode 100755
diff --git a/tmc3/AttributeCommon.cpp b/tmc3/AttributeCommon.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/AttributeCommon.h b/tmc3/AttributeCommon.h
old mode 100644
new mode 100755
diff --git a/tmc3/AttributeDecoder.cpp b/tmc3/AttributeDecoder.cpp
old mode 100644
new mode 100755
index d5d22dd..dad8d6e
--- a/tmc3/AttributeDecoder.cpp
+++ b/tmc3/AttributeDecoder.cpp
@@ -445,6 +445,7 @@ AttributeDecoder::decodeReflectancesRaht(
   for (int n = 0; n < voxelCount; n++) {
     packedVoxel[n].mortonCode = mortonAddr(pointCloud[n]);
     packedVoxel[n].index = n;
+	packedVoxel[n].regionQPOffset = qpSet.quantizerRAHT_region(pointCloud[n]);
   }
   sort(packedVoxel.begin(), packedVoxel.end());
 
@@ -457,6 +458,7 @@ AttributeDecoder::decodeReflectancesRaht(
   // Entropy decode
   const int attribCount = 1;
   int* coefficients = new int[attribCount * voxelCount];
+  int* regionQPOffset = new int[voxelCount];
   int zero_cnt = decoder.decodeZeroCnt(voxelCount);
   for (int n = 0; n < voxelCount; ++n) {
     uint32_t value = 0;
@@ -467,13 +469,14 @@ AttributeDecoder::decodeReflectancesRaht(
       zero_cnt = decoder.decodeZeroCnt(voxelCount);
     }
     coefficients[n] = UIntToInt(value);
+	regionQPOffset[n] = packedVoxel[n].regionQPOffset;
   }
 
   int* attributes = new int[attribCount * voxelCount];
-  auto quantLayers = qpSet.quantizerLayers();
+  auto quantLayers = qpSet.QP_Layers();
   regionAdaptiveHierarchicalInverseTransform(
     aps.raht_prediction_enabled_flag, quantLayers, mortonCode, attributes,
-    attribCount, voxelCount, coefficients);
+    attribCount, voxelCount, coefficients, regionQPOffset);
 
   const int64_t maxReflectance = (1 << desc.attr_bitdepth) - 1;
   const int64_t minReflectance = 0;
@@ -505,6 +508,7 @@ AttributeDecoder::decodeColorsRaht(
   for (int n = 0; n < voxelCount; n++) {
     packedVoxel[n].mortonCode = mortonAddr(pointCloud[n]);
     packedVoxel[n].index = n;
+	packedVoxel[n].regionQPOffset = qpSet.quantizerRAHT_region(pointCloud[n]);
   }
   sort(packedVoxel.begin(), packedVoxel.end());
 
@@ -518,6 +522,7 @@ AttributeDecoder::decodeColorsRaht(
   const int attribCount = 3;
   int zero_cnt = decoder.decodeZeroCnt(voxelCount);
   int* coefficients = new int[attribCount * voxelCount];
+  int* regionQPOffset = new int[voxelCount];
 
   for (int n = 0; n < voxelCount; ++n) {
     uint32_t values[3];
@@ -531,13 +536,14 @@ AttributeDecoder::decodeColorsRaht(
     for (int d = 0; d < attribCount; ++d) {
       coefficients[voxelCount * d + n] = UIntToInt(values[d]);
     }
+	regionQPOffset[n] = packedVoxel[n].regionQPOffset;
   }
 
   int* attributes = new int[attribCount * voxelCount];
-  auto quantLayers = qpSet.quantizerLayers();
+  auto quantLayers = qpSet.QP_Layers();
   regionAdaptiveHierarchicalInverseTransform(
     aps.raht_prediction_enabled_flag, quantLayers, mortonCode, attributes,
-    attribCount, voxelCount, coefficients);
+    attribCount, voxelCount, coefficients, regionQPOffset);
 
   Vec3<int> clipMax{(1 << desc.attr_bitdepth) - 1,
                     (1 << desc.attr_bitdepth_secondary) - 1,
diff --git a/tmc3/AttributeDecoder.h b/tmc3/AttributeDecoder.h
old mode 100644
new mode 100755
diff --git a/tmc3/AttributeEncoder.cpp b/tmc3/AttributeEncoder.cpp
old mode 100644
new mode 100755
index 74edea7..dee6d91
--- a/tmc3/AttributeEncoder.cpp
+++ b/tmc3/AttributeEncoder.cpp
@@ -358,7 +358,7 @@ AttributeEncoder::encode(
 
   // generate LoDs if necessary
   if (attr_aps.lodParametersPresent() && _lods.empty())
-    _lods.generate(attr_aps, 0, pointCloud);
+      _lods.generate(attr_aps, 0, pointCloud);
 
   if (desc.attr_num_dimensions == 1) {
     switch (attr_aps.attr_encoding) {
@@ -789,6 +789,7 @@ AttributeEncoder::encodeReflectancesTransformRaht(
   for (int n = 0; n < voxelCount; n++) {
     packedVoxel[n].mortonCode = mortonAddr(pointCloud[n]);
     packedVoxel[n].index = n;
+	packedVoxel[n].regionQPOffset = qpSet.quantizerRAHT_region(pointCloud[n]);
   }
   sort(packedVoxel.begin(), packedVoxel.end());
 
@@ -797,19 +798,21 @@ AttributeEncoder::encodeReflectancesTransformRaht(
   const int attribCount = 1;
   int* attributes = new int[attribCount * voxelCount];
   int* coefficients = new int[attribCount * voxelCount];
+  int* regionQPOffset = new int[voxelCount];
 
   // Populate input arrays.
   for (int n = 0; n < voxelCount; n++) {
     mortonCode[n] = packedVoxel[n].mortonCode;
     const auto reflectance = pointCloud.getReflectance(packedVoxel[n].index);
     attributes[attribCount * n] = reflectance;
+	regionQPOffset[n] = packedVoxel[n].regionQPOffset;
   }
 
-  auto quantLayers = qpSet.quantizerLayers();
+  auto quantLayers = qpSet.QP_Layers();
   // Transform.
   regionAdaptiveHierarchicalTransform(
     aps.raht_prediction_enabled_flag, quantLayers, mortonCode, attributes,
-    attribCount, voxelCount, coefficients);
+    attribCount, voxelCount, coefficients, regionQPOffset);
 
   // Entropy encode.
   int zero_cnt = 0;
@@ -858,6 +861,7 @@ AttributeEncoder::encodeColorsTransformRaht(
   for (int n = 0; n < voxelCount; n++) {
     packedVoxel[n].mortonCode = mortonAddr(pointCloud[n]);
     packedVoxel[n].index = n;
+	packedVoxel[n].regionQPOffset = qpSet.quantizerRAHT_region(pointCloud[n]);
   }
   sort(packedVoxel.begin(), packedVoxel.end());
 
@@ -866,6 +870,7 @@ AttributeEncoder::encodeColorsTransformRaht(
   const int attribCount = 3;
   int* attributes = new int[attribCount * voxelCount];
   int* coefficients = new int[attribCount * voxelCount];
+  int* regionQPOffset = new int[voxelCount];
 
   // Populate input arrays.
   for (int n = 0; n < voxelCount; n++) {
@@ -874,13 +879,13 @@ AttributeEncoder::encodeColorsTransformRaht(
     attributes[attribCount * n] = color[0];
     attributes[attribCount * n + 1] = color[1];
     attributes[attribCount * n + 2] = color[2];
+	regionQPOffset[n] = packedVoxel[n].regionQPOffset;
   }
-
-  auto quantLayers = qpSet.quantizerLayers();
+  auto quantLayers = qpSet.QP_Layers();
   // Transform.
   regionAdaptiveHierarchicalTransform(
     aps.raht_prediction_enabled_flag, quantLayers, mortonCode, attributes,
-    attribCount, voxelCount, coefficients);
+    attribCount, voxelCount, coefficients, regionQPOffset);
 
   // Entropy encode.
   uint32_t values[attribCount];
diff --git a/tmc3/AttributeEncoder.h b/tmc3/AttributeEncoder.h
old mode 100644
new mode 100755
diff --git a/tmc3/BitReader.h b/tmc3/BitReader.h
old mode 100644
new mode 100755
diff --git a/tmc3/BitWriter.h b/tmc3/BitWriter.h
old mode 100644
new mode 100755
diff --git a/tmc3/CMakeLists.txt b/tmc3/CMakeLists.txt
index 985844a..9da871a 100644
--- a/tmc3/CMakeLists.txt
+++ b/tmc3/CMakeLists.txt
@@ -13,7 +13,7 @@ check_symbol_exists(getrusage sys/resource.h HAVE_GETRUSAGE)
 # Fallback to descriptive version if VCS unavailable
 #  NB: the "unconfirmed-" part refers to this being a fallback option
 #      and the reported version may or may not be accurate.
-set(VERSION_FALLBACK "unconfirmed-release-8.1")
+set(VERSION_FALLBACK "unconfirmed-release-8.0")
 set(VERSION_FILE ${CMAKE_CURRENT_BINARY_DIR}/version.cpp)
 set(VERSION_FILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp.in)
 set(VERSION_CACHE_FILE ${CMAKE_CURRENT_BINARY_DIR}/version.cache)
diff --git a/tmc3/DualLutCoder.cpp b/tmc3/DualLutCoder.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/DualLutCoder.h b/tmc3/DualLutCoder.h
old mode 100644
new mode 100755
diff --git a/tmc3/FixedPoint.cpp b/tmc3/FixedPoint.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/FixedPoint.h b/tmc3/FixedPoint.h
old mode 100644
new mode 100755
diff --git a/tmc3/OctreeNeighMap.cpp b/tmc3/OctreeNeighMap.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/OctreeNeighMap.h b/tmc3/OctreeNeighMap.h
old mode 100644
new mode 100755
diff --git a/tmc3/PCCMath.h b/tmc3/PCCMath.h
old mode 100644
new mode 100755
diff --git a/tmc3/PCCMisc.h b/tmc3/PCCMisc.h
old mode 100644
new mode 100755
diff --git a/tmc3/PCCPointSet.h b/tmc3/PCCPointSet.h
old mode 100644
new mode 100755
diff --git a/tmc3/PCCTMC3Common.h b/tmc3/PCCTMC3Common.h
old mode 100644
new mode 100755
index 5fa7c8f..2094e87
--- a/tmc3/PCCTMC3Common.h
+++ b/tmc3/PCCTMC3Common.h
@@ -75,6 +75,7 @@ struct WeightWithIndex {
 struct MortonCodeWithIndex {
   int64_t mortonCode;
   int32_t index;
+  int regionQPOffset;
   bool operator<(const MortonCodeWithIndex& rhs) const
   {
     // NB: index used to maintain stable sort
@@ -207,13 +208,7 @@ struct PCCPredictor {
     predMode = 0;
   }
 
-  void init()
-  {
-    neighborCount = 0;
-    memset(
-      neighbors, 0,
-      sizeof(PCCNeighborInfo) * kAttributePredictionMaxNeighbourCount);
-  }
+  void init() { neighborCount = 0; }
 
   void insertNeighbor(
     const uint32_t reference,
@@ -954,26 +949,13 @@ buildPredictorsFast(
   numberOfPointsPerLevelOfDetail.reserve(21);
   numberOfPointsPerLevelOfDetail.push_back(pointCount);
 
-  int32_t num_detail_levels = aps.num_detail_levels;
-  if (aps.scalable_lifting_enabled_flag == 1) {
-    // NB: when partial decoding is enabled, LoDs correspond to octree levels
-    num_detail_levels = std::numeric_limits<int>::max();
-    ;
-  }
-
-  // prepare temporal buffer
-  std::vector<uint32_t> indexesOfSbsample;
-  indexesOfSbsample.resize(0);
-  if (aps.scalable_lifting_enabled_flag) {
-    indexesOfSbsample.reserve(pointCount);
-  }
-
+  // NB: when partial decoding is enabled, LoDs correspond to octree levels
   std::vector<Box3<int32_t>> bBoxes;
   int32_t predIndex = int32_t(pointCount);
   for (auto lodIndex = minGeomNodeSizeLog2;
-       !input.empty() && lodIndex <= num_detail_levels; ++lodIndex) {
+       !input.empty() && lodIndex <= aps.num_detail_levels; ++lodIndex) {
     const int32_t startIndex = indexes.size();
-    if (lodIndex == num_detail_levels) {
+    if (lodIndex == aps.num_detail_levels) {
       for (const auto index : input) {
         indexes.push_back(index);
       }
@@ -982,26 +964,6 @@ buildPredictorsFast(
         aps, pointCloud, packedVoxel, input, lodIndex, retained, indexes);
     }
     const int32_t endIndex = indexes.size();
-    if (aps.scalable_lifting_enabled_flag) {
-      indexesOfSbsample.resize(endIndex);
-      if (lodIndex == 0) {
-        for (int32_t i = startIndex; i < endIndex; i++) {
-          indexesOfSbsample[i] = indexes[i];
-        }
-      }
-      if (lodIndex == 1) {
-        if (endIndex - startIndex > startIndex) {
-          for (int32_t i = 0; i < startIndex; i++) {
-            indexes[i] = indexesOfSbsample[i];
-          }
-          predIndex = int32_t(pointCount);
-          computeNearestNeighbors(
-            aps, pointCloud, packedVoxel, retained, 0, startIndex,
-            lodIndex - 1, indexes, predictors, pointIndexToPredictorIndex,
-            predIndex, bBoxes);
-        }
-      }
-    }
 
     computeNearestNeighbors(
       aps, pointCloud, packedVoxel, retained, startIndex, endIndex, lodIndex,
diff --git a/tmc3/PCCTMC3Decoder.h b/tmc3/PCCTMC3Decoder.h
old mode 100644
new mode 100755
diff --git a/tmc3/PCCTMC3Encoder.h b/tmc3/PCCTMC3Encoder.h
old mode 100644
new mode 100755
diff --git a/tmc3/PayloadBuffer.h b/tmc3/PayloadBuffer.h
old mode 100644
new mode 100755
diff --git a/tmc3/RAHT.cpp b/tmc3/RAHT.cpp
old mode 100644
new mode 100755
index 691175b..bc95bb9
--- a/tmc3/RAHT.cpp
+++ b/tmc3/RAHT.cpp
@@ -46,6 +46,7 @@
 #include "PCCTMC3Common.h"
 #include "PCCMisc.h"
 
+
 namespace pcc {
 
 //============================================================================
@@ -53,6 +54,7 @@ namespace pcc {
 struct UrahtNode {
   int64_t pos;
   int weight;
+  int region_qp_offset;
 };
 
 //============================================================================
@@ -71,6 +73,7 @@ reduceUnique(
   int64_t posPrev = -1;
   auto weightsInWrIt = weightsIn->begin();
   auto weightsInRdIt = weightsIn->cbegin();
+
   auto attrsInWrIt = attrsIn->begin();
   auto attrsInRdIt = attrsIn->begin();
   for (int i = 0; i < numNodes; i++) {
@@ -118,16 +121,20 @@ reduceLevel(
   auto attrsInWrIt = attrsIn->begin();
   auto attrsInRdIt = attrsIn->begin();
   for (int i = 0; i < numNodes; i++) {
-    const auto& node = *weightsInRdIt++;
+    auto& node = *weightsInRdIt++;
     bool newPair = (posPrev ^ node.pos) >> level != 0;
     posPrev = node.pos;
     if (newPair) {
       *weightsInWrIt++ = node;
       for (int k = 0; k < numAttrs; k++)
         *attrsInWrIt++ = *attrsInRdIt++;
+		
     } else {
       (weightsInWrIt - 1)->weight += node.weight;
-      weightsOut->push_back(node);
+	  (weightsInWrIt - 1)->region_qp_offset = ((weightsInWrIt - 1)->region_qp_offset + node.region_qp_offset)  >> 1;
+
+	  weightsOut->push_back(node);
+
       for (int k = 0; k < numAttrs; k++) {
         *(attrsInWrIt - numAttrs + k) += *attrsInRdIt;
         attrsOut->push_back(*attrsInRdIt++);
@@ -514,12 +521,13 @@ template<bool isEncoder>
 void
 uraht_process(
   bool raht_prediction_enabled_flag,
-  const std::vector<Quantizers>& quantLayers,
+  const std::vector<Qps>& quantLayers,
   int numPoints,
   int numAttrs,
   int64_t* positions,
   int* attributes,
-  int32_t* coeffBufIt)
+  int32_t* coeffBufIt,
+  int* regionQPOffset)
 {
   // coefficients are stored in three planar arrays.  coeffBufItK is a set
   // of iterators to each array.
@@ -535,10 +543,13 @@ uraht_process(
   weightsLf.reserve(numPoints);
   attrsLf.reserve(numPoints * numAttrs);
 
+  //fix value (need to define)
+  int region_qp_shift = 4;
+
   // copy positions into internal form
   // todo(df): lift to api
   for (int i = 0; i < numPoints; i++) {
-    weightsLf.emplace_back(UrahtNode{positions[i], 1});
+    weightsLf.emplace_back(UrahtNode{positions[i], 1, regionQPOffset[i] << region_qp_shift });
     for (int k = 0; k < numAttrs; k++) {
       attrsLf.push_back(attributes[i * numAttrs + k]);
     }
@@ -624,6 +635,7 @@ uraht_process(
       FixedPoint transformBuf[6][8] = {};
       FixedPoint(*transformPredBuf)[8] = &transformBuf[numAttrs];
       int weights[8 + 4 + 2] = {};
+	  int qp_node[8 + 4 + 2] = {};
       uint8_t occupancy = 0;
 
       // generate weights, occupancy mask, and fwd transform buffers
@@ -636,6 +648,8 @@ uraht_process(
 
         int nodeIdx = (weightsLf[iLast].pos >> level) & 0x7;
         weights[nodeIdx] = weightsLf[iLast].weight;
+		qp_node[nodeIdx] = weightsLf[iLast].region_qp_offset >> region_qp_shift;
+
         occupancy |= 1 << nodeIdx;
 
         if (isEncoder) {
@@ -722,8 +736,10 @@ uraht_process(
         // The RAHT transform
         for (int k = 0; k < numAttrs; k++) {
           // todo: hoist to preallocated array
-          auto& q = quant[std::min(k, int(quant.size()) - 1)];
-          if (isEncoder) {
+	      auto q = Quantizer(quant[std::min(k, int(quant.size()) - 1)] + qp_node[idx]);
+
+
+		  if (isEncoder) {
             auto coeff = transformBuf[k][idx].round();
             assert(coeff <= INT_MAX && coeff >= INT_MIN);
             *coeffBufItK[k]++ = coeff =
@@ -786,7 +802,9 @@ uraht_process(
 
   for (int i = 0, out = 0, iEnd = weightsLf.size(); i < iEnd; i++) {
     int weight = weightsLf[i].weight;
-    // unique points have weight = 1
+	int qp_node = weightsLf[i].region_qp_offset >> region_qp_shift;
+	
+	// unique points have weight = 1
     if (weight == 1) {
       for (int k = 0; k < numAttrs; k++)
         attrRec[out++] = *attrRecParentIt++;
@@ -810,8 +828,8 @@ uraht_process(
       sqrtWeight.val = isqrt(uint64_t(w) << (2 * FixedPoint::kFracBits));
 
       for (int k = 0; k < numAttrs; k++) {
-        auto q = quant[std::min(k, int(quant.size()) - 1)];
-
+        //auto q = quant[std::min(k, int(quant.size()) - 1)];
+		auto q = Quantizer(quant[std::min(k, int(quant.size()) - 1)] + qp_node);
         FixedPoint transformBuf[2];
         if (isEncoder) {
           // invert the initial reduction (sum)
@@ -884,16 +902,17 @@ uraht_process(
 void
 regionAdaptiveHierarchicalTransform(
   bool raht_prediction_enabled_flag,
-  const std::vector<Quantizers>& quantLayers,
+  const std::vector<Qps>& quantLayers,
   int64_t* mortonCode,
   int* attributes,
   const int attribCount,
   const int voxelCount,
-  int* coefficients)
+  int* coefficients,
+  int* regionQPOffset)
 {
   uraht_process<true>(
     raht_prediction_enabled_flag, quantLayers, voxelCount, attribCount,
-    mortonCode, attributes, coefficients);
+    mortonCode, attributes, coefficients, regionQPOffset);
 }
 
 //============================================================================
@@ -916,16 +935,17 @@ regionAdaptiveHierarchicalTransform(
 void
 regionAdaptiveHierarchicalInverseTransform(
   bool raht_prediction_enabled_flag,
-  const std::vector<Quantizers>& quantLayers,
+  const std::vector<Qps>& quantLayers,
   int64_t* mortonCode,
   int* attributes,
   const int attribCount,
   const int voxelCount,
-  int* coefficients)
+  int* coefficients,
+  int* regionQPOffset)
 {
   uraht_process<false>(
     raht_prediction_enabled_flag, quantLayers, voxelCount, attribCount,
-    mortonCode, attributes, coefficients);
+    mortonCode, attributes, coefficients, regionQPOffset);
 }
 
 //============================================================================
diff --git a/tmc3/RAHT.h b/tmc3/RAHT.h
old mode 100644
new mode 100755
index 9c9aa97..2221654
--- a/tmc3/RAHT.h
+++ b/tmc3/RAHT.h
@@ -46,20 +46,22 @@ namespace pcc {
 
 void regionAdaptiveHierarchicalTransform(
   bool raht_prediction_enabled_flag,
-  const std::vector<Quantizers>& quantLayers,
+  const std::vector<Qps>& quantLayers,
   int64_t* mortonCode,
   int* attributes,
   const int attribCount,
   const int voxelCount,
-  int* coefficients);
+  int* coefficients, 
+  int* regionQPOffset);
 
 void regionAdaptiveHierarchicalInverseTransform(
   bool raht_prediction_enabled_flag,
-  const std::vector<Quantizers>& quantLayers,
+  const std::vector<Qps>& quantLayers,
   int64_t* mortonCode,
   int* attributes,
   const int attribCount,
   const int voxelCount,
-  int* coefficients);
+  int* coefficients,
+  int* regionQPOffset);
 
 } /* namespace pcc */
diff --git a/tmc3/TMC3.cpp b/tmc3/TMC3.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/TMC3.h b/tmc3/TMC3.h
old mode 100644
new mode 100755
diff --git a/tmc3/colourspace.h b/tmc3/colourspace.h
old mode 100644
new mode 100755
diff --git a/tmc3/constants.h b/tmc3/constants.h
old mode 100644
new mode 100755
diff --git a/tmc3/decoder.cpp b/tmc3/decoder.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/encoder.cpp b/tmc3/encoder.cpp
old mode 100644
new mode 100755
index e86dabc..f56f2ba
--- a/tmc3/encoder.cpp
+++ b/tmc3/encoder.cpp
@@ -411,11 +411,22 @@ PCCTMC3Encoder3::compressPartition(
     abh.attr_layer_qp_delta_luma = attr_enc.abh.attr_layer_qp_delta_luma;
     abh.attr_layer_qp_delta_chroma = attr_enc.abh.attr_layer_qp_delta_chroma;
 
-    abh.attr_region_qp_present_flag = false;
+    /*abh.attr_region_qp_present_flag = false;
     abh.attr_region_qp_origin = Vec3<int>{0};
     abh.attr_region_qp_whd = Vec3<int>{0};
-    abh.attr_region_qp_delta = 0;
-
+    abh.attr_region_qp_delta = 0;*/
+	
+	/*abh.attr_region_qp_present_flag = true;
+	abh.attr_region_qp_origin = Vec3<int>{0, 861, 0};
+	abh.attr_region_qp_whd = Vec3<int>{ 400, 122, 200 };
+	abh.attr_region_qp_delta = 24;*/
+
+	//adaptive setting for  CTC
+	abh.attr_region_qp_present_flag = true;
+	abh.attr_region_qp_origin = Vec3<int>{0, 0, 0};
+	abh.attr_region_qp_whd = Vec3<int>{ _sps->seq_bounding_box_whd[0], _sps->seq_bounding_box_whd[1] * 1/4 , _sps->seq_bounding_box_whd[2]};
+	abh.attr_region_qp_delta = -6;
+	
     write(attr_aps, abh, &payload);
 
     // replace the attribute encoder if not compatible
diff --git a/tmc3/entropy.h b/tmc3/entropy.h
old mode 100644
new mode 100755
diff --git a/tmc3/entropydirac.cpp b/tmc3/entropydirac.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/entropydirac.h b/tmc3/entropydirac.h
old mode 100644
new mode 100755
diff --git a/tmc3/entropyo3dgc.h b/tmc3/entropyo3dgc.h
old mode 100644
new mode 100755
diff --git a/tmc3/entropyutils.h b/tmc3/entropyutils.h
old mode 100644
new mode 100755
diff --git a/tmc3/geometry.h b/tmc3/geometry.h
old mode 100644
new mode 100755
diff --git a/tmc3/geometry_intra_pred.cpp b/tmc3/geometry_intra_pred.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/geometry_intra_pred.h b/tmc3/geometry_intra_pred.h
old mode 100644
new mode 100755
diff --git a/tmc3/geometry_octree.cpp b/tmc3/geometry_octree.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/geometry_octree.h b/tmc3/geometry_octree.h
old mode 100644
new mode 100755
diff --git a/tmc3/geometry_octree_decoder.cpp b/tmc3/geometry_octree_decoder.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/geometry_octree_encoder.cpp b/tmc3/geometry_octree_encoder.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/geometry_trisoup.h b/tmc3/geometry_trisoup.h
old mode 100644
new mode 100755
diff --git a/tmc3/geometry_trisoup_decoder.cpp b/tmc3/geometry_trisoup_decoder.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/geometry_trisoup_encoder.cpp b/tmc3/geometry_trisoup_encoder.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/hls.h b/tmc3/hls.h
old mode 100644
new mode 100755
index ac4bdd1..a5bc0a7
--- a/tmc3/hls.h
+++ b/tmc3/hls.h
@@ -349,8 +349,7 @@ struct AttributeParameterSet {
   int aps_seq_parameter_set_id;
   AttributeEncoding attr_encoding;
 
-  bool lodParametersPresent() const
-  {
+  bool lodParametersPresent() const {
     return attr_encoding == AttributeEncoding::kLiftingTransform
       || attr_encoding == AttributeEncoding::kPredictingTransform;
   }
diff --git a/tmc3/io_hls.cpp b/tmc3/io_hls.cpp
old mode 100644
new mode 100755
index 16add78..771154b
--- a/tmc3/io_hls.cpp
+++ b/tmc3/io_hls.cpp
@@ -609,6 +609,7 @@ write(
     bs.writeUe(abh.attr_region_qp_whd.y());
     bs.writeUe(abh.attr_region_qp_whd.z());
     bs.writeSe(abh.attr_region_qp_delta);
+
   }
   bs.byteAlign();
 }
diff --git a/tmc3/io_hls.h b/tmc3/io_hls.h
old mode 100644
new mode 100755
diff --git a/tmc3/io_tlv.cpp b/tmc3/io_tlv.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/io_tlv.h b/tmc3/io_tlv.h
old mode 100644
new mode 100755
diff --git a/tmc3/misc.cpp b/tmc3/misc.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/osspecific.cpp b/tmc3/osspecific.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/osspecific.h b/tmc3/osspecific.h
old mode 100644
new mode 100755
diff --git a/tmc3/partitioning.cpp b/tmc3/partitioning.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/partitioning.h b/tmc3/partitioning.h
old mode 100644
new mode 100755
diff --git a/tmc3/pcc_chrono.cpp b/tmc3/pcc_chrono.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/pcc_chrono.h b/tmc3/pcc_chrono.h
old mode 100644
new mode 100755
diff --git a/tmc3/ply.cpp b/tmc3/ply.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/ply.h b/tmc3/ply.h
old mode 100644
new mode 100755
diff --git a/tmc3/pointset_processing.cpp b/tmc3/pointset_processing.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/pointset_processing.h b/tmc3/pointset_processing.h
old mode 100644
new mode 100755
diff --git a/tmc3/quantization.cpp b/tmc3/quantization.cpp
old mode 100644
new mode 100755
index b911297..1dafaa9
--- a/tmc3/quantization.cpp
+++ b/tmc3/quantization.cpp
@@ -139,7 +139,7 @@ Quantizers
 QpSet::quantizers(const Vec3<int32_t>& point, int qpLayer) const
 {
   int qpRegionOffset = 0;
-  if (regionOffset.valid && regionOffset.region.contains(point)) {
+ if (regionOffset.valid && regionOffset.region.contains(point)) {
     qpRegionOffset = regionOffset.qpOffset;
   }
   return {Quantizer(layers[qpLayer][0] + qpRegionOffset),
@@ -159,6 +159,30 @@ QpSet::quantizerLayers() const
 }
 
 //============================================================================
+//for RAHT region QP Offset
+int QpSet::quantizerRAHT_region(const Vec3<int32_t>& point) const
+{
+	//std::vector<Quantizers> quantLayers;
+	int qpRegionOffset = 0;
+	if (regionOffset.valid && regionOffset.region.contains(point)) {
+		qpRegionOffset = regionOffset.qpOffset;
+	}
+	return qpRegionOffset;
+}
+
+//============================================================================
+//for RAHT layer QP
+std::vector<Qps>
+QpSet::QP_Layers() const
+{
+	std::vector<Qps> QP_val_in_Layers;
+	for (int i = 0; i < layers.size(); i++) {
+		QP_val_in_Layers.push_back({ (layers[i][0]), (layers[i][1]) });
+	}
+	return QP_val_in_Layers;
+}
+
+//============================================================================
 
 const int32_t QuantizerGeom::kQpStep[6] = {659445, 741374,  831472,
                                            933892, 1048576, 1175576};
diff --git a/tmc3/quantization.h b/tmc3/quantization.h
old mode 100644
new mode 100755
index 719b61e..abfad05
--- a/tmc3/quantization.h
+++ b/tmc3/quantization.h
@@ -126,6 +126,10 @@ struct QpSet {
 
   // Return the list of quantisers for all layers
   std::vector<Quantizers> quantizerLayers() const;
+
+  int quantizerRAHT_region(const Vec3<int32_t>& point) const;
+  std::vector<Qps> QP_Layers() const;
+
 };
 
 //============================================================================
diff --git a/tmc3/ringbuf.h b/tmc3/ringbuf.h
old mode 100644
new mode 100755
diff --git a/tmc3/tables.cpp b/tmc3/tables.cpp
old mode 100644
new mode 100755
diff --git a/tmc3/tables.h b/tmc3/tables.h
old mode 100644
new mode 100755
diff --git a/tmc3/version.h b/tmc3/version.h
old mode 100644
new mode 100755
