Skip to content
Snippets Groups Projects
Commit 6dfc88d0 authored by Yi-Wen Chen's avatar Yi-Wen Chen
Browse files

Integration of P0516 to fix the PLT binarization

parent c13af92c
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,8 @@
#include <assert.h>
#include <cassert>
#define JVET_P0516_PLT_BINARIZATION 1 // JVET-P0516: PLT is always signaled when pred mode is euqal to 1 (intra mode)
#define JVET_O0145_ENTRYPOINT_SIGNALLING 0 // JVET-O0145: Not signalling num_entry_point_offsets but derive it at decoder
#define JVET_O0625_ALF_PADDING 1 // JVET-O0625/O0654/O0662: Unified padding method in ALF
......
......@@ -1111,7 +1111,11 @@ void CABACReader::pred_mode( CodingUnit& cu )
else
{
cu.predMode = m_BinDecoder.decodeBin(Ctx::PredMode(DeriveCtx::CtxPredModeFlag(cu))) ? MODE_INTRA : MODE_INTER;
#if JVET_P0516_PLT_BINARIZATION
if (CU::isIntra(cu) && cu.cs->slice->getSPS()->getPLTMode() && cu.lwidth() <= 64 && cu.lheight() <= 64)
#else
if (!CU::isIntra(cu) && cu.cs->slice->getSPS()->getPLTMode() && cu.lwidth() <= 64 && cu.lheight() <= 64)
#endif
{
if (m_BinDecoder.decodeBin(Ctx::PLTFlag(0)))
{
......
......@@ -789,8 +789,13 @@ void CABACWriter::pred_mode( const CodingUnit& cu )
m_BinEncoder.encodeBin((CU::isPLT(cu)), Ctx::PLTFlag(0));
return;
}
#if JVET_P0516_PLT_BINARIZATION
m_BinEncoder.encodeBin((CU::isIntra(cu) || CU::isPLT(cu)), Ctx::PredMode(DeriveCtx::CtxPredModeFlag(cu)));
if ((CU::isIntra(cu) || CU::isPLT(cu)) && cu.cs->slice->getSPS()->getPLTMode() && cu.lwidth() <= 64 && cu.lheight() <= 64)
#else
m_BinEncoder.encodeBin((CU::isIntra(cu)), Ctx::PredMode(DeriveCtx::CtxPredModeFlag(cu)));
if (!CU::isIntra(cu) && cu.cs->slice->getSPS()->getPLTMode() && cu.lwidth() <= 64 && cu.lheight() <= 64)
#endif
{
m_BinEncoder.encodeBin((CU::isPLT(cu)), Ctx::PLTFlag(0));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment