DSP imlib C64x+ CCS4工程文件 测试函数 sobel 测试图像 lena 灰度图512*512
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 317 2012-01-05 10:32 IMG_soble_lena.ccsproject
文件 8333 2012-01-05 15:06 IMG_soble_lena.cdtbuild
文件 677 2012-01-05 10:32 IMG_soble_lena.cdtproject
文件 594 2012-01-05 10:32 IMG_soble_lena.project
文件 640 2012-01-05 14:45 IMG_soble_lena.settingsorg.eclipse.cdt.managedbuilder.core.prefs
文件 81 2012-01-05 15:22 IMG_soble_lenaDebugccsObjs.opt
文件 28 2012-01-05 15:22 IMG_soble_lenaDebugccsSrcs.opt
文件 17029 2012-01-05 15:23 IMG_soble_lenaDebugIMG_soble_lena.map
文件 422647 2012-01-05 15:23 IMG_soble_lenaDebugIMG_soble_lena.out
文件 15485 2012-01-05 15:22 IMG_soble_lenaDebugmain.obj
文件 835 2012-01-05 15:23 IMG_soble_lenaDebugmain.pp
文件 3074 2012-01-05 15:22 IMG_soble_lenaDebugmakefile
文件 267 2012-01-05 15:22 IMG_soble_lenaDebugobjects.mk
文件 1637 2012-01-05 15:22 IMG_soble_lenaDebugsources.mk
文件 1702 2012-01-05 15:22 IMG_soble_lenaDebugsubdir.mk
文件 264710 2012-01-05 15:22 IMG_soble_lenaDebug est_dat.obj
文件 59 2012-01-05 15:23 IMG_soble_lenaDebug est_dat.pp
文件 279202 2011-12-07 17:47 IMG_soble_lenaimglib2.l64P
文件 280610 2011-12-07 17:47 IMG_soble_lenaimglib2_cn.l64P
文件 2889 2012-01-05 14:57 IMG_soble_lenakernel_test.cmd
文件 4229 2012-01-05 14:44 IMG_soble_lenamain.c
文件 9543604 2011-12-07 17:47 IMG_soble_lena
ts64plus.lib
文件 968550 2011-12-21 11:39 IMG_soble_lena est_dat.c
目录 0 2012-01-05 16:55 IMG_soble_lena.settings
目录 0 2012-01-05 16:55 IMG_soble_lenaDebug
目录 0 2012-01-05 16:55 IMG_soble_lena
----------- --------- ---------- ----- ----
11817199 26
#include
#include
#define BOUNDARY 0
#define ROWS 512
#define ROWS1 514
#define COLS 512
#define COLS1 514
#define STEP 514
#define STEP1 512
#define BUFSIZE1 512*512
#define BUFSIZE2 514*3
#define BUFSIZE3 514*514
extern unsigned char in_buffer[];
unsigned char in_buffer1[BUFSIZE3]; /*ADD boundary*/
unsigned char out_buffer[BUFSIZE1];
unsigned char in[BUFSIZE2];
unsigned char out[COLS1];
extern void IMG_sobel_3x3_8(const unsigned char *in_data unsigned char *out_data short cols short rows);
void cpy_img_to_kernel(unsigned char *in_datunsigned char *out_dat int num);
void add_boundary(unsigned char *in_dat unsigned char *out_dat int or_rows int or_cols);
void add_result(unsigned char *str_in unsigned char *str_out int num);
main()
{
clock_t startoverheadstoptt_boundaryt_initialize;
int i;
unsigned char *str_in*str_out*str_i*str_o;
start=clock();
stop=clock();
overhead=stop-start;
//====================================Initialize======================================//
start=clock();
printf(“Initialize out_buffer[];
“);
for(i=0;i out_buffer[i]=0;
printf(“Initialize in[];
“);
for(i=0;i in[i]=0;
printf(“Initialize in[];
“);
for(i=0;i out[i]=0;
stop=clock();
t_initialize=stop-start-overhead;
printf(“Initialize finished! the time is %d
“t_initialize);
//==================================ADD BOUNDARY=======================================//
start=clock();
add_boundary(in_buffer in_buffer1 ROWS COLS);
stop=clock();
t_boundary = stop - start - overhead;
printf(“Add boundary fininsed! the time is %d
“t_boundary);
printf(“======Ininalize fininshed====
“);
str_in=in_buffer1;
str_out=out_buffer;
str_i=in;
str_o=out;
printf(“Begin processing!
“);
//============================================Sobel=======================================///
start=clock();
for(i=0;i {
cpy_img_to_kernel(str_in str_i BUFSIZE2);
str_in+=STEP;
str_o=out;
IMG_sobel_3x3_8(str_i str_o COLS ROWS);
str_o = out;
str_out = out_buffer + i*STEP1;
add_result(str_o str_out COLS);
// for(j=0;j // {
// *str_out++=*(str_o+1);
// str_o++;
//
// }
// str_out=out_buffer;
// str_out+=(i+1)*STEP1;
}
stop=clock();
t=stop-start-overhead;
printf(“Processed time = %d
“t);
}
/*==============================================================
* add_boundary
* ==============================================================*/
void add_boundary(unsigned char *in_dat unsigned char *out_dat int or_rows int or_cols)
{
int ijkl;
int cols;
cols=or_cols+2;
/*========Add the first row===========*/
for(i=0;i {
*out_dat++=BOUNDARY;
}
/*=======Add the begin and end of eve
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 317 2012-01-05 10:32 IMG_soble_lena.ccsproject
文件 8333 2012-01-05 15:06 IMG_soble_lena.cdtbuild
文件 677 2012-01-05 10:32 IMG_soble_lena.cdtproject
文件 594 2012-01-05 10:32 IMG_soble_lena.project
文件 640 2012-01-05 14:45 IMG_soble_lena.settingsorg.eclipse.cdt.managedbuilder.core.prefs
文件 81 2012-01-05 15:22 IMG_soble_lenaDebugccsObjs.opt
文件 28 2012-01-05 15:22 IMG_soble_lenaDebugccsSrcs.opt
文件 17029 2012-01-05 15:23 IMG_soble_lenaDebugIMG_soble_lena.map
文件 422647 2012-01-05 15:23 IMG_soble_lenaDebugIMG_soble_lena.out
文件 15485 2012-01-05 15:22 IMG_soble_lenaDebugmain.obj
文件 835 2012-01-05 15:23 IMG_soble_lenaDebugmain.pp
文件 3074 2012-01-05 15:22 IMG_soble_lenaDebugmakefile
文件 267 2012-01-05 15:22 IMG_soble_lenaDebugob
文件 1637 2012-01-05 15:22 IMG_soble_lenaDebugsources.mk
文件 1702 2012-01-05 15:22 IMG_soble_lenaDebugsubdir.mk
文件 264710 2012-01-05 15:22 IMG_soble_lenaDebug est_dat.obj
文件 59 2012-01-05 15:23 IMG_soble_lenaDebug est_dat.pp
文件 279202 2011-12-07 17:47 IMG_soble_lenaimglib2.l64P
文件 280610 2011-12-07 17:47 IMG_soble_lenaimglib2_cn.l64P
文件 2889 2012-01-05 14:57 IMG_soble_lenakernel_test.cmd
文件 4229 2012-01-05 14:44 IMG_soble_lenamain.c
文件 9543604 2011-12-07 17:47 IMG_soble_lena
ts64plus.lib
文件 968550 2011-12-21 11:39 IMG_soble_lena est_dat.c
目录 0 2012-01-05 16:55 IMG_soble_lena.settings
目录 0 2012-01-05 16:55 IMG_soble_lenaDebug
目录 0 2012-01-05 16:55 IMG_soble_lena
----------- --------- ---------- ----- ----
11817199 26
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)