AnsweredAssumed Answered

How to allocate IPU output buffer?

Question asked by Tarek El-Sherbiny on Oct 29, 2012
Latest reply on May 13, 2014 by Yann Tinaugus
Branched to a new discussion

mxc_ipu_lib_task_init() is suppose to allocate IPU output memory because the pointer passed in is null.

 

(gdb) print pIpuInfo->ipu_handle

$6 = {inbuf_start = {0x0, 0x0, 0x0}, ovbuf_start = {0x0, 0x0}, ovbuf_alpha_start = {0x0, 0x0}, outbuf_start = {0x0, 0x0, 0x0}, ifr_size = 0,

   ovfr_size = 0, ovfr_alpha_size = 0, ofr_size = 0, priv = 0x0}

 

After calling the init function the pointer is still pointing to 0x0 which is resulting in segmentation fault after decoding the first frame and attempting to memcpy from decoder buffer to IPU buffer.

 

FB_RENDER_MEMCPY(pIpuInfo->YUV[0],pY,ySize);

 

Do I need to make the following call myself?

 

mxc_ipu_lib_task_control(IPU_CTL_ALLOC_MEM, (void *)(&mem), NULL);

 

 

For reference I have printed the reset of the parameters passed to mxc_ipu_lib_task_init():

 

(gdb) print pIpuInfo->sInParam

$8 = {width = 320, height = 256, fmt = 808596553, motion_sel = MED_MOTION, input_crop_win = {pos = {x = 0, y = 0}, win_w = 320, win_h = 256},   user_def_paddr = {0, 0, 0}}

 

(gdb) print pIpuInfo->sOutParam

$9 = {width = 240, height = 320, fmt = 1346520914, rot = 0, user_def_paddr = {0, 0, 0}, show_to_fb = 1, fb_disp = {pos = {x = 0, y = 0}, fb_num = 1},   output_win = {pos = {x = 0, y = 0}, win_w = 320, win_h = 256}}

 

(gdb) print mode

$10 = 16

 

Thanks

 

Outcomes