twlift_bior_7_9_jpeg2000.c

来自「基于ADI公司的Blackfin处理器的JPEG2000编解码库的源代码。」· C语言 代码 · 共 55 行

C
55
字号
/*******************************************************************************
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   : twlift_bior_7_9_JPEG2000.c
Description : This module tests wlift_bior_7_9_JPEG2000().
*******************************************************************************/
#include <stdio.h>
#include "testinp.h"  /*Input test file generated using Matlab*/
#include "testout.h"  /*Output file generated using Matlab*/
/*Test a 1-D Wavelet 7.9 based lifting scheme*/

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

void _wlift_bior_7_9_JPEG2000();

main()
{
    int i,N;

    f1 = _wlift_bior_7_9_JPEG2000;

//Test case : 1

    N = 256;  //Number of input samples to be lifted. Must be even

    for(i=0;i<256;i++)
        im[i] = input[i];

    cycle_count[0] = Compute_Cycle_Count(im,N);
                          //This function inturn calls wlift_bior_7_9_JPEG2000()

    for(i=0;i<N;i++)
    {
        if(abs(im[i] - output[i]) > MAX_PERMISSIBLE_ERROR) 
        {
            error_flag = error_flag | 1;
            break;
        }
    }
    #ifdef PRINTF_SUPPORT
        if(error_flag & 1)
            printf("Test Case 1 failed\n");
        else
            printf("Test Case 1 passed\n");
    #endif
}

⌨️ 快捷键说明

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