~ubuntu-branches/ubuntu/trusty/libtheora/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/dec/x86/mmxidct.c

  • Committer: Bazaar Package Importer
  • Author(s): Clint Adams
  • Date: 2008-04-23 14:08:37 UTC
  • mfrom: (1.1.6 upstream) (3.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20080423140837-t981xtgv43carzk8
Tags: 1.0~beta3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 ********************************************************************
12
12
 
13
13
  function:
14
 
    last mod: $Id: mmxidct.c 13884 2007-09-22 08:38:10Z giles $
 
14
    last mod: $Id: mmxidct.c 14357 2008-01-04 20:05:28Z tterribe $
15
15
 
16
16
 ********************************************************************/
17
17
 
26
26
#if defined(USE_ASM)
27
27
 
28
28
/*These are offsets into the table of constants below.*/
29
 
/*4 masks, in order: low word to high.*/
30
 
#define OC_MASK_OFFSET    (0)
31
29
/*7 rows of cosines, in order: pi/16 * (1 ... 7).*/
32
 
#define OC_COSINE_OFFSET (32)
 
30
#define OC_COSINE_OFFSET (0)
33
31
/*A row of 8's.*/
34
 
#define OC_EIGHT_OFFSET  (88)
 
32
#define OC_EIGHT_OFFSET  (56)
35
33
 
36
34
 
37
35
 
38
36
/*A table of constants used by the MMX routines.*/
39
37
static const ogg_uint16_t __attribute__((aligned(8),used))
40
 
 OC_IDCT_CONSTS[(4+7+1)*4]={
41
 
  65535,    0,    0,    0,
42
 
      0,65535,    0,    0,
43
 
      0,    0,65535,    0,
44
 
      0,    0,    0,65535,
 
38
 OC_IDCT_CONSTS[(7+1)*4]={
45
39
  (ogg_uint16_t)OC_C1S7,(ogg_uint16_t)OC_C1S7,
46
40
  (ogg_uint16_t)OC_C1S7,(ogg_uint16_t)OC_C1S7,
47
41
  (ogg_uint16_t)OC_C2S6,(ogg_uint16_t)OC_C2S6,
143
137
 
144
138
/*38+8=46 cycles.*/
145
139
#define OC_ROW_IDCT \
146
 
  "#OC\n" \
 
140
  "#OC_ROW_IDCT\n" \
147
141
  OC_IDCT_BEGIN \
148
142
  /*r3=D'*/ \
149
143
  "movq "OC_I(2)",%%mm3\n\t" \
316
310
  "#end OC_COLUMN_IDCT\n\t" \
317
311
 
318
312
#define OC_MID(_m,_i) OC_M2STR(_m+(_i)*8)"(%[c])"
319
 
#define OC_M(_i)      OC_MID(OC_MASK_OFFSET,_i)
320
313
#define OC_C(_i)      OC_MID(OC_COSINE_OFFSET,_i-1)
321
314
#define OC_8          OC_MID(OC_EIGHT_OFFSET,0)
322
315