Skip to content

[Av1e/lib] Enable ARGB #356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ class IDDI
virtual void ResetState(const FeatureBlocks& blocks, TPushRS Push) override = 0;

virtual mfxStatus SetDDIID(const mfxU16 bitDepth
, const mfxU16 chromFormat
, const mfxU32 fourCC
, const mfxU16 targetChromaForamt) = 0;
, const mfxU16 chromFormat) = 0;
};

} //Base
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ using namespace AV1EHW;
using namespace AV1EHW::Base;
using namespace AV1EHW::Linux::Base;

mfxStatus DDI_VA::SetDDIID(const mfxU16 bitDepth, const mfxU16 chromFormat, const mfxU32 /*fourCC*/, const mfxU16/* targetChromaFormat*/)
mfxStatus DDI_VA::SetDDIID(const mfxU16 bitDepth, const mfxU16 chromFormat)
{
MFX_CHECK(!m_vaid, MFX_ERR_NONE);

Expand Down Expand Up @@ -114,19 +114,17 @@ void DDI_VA::Query1NoCaps(const FeatureBlocks& /*blocks*/, TPushQ1 Push)

m_hw = Glob::VideoCore::Get(strg).GetHWType();
const mfxU16 bitDepth = m_pDefaults->base.GetBitDepthLuma(*m_pDefaults);
const mfxU16 chromaFormat = par.mfx.FrameInfo.ChromaFormat;
const mfxU32 fourCC = par.mfx.FrameInfo.FourCC;
const mfxU16 profile = par.mfx.CodecProfile;
const mfxExtCodingOption3* pCO3 = ExtBuffer::Get(m_pDefaults->mvp);
mfxU16 targetChromaFormat = MFX_CHROMAFORMAT_YUV420;
mfxU16 targetChromaFormat = m_pDefaults->base.GetTargetChromaFormatPlus1(*m_pDefaults) - 1;;

SetIf(targetChromaFormat, profile == MFX_PROFILE_AV1_HIGH, MFX_CHROMAFORMAT_YUV444);
if (pCO3)
{
SetIf(targetChromaFormat, !pCO3->TargetChromaFormatPlus1, pCO3->TargetChromaFormatPlus1 - 1);
}

MFX_SAFE_CALL(SetDDIID(bitDepth, chromaFormat, fourCC, targetChromaFormat));
MFX_SAFE_CALL(SetDDIID(bitDepth, targetChromaFormat));

return MFX_ERR_NONE;
});
Expand Down Expand Up @@ -398,6 +396,7 @@ mfxStatus DDI_VA::QueryCaps()
MFX_CHECK_STS(sts);

m_caps.ChromaSupportFlags.fields.i420 = !!(AV(VAConfigAttribRTFormat) & VA_RT_FORMAT_YUV420);
m_caps.ChromaSupportFlags.fields.RGB = !!(AV(VAConfigAttribRTFormat) & VA_RT_FORMAT_RGB32);

m_caps.BitDepthSupportFlags.fields.eight_bits = !!(AV(VAConfigAttribRTFormat) & VA_RT_FORMAT_YUV420);
m_caps.BitDepthSupportFlags.fields.ten_bits = !!(AV(VAConfigAttribRTFormat) & VA_RT_FORMAT_YUV420_10BPP);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ class DDI_VA
virtual void SetDefaults(const FeatureBlocks& blocks, TPushSD Push) override;

virtual mfxStatus SetDDIID(const mfxU16 bitDepth
, const mfxU16 chromFormat
, const mfxU32 fourCC
, const mfxU16 targetChromaFormat) override;
, const mfxU16 chromFormat) override;

mfxStatus CreateVABuffers(
const std::list<DDIExecParam>& par
Expand Down