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

📄 amf_agcnmultiplier_s_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_AGCNMultiplier_S_Render.asm#3 $ 
// Part of : VisualAudio V2.5.0 
// Updated : $Date: 2006/10/12 $ by $Author: Fernando $




//    Module Name     : AMF_AGCNMultiplier_S_Render.asm 
//    DSP Processor   : ADSP21161
//    Original Author : Mark A Wilson    
//    Date               : 5/29/03
//====================================================================================
// Processor resources used for AMF_AGCNMultiplier_S_Render.asm:
//    37 words pmem INTERNAL
//   51 + 393*outputPinCount cycles (new API), tickSize=128
//   (51 + outputCount*(9 + 3*tickSize))
//
//    Revision history:
//
//      05/29/03  Mark Wilson           Created
//      07/03/03  Tim Stilson           verified outputPinCount > 1
//      07/03/03  Tim Stilson           Optimized
//      08/15/03  Tim Stilson           Optimized
//
//====================================================================================
//#ifdef _MODULE_OPTIMIZED
#if 1

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

.global    _AMF_AGCNMultiplier_S_Render;            

.segment /pm SEG_MOD_FAST_CODE    ; 
//.segment /pm seg_pmco;
_AMF_AGCNMultiplier_S_Render:

//====================================================================================
//AMF_AGCNMultiplier_S_Render_prologue:
    entry;    
                            
//module entry arguments passed in registers: 
//  r4  = instance    (AMF_SmoothScaler * restrict)
//  r8  = * buffers (float * restrict)
//  r12 = int tickSize

//push call preserve regs to stack here once stack call params are retrieved
    
    puts=mode1;
    R0=I0; puts=R0;
    R0=I1; puts=R0;
    R0=I2; puts=R0;
    R0=I3; puts=R0;
    
//------------------------------------------------------------------------------------
AMF_AGCNMultiplier_S_Render_setup:

    i4=r4;                                            //i4->testModuleInstance[0]
    r4=dm(AMF_AGCNMultiplier_S_inputPinCount,i4);        //r3=instance->b.inputPinCount

    i1=r8;                                            //i1->buffers
    r2=r4-1, i13=dm(m5,i1);                            //r2=inputPinCount-1, i13=*inMul=buffers[0]
    
    if LE Jump AMF_AGCNMultiplier_S_Render_epilogue; 
    //NEVER load the LCNTR with zero or negative number

    i3=r8;
    modify(i3,m6);                                   //i3->buffer[1]
    
    m4=2;

    r1=r8+r2;
    i4=r1;        
    modify(i4,m6);                                    //i1->buffer[inputPinCount+1]


    
AMF_AGCNMultiplier_S_Render_loop1_start:
    //for (k=1; k<inputPinCount; k++)
    LCNTR=r2, DO AMF_AGCNMultiplier_S_Render_loop1_end UNTIL LCE;
        i1=i13;                        // reset mono input ptr
        r1=dm(i3,m6);
        i2=r1;                        //i2 = (*i3++) = stereoin ptr
        r1=dm(i4,m6);                
        bit set mode1 BDCST1 | PEYEN;
        i0=r1;                        //i0 = (*i4++) = stereoout ptr
//out = buffers[k + inputPinCount - 1]

            f1=dm(i1,m6);                //r1=inMul[i++]
        LCNTR=r12, DO AMF_AGCNMultiplier_S_Render_loop11_end UNTIL LCE;
            f8=dm(i2,m4);                //r8=stereoInL/R
            f8=f1*f8,    f1=dm(i1,m6);    //f8=inMul*stereoInL/R, f1=next inMul
AMF_AGCNMultiplier_S_Render_loop11_end:     
            dm(i0,m4)=f8;                //outL/R=f8

AMF_AGCNMultiplier_S_Render_loop1_end: 
        bit clr mode1 BDCST1 | PEYEN;
           
//====================================================================================
AMF_AGCNMultiplier_S_Render_epilogue:

    I3=gets(1);
    I2=gets(2);
    I1=gets(3);
    I0=gets(4);
    mode1=gets(5);
    alter(5);
    
//------------------------------------------------------------------------------------
_AMF_AGCNMultiplier_S_Render.END:
    leaf_exit; // C-rth requires this instead of rts
//------------------------------------------------------------------------------------
.endseg;
#endif    

⌨️ 快捷键说明

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