source/Lib/CommonLib/ContextModelling.cpp | 19 ++++++++++++++++++-
source/Lib/CommonLib/TypeDef.h | 1 +
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/source/Lib/CommonLib/ContextModelling.cpp b/source/Lib/CommonLib/ContextModelling.cpp
index 859f5f5..2f61246 100644
a
|
b
|
unsigned DeriveCtx::CtxBTsplit(const CodingStructure& cs, Partitioner& partition |
315 | 315 | |
316 | 316 | { |
317 | 317 | #if JVET_L0361_SPLIT_CTX |
318 | | unsigned widthCurr = partitioner.currArea().lwidth(); |
| 318 | #if L0361_BUGFIX |
| 319 | unsigned widthCurr = partitioner.currArea().blocks[partitioner.chType].width; |
| 320 | unsigned heightCurr = partitioner.currArea().blocks[partitioner.chType].height; |
| 321 | #else |
| 322 | unsigned widthCurr = partitioner.currArea().lwidth(); |
319 | 323 | unsigned heightCurr = partitioner.currArea().lheight(); |
| 324 | #endif |
320 | 325 | |
321 | 326 | if( cuLeft ) |
322 | 327 | { |
| 328 | #if L0361_BUGFIX |
| 329 | unsigned heightLeft = cuLeft->blocks[partitioner.chType].height; |
| 330 | #else |
323 | 331 | unsigned heightLeft = cuLeft->Y().height; |
| 332 | #endif |
324 | 333 | ctx += ( heightLeft < heightCurr ? 1 : 0 ); |
325 | 334 | } |
326 | 335 | if( cuAbove ) |
327 | 336 | { |
| 337 | #if L0361_BUGFIX |
| 338 | unsigned widthAbove = cuAbove->blocks[partitioner.chType].width; |
| 339 | #else |
328 | 340 | unsigned widthAbove = cuAbove->Y().width; |
| 341 | #endif |
329 | 342 | ctx += ( widthAbove < widthCurr ? 1 : 0 ); |
330 | 343 | } |
331 | 344 | |
… |
… |
unsigned DeriveCtx::CtxBTsplit(const CodingStructure& cs, Partitioner& partition |
338 | 351 | int maxBTSize = cs.pcv->getMaxBtSize( *cs.slice, partitioner.chType ); |
339 | 352 | int th1 = ( maxBTSize == 128 ) ? 128 : ( ( maxBTSize == 64 ) ? 64 : 64 ); |
340 | 353 | int th2 = ( maxBTSize == 128 ) ? 1024 : ( ( maxBTSize == 64 ) ? 512 : 256 ); |
| 354 | #if L0361_BUGFIX |
| 355 | unsigned int sizeCurr = partitioner.currArea().lumaSize().area(); |
| 356 | #else |
341 | 357 | unsigned int sizeCurr = widthCurr * heightCurr; |
| 358 | #endif |
342 | 359 | ctx += sizeCurr > th2 ? 0 : ( sizeCurr > th1 ? 3 : 6 ); |
343 | 360 | } |
344 | 361 | #else |
diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h
index ebde21e..dd3d8a2 100644
a
|
b
|
|
100 | 100 | #define JVET_L0194_ONE_CTX_FOR_MRG_IDX 1 // one context for full-block Merge index |
101 | 101 | |
102 | 102 | #define JVET_L0361_SPLIT_CTX 1 // context for cu-split-related flags |
| 103 | #define L0361_BUGFIX ( 1 && JVET_L0361_SPLIT_CTX ) |
103 | 104 | |
104 | 105 | #define JVET_L0274 1 |
105 | 106 | #define JVET_L0274_ENCODER_SPEED_UP ( 1 && JVET_L0274 ) // encoder speed-up by pre-calculating position dependent parameters |