ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

indeo_dsp.cpp File Reference

#include "image/codecs/indeo/indeo_dsp.h"
Include dependency graph for indeo_dsp.cpp:

Go to the source code of this file.

Namespaces

namespace  Image
 

Based on the PCX specs: http://www.fileformat.info/format/pcx/spec/a10e75307b3a4cc49c3bbe6db4c41fa2/view.htm and the PCX decoder of FFmpeg (libavcodec/pcx.c): http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/pcx.c.


namespace  Image::Indeo

Defines

#define IVI_HAAR_BFLY(s1, s2, o1, o2, t)
 butterfly operation for the inverse Haar transform
#define INV_HAAR8(s1, s5, s3, s7, s2, s4, s6, s8, d1, d2, d3, d4, d5, d6, d7, d8, t0, t1, t2, t3, t4, t5, t6, t7, t8)
 inverse 8-point Haar transform
#define INV_HAAR4(s1, s3, s5, s7, d1, d2, d3, d4, t0, t1, t2, t3, t4)
 inverse 4-point Haar transform
#define COMPENSATE(x)   (x)
#define COMPENSATE(x)   (x)
#define COMPENSATE(x)   (x)
#define COMPENSATE(x)   (x)
#define COMPENSATE(x)   (x)
#define COMPENSATE(x)   (x)
#define COMPENSATE(x)   (x)
#define COMPENSATE(x)   (x)
#define IVI_SLANT_BFLY(s1, s2, o1, o2, t)
#define IVI_IREFLECT(s1, s2, o1, o2, t)
#define IVI_SLANT_PART4(s1, s2, o1, o2, t)
#define IVI_INV_SLANT8(s1, s4, s8, s5, s2, s6, s3, s7, d1, d2, d3, d4, d5, d6, d7, d8, t0, t1, t2, t3, t4, t5, t6, t7, t8)
#define IVI_INV_SLANT4(s1, s4, s2, s3, d1, d2, d3, d4, t0, t1, t2, t3, t4)
#define COMPENSATE(x)   (x)
#define COMPENSATE(x)   (((x) + 1)>>1)
#define COMPENSATE(x)   (x)
#define COMPENSATE(x)   (((x) + 1)>>1)
#define COMPENSATE(x)   (((x) + 1)>>1)
#define COMPENSATE(x)   (((x) + 1)>>1)
#define COMPENSATE(x)   (((x) + 1)>>1)
#define COMPENSATE(x)   (((x) + 1)>>1)
#define IVI_MC_TEMPLATE(size, suffix, OP)
#define IVI_MC_AVG_TEMPLATE(size, suffix, OP)
#define OP_PUT(a, b)   (a) = (b)
#define OP_ADD(a, b)   (a) += (b)

Define Documentation

#define COMPENSATE (   x  )     (x)
#define COMPENSATE (   x  )     (x)
#define COMPENSATE (   x  )     (x)
#define COMPENSATE (   x  )     (x)
#define COMPENSATE (   x  )     (x)
#define COMPENSATE (   x  )     (((x) + 1)>>1)
#define COMPENSATE (   x  )     (((x) + 1)>>1)
#define COMPENSATE (   x  )     (((x) + 1)>>1)
#define COMPENSATE (   x  )     (((x) + 1)>>1)
#define COMPENSATE (   x  )     (x)
#define COMPENSATE (   x  )     (x)
#define COMPENSATE (   x  )     (((x) + 1)>>1)
#define COMPENSATE (   x  )     (x)
#define COMPENSATE (   x  )     (x)
#define COMPENSATE (   x  )     (((x) + 1)>>1)
#define COMPENSATE (   x  )     (x)
#define INV_HAAR4 (   s1,
  s3,
  s5,
  s7,
  d1,
  d2,
  d3,
  d4,
  t0,
  t1,
  t2,
  t3,
  t4 
)
Value:
{\
    IVI_HAAR_BFLY(s1, s3, t0, t1, t4);\
    IVI_HAAR_BFLY(t0, s5, t2, t3, t4);\
    d1 = COMPENSATE(t2);\
    d2 = COMPENSATE(t3);\
    IVI_HAAR_BFLY(t1, s7, t2, t3, t4);\
    d3 = COMPENSATE(t2);\
    d4 = COMPENSATE(t3); }

inverse 4-point Haar transform

Definition at line 65 of file indeo_dsp.cpp.

#define INV_HAAR8 (   s1,
  s5,
  s3,
  s7,
  s2,
  s4,
  s6,
  s8,
  d1,
  d2,
  d3,
  d4,
  d5,
  d6,
  d7,
  d8,
  t0,
  t1,
  t2,
  t3,
  t4,
  t5,
  t6,
  t7,
  t8 
)
Value:
{\
    t1 = (s1) << 1; t5 = (s5) << 1;\
    IVI_HAAR_BFLY(t1, t5, t1, t5, t0); IVI_HAAR_BFLY(t1, s3, t1, t3, t0);\
    IVI_HAAR_BFLY(t5, s7, t5, t7, t0); IVI_HAAR_BFLY(t1, s2, t1, t2, t0);\
    IVI_HAAR_BFLY(t3, s4, t3, t4, t0); IVI_HAAR_BFLY(t5, s6, t5, t6, t0);\
    IVI_HAAR_BFLY(t7, s8, t7, t8, t0);\
    d1 = COMPENSATE(t1);\
    d2 = COMPENSATE(t2);\
    d3 = COMPENSATE(t3);\
    d4 = COMPENSATE(t4);\
    d5 = COMPENSATE(t5);\
    d6 = COMPENSATE(t6);\
    d7 = COMPENSATE(t7);\
    d8 = COMPENSATE(t8); }

inverse 8-point Haar transform

Definition at line 47 of file indeo_dsp.cpp.

#define IVI_HAAR_BFLY (   s1,
  s2,
  o1,
  o2,
  t 
)
Value:
t  = ((s1) - (s2)) >> 1;\
    o1 = ((s1) + (s2)) >> 1;\
    o2 = (t);\

butterfly operation for the inverse Haar transform

Definition at line 37 of file indeo_dsp.cpp.

#define IVI_INV_SLANT4 (   s1,
  s4,
  s2,
  s3,
  d1,
  d2,
  d3,
  d4,
  t0,
  t1,
  t2,
  t3,
  t4 
)
Value:
{\
    IVI_SLANT_BFLY(s1, s2, t1, t2, t0); IVI_IREFLECT  (s4, s3, t4, t3, t0);\
\
    IVI_SLANT_BFLY(t1, t4, t1, t4, t0); IVI_SLANT_BFLY(t2, t3, t2, t3, t0);\
    d1 = COMPENSATE(t1);\
    d2 = COMPENSATE(t2);\
    d3 = COMPENSATE(t3);\
    d4 = COMPENSATE(t4);}

Definition at line 315 of file indeo_dsp.cpp.

#define IVI_INV_SLANT8 (   s1,
  s4,
  s8,
  s5,
  s2,
  s6,
  s3,
  s7,
  d1,
  d2,
  d3,
  d4,
  d5,
  d6,
  d7,
  d8,
  t0,
  t1,
  t2,
  t3,
  t4,
  t5,
  t6,
  t7,
  t8 
)
Value:
{\
    IVI_SLANT_PART4(s4, s5, t4, t5, t0);\
\
    IVI_SLANT_BFLY(s1, t5, t1, t5, t0); IVI_SLANT_BFLY(s2, s6, t2, t6, t0);\
    IVI_SLANT_BFLY(s7, s3, t7, t3, t0); IVI_SLANT_BFLY(t4, s8, t4, t8, t0);\
\
    IVI_SLANT_BFLY(t1, t2, t1, t2, t0); IVI_IREFLECT  (t4, t3, t4, t3, t0);\
    IVI_SLANT_BFLY(t5, t6, t5, t6, t0); IVI_IREFLECT  (t8, t7, t8, t7, t0);\
    IVI_SLANT_BFLY(t1, t4, t1, t4, t0); IVI_SLANT_BFLY(t2, t3, t2, t3, t0);\
    IVI_SLANT_BFLY(t5, t8, t5, t8, t0); IVI_SLANT_BFLY(t6, t7, t6, t7, t0);\
    d1 = COMPENSATE(t1);\
    d2 = COMPENSATE(t2);\
    d3 = COMPENSATE(t3);\
    d4 = COMPENSATE(t4);\
    d5 = COMPENSATE(t5);\
    d6 = COMPENSATE(t6);\
    d7 = COMPENSATE(t7);\
    d8 = COMPENSATE(t8);}

Definition at line 295 of file indeo_dsp.cpp.

#define IVI_IREFLECT (   s1,
  s2,
  o1,
  o2,
  t 
)
Value:
t  = (((s1) + (s2)*2 + 2) >> 2) + (s1);\
    o2 = (((s1)*2 - (s2) + 2) >> 2) - (s2);\
    o1 = (t);\

Definition at line 281 of file indeo_dsp.cpp.

#define IVI_MC_AVG_TEMPLATE (   size,
  suffix,
  OP 
)
Value:
void IndeoDSP::ffIviMcAvg ## size ##x## size ## suffix(int16 *buf, \
                                                 const int16 *refBuf, \
                                                 const int16 *refBuf2, \
                                                 uint32 pitch, \
                                               int mcType, int mcType2) \
{ \
    int16 tmp[size * size]; \
\
    iviMc ## size ##x## size ## NoDelta(tmp, size, refBuf, pitch, mcType); \
    iviMc ## size ##x## size ## Delta(tmp, size, refBuf2, pitch, mcType2); \
    for (int i = 0; i < size; i++, buf += pitch) { \
        for (int j = 0; j < size; j++) {\
            OP(buf[j], tmp[i * size + j] >> 1); \
        } \
    } \
}

Definition at line 575 of file indeo_dsp.cpp.

#define IVI_MC_TEMPLATE (   size,
  suffix,
  OP 
)

Definition at line 533 of file indeo_dsp.cpp.

#define IVI_SLANT_BFLY (   s1,
  s2,
  o1,
  o2,
  t 
)
Value:
t  = (s1) - (s2);\
    o1 = (s1) + (s2);\
    o2 = (t);\

Definition at line 275 of file indeo_dsp.cpp.

#define IVI_SLANT_PART4 (   s1,
  s2,
  o1,
  o2,
  t 
)
Value:
t  = (s2) + (((s1)*4  - (s2) + 4) >> 3);\
    o2 = (s1) + ((-(s1) - (s2)*4 + 4) >> 3);\
    o1 = (t);\

Definition at line 287 of file indeo_dsp.cpp.

#define OP_ADD (   a,
  b 
)    (a) += (b)

Definition at line 594 of file indeo_dsp.cpp.

#define OP_PUT (   a,
  b 
)    (a) = (b)

Definition at line 593 of file indeo_dsp.cpp.



Generated on Sat Jul 13 2019 05:02:42 for ResidualVM by doxygen 1.7.1
curved edge   curved edge