Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
48 Views

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 ?

0 Kudos
2 Replies
Highlighted
48 Views

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))

 

 

0 Kudos
Highlighted
Beginner
48 Views

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

Thanks a lot for very valuable answer.

0 Kudos