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

📄 vicp_comp.h

📁 vicp做为dm6446上的硬件加速器
💻 H
📖 第 1 页 / 共 5 页
字号:
  Int16  output_type,   /* Int16/byte                            */
  Int16  round_shift,   /* shifting parameter                    */
  Int16  coeff_arrang,  /* 1 - coefficient are stored transposed */
  Int16 *cmdptr);


/* =================================================== */
/*  1-D rowwise linear (block) Transform of data   */
/*      with MxN coefficient matrix A                  */
/*      the horizontal dimension N must be a multiple  */
/*      of 4 => the argument coeff_with must be x4     */     
/* --------------------------------------------------- */
/*   output = data * coeff'                            */
/* =================================================== */

Int16 imxenc_trafo_blk_row(
  Int16 *input_ptr,       /* starting address of input            */
  Int16 *coeff_ptr,       /* starting address of coefficients     */
  Int16 *output_ptr,      /* starting address of output           */
  Int16  input_width,     /* width of the input image             */
  Int16  input_height,    /* height of the input image            */
  Int16  coeff_width,     /* width of the transform coefficients  */
  Int16  coeff_height,    /* height of the transform coefficients */
  Int16  output_width,    /* width of the output image            */
  Int16  output_height,   /* height of the output image           */
  Int16  calc_Hblks,      /* number of horizontal blocks          */
  Int16  compute_height,  /* height of computed array             */
  Int16  input_type,      /* Int16/byte signed/unsigned           */
  Int16  coeff_type,      /* Int16/byte signed/unsigned           */
  Int16  output_type,     /* Int16/byte                           */
  Int16  round_shift,     /* shifting parameter                   */
  Int16 *cmdptr);


/*----- Filtering Functions -----*/

/* ============================================================= */
/*  Filtering - 2-D FIR, 1-D row and column filtering    */
/* ============================================================= */

Int16 imxenc_filter(
  Int16 *input_ptr,      /* starting address of input               */
  Int16 *coeff_ptr,      /* starting address of coefficients        */
  Int16 *output_ptr,     /* starting address of output              */
  Int16  input_width,    /* width/columns of input                  */
  Int16  input_height,   /* height/rows of input                    */
  Int16  coeff_width,    /* width/columns of coefficients           */
  Int16  coeff_height,   /* height/rows of coefficients             */
  Int16  output_width,   /* width/columns of output                 */
  Int16  output_height,  /* height/rows of output                   */
  Int16  compute_width,  /* computation dimension/number of columns */
  Int16  compute_height, /* computation dimension/number of rows    */
  Int16  dnsmpl_horz,    /* horizontal downsampling factor          */
  Int16  dnsmpl_vert,    /* verical downsampling factor             */
  Int16  input_type,     /* Int16/byte, signed/unsigned             */
  Int16  coeff_type,     /* Int16/byte, signed/unsigned             */
  Int16  output_type,    /* Int16/byte                              */
  Int16  round_shift,    /* shifting parameter                      */
  Int16 *cmdptr);


/* =================================================== */
/*  function:     imx_fir_poly_setup_coeff             */
/*  description:  setup the coefficients for the       */
/*                polyphase filter function        */
/*  input:        1D filter with TAPS coefficients     */
/* --------------------------------------------------- */
/*   PREPARATION FUNCTION                              */
/* =================================================== */

Int16 imx_fir_poly_setup_coeff (
  Int16 *src_p,        /* address of 1D filter coefficients    */
  Int16 *dst_p,        /* destination address in iMXCMD memory */
  int    taps,         /* number of filter taps                */
  int    smpl_nom,     /* upsampling factor                    */
  int    smpl_denom,   /* downsampling factor                  */
  Int16  coeff_type);


/* ============================================================== */
/*  1D polyphase filtering along columns                      */
/* -------------------------------------------------------------- */
/* NOTE: The filter coefficients must be stored in a specific way */
/* input data, upsampling by 4     x...x...x...x...x...x...x...   */
/* filter - phase 1                1   5   9   0   0              */
/* filter - phase 2                0   4   8   0   0              */
/* filter - phase 3                0   3   7   0   0              */
/* filter - phase 4                0   2   6   0   0              */
/* filter - phase 5                0   1   5   9   0              */
/* filter - phase 12               0   0   0   2   6              */
/* for subsequent downsampling by 3, the phase count is 12        */
/* the assumed filter length is 9-tap, index by 1...9;
   0 means a 0 value */ 
/* CONSTRAINTS:                                   
   -) input height >= smpl_nom * (compute_height/smpl_denom -1) 
            + smpl_denom + coeff_taps / smpl_nom
   -) compute_width must be multiple of 4 (for speed reasons)
   -) compute_height must be multiple of smpl_nom                 */
/* ============================================================== */

Int16 imxenc_fir_poly_col(
  Int16 *input_ptr,      /* starting address of input               */
  Int16 *coeff_ptr,      /* starting address of coefficients        */
  Int16 *output_ptr,     /* starting address of output              */
  Int16  input_width,    /* width/columns of input                  */
  Int16  input_height,   /* height/rows of input                    */
  Int16  coeff_taps,     /* number of filter coefficients           */
  Int16  output_width,   /* width/columns of output                 */
  Int16  output_height,  /* height/rows of output                   */
  Int16  compute_width,  /* computation dimension/number of columns */
  Int16  compute_height, /* computation dimension/number of rows    */
  Int16  smpl_nom,       /* nominator for fractional vertical
                            sampling factor (upsampling)     */
  Int16  smpl_denom,     /* denominator for fractional vertical 
                            sampling factor (downsampling) */
  Int16  input_type,     /* Int16/byte, signed/unsigned             */
  Int16  coeff_type,     /* Int16/byte, signed/unsigned             */
  Int16  output_type,    /* Int16/byte                              */
  Int16  round_shift,    /* shifting parameter                      */
  Int16 *cmdptr);


/*----- YCbCr Formatting Functions -----*/



/* ======================================================================== */
/* imxenc_YcbCrPack -Packing YCbCr color data stored in separate components */
/*           into a single image with 16bit per color pixel     */
/*                  (YcbCr 4:2:2 format)                                    */
/* ======================================================================== */

Int16 imxenc_YCbCrPack(
  Int16 **input_ptr,     /* starting address of input                   */
  Int16 *coeff_ptr,      /* pointer to single scalar used for scaling   */
  Int16 *output_ptr,     /* pointer to packed output image              */
  Int16  input_width,    /* width of the input image                    */
  Int16  input_height,   /* height of the input image                   */
  Int16  output_width,   /* width of the output image                   */
  Int16  output_height,  /* width of the output image                   */
  Int16  calc_width,     /* computed width in output image              */
  Int16  calc_height,    /* computed height in output image             */
  Int16  colorspace,     /* input YCbCr 4:4:4 - 0, 4:2:2 - 1, 4:2:0 - 2 */
  Int16  round_shift,    /* shifting parameter                          */
  Int16 *cmdptr); 

Int16 imxenc_tlu(
   Int16 *data_ptr,             /* point to input data array          */
   Int16 *table_base,           /* point to lookup table              */
   Int16 *output_ptr,           /* point to output array              */
   Int16 input_width,           /* width of input data array          */
   Int16 input_height,          /* height of input data array         */
   Int16 table_size,            /* number of entries in the table     */
   Int16 no_lut_horiz,          /* number of tables horizontally      */
   Int16 no_lut_vert,           /* number of tables vertically        */
   Int16 output_width,          /* width of output data array         */
   Int16 output_height,         /* height of output data array        */
   Int16 compute_width,         /* width of actual output             */
   Int16 compute_height,        /* height of actual output            */
   Int16 input_type,            /* Int16/byte, signed/unsigned        */
   Int16 table_type,            /* Int16/byte, signed/unsigned        */
   Int16 output_type,           /* output written as Int16/byte       */ 
   Int16 round_shift,           /* rounding right shift before lookup */
   Int16 *cmdptr);

Int16 imxenc_tlu_cfa(
  Int16 *data_ptr,          /* point to input data array          */
  Int16 *table_base,            /* point to lookup table              */
  Int16 *output_ptr,            /* point to output array              */
  Int16  input_width,           /* width of input data array          */
  Int16  input_height,          /* height of input data array         */
  Int16  table_size,            /* number of entries in the table     */
  Int16  cfaphase,              /* phase of CFA Bayer pattern         */
  Int16  output_width,          /* width of output data array         */
  Int16  output_height,         /* height of output data array        */
  Int16  compute_width,         /* width of actual output             */
  Int16  compute_height,        /* height of actual output            */
  Int16  input_type,            /* Int16/byte, signed/unsigned        */
  Int16  table_type,            /* Int16/byte, signed/unsigned        */
  Int16  output_type,           /* output written as Int16/byte       */ 
  Int16  round_shift,       /* rounding right shift before lookup */
  Int16 *cmdptr);


/*----- Color Space Conversion -----*/
Int16 imxenc_color_spc_conv(
  Int16 *input_ptr,         /* point to input data               */
  Int16 *coeff_ptr,         /* point to coef array               */
  Int16 *output_ptr,        /* point to output array             */
  Int16  input_width,       /* width of input                    */
  Int16  input_height,      /* height of input                   */
  Int16  input_depth,       /* number of input color planes      */
  Int16  output_width,      /* width of output                   */
  Int16  output_height,     /* height of output                  */
  Int16  output_depth,      /* number of output color planes     */
  Int16  compute_width,     /* num pixels processed horizontally */
  Int16  compute_height,    /* num pixels processed vertically   */
  Int16  input_step_color,  /* offset between input colors       */
  Int16  input_step_row,    /* offset between input rows         */
  Int16  output_step_color, /* offset between outp colors        */
  Int16  output_step_row,   /* offset between outp rows          */
  Int16  input_type,        /* Int16/byte signed/unsigned        */
  Int16  coeff_type,        /* Int16/byte signed/unsigned        */
  Int16  output_type,       /* Int16/byte                        */
  Int16  round_shift,       /* shifting parameter                */
  Int16 *cmdptr);

/* Piece wise linear function */
Int16 imxenc_pcWiseLinear(
              Int16 *input,
              Int16 *output, 
              Int16 input_width,
              Int16 input_height,
              Int16 output_width,
              Int16 output_height,
              Int16 compute_width,
              Int16 compute_height,
              Int16 nbPts, /* must be >1 */
              Int16 *xpts, /* must be in ascending order */
              Int16 *ypts,
              Int16 Qshift,
              Int16 input_type,
              Int16 output_type,
              Int16 *scratch1,/*can be in img buffer or iMX coeff,
                      should be output_width*output_height
                     */
                          Int16 *scratch2, /* output_width*output_height+
                                              2*nbPts*/
              
              Int16 *cmdPtr);

Int16 imxenc_sum_array_op(
    Int16 *target_ptr,       /* point to target array */
    Int16 *ref_ptr,          /* point to reference array */
    Int16 *output_ptr,       /* point to output array */
    Int16 *interim_ptr,      /* point to intermediate result array */
    Int16 block_width,       /* width of matching block */
    Int16 block_height,      /* height of matching block */
    Int16 target_width,      /* width of target array */
    Int16 target_height,     /* height of target array */
    Int16 ref_width,         /* width of refernece array */
    Int16 ref_height,        /* height of refernece array */
    Int16 step_horz,         /* horizontal offset between matchings */
    Int16 step_vert,         /* vertical offset between matchings */
    Int16 nsteps_horz,       /* number of steps horizontally */
    Int16 nsteps_vert,       /* number of steps vertically */
    Int16 target_type,       /* Int16/byte, signed/unsigned */
    Int16 ref_type,          /* Int16/byte, signed/unsigned */
    Int16 output_type,       /* Int16/byte */
    Int16 round_shift,       /* number of bits to downshift before output */
    Int16 data_inter,    /* 1 --> yes, 0 --> no                       */
    Int16 coef_inter ,
    Int16 out_inter ,
    Int16 data_msb ,
    Int16 coef_msb ,
    Int16 out_msb ,
    Int16 operation ,
    Int16 *cmdptr);

Int16 imxenc_array_minmax(

⌨️ 快捷键说明

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