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

📄 rotate_ti_vt.c

📁 TI公司的算法标准 Framework5的源代码
💻 C
字号:
/*
 *  Copyright 2002 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
/* "@(#) RF5_IEK 2.00.02 12-11-02 (swat-c19)" */
/*
 *  ======== rotate_ti_vt.c ========
 *  Definition of ROTATE_TI_IROTATE, the IROTATE function structure the 
 *  defines TI's implementation of the IROTATE interface.  Since IROTATE 
 *  derives from IALG, we also define the symbol ROTATE_TI_IALG, TI's 
 *  implementation of the IALG interface.
 *
 *  We place these tables in a separate file for two reasons:
 *     1. We want allow one to replace these tables with
 *    different definitions.  For example, one may
 *    want to build a system where the ROTATE is activated
 *    once and never deactivated, moved, or freed.
 *
 *     2. Eventually there will be a separate "system build"
 *    tool that builds these tables automatically 
 *    and if it determines that only one implementation
 *    of an API exists, "short circuits" the vtable by
 *    linking calls directly to the algorithm's functions.
 */

#include <std.h>

#include "irotate.h"
#include "rotate_ti.h" 

extern Int  ROTATE_TI_alloc(const IALG_Params *, struct IALG_Fxns **,
                            IALG_MemRec *);
extern Int  ROTATE_TI_free(IALG_Handle, IALG_MemRec *);
extern Int  ROTATE_TI_initObj(IALG_Handle, const IALG_MemRec *, 
                              IALG_Handle, const IALG_Params *);
extern Int  ROTATE_TI_numAlloc(Void);
extern Void ROTATE_TI_apply(IROTATE_Handle handle, unsigned char y[], 
                            unsigned char cr[], unsigned char cb[],
                            Int lumaSize, Int chromaSize, 
                            Short cosine, Short sine);

#define IALGFXNS \
    &ROTATE_TI_IALG,    /* module ID */    \
    NULL,               /* activate */     \
    ROTATE_TI_alloc,    /* algAlloc */     \
    NULL,               /* control */      \
    NULL,               /* deactivate */   \
    ROTATE_TI_free,     /* free */         \
    ROTATE_TI_initObj,  /* init */         \
    NULL,               /* moved */        \
    ROTATE_TI_numAlloc  /* numAlloc */

/*
 *  ======== ROTATE_TI_IROTATE ========
 *  This structure defines TI's implementation of the IROTATE interface
 *  for the ROTATE_TI module.
 */
IROTATE_Fxns ROTATE_TI_IROTATE = {   /* module_vendor_interface */
    IALGFXNS,
    ROTATE_TI_apply
};

/*
 *  ======== ROTATE_TI_IALG ========
 *  This structure defines TI's implementation of the IALG interface
 *  for the ROTATE_TI module.
 */

asm("_ROTATE_TI_IALG .set _ROTATE_TI_IROTATE");

/*
 *  We could have also duplicate the structure here to allow this code to be 
 *  compiled and run non-DSP platforms at the expense of unnecessary data space
 *  consumed by the definition below.
 *
 *  IALG_Fxns ROTATE_TI_IALG = {
 *      IALGFXNS
 *  };
 */


⌨️ 快捷键说明

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