?? testim.c
字號:
/*******************************************************************************
Copyright(c) 2000 - 2002 Analog Devices. All Rights Reserved.
Developed by Joint Development Software Application Team, IPDC, Bangalore, India
for Blackfin DSPs ( Micro Signal Architecture 1.0 specification).
By using this module you agree to the terms of the Analog Devices License
Agreement for DSP Software.
********************************************************************************
******************************************************************************/
#include <stdio.h>
#include <math.h>
#include "scale_up_by2.h"
#define INSIZE 65536
#define OUT_SIZE 65536*4
segment ("data1") unsigned char PtrInput[INSIZE];
segment ("data1") unsigned char PtrOutput[OUT_SIZE];
FILE *ptr, *ptr1;
main (void)
{
short row, col;
short max, min, m;
short nBins=10;
int i, nTotalPixel;
ptr = fopen("baboon256.dat", "rb");
if(ptr == NULL)
{
printf("unable to open ptr\n");
}
ptr1 = fopen("scale_Baoon.dat", "wb");
if(ptr1 == NULL)
{
printf("unable to open ptr1\n");
}
row = 256;
col = 256;
nTotalPixel = row * col;
fread(PtrInput,sizeof(char),nTotalPixel,ptr);
_scale_up_by2(PtrInput,row,col,coeff,PtrOutput);
nTotalPixel = row * col*4;
fwrite(PtrOutput,sizeof(char),nTotalPixel,ptr1);
fclose(ptr1);
fclose(ptr);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -