Rule about NV12 stride value ?

Rule about NV12 stride value ?

Say we have a dump of NV12 raw video stream whose width and height are known, but not the stride value. 

Given the image dump originated from Intel Media library, what would be an algorithm (simple one, presumably) that could be used to make the right guess as to what the stride value for given width/height might be ?

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

For NV12, the pitch is simply the 'width' of the surface.  Actual storage in a file can depend on how the application writes a file.  The Intel Meida SDK Library does not actually write to file, but the sample and tutorial applications do.  The 'width' of surfaces that hold NV12 data are a multiple of 32. 

#define ALIGN32(X) (((mfxU32)((X)+31)) & (~ (mfxU32)31))

 

 

-Tony

>> The 'width' of surfaces that hold NV12 data are a multiple of 32.

Thanks a lot for very valuable answer.

Leave a Comment

Please sign in to add a comment. Not a member? Join today