Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Employee
40 Views

Contiguous memory allocation for NV12 decode

Jump to solution

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

Accepted Solutions
Highlighted
New Contributor III
40 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.

~Ramashankar

View solution in original post

0 Kudos
1 Reply
Highlighted
New Contributor III
41 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.

~Ramashankar

View solution in original post

0 Kudos