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

📄 huffinit

📁 TMS320VC55XX图像处理程序
💻
字号:
; TEXAS INSTRUMENTS FRANCE
; Wireless Communication Applications / ASP 
; 
; 
; 
; 
; 
; 
;               ASM Code Module of the jpeinit.asm    
; 
;
; 
; 
; 
; 
; 
;Archives:      \jpenc_p3\code\src\jpeinit.asm
; 
;Filename:      jpeinit.asm 
; 
;Version:       1.0 
;Status :       draft         (X)
;               proposal      ( )
;               accepted      ( )
; 
;AUTHOR         Marc PERESSE
;
;               Application Specific Products - 
;               Wireless Communication Applications
;               BP 5
;               06270 Villeneuve Loubet  
;               FRANCE
;
; 
; UNDER LICENSE AGREEMENT. 
; 
;(C) Copyright 2001. Texas Instruments France. All rights reserved.
;
;
; Change history:
; 
;       VERSION   DATE     /    AUTHORS        COMMENT
;         1.0    23-Feb-01 /    PERESSE        Creation
; 
;
; 1 ABSTRACT
; 
; 1.1 Module Type
; 
;       This module contains two functions used for pointer initialization
;       in order to make the code XDAIS compliant
; 
; 1.2 Functional Description
; 
;       This file contains two subroutines:
; 
;       1) _JPE_TIF_meminit: Initialize pointers. 
;       2) _JPE_TIF_get_address: Returns the memTab base address. 
; 
; 
; 1.3 Compilation Information
; 
;       Compiler:       TMS320C55X  ASSEMBLER
;       Version:        1.80 (PC)
;       Activation:     cl55 -g -as -mg -iC:\jpenc_p3\code\inc -ml jpeinit.asm    
; 
; 
; 1.4 Notes and tricky points
; 

; 3 EXTERNAL RESOURCES
; 
; 3.1 Include Files
 
        .include "fconst.inc"
 
; 3.2 External Data within same module 
 
        .ref  r_y_rdchuff, r_y_rachuff          ; Tables address
        .ref  r_uv_rdchuff, r_uv_rachuff
 

; 5 INTERNAL or EXPORT ROUTINES/FUNCTIONS
; 
; 5.1 Internal Functions within the same module

 
; 5.2 Export Functions for other modules

        .def   _JPE_TIF_meminit, _JPE_TIF_get_address
 


; HeaderBegin
;============================================================================== 
;
;-----------------------------------------------------------------------------
; 6.1 _JPE_TIF_meminit/function 
; 
; 6.1.1 Functional Description
; 
;       It is an Export Function for the module.
;
;       It initialize the pointers to arrays or variables in function
;       of the input base address
; 
;-----------------------------------------------------------------------------
; 
; 6.1.2 Activation
;
;       Activation example:  JPE_TIF_meminit(memTab[0].base, memTab[1].base, memTab[2].base,
;                           memTab[3].base);  

;       Reentrancy:     Yes
;       Recursive :     No
;
; 6.1.3 Inputs
; 
;               Data structure: XAR0/memTab[0].base                   
;               Data format:    23.0
;               Use:            Memory 0 area base adresse.
; 
;
;               Data structure: XAR1/memTab[1].base                   
;               Data format:    23.0
;               Use:            Memory 1 area base adresse.
; 
;
;               Data structure: XAR2/memTab[2].base                   
;               Data format:    23.0
;               Use:            Memory 2 area base adresse.
; 
;
;               Data structure: XAR3/memTab[3].base                   
;               Data format:    23.0
;               Use:            Memory 3 area base adresse.
; 
;
; 6.1.4 Outputs
; 
;               All the pointers                               
; 
; 6.1.5 Special required for data structure
;
;              All the memTab[] base adresses have to be aligned on a long
;              word boundary.
;
; 6.1.6 Entry and output conditions
;
;              This function is C callable which means:
;                - We have to save T2, T3, XAR5, XAR6, XAR7
;                - The status registers have to be in the same
;                  state than before the call (excepted some bits)

;              The function modifies:
;                - AC0, AC3, XDP
;
;
; 6.1.7 Execution
; 
;       Execution time: 32 cycles
;       Call rate:      1 time
; 
; 
;============================================================================== 
;HeaderEnd

       .sect  ".text:jpencoder"

; 6.1.8 Code

*****************       
_JPE_TIF_meminit:
*****************
   .dp  0
   bit(ST1, #ST1_CPL) = #0
   XDP = XAR0		; memTab[0].base
   AC0 = XAR1		; memTab[1].base
   AC1 = XAR2		; memTab[2].base
   AC2 = XAR3		; memTab[3].base
   
   ; Initialization of pointers to arrays
   AC3 = AC0 + #_a_y_qtab
   dbl(@(p_y_qtab)) = AC3
   AC3 = AC0 + #_a_uv_qtab
   dbl(@(p_u_qtab)) = AC3
   dbl(@(p_v_qtab)) = AC3
   @(p_y_rdchuff) = #(r_y_rdchuff & 0xffff)
   @(p_y_rachuff) = #(r_y_rachuff & 0xffff)
   @(p_u_rdchuff) = #(r_uv_rdchuff & 0xffff)
   @(p_u_rachuff) = #(r_uv_rachuff & 0xffff)
   @(p_v_rdchuff) = #(r_uv_rdchuff & 0xffff)
   @(p_v_rachuff) = #(r_uv_rachuff & 0xffff)
 
   AC3 = AC0 + #a_tmp_buff
   dbl(@(p_tmp_buff)) = AC3

   AC3 = AC1 + #a_buffer_in
   dbl(@(p_buffer_in)) = AC3

   AC3 = AC2 + #_a_zigzag
   dbl(@(p_zigzag)) = AC3
  
   AC0 = XDP
   AC3 = AC0 + #d_y_eob
   dbl(@(p_y_eob)) = AC3

   AC3 = AC0 + #d_u_eob
   dbl(@(p_u_eob)) = AC3

   AC3 = AC0 + #d_v_eob
   dbl(@(p_v_eob)) = AC3

   AC3 = AC0 + #C_ZERO
   dbl(@(p_C_ZERO)) = AC3

   bit(ST1, #ST1_CPL) = #1
   return


; HeaderBegin
;============================================================================== 
;
;-----------------------------------------------------------------------------
; 6.2 _JPE_TIF_get_address/function 
; 
; 6.2.1 Functional Description
; 
;       It is an Export Function for the module.
;
;       It returns the memTab base adresses
; 
;-----------------------------------------------------------------------------
; 
; 6.2.2 Activation
;
;       Activation example:  JPE_TIF_get_address((IJPE_Handle)handle, &memTab[1].base, &memTab[2].base,
;                                &memTab[3].base); 

;       Reentrancy:     Yes
;       Recursive :     No
;
; 6.2.3 Inputs
; 
;               Data structure: XAR0/(IJPE_Handle)handle                   
;               Data format:    23.0
;               Use:            Contains the Data Page.
; 
;
;               Data structure: XAR1/&memTab[1].base                   
;               Data format:    23.0
;               Use:            Pointer to memTab[1] base address.
; 
;
;               Data structure: XAR2/&memTab[2].base                   
;               Data format:    23.0
;               Use:            Pointer to memTab[2] base address.
; 
;
;               Data structure: XAR3/&memTab[3].base                   
;               Data format:    23.0
;               Use:            Pointer to memTab[3] base address.
; 
;
; 6.2.4 Outputs
; 
;               Three base address                               
; 
; 6.2.5 Special required for data structure
;
;
; 6.2.6 Entry and output conditions
;
;              This function is C callable which means:
;                - We have to save T2, T3, XAR5, XAR6, XAR7
;                - The status registers have to be in the same
;                  state than before the call (excepted some bits)

;              The function modifies:
;                - AC0, XDP
;
;
; 6.2.7 Execution
; 
;       Execution time: 14 cycles
;       Call rate:      1 time
; 
; 
;============================================================================== 
;HeaderEnd

; 6.2.8 Code
   
;********************
_JPE_TIF_get_address:
;********************

                                                ; Save registers
	push(@ST1_L)||mmap()	
                                                ; INITES
	bit(ST1, #ST1_CPL) = #0		                ; CPL = 0

	XDP = XAR0

 	AC0 = dbl(@(p_y_qtab))		                ; Return address of memTab[1]
 	dbl(*AR1) = AC0
 	
 	AC0 = dbl(@(p_buffer_in)) 		            ; Return address of memTab[2]
 	dbl(*AR2) = AC0
 	
 	AC0 = dbl(@(p_zigzag)) 	                    ; Return address of memTab[3]
 	dbl(*AR3) = AC0
                                                ; Restore registers

	bit(ST1, #ST1_CPL) = #1		                ; CPL = 0
	@ST1_L = pop()||mmap()
	
	return  
   
   

⌨️ 快捷键说明

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