?? close.asm
字號:
/*******************************************************************************
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.
********************************************************************************
Module Name : close.asm
Label name : __close
Version : 1.2
Change History :
Version Date Author Comments
1.2 11/18/2002 Swarnalatha Tested with VDSP++ 3.0
compiler 6.2.2 on
ADSP-21535 Rev.0.2
1.1 11/13/2002 Swarnalatha Tested with VDSP++ 3.0
on ADSP-21535 Rev. 0.2
1.0 06/29/2001 Raghavendra Original
Description : This function performs close operation on input binary
image. This is done by calling dilation function followed by
erosion function Temporary results after calling dilation
function is stored on stack. This temporary result is used as
an input to erosion function and structured elements are
stored as below
| h00 h01 h02 |
| h10 h11 h12 |
| h20 h21 h22 |
Assumption : 1. Number of columns of input image is even AND aligned to
word or half word boundary
2. Input and structured elements are in different banks.
3. Same structured elements are used for both dilation and
erosion operation.
Prototype : void _close (unsigned char* in, int row, int col, short * SE,
unsigned char *out );
in -> Pointer to the input image.
row -> Number of rows in input image.
col -> Number of columns in input image.
SE -> Pointer to 3x3 structured element.
out -> Pointer to the output buffer.
Registers used : R0-R7, P0-P5.
Performance :
Code size : 70 bytes
Cycle count : 1276 cycles for 8x8 image
*******************************************************************************/
.section L1_code;
.global __close;
.align 8;
__close:
[--SP] = (R7:4,P5:3);
// Push R7:4 and P5:3
R3 = R1.L *R2.L(IS)||P5 = [SP+40];
// Row *column and fetch address of SE
P3 = R3; // offset to store temp. result on stack
R7 = R1; // r7 = number of Rows
R6 = R2<<0|| P4 = [SP+44];
// Address of output array
[--SP] = RETS; // store RETS value on stack
SP -= P3; // Decrement stack to store temp. result
R4 = SP;
SP += -20; // decrement stack to store arguments
[SP+12] = P5; // Arguments for dilation function
[SP+16] = R4;
CALL __dilation;
R0 = R4; // Arguments for erosion function
R1 = R7 << 0 || [SP+12] = P5;
R2 = R6 << 0 || [SP+16] = P4;
CALL __erosion;
SP += 20; // Increment stack pointer to proper position
SP = SP + P3;
RETS = [SP++]; // Pop RETS value
(R7:4,P5:3) = [SP++]; // Pop R7:4 and P5:3
RTS;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -