Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools from Intel. This includes Intel® oneAPI Video Processing Library and Intel® Media SDK.

Contiguous memory allocation for NV12 decode

Mingyu_K_Intel
Employee
272 Views

Hi,

 

We are using media sdk for decoding the video stream into NV12. We found that sometimes Y and UV planes are contiguous and sometimes not.

 

Is there an option to set the output layout whether to prevent gap between Y plane and UV plane?

Or was it just a coincidence to have a contiguous layout?

 

Thanks,

Mingyu

0 Kudos
1 Solution
Ramashankar
New Contributor III
272 Views

gap between Y plane and UV plane?

you mean to say that UV plane is not starting just after ending the Y plane, i.e. UV != Y + width * height ?

If so, then please note that Y plane size will be pitch * height and not width * height. This pitch and width value will be same if width is multiple of 16, else pitch value will be aligned by 16 of width value, which is slightly greater than width.

Please let me know in case i understood your issue incorrectly.

View solution in original post

1 Reply
Ramashankar
New Contributor III
273 Views

gap between Y plane and UV plane?

you mean to say that UV plane is not starting just after ending the Y plane, i.e. UV != Y + width * height ?

If so, then please note that Y plane size will be pitch * height and not width * height. This pitch and width value will be same if width is multiple of 16, else pitch value will be aligned by 16 of width value, which is slightly greater than width.

Please let me know in case i understood your issue incorrectly.

Reply