From bd292dab16115abbe8922f1db8d3955b2a166ac7 Mon Sep 17 00:00:00 2001 From: Arttu Makinen Date: Tue, 20 Oct 2020 17:35:51 +0300 Subject: [PATCH] Fixed coding of headers for inter coding with ALF. --- src/encoder_state-bitstream.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/encoder_state-bitstream.c b/src/encoder_state-bitstream.c index a19302ec..9ef89b39 100644 --- a/src/encoder_state-bitstream.c +++ b/src/encoder_state-bitstream.c @@ -1241,6 +1241,12 @@ void kvz_encoder_state_write_bitstream_slice_header( WRITE_U(stream, 0, 1, "sh_no_output_of_prior_pics_flag"); } + //alf + if (encoder->cfg.alf_enable && !encoder->cfg.alf_info_in_ph_flag) + { + const int alf_enabled = state->slice->tile_group_alf_enabled_flag[COMPONENT_Y]; + WRITE_U(stream, alf_enabled, 1, "slice_alf_enabled_flag"); + if (alf_enabled) { WRITE_U(stream, state->slice->tile_group_num_aps, 3, "slice_num_alf_aps_ids_luma");