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

📄 img_mad_8x8.h64

📁 TMS320C64x Image/Video Processing Library (V1.04)
💻 H64
📖 第 1 页 / 共 2 页
字号:
;* ======================================================================== *;
;*  TEXAS INSTRUMENTS, INC.                                                 *;
;*                                                                          *;
;*  IMGLIB  DSP Image/Video Processing Library                              *;
;*                                                                          *;
;*      Release:        Revision 1.04b                                      *;
;*      CVS Revision:   1.16    Sun Sep 29 02:31:01 2002 (UTC)              *;
;*      Snapshot date:  23-Oct-2003                                         *;
;*                                                                          *;
;*  This library contains proprietary intellectual property of Texas        *;
;*  Instruments, Inc.  The library and its source code are protected by     *;
;*  various copyrights, and portions may also be protected by patents or    *;
;*  other legal protections.                                                *;
;*                                                                          *;
;*  This software is licensed for use with Texas Instruments TMS320         *;
;*  family DSPs.  This license was provided to you prior to installing      *;
;*  the software.  You may review this license by consulting the file       *;
;*  TI_license.PDF which accompanies the files in this library.             *;
;* ------------------------------------------------------------------------ *;
;*          Copyright (C) 2003 Texas Instruments, Incorporated.             *;
;*                          All Rights Reserved.                            *;
;* ======================================================================== *;
;* ======================================================================== *;
;*  Assembler compatibility shim for assembling 4.30 and later code on      *;
;*  tools prior to 4.30.                                                    *;
;* ======================================================================== *;
;* ======================================================================== *;
;*  End of assembler compatibility shim.                                    *;
;* ======================================================================== *;
* ========================================================================= *
*                                                                           *
*   TEXAS INSTRUMENTS, INC.                                                 *
*                                                                           *
*   NAME                                                                    *
*       IMG_mad_8x8 : Minimum absolute Difference                           *
*                                                                           *
*   REVISION DATE                                                           *
*       15-Aug-2001                                                         *
*                                                                           *
*   USAGE                                                                   *
*                                                                           *
*       This routine is C-callable and can be called as:                    *
*                                                                           *
*       void IMG_mad_8x8                                                    *
*       (                                                                   *
*           const unsigned char *ref_data,  /* Ref. image to search */      *
*           const unsigned char *src_data,  /* Source 8x8 block     */      *
*           int                 pitch,      /* Width of ref image   */      *
*           int sx, int sy,                 /* Search window size   */      *
*           unsigned int        *match      /* Result               */      *
*       );                                                                  *
*                                                                           *
*       The reference image is an image of width 'pitch'.  The IMG_mad_8x8  *
*       routine searches a (sx,sy) window within the image.                 *
*                                                                           *
*       The source image is an 8x8 block of pixels which contain the        *
*       image block that is being searched for.                             *
*                                                                           *
*       The match[] array is where the best match location and MAD value    *
*       for the best match are stored.  The best match position and its     *
*       absolute difference are returned in match, packed as follows:       *
*                                                                           *
*                      31             16 15             0                   *
*                      +----------------+----------------+                  *
*           match[0]:  |    X offset    |    Y offset    |                  *
*                      +----------------+----------------+                  *
*                                                                           *
*                      31                               0                   *
*                      +---------------------------------+                  *
*           match[1]:  |   Sum of absolute differences   |                  *
*                      +---------------------------------+                  *
*                                                                           *
*   DESCRIPTION                                                             *
*       This routine locates the position in a reference image which        *
*       most closely matches an 8x8 block from a source image, using        *
*       the Minimum Absolute Difference metric.  Searches over a range      *
*       that is 'sx' pixels wide and 'sy' pixels tall within a reference    *
*       image that is 'pitch' pixels wide.                                  *
*                                                                           *
*       The search is performed in top-to-bottom, left-to-right order,      *
*       with the earliest match taking precedence in the case of ties.      *
*                                                                           *
*       The match location as well as the Minimum Absolute Difference       *
*       metric for the match are returned in the 'match' array.             *
*       The first element contains the packed horizontal and vertical       *
*       coordinates of the match, with the X coordinate in the upper        *
*       halfword and the Y coordinate in the lower halfword.  The           *
*       second element contains the MAD value for this match location.      *
*                                                                           *
*   TECHNIQUES                                                              *
*       The inner loops that perform the 8x8 mads are completely            *
*       unrolled and the outer two loops are collpaesd together. In         *
*       addition all source image data is pre-loaded into registers.        *
*                                                                           *
*       The data required for any one row is brought in using               *
*       non-aligned loads. SUBABS4 and DOTPU4 are used together to do       *
*       the MAD computation.                                                *
*                                                                           *
*       To save instructions and fit within an 8 cycle loop, the            *
*       precise location of a given match is not stored.  Rather,           *

⌨️ 快捷键说明

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