sh4/hpeldsp.c File Reference
Include dependency graph for sh4/hpeldsp.c:

Go to the source code of this file.

Macros

#define LP(p)   *(uint32_t*)(p)
 
#define LPC(p)   *(const uint32_t*)(p)
 
#define UNPACK(ph, pl, tt0, tt1)
 
#define rnd_PACK(ph, pl, nph, npl)   ph + nph + (((pl + npl + BYTE_VEC32(0x02))>>2) & BYTE_VEC32(0x03))
 
#define no_rnd_PACK(ph, pl, nph, npl)   ph + nph + (((pl + npl + BYTE_VEC32(0x01))>>2) & BYTE_VEC32(0x03))
 
#define MERGE1(a, b, ofs)   (ofs==0)?a:( ((a)>>(8*ofs))|((b)<<(32-8*ofs)) )
 
#define MERGE2(a, b, ofs)   (ofs==3)?b:( ((a)>>(8*(ofs+1)))|((b)<<(32-8*(ofs+1))) )
 
#define put(d, s)   d = s
 
#define avg(d, s)   d = rnd_avg32(s,d)
 
#define OP_C4(ofs)
 
#define OP_C40()
 
#define OP   put
 
#define OP   avg
 
#define OP_C(ofs, sz, avg2)
 
#define OP_C0(sz, avg2)
 
#define OP_X(ofs, sz, avg2)
 
#define OP_Y0(sz, avg2)
 
#define OP_Y(ofs, sz, avg2)
 
#define OP_X0(sz, avg2)   OP_X(0,sz,avg2)
 
#define OP_XY0(sz, PACK)   OP_XY(0,sz,PACK)
 
#define OP_XY(ofs, sz, PACK)
 
#define DEFFUNC(prefix, op, rnd, xy, sz, OP_N, avgfunc)
 
#define OP   put
 
#define OP   avg
 
#define ff_put_no_rnd_pixels8_o   ff_put_rnd_pixels8_o
 
#define ff_put_no_rnd_pixels16_o   ff_put_rnd_pixels16_o
 
#define ff_avg_no_rnd_pixels16_o   ff_avg_rnd_pixels16_o
 

Functions

static void put_pixels4_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
 
static void avg_pixels4_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
 
av_cold void ff_hpeldsp_init_sh4 (HpelDSPContext *c, int flags)
 

Macro Definition Documentation

#define avg (   d,
  s 
)    d = rnd_avg32(s,d)

Definition at line 54 of file sh4/hpeldsp.c.

#define DEFFUNC (   prefix,
  op,
  rnd,
  xy,
  sz,
  OP_N,
  avgfunc 
)
Value:
prefix void op##_##rnd##_pixels##sz##_##xy(uint8_t *dest, const uint8_t *ref, \
const ptrdiff_t stride, int height) \
{ \
switch((int)ref&3) { \
case 0:OP_N##0(sz,rnd##_##avgfunc); return; \
case 1:OP_N(1,sz,rnd##_##avgfunc); return; \
case 2:OP_N(2,sz,rnd##_##avgfunc); return; \
case 3:OP_N(3,sz,rnd##_##avgfunc); return; \
} \
}
FIXME Range Coding of cr are ref
Definition: snow.txt:367
int stride
Definition: mace.c:144
#define _(x)
uint8_t
dest
Definition: start.py:60
BYTE int const BYTE int int int height
Definition: avisynth_c.h:713
static int op(uint8_t **dst, const uint8_t *dst_end, GetByteContext *gb, int pixel, int count, int *x, int width, int linesize)
Perform decode operation.

Definition at line 268 of file sh4/hpeldsp.c.

#define ff_avg_no_rnd_pixels16_o   ff_avg_rnd_pixels16_o

Definition at line 316 of file sh4/hpeldsp.c.

Referenced by ff_hpeldsp_init_sh4().

#define ff_put_no_rnd_pixels16_o   ff_put_rnd_pixels16_o

Definition at line 315 of file sh4/hpeldsp.c.

Referenced by ff_hpeldsp_init_sh4().

#define ff_put_no_rnd_pixels8_o   ff_put_rnd_pixels8_o

Definition at line 314 of file sh4/hpeldsp.c.

Referenced by ff_hpeldsp_init_sh4().

#define LP (   p)    *(uint32_t*)(p)

Definition at line 32 of file sh4/hpeldsp.c.

#define LPC (   p)    *(const uint32_t*)(p)

Definition at line 33 of file sh4/hpeldsp.c.

#define MERGE1 (   a,
  b,
  ofs 
)    (ofs==0)?a:( ((a)>>(8*ofs))|((b)<<(32-8*ofs)) )

Definition at line 45 of file sh4/hpeldsp.c.

#define MERGE2 (   a,
  b,
  ofs 
)    (ofs==3)?b:( ((a)>>(8*(ofs+1)))|((b)<<(32-8*(ofs+1))) )

Definition at line 46 of file sh4/hpeldsp.c.

#define no_rnd_PACK (   ph,
  pl,
  nph,
  npl 
)    ph + nph + (((pl + npl + BYTE_VEC32(0x01))>>2) & BYTE_VEC32(0x03))

Definition at line 42 of file sh4/hpeldsp.c.

#define OP   put

Definition at line 298 of file sh4/hpeldsp.c.

#define OP   avg

Definition at line 298 of file sh4/hpeldsp.c.

#define OP   put

Definition at line 298 of file sh4/hpeldsp.c.

#define OP   avg

Definition at line 298 of file sh4/hpeldsp.c.

#define OP_C (   ofs,
  sz,
  avg2 
)
Value:
{ \
ref-=ofs; \
do { \
uint32_t t0,t1; \
t0 = LPC(ref+0); \
t1 = LPC(ref+4); \
OP(LP(dest+0), MERGE1(t0,t1,ofs)); \
t0 = LPC(ref+8); \
OP(LP(dest+4), MERGE1(t1,t0,ofs)); \
if (sz==16) { \
t1 = LPC(ref+12); \
OP(LP(dest+8), MERGE1(t0,t1,ofs)); \
t0 = LPC(ref+16); \
OP(LP(dest+12), MERGE1(t1,t0,ofs)); \
} \
} while(--height); \
}
FIXME Range Coding of cr are ref
Definition: snow.txt:367
int stride
Definition: mace.c:144
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
#define OP
Definition: sh4/hpeldsp.c:298
#define t0
Definition: regdef.h:28
#define LPC(p)
Definition: sh4/hpeldsp.c:33
#define t1
Definition: regdef.h:29
#define LP(p)
Definition: sh4/hpeldsp.c:32
dest
Definition: start.py:60
BYTE int const BYTE int int int height
Definition: avisynth_c.h:713
#define MERGE1(a, b, ofs)
Definition: sh4/hpeldsp.c:45

Definition at line 101 of file sh4/hpeldsp.c.

#define OP_C0 (   sz,
  avg2 
)
Value:
{ \
do { \
OP(LP(dest+0), LPC(ref+0)); \
OP(LP(dest+4), LPC(ref+4)); \
if (sz==16) { \
OP(LP(dest+8), LPC(ref+8)); \
OP(LP(dest+12), LPC(ref+12)); \
} \
} while(--height); \
}
FIXME Range Coding of cr are ref
Definition: snow.txt:367
int stride
Definition: mace.c:144
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
#define OP
Definition: sh4/hpeldsp.c:298
#define LPC(p)
Definition: sh4/hpeldsp.c:33
#define LP(p)
Definition: sh4/hpeldsp.c:32
dest
Definition: start.py:60
BYTE int const BYTE int int int height
Definition: avisynth_c.h:713

Definition at line 123 of file sh4/hpeldsp.c.

#define OP_C4 (   ofs)
Value:
ref-=ofs; \
do { \
OP(LP(dest),MERGE1(LPC(ref),LPC(ref+4),ofs)); \
} while(--height)
FIXME Range Coding of cr are ref
Definition: snow.txt:367
int stride
Definition: mace.c:144
#define OP
Definition: sh4/hpeldsp.c:298
#define LPC(p)
Definition: sh4/hpeldsp.c:33
#define LP(p)
Definition: sh4/hpeldsp.c:32
dest
Definition: start.py:60
BYTE int const BYTE int int int height
Definition: avisynth_c.h:713
#define MERGE1(a, b, ofs)
Definition: sh4/hpeldsp.c:45

Definition at line 56 of file sh4/hpeldsp.c.

Referenced by avg_pixels4_c(), and put_pixels4_c().

#define OP_C40 ( )
Value:
do { \
} while(--height)
FIXME Range Coding of cr are ref
Definition: snow.txt:367
int stride
Definition: mace.c:144
#define OP
Definition: sh4/hpeldsp.c:298
#define LPC(p)
Definition: sh4/hpeldsp.c:33
#define LP(p)
Definition: sh4/hpeldsp.c:32
dest
Definition: start.py:60
BYTE int const BYTE int int int height
Definition: avisynth_c.h:713

Definition at line 64 of file sh4/hpeldsp.c.

Referenced by avg_pixels4_c(), and put_pixels4_c().

#define OP_X (   ofs,
  sz,
  avg2 
)
Value:
{ \
ref-=ofs; \
do { \
uint32_t t0,t1; \
t0 = LPC(ref+0); \
t1 = LPC(ref+4); \
OP(LP(dest+0), avg2(MERGE1(t0,t1,ofs),MERGE2(t0,t1,ofs))); \
t0 = LPC(ref+8); \
OP(LP(dest+4), avg2(MERGE1(t1,t0,ofs),MERGE2(t1,t0,ofs))); \
if (sz==16) { \
t1 = LPC(ref+12); \
OP(LP(dest+8), avg2(MERGE1(t0,t1,ofs),MERGE2(t0,t1,ofs))); \
t0 = LPC(ref+16); \
OP(LP(dest+12), avg2(MERGE1(t1,t0,ofs),MERGE2(t1,t0,ofs))); \
} \
} while(--height); \
}
FIXME Range Coding of cr are ref
Definition: snow.txt:367
#define MERGE2(a, b, ofs)
Definition: sh4/hpeldsp.c:46
int stride
Definition: mace.c:144
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
#define OP
Definition: sh4/hpeldsp.c:298
#define t0
Definition: regdef.h:28
#define LPC(p)
Definition: sh4/hpeldsp.c:33
#define t1
Definition: regdef.h:29
#define LP(p)
Definition: sh4/hpeldsp.c:32
dest
Definition: start.py:60
BYTE int const BYTE int int int height
Definition: avisynth_c.h:713
#define avg2(a, b)
Definition: dsputil.c:520
#define MERGE1(a, b, ofs)
Definition: sh4/hpeldsp.c:45

Definition at line 137 of file sh4/hpeldsp.c.

#define OP_X0 (   sz,
  avg2 
)    OP_X(0,sz,avg2)

Definition at line 224 of file sh4/hpeldsp.c.

#define OP_XY (   ofs,
  sz,
  PACK 
)

Definition at line 226 of file sh4/hpeldsp.c.

#define OP_XY0 (   sz,
  PACK 
)    OP_XY(0,sz,PACK)

Definition at line 225 of file sh4/hpeldsp.c.

#define OP_Y (   ofs,
  sz,
  avg2 
)

Definition at line 186 of file sh4/hpeldsp.c.

#define OP_Y0 (   sz,
  avg2 
)
Value:
{ \
uint32_t t0,t1,t2,t3,t; \
t0 = LPC(ref+0); \
t1 = LPC(ref+4); \
if (sz==16) { \
t2 = LPC(ref+8); \
t3 = LPC(ref+12); \
} \
do { \
ref += stride; \
t = LPC(ref+0); \
OP(LP(dest+0), avg2(t0,t)); t0 = t; \
t = LPC(ref+4); \
OP(LP(dest+4), avg2(t1,t)); t1 = t; \
if (sz==16) { \
t = LPC(ref+8); \
OP(LP(dest+8), avg2(t2,t)); t2 = t; \
t = LPC(ref+12); \
OP(LP(dest+12), avg2(t3,t)); t3 = t; \
} \
} while(--height); \
}
FIXME Range Coding of cr are ref
Definition: snow.txt:367
int stride
Definition: mace.c:144
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
#define OP
Definition: sh4/hpeldsp.c:298
#define t0
Definition: regdef.h:28
#define LPC(p)
Definition: sh4/hpeldsp.c:33
#define t1
Definition: regdef.h:29
#define t3
Definition: regdef.h:31
#define LP(p)
Definition: sh4/hpeldsp.c:32
t
Definition: genspecsines3.m:6
dest
Definition: start.py:60
BYTE int const BYTE int int int height
Definition: avisynth_c.h:713
#define avg2(a, b)
Definition: dsputil.c:520
#define t2
Definition: regdef.h:30

Definition at line 159 of file sh4/hpeldsp.c.

#define put (   d,
  s 
)    d = s

Definition at line 53 of file sh4/hpeldsp.c.

#define rnd_PACK (   ph,
  pl,
  nph,
  npl 
)    ph + nph + (((pl + npl + BYTE_VEC32(0x02))>>2) & BYTE_VEC32(0x03))

Definition at line 41 of file sh4/hpeldsp.c.

#define UNPACK (   ph,
  pl,
  tt0,
  tt1 
)
Value:
do { \
uint32_t t0,t1; t0=tt0;t1=tt1; \
ph = ( (t0 & ~BYTE_VEC32(0x03))>>2) + ( (t1 & ~BYTE_VEC32(0x03))>>2); \
pl = (t0 & BYTE_VEC32(0x03)) + (t1 & BYTE_VEC32(0x03)); } while(0)
#define t0
Definition: regdef.h:28
#define t1
Definition: regdef.h:29
#define BYTE_VEC32(c)
Definition: rnd_avg.h:34

Definition at line 36 of file sh4/hpeldsp.c.

Function Documentation

static void avg_pixels4_c ( uint8_t dest,
const uint8_t ref,
const int  stride,
int  height 
)
static

Definition at line 88 of file sh4/hpeldsp.c.

av_cold void ff_hpeldsp_init_sh4 ( HpelDSPContext c,
int  flags 
)

Definition at line 318 of file sh4/hpeldsp.c.

Referenced by ff_hpeldsp_init().

static void put_pixels4_c ( uint8_t dest,
const uint8_t ref,
const int  stride,
int  height 
)
static

Definition at line 74 of file sh4/hpeldsp.c.