📄 vicp_comp.h
字号:
Int16 input_height,
Int16 output_width,
Int16 output_height,
Int16 compute_width,
Int16 compute_height,
Int16 median_size,
Int16 input_type,
Int16 output_type,
Int16 *cmdptr
);
Int16 imxenc_median_filter_col(
Int16 *input_ptr,
Int16 *output_ptr,
Int16 input_width,
Int16 input_height,
Int16 output_width,
Int16 output_height,
Int16 compute_width,
Int16 compute_height,
Int16 median_size,
Int16 input_type,
Int16 output_type,
Int16 *cmdptr
);
/* ==================================================================== */
/* Array Operations - add, subtract, multiply, absdiff, pack bytes, */
/* AND, OR, mask, nmask, minimum, maximum and */
/* packed-bytes absolute differences on two arrays */
/* ==================================================================== */
Int16 imxenc_array_com_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/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 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 accu, /* IMXACCU_NONE -> no accumulation
IMXACCU_ROW -> accumulate each row
IXMACCU_ALL -> accumulate everything
*/
Int16 round_shift, /* shifting parameter */
Int16 operation, /* (0) -> multiply
(1) -> absdiff
(2) -> add
(3) -> subtract
(4) -> NOT AVAILABLE
(5) -> pack bytes
(6) -> logical AND
(7) -> logical OR
(8) -> mask (c ? d : 0)
(9) -> mask (c ? 0 : d)
(10) -> minimum
(11) -> maximum
(12) -> packed-bytes absolute differences
*/
Int16 sum_mode, /* combination of MACS */
Int16 comb_op, /* operation for combination */
Int16 *cmdptr);
/* ================================================================ */
/* imx_filter_22phase, filter with alternating coefficients
(2 horizontal phases) and producing every other line (2 veritical phases)
compute_width represents total width of computed output
compute_height represents actual number of rows computed
coeff_width represents width EACH phase */
/* ================================================================ */
Int16 imxenc_filter_22phase(
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 round_shift, /* shifting parameter */
Int16 skip_inp_line, /* whether take every other line line */
Int16 *cmdptr);
/* ================================================= */
/* Calculates average value of subsection of block */
/* ================================================= */
Int16 imxenc_blkAverage(
Int16 *input_ptr, /* starting address of current block */
Int16 *zero_ptr, /* points to a Int16 0 */
Int16 *output_ptr, /* address where result will be */
Int16 input_width, /* width (x dimension) of entire block */
Int16 compute_width, /* width of subsection being operated on */
Int16 compute_height, /* height of subsection being operated on */
Int16 shift, /* amount to shift for averaging (could also be calculated) */
Int16 input_type, /* Int16/byte signed/unsigned */
Int16 output_type,
Int16 *cmdptr); /* Int16/byte */
/* ============================================ */
/* Calculates variance of subsection of block */
/* ============================================ */
Int16 imxenc_blkVariance(
Int16 *input_ptr, /* starting address of current block */
Int16 *avg_ptr, /* points to address where average is stored */
Int16 *output_ptr, /* address where result will be */
Int16 input_width, /* width (x dimension) of entire block */
Int16 compute_width, /* width of subsection being operated on */
Int16 compute_height, /* height of subsection being operated on */
Int16 input_type, /* Int16/byte signed/unsigned */
Int16 average_type, /* Int16/byte signed/unsigned */
Int16 output_type, /* Int16/byte */
Int16 *cmdptr);
/* ============================================ */
/* Fill Memory with value */
/* ============================================ */
Int16 imxenc_fillMem(
Int16 *val, /* Pointer to filling value */
Int16 *coef, /* Pointer to coefficient */
Int16 *output_ptr, /* starting address of output */
Int16 byteOfst, /* Offset in number of byte */
Int16 output_width, /* width/columns of output */
Int16 output_height, /* height/rows of output */
Int16 nbHsteps, /* number of horizontal steps */
Int16 nbVsteps, /* number of vertical steps */
Int16 hStepSize, /* horizontal step size */
Int16 vStepSize, /* vertical step size */
Int16 val_type, /* Int16/byte signed/unsigned */
Int16 coef_type, /* Int16/byte signed/unsigned */
Int16 output_type, /* Int16/byte */
/* 0: signed_byte
1: unsigned_byte
2: signed_Int16
3: unsigned_Int16
*/
Int16 round_shift, /* shifting parameter */
Int16 operation, /* (0) -> multiply
(1) -> absdiff
(2) -> add
(3) -> subtract
(4) -> Table lookup? maybe
(5) -> pack bytes
(6) -> logical AND
(7) -> logical OR
(8) -> mask (c ? d : 0)
(9) -> mask (c ? 0 : d)
(10) -> minimum
(11) -> maximum
(12) -> packed-bytes absolute differences
*/
Int16 *cmdptr);
/* =================================================== */
/* function can NOT operate in-place */
/* =================================================== */
/* ==================================================================== */
/* imxenc_YcbCrUnpack2 Unpacking YcbCr color data store in a single imag*/
/* with 16bit per color picel (YcbCr 4:2:2 format) */
/* into separate components, extra type parameters */
/* ==================================================================== */
extern Int16 imxenc_YCbCrUnpack2(
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, /* width of the output image */
Int16 calc_width, /* compute width (multiple of 2 */
Int16 calc_height, /* compute height */
Int16 colorspace, /* YCbCr 4:4:4 - 0, 4:2:2 - 1, 4:2:0 - 2 */
Int16 outputY_type,
Int16 outputUV_type,
Int16 round_shift, /* shifting parameter */
Int16 *cmdptr);
/* =================================================== */
/* function can NOT operate in-place */
/* =================================================== */
/* ==================================================================== */
/* imxenc_YcbCrUnpack Unpacking YcbCr color data store in a single image*/
/* with 16bit per color picel (YcbCr 4:2:2 format) */
/* into separate components */
/* ==================================================================== */
static inline Int16 imxenc_YCbCrUnpack(
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, /* width of the output image */
Int16 calc_width, /* compute width (multiple of 2 */
Int16 calc_height, /* compute height */
Int16 colorspace, /* YCbCr 4:4:4 - 0, 4:2:2 - 1, 4:2:0 - 2 */
Int16 round_shift, /* shifting parameter */
Int16 *cmdptr) {
return (imxenc_YCbCrUnpack2(input_ptr, coeff_ptr, output_ptr,
input_width, input_height, output_width,
output_height, calc_width, calc_height,
colorspace, IMXOTYPE_SHORT, IMXOTYPE_SHORT,
round_shift, cmdptr));
}
/* Optimized Pack */
Int16
imxenc_pack422(Int16 *y_ptr, /* pointer to Y array */
Int16 *u_ptr, /* pointer to U array */
Int16 *v_ptr, /* pointer to V array */
Int16 *zero_ptr, /* pointer to a 0 */
Int16 *out_ptr, /* output pointer */
Int16 lum_width, /* width of Y array */
Int16 chr_width, /* width of U/V array */
Int16 compute_width, /* width of luminance compute */
Int16 compute_height, /* height of luminance compute */
Int16 out_width, /* width of output array in luminance */
Int16 input_type,
Int16 no_overlap,
Int16 hibyte_y,
Int16 hibyte_u,
Int16 hibyte_v,
Int16 *cmdptr);
/* ==================================================================== */
/* imx_y2blkseq2 - Reorganize a NxM 2D matrix into a (N*M/8) matrix */
/* (or storing data in 8x8 blocksequentially) */
/* extended type params */
/* ==================================================================== */
Int16 imxenc_y2blkseq2(
Int16 *input_ptr, /* starting address of input */
Int16 *coeff_ptr, /* pointer to single scalar */
Int16 *output_ptr, /* starting address of output */
Int16 input_width, /* width of the input image */
Int16 input_height, /* height of the input image */
Int16 no_blks_x, /* handled no of blocks in x-direction */
Int16 no_blks_y,
Int16 input_type,
Int16 coeff_type,
Int16 output_type,
Int16 round_shift, /* shifting parameter */
Int16 *cmdptr);
/* ==================================================================== */
/* imx_y2blkseq - Reorganize a NxM 2D matrix into a (N*M/8) matrix */
/* (or storing data in 8x8 blocksequentially) */
/* */
/* ===============================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -