Skip to content

Commit fcad0a9

Browse files
yawenyangfxVPLsdm
authored andcommitted
Revert "[Decode] Only decode basic layer when input is multi-layer (#8886)"
This reverts commit cf92aba
1 parent cfd3884 commit fcad0a9

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

_studio/shared/umc/codec/h265_dec/src/umc_h265_bitstream_headers.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2012-2024 Intel Corporation
1+
// Copyright (c) 2012-2020 Intel Corporation
22
//
33
// Permission is hereby granted, free of charge, to any person obtaining a copy
44
// of this software and associated documentation files (the "Software"), to deal
@@ -331,9 +331,8 @@ UMC::Status H265HeadersBitstream::GetVideoParamSet(H265VideoParamSet *pcVPS)
331331
}
332332

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

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

21092108
uint32_t const nuh_temporal_id_plus1 = GetBits(3);
21102109
if (!nuh_temporal_id_plus1)

_studio/shared/umc/codec/h265_dec/src/umc_h265_task_supplier.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,10 +1432,9 @@ UMC::Status TaskSupplier_H265::DecodeHeaders(UMC::MediaDataEx *nalUnit)
14321432
NalUnitType nal_unit_type;
14331433
uint32_t temporal_id = 0;
14341434

1435-
umcRes = bitStream.GetNALUnitType(nal_unit_type, temporal_id);
1436-
if (umcRes != UMC::UMC_OK)
1437-
return umcRes;
1438-
switch (nal_unit_type)
1435+
bitStream.GetNALUnitType(nal_unit_type, temporal_id);
1436+
1437+
switch(nal_unit_type)
14391438
{
14401439
case NAL_UT_VPS:
14411440
umcRes = xDecodeVPS(&bitStream);

0 commit comments

Comments
 (0)