⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 详细说明:用ADI DSP汇编指令编写的全内插函数(包括水平、垂直、交叉内插)
💻 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. 
********************************************************************************
File name   : tr8x8dct.c
Description : This is the test file for the testing of functionality of
              of forward 8x8 DCT.
*******************************************************************************/
#include <stdio.h>
#include <defBF533.h>
//#include "data_init.h"
//#include "data_init_h.h"
//#include "data_init_v.h"
//#include "data_init_hv.h"
//#include "data_init_64x32.h"
//#include "data_init_h_64x32.h"
//#include "data_init_v_64x32.h"
//#include "data_init_hv_64x32.h"
//#include "data_init_80x32.h"
//#include "data_init_h_80x32.h"
//#include "data_init_v_80x32.h"
//#include "data_init_hv_80x32.h"
//#include "data_init_352x416.h"
//#include "data_init_h_352x416.h"
//#include "data_init_v_352x416.h"
//#include "data_init_hv_352x416.h"

int error_flag = 0;
void (*f1)();
int cycle_count[2000];

void _fullinterpolate();

void main (void)
{
    int n_hight,m_width, i, j,x,y,Width,Hight,Stride,rounding,cycles,Stride_Width,stride_add,H,W;
    unsigned char *in_ptr,*h_ptr,*v_ptr,*hv_ptr;

    //in_ptr=&input[0][0];
    //h_ptr=&h_output[0][0];
   // v_ptr=&v_output[0][0];
   // hv_ptr=&hv_output[0][0];
    unsigned long data_in=0xff904000l;
    unsigned long ll_h=0xffb00000l;
    unsigned long ll_v=0xffb00000l+416*3;
    unsigned long ll_hv=0xffb00000l+416*3*2;
     in_ptr=(unsigned char *)data_in;
     h_ptr=(unsigned char *)ll_h;
     v_ptr=(unsigned char *)ll_v;
     hv_ptr=(unsigned char *)ll_hv;
     
     for (i = 0; i < 5; i++)
         {   
            for (j = 0; j < 208; j++)
            {
            	*in_ptr++=2;
                *in_ptr++=3;
            }
         }
    
    f1 = _fullinterpolate;  
    
  
    

    n_hight =3;
    m_width =352;
    Width=352;
    Hight=288;
    Stride=416;
    Stride_Width=Stride-Width;
    stride_add=(n_hight-1)*Stride;
    cycles=0;
    H=Hight/n_hight;
    W=Width/m_width;
	for (y = 0,i=0; y <Hight; y += n_hight,i++) 
	{
		for (x = 0,j=0; x < Width; x += m_width,j++)
		{
		   /*cycle_count[j+i*W] = Compute_Cycle_Count(in_ptr, h_ptr,v_ptr,hv_ptr,m_width,n_hight,Stride);*/
            cycle_count[1] = Compute_Cycle_Count(in_ptr, h_ptr,v_ptr,hv_ptr,m_width,n_hight,Stride);                                                               
	     	in_ptr += m_width;
		//	h_ptr += m_width;
		//	v_ptr += m_width;
		//	hv_ptr += m_width;
		}
		
		  
	  	 printf("cycles=%d\n",cycle_count[1]);
         printf("h_output[368][304]=\n");
         for (i = 0; i < 10; i++)
         {   
            for (j = 0; j < 416; j++)
            printf("%d ",*h_ptr++);
            printf("\n");
         }
         
          //h_ptr += Stride_Width;
		///	v_ptr += Stride_Width;
		//	hv_ptr += Stride_Width;
			in_ptr += Stride_Width;

		//	h_ptr += stride_add;
		//	v_ptr += stride_add;
		//	hv_ptr += stride_add;
			in_ptr += stride_add;
	}
    
   /* for (i = 0; i <H;i++) 
    for (j = 0; j < W;j++)
        cycles+=cycle_count[j+i*W];
                       
   printf("cycles=%d\n",cycles);*/

 /* printf("h_output[368][304]=\n");
    for (i = 0; i < 304; i++)
    {   
        for (j = 0; j < 368; j++)
        printf("%d ",h_output[i][j]);
        printf("\n");
    }
    printf("v_output[368][304]=\n");
     for (i = 0; i < 8; i++)
    {
        for (j = 0; j < 8; j++)
        printf("%d ",v_output[i][j]);
        printf("\n");
    }
    printf("hv_output[368][304]=\n");
     for (i = 0; i < 8; i++)
    {
        for (j = 0; j < 8; j++)
        printf("%d ",hv_output[i][j]);
        printf("\n");
    }*/
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -