Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

VPP NV12 to YV12 Conversion?

Bob_Kirnum
Beginner
678 Views

Can the VPP be used to convert from the decoded NV12 to YV12?  I know it can be used to convert YV12 to NV12 for input to the encoder, this works for me.  I have been attempting to do this for decoding but I always get the unsupported error when calling the VPP Query with the video parameters initialized for this conversion.  Our application expects YV12 frames and I can use the IPP for this conversion but expect the VPP to be more efficient.

My debug output dump of the VPP video parameters before and after the call to VPP Query.  Note that after the error, the FourCC Out value is 0.

     56016: src/VtpXcoderMFX.cpp.4000:AllocFrames: mfxVideoParamVPP: AsyncDepth 4 Protected 0 IOPattern 33( IN_VIDEO OUT_SYSTEM) ExtParam 0x7f53d80ee7e0 NumExtParam 1
     56016: src/VtpXcoderMFX.cpp.4000:AllocFrames: mfxVideoParamVPP: vpp:  In Width 640 Height 480 Crop (0, 0, 640, 480) FourCC NV12 FrameRateExt (30, 2) AspectRatio (1, 1) PicStruct 1 ChromaFormat 1(YUV420)
     56016: src/VtpXcoderMFX.cpp.4000:AllocFrames: mfxVideoParamVPP: vpp: Out Width 640 Height 480 Crop (0, 0, 640, 480) FourCC YV12 FrameRateExt (30, 2) AspectRatio (1, 1) PicStruct 1 ChromaFormat 1(YUV420)


     56020: src/VtpXcoderMFX.cpp.4020:AllocFrames: -3(MFX_ERR_UNSUPPORTED) = m_pmfxVPP->Query(0x7f53d80ee6c0, 0x7f53d80ee6c0) m_bSysmemBetween false


     56020: src/VtpXcoderMFX.cpp.4024:AllocFrames: mfxVideoParamVPP: AsyncDepth 4 Protected 0 IOPattern 33( IN_VIDEO OUT_SYSTEM) ExtParam 0x7f53d80ee7e0 NumExtParam 1
     56020: src/VtpXcoderMFX.cpp.4024:AllocFrames: mfxVideoParamVPP: vpp:  In Width 640 Height 480 Crop (0, 0, 640, 480) FourCC NV12 FrameRateExt (30, 2) AspectRatio (1, 1) PicStruct 1 ChromaFormat 1(YUV420)
     56020: src/VtpXcoderMFX.cpp.4024:AllocFrames: mfxVideoParamVPP: vpp: Out Width 640 Height 480 Crop (0, 0, 640, 480) FourCC      FrameRateExt (30, 2) AspectRatio (1, 1) PicStruct 1 ChromaFormat 1(YUV420)

 

Thanks, Bob.

0 Kudos
5 Replies
koby_s_
Beginner
678 Views

Hi Bob

According to the SDK API reference manual (page 7, table 2) - it is not possible to convert NV12 to YV12.

YV12 is not even mentioned as an output color space in that table.

Maybe I am wrong and I suggest for you to wait for someone from Intel..

Koby

0 Kudos
Bob_Kirnum
Beginner
678 Views

Hey Koby

The encoder and decoder only support NV12 for sure.  The VPP does support YV12 to NV12 conversion.  I use this in my pipeline as input to the encoder.  I would expect that the reverse conversion also be supported but I have had no success.  Hopefully, Intel will respond soon.

Thx Bob

0 Kudos
Harshdeep_B_Intel
678 Views

Hi Bob, 

In general, MediaSDK's default format is NV12. Most of the encoders/decoders only work with NV12, with exception of JPEG/MJPEG. VPP can help with converting to/from other formats in several cases, but software or OpenCL color conversion or IPP may be required if the conversion is not on the VPP's short list ( as koby mentioned above "SDK API reference manual (page 7, table 2)"). In this particular case VPP won't help as it can perform YUV12in/NV12out but not the reverse. Just mentioning this to illustrate the design. 

Thanks, 

0 Kudos
Bob_Kirnum
Beginner
678 Views

Thanks Harsh.  I have the IPP working fine for NV12 to YV12 in the decode direction.  Also have the VPP working fine for YV12 to NV12.  Always love asymmetry,

Bob

0 Kudos
Harshdeep_B_Intel
678 Views

Great Bob, you have things working. So, then we will go ahead and close this thread as resolved. Please feel free to start a new thread if any further questions on the forum. 

Thanks, 

0 Kudos
Reply