From 057fc88acb5f9f9467d18d46662bd1a90ef64dc9 Mon Sep 17 00:00:00 2001
From: Gleb Verba <gverba@qti.qualcomm.com>
Date: Tue, 14 Nov 2023 13:06:24 +0000
Subject: [PATCH] Fix debugbitstream issues 3.1 and 3.3 (see #50)

---
 source/Lib/DecoderLib/CABACReader.cpp | 1 +
 source/Lib/EncoderLib/EncGOP.cpp      | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/source/Lib/DecoderLib/CABACReader.cpp b/source/Lib/DecoderLib/CABACReader.cpp
index 49c4f5528..c0eea83ae 100644
--- a/source/Lib/DecoderLib/CABACReader.cpp
+++ b/source/Lib/DecoderLib/CABACReader.cpp
@@ -3072,6 +3072,7 @@ void CABACReader::cu_palette_info(CodingUnit& cu, ComponentID compBegin, uint32_
       curPLTidx++;
     }
   }
+  cu.reusePLTSize[compBegin] = curPLTidx;
 
   uint32_t recievedPLTnum = 0;
   if (curPLTidx < maxPltSize)
diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp
index dbb95ecef..9e6f67efe 100644
--- a/source/Lib/EncoderLib/EncGOP.cpp
+++ b/source/Lib/EncoderLib/EncGOP.cpp
@@ -4192,6 +4192,8 @@ void EncGOP::compressGOP(int iPOCLast, int iNumPicRcvd, PicList &rcListPic, std:
             picHeader->setNumL0Weights(pcSlice->getNumRefIdx(REF_PIC_LIST_1));
           }
 
+          picHeader->setDisFracMBVD(pcSlice->getPicHeader()->getDisFracMBVD());
+
           pcPic->cs->picHeader->setPic(pcPic);
           pcPic->cs->picHeader->setValid();
           if (pcPic->cs->pps->getNumSlicesInPic() > 1 || !m_pcCfg->getEnablePictureHeaderInSliceHeader())
-- 
GitLab