Commit 9ac5a47f authored by Karsten Suehring's avatar Karsten Suehring

Tile coding fixes

- Fix coding for HEVC style tiles
- Re-enable tiles

Original patch by: Rickard Sjöberg <rickard.sjoberg@ericsson.com>
parent 47b610b5
......@@ -220,9 +220,9 @@
#define HEVC_TILES_WPP 1
#else
#define HEVC_USE_SIGN_HIDING 1
#define HEVC_TILES_WPP 1
#endif
#define KEEP_PRED_AND_RESI_SIGNALS 0
......
......@@ -160,8 +160,8 @@ bool CABACReader::coding_tree_unit( CodingStructure& cs, const UnitArea& area, i
const uint32_t curSliceIdx = cs.slice->getIndependentSliceIdx();
#if HEVC_TILES_WPP
const uint32_t curTileIdx = cs.picture->tileMap->getTileIdxMap( pos );
bool leftMergeAvail = cs.getCURestricted( pos.offset( -(int)pcv.maxCUWidth, 0 ), curSliceIdx, curTileIdx, CH_L ) ? true : false;
bool aboveMergeAvail = cs.getCURestricted( pos.offset( 0, -(int)pcv.maxCUHeight ), curSliceIdx, curTileIdx, CH_L ) ? true : false;
bool leftAvail = cs.getCURestricted( pos.offset( -(int)pcv.maxCUWidth, 0 ), curSliceIdx, curTileIdx, CH_L ) ? true : false;
bool aboveAvail = cs.getCURestricted( pos.offset( 0, -(int)pcv.maxCUHeight ), curSliceIdx, curTileIdx, CH_L ) ? true : false;
#else
bool leftAvail = cs.getCURestricted( pos.offset( -(int)pcv.maxCUWidth, 0 ), curSliceIdx, CH_L ) ? true : false;
bool aboveAvail = cs.getCURestricted( pos.offset( 0, -(int)pcv.maxCUHeight ), curSliceIdx, CH_L ) ? true : false;
......
......@@ -112,12 +112,8 @@ void DecSlice::decompressSlice( Slice* slice, InputBitstream* bitstream )
#else
const int startCtuTsAddr = slice->getSliceCurStartCtuTsAddr();
#endif
#if HEVC_TILES_WPP
const int startCtuRsAddr = tileMap.getCtuTsToRsAddrMap(startCtuTsAddr);
#else
#if HEVC_DEPENDENT_SLICES
const int startCtuRsAddr = startCtuTsAddr;
#endif
#endif
const unsigned numCtusInFrame = cs.pcv->sizeInCtus;
const unsigned widthInCtus = cs.pcv->widthInCtus;
......
......@@ -2822,8 +2822,8 @@ void CABACWriter::codeAlfCtuEnableFlag( CodingStructure& cs, uint32_t ctuRsAddr,
const uint32_t curSliceIdx = cs.slice->getIndependentSliceIdx();
#if HEVC_TILES_WPP
const uint32_t curTileIdx = cs.picture->tileMap->getTileIdxMap( pos );
bool leftMergeAvail = cs.getCURestricted( pos.offset( -(int)pcv.maxCUWidth, 0 ), curSliceIdx, curTileIdx, CH_L ) ? true : false;
bool aboveMergeAvail = cs.getCURestricted( pos.offset( 0, -(int)pcv.maxCUHeight ), curSliceIdx, curTileIdx, CH_L ) ? true : false;
bool leftAvail = cs.getCURestricted( pos.offset( -(int)pcv.maxCUWidth, 0 ), curSliceIdx, curTileIdx, CH_L ) ? true : false;
bool aboveAvail = cs.getCURestricted( pos.offset( 0, -(int)pcv.maxCUHeight ), curSliceIdx, curTileIdx, CH_L ) ? true : false;
#else
bool leftAvail = cs.getCURestricted( pos.offset( -(int)pcv.maxCUWidth, 0 ), curSliceIdx, CH_L ) ? true : false;
bool aboveAvail = cs.getCURestricted( pos.offset( 0, -(int)pcv.maxCUHeight ), curSliceIdx, CH_L ) ? true : false;
......
......@@ -2525,6 +2525,9 @@ void EncCu::xCheckRDCostMergeTriangle2Nx2N( CodingStructure *&tempCS, CodingStru
cu.cs = tempCS;
cu.predMode = MODE_INTER;
cu.slice = tempCS->slice;
#if HEVC_TILES_WPP
cu.tileIdx = tempCS->picture->tileMap->getTileIdxMap( tempCS->area.lumaPos() );
#endif
cu.triangle = true;
#if JVET_L0054_MMVD
cu.mmvdSkip = false;
......@@ -2564,6 +2567,9 @@ void EncCu::xCheckRDCostMergeTriangle2Nx2N( CodingStructure *&tempCS, CodingStru
partitioner.setCUData( cu );
cu.slice = tempCS->slice;
#if HEVC_TILES_WPP
cu.tileIdx = tempCS->picture->tileMap->getTileIdxMap( tempCS->area.lumaPos() );
#endif
cu.skip = false;
cu.predMode = MODE_INTER;
cu.transQuantBypass = encTestMode.lossless;
......@@ -2669,6 +2675,9 @@ void EncCu::xCheckRDCostMergeTriangle2Nx2N( CodingStructure *&tempCS, CodingStru
partitioner.setCUData(cu);
cu.slice = tempCS->slice;
#if HEVC_TILES_WPP
cu.tileIdx = tempCS->picture->tileMap->getTileIdxMap( tempCS->area.lumaPos() );
#endif
cu.skip = false;
cu.predMode = MODE_INTER;
cu.transQuantBypass = encTestMode.lossless;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment