Community
cancel
Showing results for 
Search instead for 
Did you mean: 
nick_k_5
Beginner
130 Views

converting BGR frame to NV12 frame

Sorry if similar subject already was here - i trying to find answer but cannot..

I need to encode sequence of BGR frames to h264 stream.
I am using sample_encode Media SDK as example. This example uses as input YUV stream - so it is not my case.

The first. I am trying to use IPP functions: ippiBGRToYCrCb420_8u_AC4P3R(...) for 32 bit BGR or ippiBGRToYCrCb420_8u_C3P3R(..) for 24 bit BGR source frame. SO i obtain 3 planes for YCbCr.

The second - I wrote function which makes interleave of CbCr into single plane to be NV12 compatible. So right now all works.

BUT! Question is how to avoid mixing/interleaving step in my  algorithm?

I was expecting to find IPP function like ippiBGRToYCrCb420_8u_AC4P2R() and ippiBGRToYCrCb420_8u_C3P2R(..) but seem those function do not exist! 

What i am doing wrong? What i am missing? I expected that if HW accepts only NV12 source frame then IPP probably should provide functions to convert from ordinal formats to two-plane NV12.. Now i need to do color conversion in 2 steps, so i expect performance loss during conversion because i need intermediate memory buffer written and read.

 

0 Kudos
3 Replies
Alexey_F_Intel
Employee
130 Views

read https://software.intel.com/sites/default/files/mediasdk-man.pdf page 163 listing colour formats convertions supported in HW.

Jeffrey_M_Intel1
Employee
130 Views

This article explains some ways to match up IPP color conversion functions with color formats supported by VPP.  Perhaps something here is closer to what you need?

https://software.intel.com/en-us/articles/using-unsupported-color-formats-with-the-intel-media-softw...

 

Roman_T_
New Contributor I
130 Views

Hi nick!

In addition to previous posts I can suggest you another one solution of your task.

IPP function ippiBGRToYCrCb420_8u_AC4P2R() exists, but it available in old IPP version (7.1)

So if you will combine the latest  version of Media SDK and IPP 7.1, ippiBGRToYCrCb420_8u_AC4P2R() will be available.

Best regards,
Roman

 

Reply