Were you able to get sequential JPEG to work? I have been unable to JPEG
encode an image at 5MP - I simply run out of memory.


I have been able to convert a 5MP image from bayer to YUV using the IPIPE.

This is the routine I use to set the structure before I call the ioctls:

setparms(&pIpipeParam, width, height);

ret = ioctl(fd_ipipe, IPIPE_SET_PARAM,pIpipeParam);
if (ret < 0) {
printf("IPIPE_SET_PARAM fail\n");
return 0;
}

/* There is a note that I read somewhere that suggested there was
supposed to be a delay between the SET_PARAM and the START ioctls, but I
can't find any example
* code that tells me what that delay should be.... or why there needs to
be one.
*/

if ((ret = ioctl(fd_ipipe, IPIPE_START, &convert)) < 0){
printf("IPIPE_START fail in IPIPE_process ret = %d\n", ret);
return 0;
}

This sets the structures:

/*
* Set some standard parameters for the IPIPE
* This process needs to know the width & height
*/

static void setparms(struct ipipe_params *pIpipeParam, int width, int
height) {

/* Setting up the ipipe for images less than 1344 pixels is fairly straight
* forward. This routine detects images larger than that boundary and splits
* the processed width by 1/2.
*/

pIpipeParam->ipipeif_param.hnum = width;
pIpipeParam->ipipeif_param.vnum = height;
pIpipeParam->ipipeif_param.glob_hor_size = width + 8;
pIpipeParam->ipipeif_param.glob_ver_size = height + 10;
pIpipeParam->ipipeif_param.adofs = ((width * 2 + 31)&(~31));

pIpipeParam->ipipeif_param.data_shift = BITS11_0;

pIpipeParam->prefilter.pre_en = DISABLE;
pIpipeParam->false_color_suppresion.fcs_en = DISABLE;
pIpipeParam->edge_enhancer.yee_emf = DISABLE;
pIpipeParam->rgb2yuv.yuv_adj_ctr = 0x20;
pIpipeParam->rgb2yuv.yuv_adj_brt = 0;

if (width > 1344)
pIpipeParam->ipipe_hsz = (width>>1)+32 - 1;
else
pIpipeParam->ipipe_hsz = width - 1;

pIpipeParam->ipipe_vsz = height - 1;

if (width == 1280) {
pIpipeParam->ipipe_vst = 1;
pIpipeParam->ipipe_hst = 1;
} else {
pIpipeParam->ipipe_vst = 0;
pIpipeParam->ipipe_hst = 0;
}

pIpipeParam->wb.wb2_dgn = 256;
pIpipeParam->wb.wb2_wg_r = 128;
pIpipeParam->wb.wb2_wg_gr = 128;
pIpipeParam->wb.wb2_wg_gb = 128;
pIpipeParam->wb.wb2_wg_b = 128;

pIpipeParam->rsz_rsc_param[0].rsz_i_hst = 0;
pIpipeParam->rsz_rsc_param[0].rsz_o_hst = 0;
pIpipeParam->rsz_rsc_param[0].rsz_h_phs = 0;

if (width > 1344)
pIpipeParam->rsz_rsc_param[0].rsz_o_hsz = (width>>1)+32-1;
else
pIpipeParam->rsz_rsc_param[0].rsz_o_hsz = width - 1 ;

pIpipeParam->rsz_rsc_param[0].rsz_h_dif = 256; // (width* 256 /width );
pIpipeParam->rsz_rsc_param[0].rsz_v_dif = 256; // ((height )* 256 / height);
pIpipeParam->rsz_rsc_param[0].rsz_o_vsz = height - 1 ;

pIpipeParam->ext_mem_param[0].rsz_sdr_oft = ((width * 2+ 31)&(~31));
pIpipeParam->ext_mem_param[0].rsz_sdr_ptr_e = height;

#if 0
pIpipeParam->ipipe_dpaths_fmt = RAW2RAW; //YUV2YUV;
pIpipeParam->ipipe_dpaths_bypass = RAW_MODE_ON;
#else
pIpipeParam->ipipe_dpaths_fmt = RAW2YUV;
pIpipeParam->ipipe_dpaths_bypass = RAW_MODE_OFF;
#endif
}


pavelhan wrote:
> Hello everyone!
> Now I need to use the jpeg codec on dm355 to get a full resolution
> jpeg file from micron MT9P031(5M pixels),
> The dm355 ipipe can only process 1344 per line once,so I must split
> the raw image to get serveral blocks whose
> line count is below 1344 lines,but I can't get it work:I can't get a
> correct jpeg file from my operration.
> So I want to know if I want to ipipethesplitblockonDM355,which
> registers should be updated after each
> operation?Is there some example code to do it?
> My sdk version is 1.30,is there anyone can help me?
> Thank you very much!
> 2008-08-27
> ------------------------------------------------------------------------
> Pavel Han
> Oplinx Co.,Ltd
> Address:Hanggang Fuchun BusinessMansion 2116# Futian, Shenzhen 518041,PRC
> Tel: (086)0755-88359865
> Website:www.oplinx.com.cn
> E-mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Davinci-linux-open-source mailing list
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
>   
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to