Hi,
I am working on h264 decoder on dm368. The decoder works fine, except one small problem - output buffer alignment. The decoder receives an output buffer with the following alignments (resolution 1920x1080):
for Y - virtp 0x4222d000, physp 84C00000
for UV - virtp 0x4246b000, physp 84E3E000
After successful decoding, the decoded data is aligned as following:
Y - virtp=0x42244418, physp=0x84c17418
UV - virtp=0x42476a18, physp=0x84e49a18
i.e there is an offset from original pointers. I assume this space is used for the decoding process.
But the decoded data now is not 32 byte aligned (0x84c17418 % 32 = 24), so it is not suitable for direct display through OSD VPBE - the image will show 24 pixels from off screen memory on the left.
Currently I am using a simple work around - I add 8 bytes to the output buffers.
for Y - virtp 0x4222d008, physp 84C00008
for UV - virtp 0x4246b008, physp 84E3E008
So decoded data is properly aligned.
Y - virtp=0x42244420, physp=0x84c17420
UV - virtp=0x42476a20, physp=0x84e49a20
I checked a few resolutions and h264 profiles/preset and it seems that the 24 byte offset is pretty consistent. So my question is - will it always be 24 bytes, or it depends on some configuration parameter I missed? Can I rely on my work around in the future?
Thank you