For VTM, after encoding a Quantization Group (QG), the QPs of the CUs before the first CU with residual in the QG are modified to predQP. However, this does not work for the local dual tree case, since the chroma CU's QP is derived from the QP of corresponding central position luma CU. More detailed explanation as follows.
Considering a local dual tree: luma CU 4x4 -> luma CU 4x8 -> luma CU 4x4 -> chroma CU 2x8 (corresponding to the 4x16 region).
If the acutal QP of the corrsponding luma CU (4x8) is predQP and there is a deltaQP signaled between this luma CU (4x8) and the chroma CU (2x8), the chroma CU's QP shall be predQP (as in decoder), not predQP+deltaQP. Therefore, before encoding the chroma CU, it is needed to revise the luma QP to predQP, and thus when encoding the chroma CU, the chroma CU will correctly use predQP by fetching qp from the corresponding luma CU, the same as the decoder does.
Besides, the QG shall be reset at luma CU. The encoder and decoder reset QG at chroma CU as well, which can be trigged when MaxCuDQPSubdiv is >= 6 for CTUSize 128.
Some other fixes are related to delta qp signaling checks from isDualITree() to isSepTree().
Another fix on the CHECK of CUs inside an Intra coding region, further considering the palette mode may be used.