Skip to content

Commit

Permalink
[SampleVPP] Revert sample vpp.
Browse files Browse the repository at this point in the history
Revert sample vpp in a7d9be8.

Signed-off-by: Zhang, Wenjuan <[email protected]>
  • Loading branch information
JaneZhang8 committed Nov 25, 2022
1 parent 0c0ad0d commit 6938efe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions samples/sample_vpp/src/sample_vpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,8 @@ int main(int argc, msdk_char *argv[])

// In-place conversion check - I420 and YV12+D3D11 should be converted in reader and processed as NV12
bool shouldConvert = false;
if ((Params.ImpLib & 0x0f00) == MFX_IMPL_VIA_D3D11 && realFrameInfoIn[i].FourCC == MFX_FOURCC_YV12)
if (realFrameInfoIn[i].FourCC == MFX_FOURCC_I420 ||
((Params.ImpLib & 0x0f00) == MFX_IMPL_VIA_D3D11 && realFrameInfoIn[i].FourCC == MFX_FOURCC_YV12))
{
realFrameInfoIn[i].FourCC = MFX_FOURCC_YV12;
shouldConvert = true;
Expand All @@ -449,7 +450,8 @@ int main(int argc, msdk_char *argv[])
{
// D3D11 does not support I420 and YV12 surfaces. So file reader will convert them into nv12.
// It may be slower than using vpp
if ((Params.ImpLib & 0x0f00) == MFX_IMPL_VIA_D3D11 && Params.fccSource == MFX_FOURCC_YV12)
if (Params.fccSource == MFX_FOURCC_I420 ||
((Params.ImpLib & 0x0f00) == MFX_IMPL_VIA_D3D11 && Params.fccSource == MFX_FOURCC_YV12))
{
msdk_printf(MSDK_STRING("[WARNING] D3D11 does not support YV12 and I420 surfaces. Input will be converted to NV12 by file reader.\n"));
Params.inFrameInfo[0].FourCC = MFX_FOURCC_NV12;
Expand Down

0 comments on commit 6938efe

Please sign in to comment.