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

📄 vicp_comp.h

📁 vicp做为dm6446上的硬件加速器
💻 H
📖 第 1 页 / 共 5 页
字号:
  Int16  input2_height,  /* height/rows of 2nd input      */
  Int16  output_width,   /* width/columns of output       */
  Int16  output_height,  /* height/rows of output         */
  Int16  compute_width,  /* computation width             */ 
  Int16  compute_height, /* computation height            */
  Int16  input1_type,    /* Int16/byte signed/unsigned    */
  Int16  input2_type,    /* Int16/byte signed/unsigned    */
  Int16  output_type,    /* Int16/byte                    */
  Int16  round_shift,    /* Shifting parameter            */
  Int16  operation,      /* Chip Dependent                */
  Int16 *cmdptr);

/* ==================================================================== */
/* Array-Scalar Operation, add/subtract/multiply/absdiff array and scalar */
/* ==================================================================== */
Int16 imxenc_array_scalar_op(
  Int16 *input1_ptr,     /* starting address of 1st input */
  Int16 *input2_ptr,     /* starting address of 2nd input */
  Int16 *output_ptr,     /* starting address of output    */
  Int16  input1_width,   /* width/columns of 1st input    */
  Int16  input1_height,  /* height/rows of 1st input      */
  Int16  input2_width,   /* width of 2nd input, 1 or 2    */ 
  Int16  input2_height,  /* height of 2nd input, 1 or 2   */
  Int16  output_width,   /* width/columns of output       */
  Int16  output_height,  /* height/rows of output         */
  Int16  compute_width,  /* computation width             */ 
  Int16  compute_height, /* computation height            */
  Int16  input1_type,    /* Int16/byte signed/unsigned    */
  Int16  input2_type,    /* Int16/byte signed/unsigned    */
  Int16  output_type,    /* Int16/byte                    */
  Int16  round_shift,    /* Shifting parameter            */
  Int16  operation,      /* Chip-dependent                */
  Int16 *cmdptr);

/* ================================================ */
/*  Matrix multiplication               */
/* ================================================ */

Int16 imxenc_mat_mul(
  Int16 *input1_ptr,    /* starting address of 1st input   */
  Int16 *input2_ptr,    /* starting address of 2nd input   */
  Int16 *output_ptr,    /* starting address of output      */
  Int16  input1_width,  /* width/columns of 1st input      */
  Int16  input1_height, /* height/rows of 1st input        */
  Int16  input2_width,  /* width/columns of 2nd input      */
  Int16  input2_height, /* height/rows of 2nd input        */
  Int16  output_width,  /* width/columns of output         */
  Int16  output_height, /* height/rows of output           */
  Int16  mat1_width,    /* computation width of 1st input  */
  Int16  mat1_height,   /* computation height of 1st input */
  Int16  mat2_width,    /* computation width of 2nd input  */
  Int16  mat2_height,   /* computation height of 2nd input */
  Int16  input1_type,   /* Int16/byte signed/unsigned      */
  Int16  input2_type,   /* Int16/byte signed/unsigned      */
  Int16  output_type,   /* Int16/byte                      */
  Int16  round_shift,   /* shifting parameter              */
  Int16 *cmdptr);


Int16 imxenc_rotate(
  Int16 *input_ptr,      /* starting address of input                              */
  Int16 *coeff_ptr,      /* pointer to single scalar used for scaling              */
  Int16 *output_ptr,     /* starting address of output                             */
  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,  /* height of the output image                             */
  Int16  compute_width,  /* computed width in output image                         */
  Int16  compute_height, /* computed height in output image                        */
  Int16  input_type,     /* Int16/byte signed/unsigned                             */
  Int16  coeff_type,     /* Int16/byte signed/unsigned                             */
  Int16  output_type,    /* Int16/byte                                             */
  Int16  angle,          /* angle of rotation: only 90/180/270 degree is supported */
  Int16  round_shift,    /* shifting parameter                                     */
  Int16 *cmdptr);


Int16 imxenc_shift(
  Int16 *input_ptr,      /* starting address of input  */
  Int16 *coeff_ptr,      /* 2 coefficients             */
  Int16 *output_ptr,     /* starting address of output */
  Int16  input_width,    /* width of the input array   */
  Int16  input_height,   /* height of the input array  */
  Int16  shift,          /* round shift                */
  Int16 *cmdptr);

/* ==================================================================== */
/* Array Summation, sum up element of 1-D/2-D array, with scaling       */
/* ==================================================================== */

Int16 imxenc_sum(
  Int16 *input_ptr,      /* starting address of array input        */
  Int16 *scaler_ptr,     /* starting address of scaler, normally 1 */
  Int16 *output_ptr,     /* starting address of output             */
  Int16  input_width,    /* width/columns of array input           */
  Int16  input_height,   /* height/rows of array input             */
  Int16  compute_width,  /* computation width                      */ 
  Int16  compute_height, /* computation height                     */
  Int16  input_type,     /* Int16/byte signed/unsigned             */
  Int16  scaler_type,    /* Int16/byte signed/unsigned             */
  Int16  output_type,    /* Int16/byte                             */
  Int16  round_shift,    /* Shifting parameter                     */
  Int16  sum_mode,       /* chip dependent                         */
  Int16 *cmdptr);

/* ==================================================================== */
/*    Array Summation with absolute difference                  */
/* ==================================================================== */

Int16 imxenc_sum_abs_diff(
  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 *zero_ptr,          /* point to a Int16 zero word                */
  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 *cmdptr);

/* =================================================== */
/*         matrix transpose                        */
/*   transposition is not that efficient on iMX but    */
/*   is needed to implement certain algorithms         */
/* =================================================== */

Int16 imxenc_transpose(
  Int16 *input_ptr,       /* starting address of input                 */
  Int16 *coeff_ptr,       /* pointer to single scalar used for scaling */
  Int16 *output_ptr,      /* starting address of output                */
  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,   /* height of the output image                */
  Int16  compute_width,   /* computed width in output image            */
  Int16  compute_height,  /* computed height in output image           */
  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);


void imx_cfa_hq_setup(Int16 *cfacoeff,
                          Int16 filterIdentifier,
                          Int16 phase,
                          Int16 qShift);

Int16 
imxenc_cfa_hq_interpolation (
  Int16 *input_p,         /* Starting address of input              */
  Int16 *coeff_p,         /* Starting address of coefficient array  */
  Int16 *outputr_p,       /* Starting address of red output         */
  Int16 *outputg_p,       /* Starting address of green output       */
  Int16 *outputb_p,       /* Starting address of blue output        */
  Int16  input_width,     /* Width of input buffer                  */
  Int16  input_height,    /* Height of input buffer                 */
  Int16  coeff_width,     /* Width of coefficient array             */
  Int16  coeff_height,    /* Height of coefficient array            */
  Int16  output_width,    /* Width of output buffers                */
  Int16  output_height,   /* Height of output buffers               */
  Int16  compute_width,   /* Computation width                      */
  Int16  compute_height,  /* Computation height                     */
  Int16  input_type,      /* Int16/Byte, Signed/Unsigned            */
  Int16  coeff_type,      /* Int16/Byte, Signed/Unsigned            */
  Int16  output_type,     /* Int16/Byte, Signed/Unsigned            */
  Int16  rnd_shift,       /* Shift parameter                        */
  Int16 *cmdptr);

Int16 imxenc_sum_cfa(
  Int16 *input_ptr,       /* starting address of array input        */
  Int16 *scaler_ptr,      /* starting address of scaler, normally 1 */
  Int16 *output_ptr,      /* starting address of output             */
  Int16  input_width,     /* width/columns of array input           */
  Int16  input_height,    /* height/rows of array input             */
  Int16  compute_width,   /* computation width                      */ 
  Int16  compute_height,  /* computation height                     */
  Int16  input_type,      /* Int16/byte signed/unsigned             */
  Int16  scaler_type,     /* Int16/byte signed/unsigned             */
  Int16  output_type,     /* Int16/byte                             */
  Int16  round_shift,     /* Shifting parameter                     */
  Int16 *cmdptr);


/*----- Block Transform Functions -----*/

/* ================================================ */
/*  1-D Column DCT on 8x8 blocks of data        */
/*      with 8x8 coefficient matrix                 */
/* ================================================ */

Int16 imxenc_dct8x8col(
  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  output_width,  /* width of the output image        */
  Int16  output_height, /* height of the output image       */
  Int16  calc_Hblks,    /* number of horizontal blocks      */
  Int16  calc_Vblks,    /* number of vertical blocks        */
  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);


/* ================================================ */
/*  1-D Row DCT on 8x8 blcoks of data           */
/*      with 8x8 coefficient matrix                 */
/* ================================================ */
Int16 imxenc_dct8x8row(
  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  output_width,  /* width of the output image        */
  Int16  output_height, /* height of the output image       */
  Int16  calc_Hblks,    /* number of horizontal blocks      */
  Int16  calc_Vblks,    /* number of vertical blocks        */
  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);

/* =================================================== */
/*  1-D columnwise linear (block) Transform of data*/
/*      with MxN coefficient matrix                    */
/* --------------------------------------------------- */
/*   output = coeff * data                             */
/* =================================================== */

Int16 imxenc_trafo_blk_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 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  compute_width,    /* computation width           */
  Int16  calc_Vblks,    /* number of vertical blocks             */
  Int16  input_type,    /* Int16/byte signed/unsigned            */
  Int16  coeff_type,    /* Int16/byte signed/unsigned            */

⌨️ 快捷键说明

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