diff options
Diffstat (limited to 'image/codecs/indeo/indeo_dsp.cpp')
-rw-r--r-- | image/codecs/indeo/indeo_dsp.cpp | 224 |
1 files changed, 112 insertions, 112 deletions
diff --git a/image/codecs/indeo/indeo_dsp.cpp b/image/codecs/indeo/indeo_dsp.cpp index f13ce91502..d4803b8b93 100644 --- a/image/codecs/indeo/indeo_dsp.cpp +++ b/image/codecs/indeo/indeo_dsp.cpp @@ -71,13 +71,13 @@ namespace Indeo { d3 = COMPENSATE(t2);\ d4 = COMPENSATE(t3); } -void IndeoDSP::ff_ivi_inverse_haar_8x8(const int32 *in, int16 *out, uint32 pitch, +void IndeoDSP::ffIviInverseHaar8x8(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { - int i, shift, sp1, sp2, sp3, sp4; + int i, shift, sp1, sp2, sp3, sp4; const int32 *src; - int32 *dst; - int tmp[64]; - int t0, t1, t2, t3, t4, t5, t6, t7, t8; + int32 * dst; + int tmp[64]; + int t0, t1, t2, t3, t4, t5, t6, t7, t8; // apply the InvHaar8 to all columns #define COMPENSATE(x) (x) @@ -126,10 +126,10 @@ void IndeoDSP::ff_ivi_inverse_haar_8x8(const int32 *in, int16 *out, uint32 pitch #undef COMPENSATE } -void IndeoDSP::ff_ivi_row_haar8(const int32 *in, int16 *out, uint32 pitch, +void IndeoDSP::ffIviRowHaar8(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { - int i; - int t0, t1, t2, t3, t4, t5, t6, t7, t8; + int i; + int t0, t1, t2, t3, t4, t5, t6, t7, t8; // apply the InvHaar8 to all rows #define COMPENSATE(x) (x) @@ -150,10 +150,10 @@ void IndeoDSP::ff_ivi_row_haar8(const int32 *in, int16 *out, uint32 pitch, #undef COMPENSATE } -void IndeoDSP::ff_ivi_col_haar8(const int32 *in, int16 *out, uint32 pitch, +void IndeoDSP::ffIviColHaar8(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { - int i; - int t0, t1, t2, t3, t4, t5, t6, t7, t8; + int i; + int t0, t1, t2, t3, t4, t5, t6, t7, t8; // apply the InvHaar8 to all columns #define COMPENSATE(x) (x) @@ -179,13 +179,13 @@ void IndeoDSP::ff_ivi_col_haar8(const int32 *in, int16 *out, uint32 pitch, #undef COMPENSATE } -void IndeoDSP::ff_ivi_inverse_haar_4x4(const int32 *in, int16 *out, uint32 pitch, +void IndeoDSP::ffIviInverseHaar4x4(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { - int i, shift, sp1, sp2; + int i, shift, sp1, sp2; const int32 *src; - int32 *dst; - int tmp[16]; - int t0, t1, t2, t3, t4; + int32 * dst; + int tmp[16]; + int t0, t1, t2, t3, t4; // apply the InvHaar4 to all columns #define COMPENSATE(x) (x) @@ -226,10 +226,10 @@ void IndeoDSP::ff_ivi_inverse_haar_4x4(const int32 *in, int16 *out, uint32 pitch #undef COMPENSATE } -void IndeoDSP::ff_ivi_row_haar4(const int32 *in, int16 *out, uint32 pitch, +void IndeoDSP::ffIviRowHaar4(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { - int i; - int t0, t1, t2, t3, t4; + int i; + int t0, t1, t2, t3, t4; // apply the InvHaar4 to all rows #define COMPENSATE(x) (x) @@ -247,10 +247,10 @@ void IndeoDSP::ff_ivi_row_haar4(const int32 *in, int16 *out, uint32 pitch, #undef COMPENSATE } -void IndeoDSP::ff_ivi_col_haar4(const int32 *in, int16 *out, uint32 pitch, +void IndeoDSP::ffIviColHaar4(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { - int i; - int t0, t1, t2, t3, t4; + int i; + int t0, t1, t2, t3, t4; // apply the InvHaar8 to all columns #define COMPENSATE(x) (x) @@ -271,16 +271,16 @@ void IndeoDSP::ff_ivi_col_haar4(const int32 *in, int16 *out, uint32 pitch, #undef COMPENSATE } -void IndeoDSP::ff_ivi_dc_haar_2d(const int32 *in, int16 *out, uint32 pitch, - int blk_size) { - int x, y; - int16 dc_coeff; +void IndeoDSP::ffIviDcHaar2d(const int32 *in, int16 *out, uint32 pitch, + int blkSize) { + int x, y; + int16 dcCoeff; - dc_coeff = (*in + 0) >> 3; + dcCoeff = (*in + 0) >> 3; - for (y = 0; y < blk_size; out += pitch, y++) { - for (x = 0; x < blk_size; x++) - out[x] = dc_coeff; + for (y = 0; y < blkSize; out += pitch, y++) { + for (x = 0; x < blkSize; x++) + out[x] = dcCoeff; } } @@ -334,12 +334,12 @@ void IndeoDSP::ff_ivi_dc_haar_2d(const int32 *in, int16 *out, uint32 pitch, d3 = COMPENSATE(t3);\ d4 = COMPENSATE(t4);} -void IndeoDSP::ff_ivi_inverse_slant_8x8(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { - int i; +void IndeoDSP::ffIviInverseSlant8x8(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { + int i; const int32 *src; - int32 *dst; - int tmp[64]; - int t0, t1, t2, t3, t4, t5, t6, t7, t8; + int32 * dst; + int tmp[64]; + int t0, t1, t2, t3, t4, t5, t6, t7, t8; #define COMPENSATE(x) (x) src = in; @@ -374,12 +374,12 @@ void IndeoDSP::ff_ivi_inverse_slant_8x8(const int32 *in, int16 *out, uint32 pitc #undef COMPENSATE } -void IndeoDSP::ff_ivi_inverse_slant_4x4(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { - int i; +void IndeoDSP::ffIviInverseSlant4x4(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { + int i; const int32 *src; - int32 *dst; - int tmp[16]; - int t0, t1, t2, t3, t4; + int32 * dst; + int tmp[16]; + int t0, t1, t2, t3, t4; #define COMPENSATE(x) (x) src = in; @@ -413,23 +413,23 @@ void IndeoDSP::ff_ivi_inverse_slant_4x4(const int32 *in, int16 *out, uint32 pitc #undef COMPENSATE } -void IndeoDSP::ff_ivi_dc_slant_2d(const int32 *in, int16 *out, uint32 pitch, - int blk_size) { - int x, y; - int16 dc_coeff; +void IndeoDSP::ffIviDcSlant2d(const int32 *in, int16 *out, uint32 pitch, + int blkSize) { + int x, y; + int16 dcCoeff; - dc_coeff = (*in + 1) >> 1; + dcCoeff = (*in + 1) >> 1; - for (y = 0; y < blk_size; out += pitch, y++) { - for (x = 0; x < blk_size; x++) - out[x] = dc_coeff; + for (y = 0; y < blkSize; out += pitch, y++) { + for (x = 0; x < blkSize; x++) + out[x] = dcCoeff; } } -void IndeoDSP::ff_ivi_row_slant8(const int32 *in, int16 *out, uint32 pitch, +void IndeoDSP::ffIviRowSlant8(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { - int i; - int t0, t1, t2, t3, t4, t5, t6, t7, t8; + int i; + int t0, t1, t2, t3, t4, t5, t6, t7, t8; #define COMPENSATE(x) (((x) + 1)>>1) for (i = 0; i < 8; i++) { @@ -446,26 +446,26 @@ void IndeoDSP::ff_ivi_row_slant8(const int32 *in, int16 *out, uint32 pitch, #undef COMPENSATE } -void IndeoDSP::ff_ivi_dc_row_slant(const int32 *in, int16 *out, uint32 pitch, int blk_size) { - int x, y; - int16 dc_coeff; +void IndeoDSP::ffIviDcRowSlant(const int32 *in, int16 *out, uint32 pitch, int blkSize) { + int x, y; + int16 dcCoeff; - dc_coeff = (*in + 1) >> 1; + dcCoeff = (*in + 1) >> 1; - for (x = 0; x < blk_size; x++) - out[x] = dc_coeff; + for (x = 0; x < blkSize; x++) + out[x] = dcCoeff; out += pitch; - for (y = 1; y < blk_size; out += pitch, y++) { - for (x = 0; x < blk_size; x++) + for (y = 1; y < blkSize; out += pitch, y++) { + for (x = 0; x < blkSize; x++) out[x] = 0; } } -void IndeoDSP::ff_ivi_col_slant8(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { - int i, row2, row4, row8; - int t0, t1, t2, t3, t4, t5, t6, t7, t8; +void IndeoDSP::ffIviColSlant8(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { + int i, row2, row4, row8; + int t0, t1, t2, t3, t4, t5, t6, t7, t8; row2 = pitch << 1; row4 = pitch << 2; @@ -489,23 +489,23 @@ void IndeoDSP::ff_ivi_col_slant8(const int32 *in, int16 *out, uint32 pitch, cons #undef COMPENSATE } -void IndeoDSP::ff_ivi_dc_col_slant(const int32 *in, int16 *out, uint32 pitch, int blk_size) { - int x, y; - int16 dc_coeff; +void IndeoDSP::ffIviDcColSlant(const int32 *in, int16 *out, uint32 pitch, int blkSize) { + int x, y; + int16 dcCoeff; - dc_coeff = (*in + 1) >> 1; + dcCoeff = (*in + 1) >> 1; - for (y = 0; y < blk_size; out += pitch, y++) { - out[0] = dc_coeff; - for (x = 1; x < blk_size; x++) + for (y = 0; y < blkSize; out += pitch, y++) { + out[0] = dcCoeff; + for (x = 1; x < blkSize; x++) out[x] = 0; } } -void IndeoDSP::ff_ivi_row_slant4(const int32 *in, int16 *out, +void IndeoDSP::ffIviRowSlant4(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { - int i; - int t0, t1, t2, t3, t4; + int i; + int t0, t1, t2, t3, t4; #define COMPENSATE(x) (((x) + 1)>>1) for (i = 0; i < 4; i++) { @@ -522,10 +522,10 @@ void IndeoDSP::ff_ivi_row_slant4(const int32 *in, int16 *out, #undef COMPENSATE } -void IndeoDSP::ff_ivi_col_slant4(const int32 *in, int16 *out, uint32 pitch, +void IndeoDSP::ffIviColSlant4(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { - int i, row2; - int t0, t1, t2, t3, t4; + int i, row2; + int t0, t1, t2, t3, t4; row2 = pitch << 1; @@ -545,18 +545,18 @@ void IndeoDSP::ff_ivi_col_slant4(const int32 *in, int16 *out, uint32 pitch, #undef COMPENSATE } -void IndeoDSP::ff_ivi_put_pixels_8x8(const int32 *in, int16 *out, uint32 pitch, +void IndeoDSP::ffIviPutPixels8x8(const int32 *in, int16 *out, uint32 pitch, const uint8 *flags) { - int x, y; + int x, y; for (y = 0; y < 8; out += pitch, in += 8, y++) for (x = 0; x < 8; x++) out[x] = in[x]; } -void IndeoDSP::ff_ivi_put_dc_pixel_8x8(const int32 *in, int16 *out, uint32 pitch, - int blk_size) { - int y; +void IndeoDSP::ffIviPutDcPixel8x8(const int32 *in, int16 *out, uint32 pitch, + int blkSize) { + int y; out[0] = in[0]; memset(out + 1, 0, 7*sizeof(out[0])); @@ -567,60 +567,60 @@ void IndeoDSP::ff_ivi_put_dc_pixel_8x8(const int32 *in, int16 *out, uint32 pitch } #define IVI_MC_TEMPLATE(size, suffix, OP) \ -static void ivi_mc_ ## size ##x## size ## suffix(int16 *buf, \ +static void iviMc ## size ##x## size ## suffix(int16 *buf, \ uint32 dpitch, \ - const int16 *ref_buf, \ - uint32 pitch, int mc_type) \ + const int16 *refBuf, \ + uint32 pitch, int mcType) \ { \ - int i, j; \ + int i, j; \ const int16 *wptr; \ \ - switch (mc_type) { \ + switch (mcType) { \ case 0: /* fullpel (no interpolation) */ \ - for (i = 0; i < size; i++, buf += dpitch, ref_buf += pitch) { \ + for (i = 0; i < size; i++, buf += dpitch, refBuf += pitch) { \ for (j = 0; j < size; j++) {\ - OP(buf[j], ref_buf[j]); \ + OP(buf[j], refBuf[j]); \ } \ } \ break; \ case 1: /* horizontal halfpel interpolation */ \ - for (i = 0; i < size; i++, buf += dpitch, ref_buf += pitch) \ + for (i = 0; i < size; i++, buf += dpitch, refBuf += pitch) \ for (j = 0; j < size; j++) \ - OP(buf[j], (ref_buf[j] + ref_buf[j+1]) >> 1); \ + OP(buf[j], (refBuf[j] + refBuf[j+1]) >> 1); \ break; \ case 2: /* vertical halfpel interpolation */ \ - wptr = ref_buf + pitch; \ - for (i = 0; i < size; i++, buf += dpitch, wptr += pitch, ref_buf += pitch) \ + wptr = refBuf + pitch; \ + for (i = 0; i < size; i++, buf += dpitch, wptr += pitch, refBuf += pitch) \ for (j = 0; j < size; j++) \ - OP(buf[j], (ref_buf[j] + wptr[j]) >> 1); \ + OP(buf[j], (refBuf[j] + wptr[j]) >> 1); \ break; \ case 3: /* vertical and horizontal halfpel interpolation */ \ - wptr = ref_buf + pitch; \ - for (i = 0; i < size; i++, buf += dpitch, wptr += pitch, ref_buf += pitch) \ + wptr = refBuf + pitch; \ + for (i = 0; i < size; i++, buf += dpitch, wptr += pitch, refBuf += pitch) \ for (j = 0; j < size; j++) \ - OP(buf[j], (ref_buf[j] + ref_buf[j+1] + wptr[j] + wptr[j+1]) >> 2); \ + OP(buf[j], (refBuf[j] + refBuf[j+1] + wptr[j] + wptr[j+1]) >> 2); \ break; \ } \ } \ \ -void IndeoDSP::ff_ivi_mc_ ## size ##x## size ## suffix(int16 *buf, const int16 *ref_buf, \ - uint32 pitch, int mc_type) \ +void IndeoDSP::ffIviMc ## size ##x## size ## suffix(int16 *buf, const int16 *refBuf, \ + uint32 pitch, int mcType) \ { \ - ivi_mc_ ## size ##x## size ## suffix(buf, pitch, ref_buf, pitch, mc_type); \ + iviMc ## size ##x## size ## suffix(buf, pitch, refBuf, pitch, mcType); \ } #define IVI_MC_AVG_TEMPLATE(size, suffix, OP) \ -void IndeoDSP::ff_ivi_mc_avg_ ## size ##x## size ## suffix(int16 *buf, \ - const int16 *ref_buf, \ - const int16 *ref_buf2, \ +void IndeoDSP::ffIviMcAvg ## size ##x## size ## suffix(int16 *buf, \ + const int16 *refBuf, \ + const int16 *refBuf2, \ uint32 pitch, \ - int mc_type, int mc_type2) \ + int mcType, int mcType2) \ { \ int16 tmp[size * size]; \ int i, j; \ \ - ivi_mc_ ## size ##x## size ## _no_delta(tmp, size, ref_buf, pitch, mc_type); \ - ivi_mc_ ## size ##x## size ## _delta(tmp, size, ref_buf2, pitch, mc_type2); \ + iviMc ## size ##x## size ## NoDelta(tmp, size, refBuf, pitch, mcType); \ + iviMc ## size ##x## size ## Delta(tmp, size, refBuf2, pitch, mcType2); \ for (i = 0; i < size; i++, buf += pitch) { \ for (j = 0; j < size; j++) {\ OP(buf[j], tmp[i * size + j] >> 1); \ @@ -631,14 +631,14 @@ void IndeoDSP::ff_ivi_mc_avg_ ## size ##x## size ## suffix(int16 *buf, \ #define OP_PUT(a, b) (a) = (b) #define OP_ADD(a, b) (a) += (b) -IVI_MC_TEMPLATE(8, _no_delta, OP_PUT) -IVI_MC_TEMPLATE(8, _delta, OP_ADD) -IVI_MC_TEMPLATE(4, _no_delta, OP_PUT) -IVI_MC_TEMPLATE(4, _delta, OP_ADD) -IVI_MC_AVG_TEMPLATE(8, _no_delta, OP_PUT) -IVI_MC_AVG_TEMPLATE(8, _delta, OP_ADD) -IVI_MC_AVG_TEMPLATE(4, _no_delta, OP_PUT) -IVI_MC_AVG_TEMPLATE(4, _delta, OP_ADD) +IVI_MC_TEMPLATE(8, NoDelta, OP_PUT) +IVI_MC_TEMPLATE(8, Delta, OP_ADD) +IVI_MC_TEMPLATE(4, NoDelta, OP_PUT) +IVI_MC_TEMPLATE(4, Delta, OP_ADD) +IVI_MC_AVG_TEMPLATE(8, NoDelta, OP_PUT) +IVI_MC_AVG_TEMPLATE(8, Delta, OP_ADD) +IVI_MC_AVG_TEMPLATE(4, NoDelta, OP_PUT) +IVI_MC_AVG_TEMPLATE(4, Delta, OP_ADD) } // End of namespace Indeo } // End of namespace Image |