Community
cancel
Showing results for 
Search instead for 
Did you mean: 
alex78
New Contributor I
95 Views

32 byte memory alignment in mfxBitstream

Jump to solution

Hi all,

I am currently getting familiar with the decoding sample of the Intel Media SDK (so sorry for the newbie question), while investigating the code, one question came up:

The documentation says in the description of mfxBitstream structure that the "data" member is a "32-bytes aligned pointer". Now, in the decoding sample code (sample_utils.cpp) the data member is allocated simply by

 pBitstream->Data = new mfxU8[nSize];

which AFAIK will not guarantee the alignment. So, could anybody please explain to me the 32-bytes alignment requirements - especially for passing encoded data blocks to the decoder?

Thanks

Alex 

0 Kudos
1 Solution
95 Views

Hi,

The documentation says in the description of mfxBitstream structure that the "data" member is a "32-bytes aligned pointer".-> Yes, it is but the pointer variable is unsigned char mfxU8. The pointer is a variable and it is pointing to a 32-byte aligned data.That does not mean pointer itself is 32-byte. Please refer tho the documentation. Hope this helps

Thanks,

View solution in original post

3 Replies
96 Views

Hi,

The documentation says in the description of mfxBitstream structure that the "data" member is a "32-bytes aligned pointer".-> Yes, it is but the pointer variable is unsigned char mfxU8. The pointer is a variable and it is pointing to a 32-byte aligned data.That does not mean pointer itself is 32-byte. Please refer tho the documentation. Hope this helps

Thanks,

View solution in original post

alex78
New Contributor I
95 Views

Hi,

thanks. It seems that I've misunderstood the "32-bytes aligned pointer". I really thought that the pointer itself must be aligned, i.e. the block of memory it is pointing to must start at a special (32-bytes aligned) memory location.

Alex

95 Views

Hi,

Glad to help.

Thanks,

Reply