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

📄 scale_h2_h.h64

📁 基于DM642平台的视频缩小放大功能 程序源代码
💻 H64
字号:
* ========================================================================= *
*   NAME                                                                    *
*       scale_h2 -- Horizontal scaling by 2                                 *
*                                                                           *
*   USAGE                                                                   *
*       This routine has the following C prototype:                         *
*                                                                           *
*       void scale_h2_cn(                                                   *
*                            const unsigned char *restrict inp,             *
*                            int   cols,                                    *
*                            unsigned char *restrict outp                   *
*                        )                                                  *
*                                                                           *
*                                                                           *
*       The scale_h2 function accepts an input array "inp" that contains    *
*       "cols" contiguous pixels and produces an output array "outp" of     *
*       "cols/2" pixels. Simple averaging and rounding are performed.       *
*       This step may also be viewed as simple bi-linear interpolation.     *
*                                                                           *
*   DESCRIPTION                                                             *
*       The following C code model shows the behaviour of the code.         *
*                                                                           *
*       void scale_h2_cn(                                                   *
*                          const unsigned char *restrict inp,               *
*                          int   cols,                                      *
*                          unsigned char *restrict outp                     *
*                        )                                                  *
*        {                                                                  *
*            int i;                                                         *
*                                                                           *
*            for( i = 0; i < (cols >> 1); i++)                              *
*            {                                                              *
*                outp[i] = (inp[2*i] + inp[(2*i)+1] + 1) >> 1;              *
*            }                                                              *
*        }                                                                  *
*                                                                           *
*      Every two consecutive pixels of the input image are averaged to      *
*      form an output pixel.                                                *
*                                                                           *
*   TECHNIQUES                                                              *
*      This code can be used to process either one line, or an arbitrary    *
*      number of lines as long as they are contiguous in memory.            *
*                                                                           *
*   ASSUMPTIONS                                                             *
*      The input array is aligned on a double-word boundary. The output     *
*      array is aligned on a double word boundary. The number of input      *
*      pixels is a multiple of 32.                                          *
*                                                                           *
*   NOTES                                                                   *
*     None                                                                  *
*                                                                           *
*   SOURCE                                                                  *
*     None                                                                  *
*                                                                           *
*   MEMORY NOTE                                                             *
*      No bank conflcits should occurr irrespective of the alignemt of      *
*      the arrays in memory.                                                *
*                                                                           *
*   INTERRUPT NOTE                                                          *
*      This code is interrupt tolerant though not interruptible.            *
*                                                                           *
*   CYCLES                                                                  *
*      (5*cols)/32 - 5                                                      *
*                                                                           *
*   cols = 640,  cycles = 95.                                               *
*                                                                           *
* ------------------------------------------------------------------------- *
*             Copyright (c) 2002 Texas Instruments, Incorporated.           *
*                            All Rights Reserved.                           *
* ========================================================================= *

      .global   _scale_h2_asm

* ========================================================================= *
*   End of file:  scale_h2_h.h64                                            *
* ------------------------------------------------------------------------- *
*             Copyright (c) 2001 Texas Instruments, Incorporated.           *
*                            All Rights Reserved.                           *
* ========================================================================= *


⌨️ 快捷键说明

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