Skip to content

Commit

Permalink
Revert "[Decode] Aligne the beh of Av1 multi sequence header with Spe…
Browse files Browse the repository at this point in the history
…c " (#6257)

This reverts commit 0237fcd

Co-authored-by: hanlong1 <[email protected]>
  • Loading branch information
gfxVPLsdm and hanlong1 authored Dec 12, 2023
1 parent 0237fcd commit c8ef176
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 40 deletions.
5 changes: 1 addition & 4 deletions _studio/mfx_lib/decode/av1/src/mfx_av1_dec_decode.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2017-2023 Intel Corporation
// Copyright (c) 2017-2021 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 @@ -1032,9 +1032,6 @@ mfxStatus VideoDECODEAV1::SubmitFrame(mfxBitstream* bs, mfxFrameSurface1* surfac
case UMC::UMC_ERR_SYNC:
sts = MFX_ERR_MORE_DATA;
break;
case UMC::UMC_ERR_INVALID_PARAMS:
sts = MFX_ERR_INVALID_VIDEO_PARAM;
break;

default:
if (sts < 0 || umcRes < 0)
Expand Down
15 changes: 1 addition & 14 deletions _studio/shared/umc/codec/av1_dec/include/umc_av1_decoder.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Intel Corporation
// Copyright (c) 2012-2021 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 @@ -128,18 +128,6 @@ namespace UMC_AV1_DECODER
{ return UMC::UMC_ERR_NOT_IMPLEMENTED; }
virtual uint32_t GetNumOfSkippedFrames() override
{ return 0; }
bool is_seq_header_ready() const
{
return sequence_header_ready;
}
void set_seq_header_ready()
{
sequence_header_ready = true;
}
void clean_seq_header_ready()
{
sequence_header_ready = false;
}

public:

Expand Down Expand Up @@ -223,7 +211,6 @@ namespace UMC_AV1_DECODER
uint32_t saved_clip_info_width;
uint32_t saved_clip_info_height;
bool clip_info_size_saved;
bool sequence_header_ready;

FrameHeader m_prev_frame_header;
bool m_prev_frame_header_exist;
Expand Down
23 changes: 1 addition & 22 deletions _studio/shared/umc/codec/av1_dec/src/umc_av1_decoder.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2017-2023 Intel Corporation
// Copyright (c) 2017-2021 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 @@ -54,7 +54,6 @@ namespace UMC_AV1_DECODER
, saved_clip_info_width(0)
, saved_clip_info_height(0)
, clip_info_size_saved(false)
, sequence_header_ready(false)
, m_prev_frame_header_exist(false)
, m_specified_anchor_Idx(0)
, m_isAnchor(false)
Expand Down Expand Up @@ -642,7 +641,6 @@ namespace UMC_AV1_DECODER
assert(!AllocComplete(*pFrameInProgress));
pCurrFrame = pFrameInProgress;
gotFullFrame = true;
clean_seq_header_ready();
}
else
{
Expand Down Expand Up @@ -696,21 +694,10 @@ namespace UMC_AV1_DECODER
// check if sequence header has been changed
if (IsNeedSPSInvalidate(old_seqHdr.get(), sequence_header.get()))
{
// According to Spec Section 7.5 the contents of sequence_header_obu must be
// bit-identical each time the sequence header
// appears except for the contents of operating_parameters_info
if (is_seq_header_ready())
{
assert(!"Multi sequence_header_obu not bit-identical!");
return UMC::UMC_ERR_INVALID_PARAMS;
}

Update_drc(sequence_header.get());
// new resolution required
return UMC::UMC_NTF_NEW_RESOLUTION;
}

set_seq_header_ready();
break;
}
case OBU_TILE_LIST:
Expand Down Expand Up @@ -759,7 +746,6 @@ namespace UMC_AV1_DECODER
in->MoveDataPointer(OBUOffset); // do not submit frame header in data buffer
OBUOffset = 0;
gotFullFrame = true; // tile list is a complete frame
clean_seq_header_ready();
tile_list_idx++;
break;
case OBU_FRAME_HEADER:
Expand Down Expand Up @@ -790,13 +776,11 @@ namespace UMC_AV1_DECODER
gotFullFrame = true;
frames_to_skip--;
fh.is_anchor = 1;
clean_seq_header_ready();
}
else if (anchor_decode)
{
gotFullFrame = true;
fh.is_anchor = 1;
clean_seq_header_ready();
}
else
{
Expand All @@ -810,7 +794,6 @@ namespace UMC_AV1_DECODER
{
repeatedFrame = true;
gotFullFrame = true;
clean_seq_header_ready();
}
break;
}
Expand All @@ -831,10 +814,6 @@ namespace UMC_AV1_DECODER
{
ReadTileGroup(layout, bs, *pFH, OBUOffset, obuInfo.size);
gotFullFrame = GotFullFrame(pFrameInProgress, *pFH, layout);
if(gotFullFrame)
{
clean_seq_header_ready();
}
break;
}
}
Expand Down

0 comments on commit c8ef176

Please sign in to comment.