Skip to content

Commit

Permalink
Merge pull request #593 from IENT/bugfix-VVCParsing-Issue590
Browse files Browse the repository at this point in the history
Add missing default value for sh_collocated_from_l0_flag
  • Loading branch information
ChristianFeldmann authored Oct 6, 2024
2 parents ee2cb93 + 49de666 commit d77af7b
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions YUViewLib/src/parser/VVC/slice_header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@

#include "slice_header.h"

#include <parser/common/Functions.h>
#include "pic_parameter_set_rbsp.h"
#include "seq_parameter_set_rbsp.h"
#include <parser/common/Functions.h>

#include <cmath>

Expand All @@ -43,11 +43,11 @@ namespace parser::vvc

using namespace parser::reader;

void slice_header::parse(SubByteReaderLogging & reader,
void slice_header::parse(SubByteReaderLogging &reader,
NalType nal_unit_type,
VPSMap & vpsMap,
SPSMap & spsMap,
PPSMap & ppsMap,
VPSMap &vpsMap,
SPSMap &spsMap,
PPSMap &ppsMap,
std::shared_ptr<slice_layer_rbsp> sliceLayer,
std::shared_ptr<picture_header_structure> picHeader)
{
Expand Down Expand Up @@ -205,7 +205,8 @@ void slice_header::parse(SubByteReaderLogging & reader,
{
if (this->ref_pic_lists_instance->getActiveRefPixList(sps, i).num_ref_entries > 1)
{
this->sh_num_ref_idx_active_minus1[i] = reader.readUEV(formatArray("sh_num_ref_idx_active_minus1", i));
this->sh_num_ref_idx_active_minus1[i] =
reader.readUEV(formatArray("sh_num_ref_idx_active_minus1", i));
}
}
}
Expand Down Expand Up @@ -239,12 +240,13 @@ void slice_header::parse(SubByteReaderLogging & reader,
{
this->sh_cabac_init_flag = reader.readFlag("sh_cabac_init_flag");
}
if (picHeader->ph_temporal_mvp_enabled_flag)
this->sh_collocated_from_l0_flag =
(this->sh_slice_type == SliceType::B) ? picHeader->ph_collocated_from_l0_flag : true;
if (picHeader->ph_temporal_mvp_enabled_flag && !pps->pps_rpl_info_in_ph_flag)
{
if (this->sh_slice_type == SliceType::B)
{
this->sh_collocated_from_l0_flag = reader.readFlag("sh_collocated_from_l0_flag");
}
if ((this->sh_collocated_from_l0_flag && this->NumRefIdxActive[0] > 1) ||
(!this->sh_collocated_from_l0_flag && this->NumRefIdxActive[1] > 1))
{
Expand Down

0 comments on commit d77af7b

Please sign in to comment.