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

📄 amf_scalersmoothed_ds_render.asm

📁 ADI SHARC DSP 音频算法标准模块库
💻 ASM
字号:
// Copyright(c) 2005 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/2.5.0/SHARC/Source/AMF_ScalerSmoothed_DS_Render.asm#3 $ 
// Part of : VisualAudio V2.5.0 
// Updated : $Date: 2006/10/12 $ by $Author: Fernando $




//    Module Name     : AMF_ScalerSmoothed_DS_Render.asm 
//    DSP Processor   : ADSP21161
//    Original Author : Mark A Wilson    
//    Date               : 4/21/03
//====================================================================================
// Processor resources used:
//  34 words pmem INTERNAL
// 312 cycles, tickSize=128 (56 + 2*tickSize)
//====================================================================================
// Revision History:
//    4/21/2003 Mark Wilson    Created
//    7/15/2003 Tim Stilson    Optimized


#if 1

#include "processor.h"
#include "AMF_ScalerSmoothed_DS.h"
#include "asm_macros.h"
#include "asm_sprt.h"

.global    _AMF_ScalerSmoothed_DS_Render;            ;

.segment /pm SEG_MOD_FAST_CODE        ; 
_AMF_ScalerSmoothed_DS_Render:

//====================================================================================

    puts=mode1;                            
    r0=i0; puts=r0;
    r0=i1; puts=r0;
    puts=r13;
                    
//------------------------------------------------------------------------------------
    i1=r8;                                //i1->*buffers
    
    i0=dm(0,i1);                        //i0=float *in
    i4=dm(1,i1);                        //i4=float *out

    i1=r4;                                //i1->testModuleInstance[0]

    f4=dm(AMF_ScalerSmoothed_DS_AmpsSmoothing,i1);    // f4/s4 = float AmpsSmoothing = instance->ampsSmoothing 
    s4=f4;
    f1=dm(AMF_ScalerSmoothed_DS_Amp,i1);        // f1 = instance->Amp[0]
    s1=dm(AMF_ScalerSmoothed_DS_Amp+1,i1);        // s1 = instance->Amp[1]
    f8=dm(AMF_ScalerSmoothed_DS_AmpTarget,i1);        // i1= &instance->ampTarget[0]
    s8=dm(AMF_ScalerSmoothed_DS_AmpTarget+1,i1);        // i1= &instance->ampTarget[1]
    
    bit set mode1 PEYEN;                // Enable PEy:SIMD
    m4=2;

    f2=1.0;                                // f2/s2 = 1.0
    f2=f2-f4;                            // f2/s2=(1-r)
    f13=f8*f4;                            // f13/s13 = target*r
    f8=f1*f2,     f4=dm(i0,m4);            // f8/s8   = cur*(1-r), read first input

    LCNTR=r12, DO AMF_ScalerSmoothed_DS_Render_loop_end UNTIL LCE;
        f0=f1*f4,  f1=f8+f13,    f4=dm(i0,m4);                // f0=in*cur,  f1=cur=cur*(1-r)+t*r, read next in
AMF_ScalerSmoothed_DS_Render_loop_end: 
        f8=f1*f2,     dm(i4,m4)=f0;                            // f8=cur*(1-r) for next iter, write out

    bit clr mode1 PEYEN;    // Disable PEy : SIMD
    nop;
    
    dm(AMF_ScalerSmoothed_DS_Amp,i1)=f1;        // f1 = instance->amp[0]
    dm(AMF_ScalerSmoothed_DS_Amp+1,i1)=s1;        // s1 = instance->amp[1]

//====================================================================================
AMF_ScalerSmoothed_DS_Render_epilogue:

    r13=gets(1);
    i1=gets(2);
    i0=gets(3);
    mode1=gets(4);
    alter(4);

//------------------------------------------------------------------------------------
_AMF_ScalerSmoothed_DS_Render.END:
    leaf_exit; // C-rth requires this instead of rts
//------------------------------------------------------------------------------------
.endseg;
#endif    

⌨️ 快捷键说明

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