File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -451,6 +451,9 @@ void init_thread_context(thread_context* tctx)
451451{
452452 // zero scrap memory for coefficient blocks
453453 memset (tctx -> coeffBuf , 0 , sizeof (tctx -> coeffBuf ));
454+
455+ tctx -> currentQG_x = -1 ;
456+ tctx -> currentQG_y = -1 ;
454457}
455458
456459
Original file line number Diff line number Diff line change @@ -83,12 +83,17 @@ void decode_quantization_parameters(decoder_context* ctx,
8383 int xQG = xC - (xC & ((1 <<pps -> Log2MinCuQpDeltaSize )- 1 ));
8484 int yQG = yC - (yC & ((1 <<pps -> Log2MinCuQpDeltaSize )- 1 ));
8585
86- // if first QG in CU, remember last QPY of last CU previous QG
8786
88- /*
89- if (xQG == tctx->currentQG_x ||
90- yQG == tctx->currentQG_y) { return; }
91- */
87+ // we only have to set QP in the first call in a quantization-group
88+
89+ if (xQG == tctx -> currentQG_x &&
90+ yQG == tctx -> currentQG_y )
91+ {
92+ return ;
93+ }
94+
95+
96+ // if first QG in CU, remember last QPY of last CU previous QG
9297
9398 if (xQG != tctx -> currentQG_x ||
9499 yQG != tctx -> currentQG_y )
You can’t perform that action at this time.
0 commit comments