Hi All,
When I use the decode a D1 video on dm365, the output buffer info is as follows:
srcbuf ptr: 441bf000, srcdim linelength: 768, x: 24, y: 48, w:720, h:480 (YUV420SP)
I want to resize it to 1280x800.
dstbuf ptr: 45f24000 , dstdim linelength: 1280, x: 0, y: 0, w:1280, h:800
The YUV420SP format requires to run the resizer twice, so I resize the Y first.
srcOffset = srcDim.y * srcDim.lineLength + (srcDim.x << 0);
dstOffset = dstDim.y * dstDim.lineLength + (dstDim.x << 0);
rsz.in_buff.index = -1;
rsz.in_buff.buf_type = IMP_BUF_IN;
rsz.in_buff.offset = (UInt32) Buffer_getUserPtr(hSrcBuf) + srcOffset;
rsz.in_buff.size = srcDim.width * srcDim.height;
rsz.out_buff1.index = -1;
rsz.out_buff1.buf_type = IMP_BUF_OUT1;
rsz.out_buff1.offset = (UInt32) Buffer_getUserPtr(hDstBuf) + dstOffset;
rsz.out_buff1.size = dstDim.width * dstDim.height;
the final rsz.in_buff.offset = 441C8018 , but
assert((rsz.in_buff.offset & 0x1F) == 0);
assert((rsz.out_buff1.offset & 0x1F) == 0);
so the assert will failed.
The problem is that the srcDim.x srcDim.y is decided by the decoder's output, I can not change it .
So how can I make the rsz.in_buff.offset to meet the address alignment requirements?
Thank you.
Xiaoguang Zhao