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

📄 scale_2d_yc_doub_buf.h

📁 基于DM642平台的视频缩小放大功能 程序源代码
💻 H
字号:
/* ========================================================================= */
/*              Copyright (C) 2000 Texas Instruments Incorporated.           */
/*                              All Rights Reserved                          */
/* ========================================================================= */
/* The code scales 3 planes of y, Cr, Cb data in varying combinations        */
/* NOTES                                                                     */
/* When the phrase "pixels" is used this measn a color pixel, this has       */
/* a color combination of  4:2:2, 4:4:4 or 4:2:0                             */
/* for 4:4:4 there are 3 identical coloe spaces all the same size            */
/* for 4:2:2 there planes are the same height but only half as wide          */
/* for 4:2:0 the planes are 1/2 the width and 1/2 the height                 */
/*                                                                           */
/* The scaler will automatically filter output data only within the display  */
/* if it is larger than the display it will write to the boundary, if smaller*/
/* it will centre the image in the middle.                                   */
/*                                                                           */
/* This function can be applied to R, G, B data also R->Y, G->Cr, B->Cb      */
/* ========================================================================= */
/*              Copyright (C) 2000 Texas Instruments Incorporated.           */
/*                              All Rights Reserved                          */
/* ========================================================================= */


int scale_2d_ycrcb (
  int     format,           /* 4:4:4 == 2, 4:2:2 == 1, 4:2:0 == 0            */

  int     p_h,              /* numerator for horizontal scale factor p/q     */
  int     q_h,              /* denominator for horizontal scale factor p/q   */

  short * hpatch,           /* stride table for horizontal scaling jumps     */
  short * hh,               /* pntr to horz filter bank                      */
  int     l_hh,             /* number of taps in each horz filter            */
  int     n_hh,             /* number of filters in horz filter bank         */

  int     p_v,              /* numerator for vertical scale factor p/q       */
  int     q_v,              /* denominator for vertical scale factor p/q     */

  short * vpatch,           /* stride table for vertical scaling jumps       */
  short * hv,               /* pntr to vert filter bank                      */
  int     l_hv,             /* number of taps in each vert filter            */
  int     n_hv,             /* number of filters in vert filter bank         */

  int     in_pic_height,    /* height of picture in Pixels multiple of 2     */
  int     in_pic_width,     /* width  of picture in Pixels multiple of 8     */

  int     display_height,   /* height of picture in Pixels multiple of 2     */
  int     display_width,    /* width  of picture in Pixels multiple of 8     */

  unsigned char * image_y,  /* pntr to input image planar y values           */
  unsigned char * image_cr, /* pntr to input image planar cr values          */
  unsigned char * image_cb, /* pntr to input image planar cb values          */
  void  * scratch_pad,      /* temp space for internal buffers and stores    */
                            /* aligned to a double boundary                  */
  unsigned char * image_rgb); /* pntr to output image, scaled in color         */
/* ========================================================================== */
/*               Copyright (C) 2000 Texas Instruments Incorporated.           */
/*                               All Rights Reserved                          */
/* ========================================================================== */

⌨️ 快捷键说明

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