📄 img_wave_horz.h64
字号:
* void IMG_wave_horz *
* ( *
* const short *restrict in_data, /* Row of input pixels */ *
* const short *restrict qmf, /* Low-pass QMF filter */ *
* const short *restrict mqmf, /* High-pass QMF filter */ *
* short *restrict out_data, /* Row of output data */ *
* int cols /* Length of input. */ *
* ); *
* *
* { *
* int i, res, iters; *
* int j, sum, prod; *
* short *xptr = in_data; *
* short *yptr = out_data; *
* short *x_end = &in_data[cols - 1]; *
* short xdata, hdata; *
* short *xstart; *
* short *filt_ptr; *
* int M = 8; *
* *
* /* ------------------------------------------------- */ *
* /* Set our loop trip count and starting x posn. */ *
* /* 'xstart' is used in the high-pass filter loop. */ *
* /* ------------------------------------------------- */ *
* iters = cols; *
* xstart = in_data + (cols - M) + 2; *
* *
* /* ------------------------------------------------- */ *
* /* Low pass filter. Iterate for cols/2 iterations */ *
* /* generating cols/2 low pass sample points with */ *
* /* the low-pass quadrature mirror filter. */ *
* /* ------------------------------------------------- */ *
* for (i = 0; i < iters; i += 2) *
* { *
* /* --------------------------------------------- */ *
* /* Initialize our sum to the rounding value */ *
* /* and reset our pointer. */ *
* /* --------------------------------------------- */ *
* sum = Qr; *
* xptr = in_data + i; *
* *
* /* --------------------------------------------- */ *
* /* Iterate over the taps in our QMF. */ *
* /* --------------------------------------------- */ *
* for (j = 0; j < M; j++) *
* { *
* xdata = *xptr++; *
* hdata = qmf[j]; *
* prod = xdata * hdata; *
* sum += prod; *
* if (xptr > x_end) xptr = in_data; *
* } *
* *
* /* --------------------------------------------- */ *
* /* Adjust the Qpt of our sum and store result. */ *
* /* --------------------------------------------- */ *
* res = (sum >> Qpt); *
* *out_data++ = res; *
* } *
* *
* *
* /* ------------------------------------------------- */ *
* /* High pass filter. Iterate for cols/2 iters */ *
* /* generating cols/2 high pass sample points with */ *
* /* the high-pass quadrature mirror filter. */ *
* /* ------------------------------------------------- */ *
* for (i = 0; i < iters ; i+=2) *
* { *
* /* --------------------------------------------- */ *
* /* Initialize our sum and filter pointer. */ *
* /* --------------------------------------------- */ *
* sum = Qr; *
* filt_ptr = mqmf + (M - 1); *
* *
* /* --------------------------------------------- */ *
* /* Set up our data pointer. This is slightly */ *
* /* more complicated due to how the data wraps */ *
* /* around the edge of the buffer. */ *
* /* --------------------------------------------- */ *
* xptr = xstart; *
* xstart += 2; *
* if (xstart > x_end) xstart = in_data; *
* *
* /* --------------------------------------------- */ *
* /* Iterate over the taps in our QMF. */ *
* /* --------------------------------------------- */ *
* for ( j = 0; j < M; j++) *
* { *
* xdata = *xptr++; *
* hdata = *filt_ptr--; *
* prod = xdata * hdata; *
* if (xptr > x_end) xptr = in_data; *
* sum += prod; *
* } *
* *
* /* --------------------------------------------- */ *
* /* Adjust the Qpt of our sum and store result. */ *
* /* --------------------------------------------- */ *
* res = (sum >> Qpt); *
* *out_data++ = res; *
* } *
* } *
* *
* CYCLES *
* cycles = cols * 2 + 25. *
* *
* For cols = 256, cycles = 537. *
* For cols = 512, cycles = 1049. *
* *
* CODESIZE *
* 360 bytes *
* *
* ------------------------------------------------------------------------- *
* Copyright (c) 2003 Texas Instruments, Incorporated. *
* All Rights Reserved. *
* ========================================================================= *
.global _IMG_wave_horz
* ========================================================================= *
* End of file: img_wave_horz.h64 *
* ------------------------------------------------------------------------- *
* Copyright (c) 2003 Texas Instruments, Incorporated. *
* All Rights Reserved. *
* ========================================================================= *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -