From 43b086caedcff9f9d1884dcf7c69a24e996305e1 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Fri, 6 Mar 2015 16:27:42 +0200 Subject: [PATCH] Added missing slice header flag "mvd_l1_zero_flag" --- src/encoder_state-bitstream.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/encoder_state-bitstream.c b/src/encoder_state-bitstream.c index 88a0c205..69af34a5 100644 --- a/src/encoder_state-bitstream.c +++ b/src/encoder_state-bitstream.c @@ -611,13 +611,13 @@ void encoder_state_write_bitstream_slice_header(encoder_state * const encoder_st if (encoder_state->global->slicetype != SLICE_I) { WRITE_U(stream, 1, 1, "num_ref_idx_active_override_flag"); WRITE_UE(stream, encoder_state->global->ref->used_size-1, "num_ref_idx_l0_active_minus1"); + if (encoder_state->global->slicetype == SLICE_B) { + WRITE_UE(stream, 0, "num_ref_idx_l1_active_minus1"); + WRITE_U(stream, 0, 1, "mvd_l1_zero_flag"); + } WRITE_UE(stream, 5-MRG_MAX_NUM_CANDS, "five_minus_max_num_merge_cand"); } - if (encoder_state->global->slicetype == SLICE_B) { - WRITE_U(stream, 0, 1, "mvd_l1_zero_flag"); - } - { int slice_qp_delta = encoder_state->global->QP - encoder_state->encoder_control->cfg->qp; WRITE_SE(stream, slice_qp_delta, "slice_qp_delta");