Hi,
Am using DM6446 board. Here my objective is to convert YUV422 interleaved to YUV422 Semi-Planar as my algorithm is expecting the data to be in YUV422 Semi-Planar.
I modified the "De-Interlacing and YUV 4:2:2 to 4:2:0 Conversion on TMS320DM6446 Using the Resizer" example code to convert it into YUV422 Semi-Planar and it works fine as expected for 720x480.
But this version of example code is for NTSC(720x480), where as i need to work with PAL (720x576).
===========================================================
imageWidth = 720;
/* params for Y, U, V component */
params[0].in_vsize = 244;
params[0].in_hsize = 1414;
params[0].out_hsize = 704;
params[0].out_vsize = 480;
params[0].out_pitch = 704;
params[0].in_pitch = imageWidth*4; //1440*2
/* for u and v */
params[1].in_vsize = 244;
params[1].in_hsize = 1414; // for u and v
params[1].out_hsize = 704;
params[1].out_vsize = 480;
params[1].out_pitch = 704;
params[1].in_pitch = imageWidth*4; //1440*2
for ( i = 0; i < RESIZE_NUM; i++ )
{
params[i].inptyp = RSZ_INTYPE_PLANAR_8BIT;
params[i].pix_fmt = RSZ_PIX_FMT_PLANAR;
params[i].yenh_params.type = RSZ_YENH_DISABLE;
params[i].cbilin = 0;
params[i].vert_starting_pixel = 0;
params[i].horz_starting_pixel = 0;
params[i].hstph = 0;
params[i].vstph = 0;
params[i].yenh_params.gain = 0x7f;
params[i].yenh_params.slop = 0x7f;
params[i].yenh_params.core = 0;
}
/* luma hor filter */
for( i = 0; i < 32; i+=4 )
{
params[0].hfilt_coeffs[i] = 0;
params[0].hfilt_coeffs[i+1] = 256; // 256
params[0].hfilt_coeffs[i+2] = 0;
params[0].hfilt_coeffs[i+3] = 0;
}
/* Chroma hor filter */
for( i = 0; i < 32; i+=8 )
{
params[1].hfilt_coeffs[i] = 256; // 256
params[1].hfilt_coeffs[i+1] = 0;
params[1].hfilt_coeffs[i+2] = 0;
params[1].hfilt_coeffs[i+3] = 0;
params[1].hfilt_coeffs[i+4] = 0;
params[1].hfilt_coeffs[i+5] = 0;
params[1].hfilt_coeffs[i+6] = 0;
}
/* luma ver filter */
for( i = 0; i < 32; i+=4 )
{
params[0].vfilt_coeffs[i] = 0;
params[0].vfilt_coeffs[i+1] = 0;
params[0].vfilt_coeffs[i+2] = 0;
params[0].vfilt_coeffs[i+3] = 0;
}
i=0;
params[0].vfilt_coeffs[i] = 0;
params[0].vfilt_coeffs[i+1] = 256; // 256
params[0].vfilt_coeffs[i+2] = 0;
params[0].vfilt_coeffs[i+3] = 0;
i = 16;
params[0].vfilt_coeffs[i] = -32;
params[0].vfilt_coeffs[i+1] = 160;
params[0].vfilt_coeffs[i+2] = 160;
params[0].vfilt_coeffs[i+3] = -32;
for ( j = 1; j < RESIZE_NUM; j++ )
{
for( i = 0; i < 32; i+=4 )
{
params[j].vfilt_coeffs[i] = 256;
params[j].vfilt_coeffs[i+1] = 0;
params[j].vfilt_coeffs[i+2] = 0;
params[j].vfilt_coeffs[i+3] = 0;
}
}
resize[0].out_buf.size = resizedImgRes;
resize[1].out_buf.size = resizedImgRes;
for ( i = 0; i < RESIZE_NUM; i++ )
{
resize[i].in_buf.index = -1;
resize[i].out_buf.index = 0;
resize[i].in_buf.size = imageSize<<1;
resize[i].in_buf.offset = inBufPhyAddr;
}
===========================================================
Can anyone please help me in setting these params for PAL resolution 720x576. I tried "calccoef" utility, not much useful.
Thanks,
Nandish