Skip to content

Commit

Permalink
Revert "[Decode] Align VPL default frame rate to 30fps "
Browse files Browse the repository at this point in the history
This reverts commit ff7ea47
  • Loading branch information
XuanJessica authored and gfxVPLsdm committed Jul 25, 2024
1 parent f25c01c commit eff7c6f
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 46 deletions.
11 changes: 0 additions & 11 deletions _studio/mfx_lib/decode/av1/src/mfx_av1_dec_decode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1242,17 +1242,6 @@ mfxStatus VideoDECODEAV1::FillVideoParam(UMC_AV1_DECODER::AV1DecoderParams const
|| par->mfx.FrameInfo.FourCC == MFX_FOURCC_Y416)
par->mfx.FrameInfo.Shift = 1;

if (vp->framerate_n && vp->framerate_d)
{
par->mfx.FrameInfo.FrameRateExtN = vp->framerate_n;
par->mfx.FrameInfo.FrameRateExtD = vp->framerate_d;
}
else // If no frame rate info in bitstream, will set to default 30fps
{
par->mfx.FrameInfo.FrameRateExtN = 30;
par->mfx.FrameInfo.FrameRateExtD = 1;
}

return MFX_ERR_NONE;
}

Expand Down
4 changes: 1 addition & 3 deletions _studio/mfx_lib/decode/vp8/src/mfx_vp8_dec_decode_common.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2024 Intel Corporation
// Copyright (c) 2014-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 @@ -126,8 +126,6 @@ namespace VP8DecodeCommon
p_params->mfx.FrameInfo.FourCC = MFX_FOURCC_NV12;
p_params->mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV420;
p_params->mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_PROGRESSIVE;
p_params->mfx.FrameInfo.FrameRateExtN = 30;
p_params->mfx.FrameInfo.FrameRateExtD = 1;
MoveBitstreamData(*p_bs, n_bytes_offset);

return MFX_ERR_NONE;
Expand Down
5 changes: 1 addition & 4 deletions _studio/mfx_lib/decode/vp9/src/mfx_vp9_dec_decode.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2024 Intel Corporation
// Copyright (c) 2012-2019 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 @@ -262,9 +262,6 @@ void FillVideoParam(eMFXPlatform platform, UMC_VP9_DECODER::VP9DecoderFrame cons
params.mfx.FrameInfo.Shift = 1;
}
}

params.mfx.FrameInfo.FrameRateExtN = 30;
params.mfx.FrameInfo.FrameRateExtD = 1;
}

} //MFX_VP9_Utility
Expand Down
5 changes: 0 additions & 5 deletions _studio/shared/umc/codec/av1_dec/include/umc_av1_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ namespace UMC_AV1_DECODER
, anchors_loaded(false)
, skip_first_frames(0)
, pre_loaded_anchors(nullptr)
, framerate_n(0)
, framerate_d(0)
{}

public:
Expand All @@ -74,9 +72,6 @@ namespace UMC_AV1_DECODER
bool anchors_loaded;
uint32_t skip_first_frames;
mfxFrameSurface1** pre_loaded_anchors;
uint32_t framerate_n; // (uint32_t) frame rate numerator
uint32_t framerate_d; // (uint32_t) frame rate denominator

};

class ReportItem // adopted from HEVC/AVC decoders
Expand Down
6 changes: 0 additions & 6 deletions _studio/shared/umc/codec/av1_dec/src/umc_av1_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1145,12 +1145,6 @@ namespace UMC_AV1_DECODER

par.film_grain = sh.film_grain_param_present;

par.framerate_n = sh.timing_info.time_scale;
par.framerate_d = sh.timing_info.num_units_in_display_tick;
if (sh.timing_info.num_units_in_display_tick && sh.timing_info.time_scale)
{
par.info.framerate = sh.timing_info.time_scale / sh.timing_info.num_units_in_display_tick;
}
return UMC::UMC_OK;
}

Expand Down
8 changes: 4 additions & 4 deletions _studio/shared/umc/codec/h264_dec/src/umc_h264_dec_mfx.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2003-2024 Intel Corporation
// Copyright (c) 2003-2019 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 @@ -180,10 +180,10 @@ Status FillVideoParam(const UMC_H264_DECODER::H264SeqParamSet * seq, mfxVideoPar
par->mfx.FrameInfo.FrameRateExtD = seq->vui.num_units_in_tick * 2;
par->mfx.FrameInfo.FrameRateExtN = seq->vui.time_scale;
}
else // If no frame rate info in bitstream, will set to default 30fps
else
{
par->mfx.FrameInfo.FrameRateExtD = 30;
par->mfx.FrameInfo.FrameRateExtN = 1;
par->mfx.FrameInfo.FrameRateExtD = 0;
par->mfx.FrameInfo.FrameRateExtN = 0;
}

par->mfx.CodecProfile = seq->profile_idc;
Expand Down
7 changes: 1 addition & 6 deletions _studio/shared/umc/codec/h265_dec/src/umc_h265_mfx_utils.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2017-2024 Intel Corporation
// Copyright (c) 2017-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 @@ -340,11 +340,6 @@ UMC::Status FillVideoParam(const H265VideoParamSet * vps, const H265SeqParamSet
par->mfx.FrameInfo.FrameRateExtD = seq->getTimingInfo()->vps_num_units_in_tick;
par->mfx.FrameInfo.FrameRateExtN = seq->getTimingInfo()->vps_time_scale;
}
else // If no frame rate info in bitstream, will set to default 30fps
{
par->mfx.FrameInfo.FrameRateExtN = 30;
par->mfx.FrameInfo.FrameRateExtD = 1;
}

par->mfx.CodecProfile = (mfxU16)seq->m_pcPTL.GetGeneralPTL()->profile_idc;
par->mfx.CodecLevel = (mfxU16)seq->m_pcPTL.GetGeneralPTL()->level_idc;
Expand Down
8 changes: 1 addition & 7 deletions _studio/shared/umc/codec/vvc_dec/src/umc_vvc_mfx_utils.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2022-2024 Intel Corporation
// Copyright (c) 2022-2023 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 @@ -121,12 +121,6 @@ namespace UMC_VVC_DECODER
par->mfx.FrameInfo.FrameRateExtD = (mfxU32)(pVps->general_timing_hrd_parameters.num_units_in_tick);
}
}
// If no frame rate info in bitstream, will set to default 30fps
if (!par->mfx.FrameInfo.FrameRateExtN || !par->mfx.FrameInfo.FrameRateExtD)
{
par->mfx.FrameInfo.FrameRateExtN = 30;
par->mfx.FrameInfo.FrameRateExtD = 1;
}

if (pSps->profile_tier_level.general_profile_idc == (VVC_STILL_PICTURE | VVC_MAIN_10))
par->mfx.CodecProfile = MFX_PROFILE_VVC_MAIN10;
Expand Down

0 comments on commit eff7c6f

Please sign in to comment.