Skip to content

Commit cf31e82

Browse files
committed
[bitstream] Fix delta qp writing
1 parent 9c29121 commit cf31e82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/encode_coding_tree.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,8 @@ static void encode_transform_coeff(
717717
}
718718
}
719719

720-
if (cb_flag_y | cb_flag_u | cb_flag_v) {
721-
if (state->must_code_qp_delta && (only_chroma || cb_flag_y || chroma_loc) ) {
720+
if ((cb_flag_y | cb_flag_u | cb_flag_v)) {
721+
if (state->must_code_qp_delta && !only_chroma && (cb_flag_y || ((cb_flag_u || cb_flag_v) && chroma_loc)) ) {
722722
const int qp_pred = uvg_get_cu_ref_qp(state, cu_loc->x, cu_loc->y, state->last_qp);
723723
const int qp_delta = cur_tu->qp - qp_pred;
724724
// Possible deltaQP range depends on bit depth as stated in HEVC specification.

0 commit comments

Comments
 (0)