Hack to fix split flag model for PCM use -> valid VVC bitstream

This commit is contained in:
Marko Viitanen 2018-07-27 14:29:31 +03:00
parent 90174f1143
commit 84b6a61193

View file

@ -977,8 +977,11 @@ void kvz_encode_coding_tree(encoder_state_t * const state,
if (y > 0) { if (y > 0) {
above_cu = kvz_cu_array_at_const(frame->cu_array, x, y - 1); above_cu = kvz_cu_array_at_const(frame->cu_array, x, y - 1);
} }
#if FORCE_PCM != 1
uint8_t split_flag = 0;// GET_SPLITDATA(cur_cu, depth); uint8_t split_flag = GET_SPLITDATA(cur_cu, depth);
#else
uint8_t split_flag = 0;
#endif
uint8_t split_model = 0; uint8_t split_model = 0;
// Absolute coordinates // Absolute coordinates
@ -1002,11 +1005,15 @@ void kvz_encode_coding_tree(encoder_state_t * const state,
if (!border) { if (!border) {
// Get left and top block split_flags and if they are present and true, increase model number // 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 (left_cu && GET_SPLITDATA(left_cu, depth) == 1) {
#if FORCE_PCM != 1
split_model++; split_model++;
#endif
} }
if (above_cu && GET_SPLITDATA(above_cu, depth) == 1) { if (above_cu && GET_SPLITDATA(above_cu, depth) == 1) {
#if FORCE_PCM != 1
split_model++; split_model++;
#endif
} }
cabac->cur_ctx = &(cabac->ctx.split_flag_model[split_model]); cabac->cur_ctx = &(cabac->ctx.split_flag_model[split_model]);