From 84b6a6119374f522f2f5cb8cd739787c090ae789 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Fri, 27 Jul 2018 14:29:31 +0300 Subject: [PATCH] Hack to fix split flag model for PCM use -> valid VVC bitstream --- src/encode_coding_tree.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/encode_coding_tree.c b/src/encode_coding_tree.c index 73687160..268916e0 100644 --- a/src/encode_coding_tree.c +++ b/src/encode_coding_tree.c @@ -977,8 +977,11 @@ void kvz_encode_coding_tree(encoder_state_t * const state, if (y > 0) { above_cu = kvz_cu_array_at_const(frame->cu_array, x, y - 1); } - - uint8_t split_flag = 0;// GET_SPLITDATA(cur_cu, depth); +#if FORCE_PCM != 1 + uint8_t split_flag = GET_SPLITDATA(cur_cu, depth); +#else + uint8_t split_flag = 0; +#endif uint8_t split_model = 0; // Absolute coordinates @@ -1002,11 +1005,15 @@ void kvz_encode_coding_tree(encoder_state_t * const state, if (!border) { // Get left and top block split_flags and if they are present and true, increase model number if (left_cu && GET_SPLITDATA(left_cu, depth) == 1) { +#if FORCE_PCM != 1 split_model++; +#endif } if (above_cu && GET_SPLITDATA(above_cu, depth) == 1) { +#if FORCE_PCM != 1 split_model++; +#endif } cabac->cur_ctx = &(cabac->ctx.split_flag_model[split_model]);