📄 amf_demux1xn_render.asm
字号:
// Copyright(c) 2002-2006 Analog Devices, Inc. All Rights Reserved.
// This software is proprietary and confidential to Analog Devices, Inc. and its licensors.
// File : $Id: //depot/Development/VisualAudio/Modules/Packs/MuxDemuxPack/2.5.0/SHARC/Source/AMF_DeMux1xN_Render.asm#2 $
// Part of : VisualAudio MuxDemuxPack V2.0.1
// Updated : $Date: 2006/10/12 $ by $Author: Fernando $
// Module Name : AMF_DeMux1xN_Render.asm
// DSP Processor : ADSP-212xx
// Original Author : kishore
// Date : 08/02/05
//====================================================================================
// Processor resources used:
// cycles = n + m*TickSize (Assuming all on-chip)
//====================================================================================
// Revision History:
// 8/2/05 kishore created
// 12/12/05 stilti reformatted, reassigned registers
#if 1
#include "AudioProcessing.h"
#include "processor.h"
#include "asm_sprt.h"
.import "AMF_DeMux1xN.h"; // for OFFSETOF()
.global _AMF_DeMux1xN_Render;
.type _AMF_DeMux1xN_Render,STT_FUNC;
.segment /pm SEG_MOD_FAST_CODE;
_AMF_DeMux1xN_Render:
//=============================================================================
entry;
puts = mode1;
r2 = i0; puts = r2;
r2 = i1; puts = r2;
r2 = i3; puts = r2;
i0=r4; // instance ptr
i3=r8; // i4->*buffers
r2=dm((OFFSETOF(AMF_DeMux1xN, b) + OFFSETOF(AMF_ModuleVariable, outputPinCount)) ,i0); // out pin
r1=dm(OFFSETOF(AMF_DeMux1xN, Select),i0); // Select pin
r12 = lshift r12 by -1; // ticksize/2 (SIMD in time dimension)
i0=dm(0x0,i3); // i0=float *in
// r4 = outer loop index and offset value for out buffer
r4=0;
LCNTR=r2, DO AMF_DeMux_Outer_loop_end UNTIL LCE;
r0=r4+1; // Calculating the out buffer OFFSET value
m4=r0;
i1=dm(m4,i3); // i1=float *out
r2 = r0-1; // outer loop index
m4 = 2; // SIMD loop increment
comp(r2,r1);
// if it is the selected ouput, copy from input, else clear it
if ne Jump Clear_out;
bit set mode1 PEYEN; // Enable PEy:SIMD
LCNTR=r12, DO AMF_DeMux_loop1_end UNTIL LCE;
f0 = dm(i0,m4);
AMF_DeMux_loop1_end:
dm(i1,m4) = f0;
bit clr mode1 PEYEN; // Disable PEy:SIMD
Jump AMF_DeMux_Outer_loop_end;
// else clear the output
Clear_out:
bit set mode1 PEYEN; // Enable PEy:SIMD
nop;
f0 = 0.0;
LCNTR=r12, DO AMF_DeMux_loop2_end UNTIL LCE;
AMF_DeMux_loop2_end:
dm(i1,m4) = f0;
bit clr mode1 PEYEN; // Disable PEy:SIMD
AMF_DeMux_Outer_loop_end:
r4= r4+1; // outer loop increment
//========================================================================
i3 = gets(1);
i1 = gets(2);
i0 = gets(3);
mode1 = gets(4);
alter(4);
leaf_exit;
_AMF_DeMux1xN_Render.end:
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -