Skip to content

Commit

Permalink
Revert "[Decode] Only decode basic layer when input is multi-layer (#…
Browse files Browse the repository at this point in the history
…8886)"

This reverts commit cf92aba
  • Loading branch information
yawenyan authored and gfxVPLsdm committed Sep 14, 2024
1 parent cfd3884 commit fcad0a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2024 Intel Corporation
// Copyright (c) 2012-2020 Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -331,9 +331,8 @@ UMC::Status H265HeadersBitstream::GetVideoParamSet(H265VideoParamSet *pcVPS)
}

pcVPS->vps_max_layer_id = GetBits(6);
//remove the max layer ID check to enable decode basic layer of multiple layer clips
/*if (pcVPS->vps_max_layer_id >= MAX_NUH_LAYER_ID)
throw h265_exception(UMC::UMC_ERR_INVALID_STREAM);*/
if (pcVPS->vps_max_layer_id >= MAX_NUH_LAYER_ID)
throw h265_exception(UMC::UMC_ERR_INVALID_STREAM);

pcVPS->vps_num_layer_sets = GetVLCElementU() + 1;
if (pcVPS->vps_num_layer_sets > MAX_VPS_NUM_LAYER_SETS)
Expand Down Expand Up @@ -2104,7 +2103,7 @@ UMC::Status H265HeadersBitstream::GetNALUnitType(NalUnitType &nal_unit_type, uin
nal_unit_type = (NalUnitType)GetBits(6);
uint32_t nuh_layer_id = GetBits(6);
if (nuh_layer_id)
return UMC::UMC_ERR_UNSUPPORTED;//only support layer 0 which is the basic layer
throw h265_exception(UMC::UMC_ERR_INVALID_STREAM);

uint32_t const nuh_temporal_id_plus1 = GetBits(3);
if (!nuh_temporal_id_plus1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1432,10 +1432,9 @@ UMC::Status TaskSupplier_H265::DecodeHeaders(UMC::MediaDataEx *nalUnit)
NalUnitType nal_unit_type;
uint32_t temporal_id = 0;

umcRes = bitStream.GetNALUnitType(nal_unit_type, temporal_id);
if (umcRes != UMC::UMC_OK)
return umcRes;
switch (nal_unit_type)
bitStream.GetNALUnitType(nal_unit_type, temporal_id);

switch(nal_unit_type)
{
case NAL_UT_VPS:
umcRes = xDecodeVPS(&bitStream);
Expand Down

0 comments on commit fcad0a9

Please sign in to comment.