www.pudn.com > motiotest.rar > scale_v2_c.h


/* ======================================================================== */
/*  NAME                                                                    */
/*      scale_v2 -- Vertical scaling down by 2                              */
/*S                                                                        S*/
/*S AUTHOR                                                                 S*/
/*S     J. Sankaran                                                        S*/
/*S                                                                        S*/
/*S REVISION HISTORY                                                       S*/
/*S     03-Mar-2002 Initial revision of scale_v2 . . . . .  J.Sankaran     S*/
/*                                                                          */
/*  USAGE                                                                   */
/*      This routine has the following C prototype:                         */
/*                                                                          */
/*          void scale_v2                                                   */
/*          (                                                               */
/*              unsigned char *restrict   inp,                              */
/*              int                       pixs,                             */
/*              int                       stride,                           */
/*              int                       lns,                              */
/*              unsigned char *restrict   outp                              */
/*          )                                                               */
/*                                                                          */
/*      The scale_v2 routine accepts an array "inp" of "lns" lines each     */
/*      of "pixs" pixels seperated by "stride" bytes, and produces an       */
/*      output array "outp" of "lns >> 1" and "pixs" pixels.                */
/*                                                                          */
/*  DESCRIPTION                                                             */
/*      The scale_v2 algorithm performs vertical scaling by a factor of     */
/*  "2" by averaging succesive lines as opposed to mere pixel dropping.     */
/*                                                                          */
/*  TECHNIQUES                                                              */
/*      None                                                                */
/*                                                                          */
/*  ASSUMPTIONS                                                             */
/*      'lns' must be a multiple of 2, and can be greater than or equal     */
/*  to 2. The input and output pointers are double word aligned. The        */
/*  number of pixels to process is a multiple of eight, and the number      */
/*  of lines to process are two.                                            */
/*                                                                          */
/*  NOTES                                                                   */
/*                                                                          */
/*  SOURCE                                                                  */
/*     None                                                                 */
/* ------------------------------------------------------------------------ */
/*            Copyright (c) 2002 Texas Instruments, Incorporated.           */
/*                           All Rights Reserved.                           */
/* ======================================================================== */
#ifndef SCALE_V2_C_H_
#define SCALE_V2_C_H_ 1

void scale_v2_cn
(
    unsigned char *restrict   inp,
    int                       pixs,
    int                       stride,
    int                       lns,
    unsigned char *restrict   outp
);

#endif
/* ======================================================================== */
/*  End of file:  scale_v2_c.h                                              */
/* ------------------------------------------------------------------------ */
/*            Copyright (c) 2002 Texas Instruments, Incorporated.           */
/*                           All Rights Reserved.                           */
/* ======================================================================== */