[svn] / branches / dev-api-4 / xvidcore / src / motion / motion_comp.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/src/motion/motion_comp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 152, Wed May 1 13:00:02 2002 UTC revision 229, Thu Jun 20 14:05:58 2002 UTC
# Line 7  Line 7 
7  #include "../utils/timer.h"  #include "../utils/timer.h"
8  #include "motion.h"  #include "motion.h"
9    
10    #undef BFRAMES
11    
12  #define ABS(X) (((X)>0)?(X):-(X))  #define ABS(X) (((X)>0)?(X):-(X))
13  #define SIGN(X) (((X)>0)?1:-1)  #define SIGN(X) (((X)>0)?1:-1)
14    
15  static __inline void compensate8x8_halfpel(  static __inline void
16                                  int16_t * const dct_codes,  compensate8x8_halfpel(int16_t * const dct_codes,
17                                  uint8_t * const cur,                                  uint8_t * const cur,
18                                  const uint8_t * const ref,                                  const uint8_t * const ref,
19                                  const uint8_t * const refh,                                  const uint8_t * const refh,
20                                  const uint8_t * const refv,                                  const uint8_t * const refv,
21                                  const uint8_t * const refhv,                                  const uint8_t * const refhv,
22                                  const uint32_t x, const uint32_t y,                                            const uint32_t x,
23                                  const int32_t dx,  const int dy,                                            const uint32_t y,
24                                              const int32_t dx,
25                                              const int dy,
26                                  const uint32_t stride)                                  const uint32_t stride)
27  {  {
28          int32_t ddx,ddy;          int32_t ddx,ddy;
# Line 29  Line 33 
33                  ddx = dx/2;                  ddx = dx/2;
34                  ddy = dy/2;                  ddy = dy/2;
35                  transfer_8to16sub(dct_codes, cur + y*stride + x,                  transfer_8to16sub(dct_codes, cur + y*stride + x,
36                                  ref + (y+ddy)*stride + x+ddx, stride);                                                    ref + (int) ((y + ddy) * stride + x + ddx), stride);
37                  break;                  break;
38    
39      case 1 :      case 1 :
40                  ddx = dx/2;                  ddx = dx/2;
41                  ddy = (dy-1)/2;                  ddy = (dy-1)/2;
42                  transfer_8to16sub(dct_codes, cur + y*stride + x,                  transfer_8to16sub(dct_codes, cur + y*stride + x,
43                                  refv + (y+ddy)*stride + x+ddx, stride);                                                    refv + (int) ((y + ddy) * stride + x + ddx), stride);
44                  break;                  break;
45    
46      case 2 :      case 2 :
47                  ddx = (dx-1)/2;                  ddx = (dx-1)/2;
48                  ddy = dy/2;                  ddy = dy/2;
49                  transfer_8to16sub(dct_codes, cur + y*stride + x,                  transfer_8to16sub(dct_codes, cur + y*stride + x,
50                                  refh + (y+ddy)*stride + x+ddx, stride);                                                    refh + (int) ((y + ddy) * stride + x + ddx), stride);
51                  break;                  break;
52    
53          default :       // case 3:          default :       // case 3:
54                  ddx = (dx-1)/2;                  ddx = (dx-1)/2;
55                  ddy = (dy-1)/2;                  ddy = (dy-1)/2;
56                  transfer_8to16sub(dct_codes, cur + y*stride + x,                  transfer_8to16sub(dct_codes, cur + y*stride + x,
57                                  refhv + (y+ddy)*stride + x+ddx, stride);                                                    refhv + (int) ((y + ddy) * stride + x + ddx), stride);
58                  break;                  break;
59      }      }
60  }  }
61    
62    
63    
64  void MBMotionCompensation(  void
65          MACROBLOCK * const mb,  MBMotionCompensation(MACROBLOCK * const mb,
66          const uint32_t i,          const uint32_t i,
67          const uint32_t j,          const uint32_t j,
68          const IMAGE * const ref,          const IMAGE * const ref,
# Line 76  Line 80 
80                  { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 };                  { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 };
81    
82    
83          if (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q)          if (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) {
         {  
84                  int32_t dx = mb->mvs[0].x;                  int32_t dx = mb->mvs[0].x;
85                  int32_t dy = mb->mvs[0].y;                  int32_t dy = mb->mvs[0].y;
86    
87                  compensate8x8_halfpel(&dct_codes[0*64], cur->y, ref->y, refh->y, refv->y, refhv->y,                  compensate8x8_halfpel(&dct_codes[0 * 64], cur->y, ref->y, refh->y,
88                                        16*i,     16*j,     dx, dy, edged_width);                                                            refv->y, refhv->y, 16 * i, 16 * j, dx, dy,
89                  compensate8x8_halfpel(&dct_codes[1*64], cur->y, ref->y, refh->y, refv->y, refhv->y,                                                            edged_width);
90                                        16*i + 8, 16*j,     dx, dy, edged_width);                  compensate8x8_halfpel(&dct_codes[1 * 64], cur->y, ref->y, refh->y,
91                  compensate8x8_halfpel(&dct_codes[2*64], cur->y, ref->y, refh->y, refv->y, refhv->y,                                                            refv->y, refhv->y, 16 * i + 8, 16 * j, dx, dy,
92                                        16*i,     16*j + 8, dx, dy, edged_width);                                                            edged_width);
93                  compensate8x8_halfpel(&dct_codes[3*64], cur->y, ref->y, refh->y, refv->y, refhv->y,                  compensate8x8_halfpel(&dct_codes[2 * 64], cur->y, ref->y, refh->y,
94                                        16*i + 8, 16*j + 8, dx, dy, edged_width);                                                            refv->y, refhv->y, 16 * i, 16 * j + 8, dx, dy,
95                                                              edged_width);
96                    compensate8x8_halfpel(&dct_codes[3 * 64], cur->y, ref->y, refh->y,
97                                                              refv->y, refhv->y, 16 * i + 8, 16 * j + 8, dx,
98                                                              dy, edged_width);
99    
100                  dx = (dx & 3) ? (dx >> 1) | 1 : dx / 2;                  dx = (dx & 3) ? (dx >> 1) | 1 : dx / 2;
101                  dy = (dy & 3) ? (dy >> 1) | 1 : dy / 2;                  dy = (dy & 3) ? (dy >> 1) | 1 : dy / 2;
102    
103                  /* uv-image-based compensation */                  /* uv-image-based compensation */
104  #ifdef BFRAMES  #ifdef BFRAMES
105                     compensate8x8_halfpel(&dct_codes[4*64], cur->u, ref->u, refh->u, refv->u, refhv->u,                  compensate8x8_halfpel(&dct_codes[4 * 64], cur->u, ref->u, refh->u,
106                     8*i, 8*j, dx, dy, edged_width/2);                                                            refv->u, refhv->u, 8 * i, 8 * j, dx, dy,
107                     compensate8x8_halfpel(&dct_codes[5*64], cur->v, ref->v, refh->v, refv->v, refhv->v,                                                            edged_width / 2);
108                     8*i, 8*j, dx, dy, edged_width/2);                  compensate8x8_halfpel(&dct_codes[5 * 64], cur->v, ref->v, refh->v,
109                                                              refv->v, refhv->v, 8 * i, 8 * j, dx, dy,
110                                                              edged_width / 2);
111  #else  #else
112                  /* uv-block-based compensation */                  /* uv-block-based compensation */
113                  interpolate8x8_switch(refv->u, ref->u, 8*i, 8*j, dx, dy, edged_width/2, rounding);                  interpolate8x8_switch(refv->u, ref->u, 8 * i, 8 * j, dx, dy,
114                                                              edged_width / 2, rounding);
115                  transfer_8to16sub(&dct_codes[4*64],                  transfer_8to16sub(&dct_codes[4*64],
116                                    cur->u + 8*j*edged_width/2 + 8*i,                                    cur->u + 8*j*edged_width/2 + 8*i,
117                                    refv->u + 8*j*edged_width/2 + 8*i, edged_width/2);                                                    refv->u + 8 * j * edged_width / 2 + 8 * i,
118                                                      edged_width / 2);
119    
120                  interpolate8x8_switch(refv->v, ref->v, 8*i, 8*j, dx, dy, edged_width/2, rounding);                  interpolate8x8_switch(refv->v, ref->v, 8 * i, 8 * j, dx, dy,
121                                                              edged_width / 2, rounding);
122                  transfer_8to16sub(&dct_codes[5*64],                  transfer_8to16sub(&dct_codes[5*64],
123                                    cur->v + 8*j*edged_width/2 + 8*i,                                    cur->v + 8*j*edged_width/2 + 8*i,
124                                    refv->v + 8*j*edged_width/2 + 8*i, edged_width/2);                                                    refv->v + 8 * j * edged_width / 2 + 8 * i,
125                                                      edged_width / 2);
126  #endif  #endif
127          }          } else                                          // mode == MODE_INTER4V
         else    // mode == MODE_INTER4V  
128          {          {
129                  int32_t sum, dx, dy;                  int32_t sum, dx, dy;
130    
131                  compensate8x8_halfpel(&dct_codes[0*64], cur->y, ref->y, refh->y, refv->y, refhv->y,                  compensate8x8_halfpel(&dct_codes[0 * 64], cur->y, ref->y, refh->y,
132                                        16*i,     16*j,     mb->mvs[0].x, mb->mvs[0].y, edged_width);                                                            refv->y, refhv->y, 16 * i, 16 * j, mb->mvs[0].x,
133                  compensate8x8_halfpel(&dct_codes[1*64], cur->y, ref->y, refh->y, refv->y, refhv->y,                                                            mb->mvs[0].y, edged_width);
134                                        16*i + 8, 16*j,     mb->mvs[1].x, mb->mvs[1].y, edged_width);                  compensate8x8_halfpel(&dct_codes[1 * 64], cur->y, ref->y, refh->y,
135                  compensate8x8_halfpel(&dct_codes[2*64], cur->y, ref->y, refh->y, refv->y, refhv->y,                                                            refv->y, refhv->y, 16 * i + 8, 16 * j,
136                                        16*i,     16*j + 8, mb->mvs[2].x, mb->mvs[2].y, edged_width);                                                            mb->mvs[1].x, mb->mvs[1].y, edged_width);
137                  compensate8x8_halfpel(&dct_codes[3*64], cur->y, ref->y, refh->y, refv->y, refhv->y,                  compensate8x8_halfpel(&dct_codes[2 * 64], cur->y, ref->y, refh->y,
138                                        16*i + 8, 16*j + 8, mb->mvs[3].x, mb->mvs[3].y, edged_width);                                                            refv->y, refhv->y, 16 * i, 16 * j + 8,
139                                                              mb->mvs[2].x, mb->mvs[2].y, edged_width);
140                    compensate8x8_halfpel(&dct_codes[3 * 64], cur->y, ref->y, refh->y,
141                                                              refv->y, refhv->y, 16 * i + 8, 16 * j + 8,
142                                                              mb->mvs[3].x, mb->mvs[3].y, edged_width);
143    
144                  sum = mb->mvs[0].x + mb->mvs[1].x + mb->mvs[2].x + mb->mvs[3].x;                  sum = mb->mvs[0].x + mb->mvs[1].x + mb->mvs[2].x + mb->mvs[3].x;
145                  dx = (sum ? SIGN(sum) * (roundtab[ABS(sum) % 16] + (ABS(sum) / 16) * 2) : 0);                  dx = (sum ? SIGN(sum) *
146                              (roundtab[ABS(sum) % 16] + (ABS(sum) / 16) * 2) : 0);
147    
148                  sum = mb->mvs[0].y + mb->mvs[1].y + mb->mvs[2].y + mb->mvs[3].y;                  sum = mb->mvs[0].y + mb->mvs[1].y + mb->mvs[2].y + mb->mvs[3].y;
149                  dy = (sum ? SIGN(sum) * (roundtab[ABS(sum) % 16] + (ABS(sum) / 16) * 2) : 0);                  dy = (sum ? SIGN(sum) *
150                              (roundtab[ABS(sum) % 16] + (ABS(sum) / 16) * 2) : 0);
151    
152                  /* uv-image-based compensation */                  /* uv-image-based compensation */
153  #ifdef BFRAMES  #ifdef BFRAMES
154                     compensate8x8_halfpel(&dct_codes[4*64], cur->u, ref->u, refh->u, refv->u, refhv->u,                  compensate8x8_halfpel(&dct_codes[4 * 64], cur->u, ref->u, refh->u,
155                     8*i, 8*j, dx, dy, edged_width/2);                                                            refv->u, refhv->u, 8 * i, 8 * j, dx, dy,
156                     compensate8x8_halfpel(&dct_codes[5*64], cur->v, ref->v, refh->v, refv->v, refhv->v,                                                            edged_width / 2);
157                     8*i, 8*j, dx, dy, edged_width/2);                  compensate8x8_halfpel(&dct_codes[5 * 64], cur->v, ref->v, refh->v,
158                                                              refv->v, refhv->v, 8 * i, 8 * j, dx, dy,
159                                                              edged_width / 2);
160  #else  #else
161                  /* uv-block-based compensation */                  /* uv-block-based compensation */
162                  interpolate8x8_switch(refv->u, ref->u, 8*i, 8*j, dx, dy, edged_width/2, rounding);                  interpolate8x8_switch(refv->u, ref->u, 8 * i, 8 * j, dx, dy,
163                                                              edged_width / 2, rounding);
164                  transfer_8to16sub(&dct_codes[4*64],                  transfer_8to16sub(&dct_codes[4*64],
165                                    cur->u + 8*j*edged_width/2 + 8*i,                                    cur->u + 8*j*edged_width/2 + 8*i,
166                                    refv->u + 8*j*edged_width/2 + 8*i, edged_width/2);                                                    refv->u + 8 * j * edged_width / 2 + 8 * i,
167                                                      edged_width / 2);
168    
169                  interpolate8x8_switch(refv->v, ref->v, 8*i, 8*j, dx, dy, edged_width/2, rounding);                  interpolate8x8_switch(refv->v, ref->v, 8 * i, 8 * j, dx, dy,
170                                                              edged_width / 2, rounding);
171                  transfer_8to16sub(&dct_codes[5*64],                  transfer_8to16sub(&dct_codes[5*64],
172                                    cur->v + 8*j*edged_width/2 + 8*i,                                    cur->v + 8*j*edged_width/2 + 8*i,
173                                    refv->v + 8*j*edged_width/2 + 8*i, edged_width/2);                                                    refv->v + 8 * j * edged_width / 2 + 8 * i,
174                                                      edged_width / 2);
175  #endif  #endif
176          }          }
177  }  }
178    
179    
180  void MBMotionCompensationBVOP(  void
181                          MBParam * pParam,  MBMotionCompensationBVOP(MBParam * pParam,
182                          MACROBLOCK * const mb,                          MACROBLOCK * const mb,
183                      const uint32_t i,                      const uint32_t i,
184                          const uint32_t j,                          const uint32_t j,
# Line 180  Line 204 
204    
205    
206    
207          switch(mb->mode)          switch (mb->mode) {
         {  
208          case MODE_FORWARD :          case MODE_FORWARD :
209                  dx = mb->mvs[0].x;                  dx = mb->mvs[0].x;
210                  dy = mb->mvs[0].y;                  dy = mb->mvs[0].y;
211    
212                  transfer_8to16sub_c(                  transfer_8to16sub_c(&dct_codes[0 * 64],
                         &dct_codes[0*64],  
213                          cur->y + (j*16)*edged_width + (i*16),                          cur->y + (j*16)*edged_width + (i*16),
214                          get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,                          get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,
215                                                          i*16, j*16, 1, dx, dy, edged_width),                                                          i*16, j*16, 1, dx, dy, edged_width),
216                          edged_width);                          edged_width);
217    
218                  transfer_8to16sub(                  transfer_8to16sub(&dct_codes[1 * 64],
                         &dct_codes[1*64],  
219                          cur->y + (j*16)*edged_width + (i*16+8),                          cur->y + (j*16)*edged_width + (i*16+8),
220                          get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,                          get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,
221                                                          i*16+8, j*16, 1, dx, dy, edged_width),                                                          i*16+8, j*16, 1, dx, dy, edged_width),
222                          edged_width);                          edged_width);
223    
224                  transfer_8to16sub_c(                  transfer_8to16sub_c(&dct_codes[2 * 64],
                         &dct_codes[2*64],  
225                          cur->y + (j*16+8)*edged_width + (i*16),                          cur->y + (j*16+8)*edged_width + (i*16),
226                          get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,                          get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,
227                                                          i*16, j*16+8, 1, dx, dy, edged_width),                                                                          i * 16, j * 16 + 8, 1, dx, dy,
228                          edged_width);                                                                          edged_width), edged_width);
229    
230                  transfer_8to16sub(                  transfer_8to16sub(&dct_codes[3 * 64],
                         &dct_codes[3*64],  
231                          cur->y + (j*16+8)*edged_width + (i*16+8),                          cur->y + (j*16+8)*edged_width + (i*16+8),
232                          get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,                          get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,
233                                                          i*16+8, j*16+8, 1, dx, dy, edged_width),                                                                    i * 16 + 8, j * 16 + 8, 1, dx, dy,
234                          edged_width);                                                                    edged_width), edged_width);
235    
236    
237                  dx = (dx & 3) ? (dx >> 1) | 1 : dx / 2;                  dx = (dx & 3) ? (dx >> 1) | 1 : dx / 2;
238                  dy = (dy & 3) ? (dy >> 1) | 1 : dy / 2;                  dy = (dy & 3) ? (dy >> 1) | 1 : dy / 2;
239    
240                  /* uv-image-based compensation */                  /* uv-image-based compensation */
241                  compensate8x8_halfpel(&dct_codes[4*64], cur->u, f_ref->u, f_refh->u, f_refv->u, f_refhv->u,                  compensate8x8_halfpel(&dct_codes[4 * 64], cur->u, f_ref->u, f_refh->u,
242                                                                  8*i, 8*j, dx, dy, edged_width/2);                                                            f_refv->u, f_refhv->u, 8 * i, 8 * j, dx, dy,
243                  compensate8x8_halfpel(&dct_codes[5*64], cur->v, f_ref->v, f_refh->v, f_refv->v, f_refhv->v,                                                            edged_width / 2);
244                                                                  8*i, 8*j, dx, dy, edged_width/2);                  compensate8x8_halfpel(&dct_codes[5 * 64], cur->v, f_ref->v, f_refh->v,
245                                                              f_refv->v, f_refhv->v, 8 * i, 8 * j, dx, dy,
246                                                              edged_width / 2);
247    
248                  break;                  break;
249    
# Line 230  Line 251 
251                  b_dx = mb->b_mvs[0].x;                  b_dx = mb->b_mvs[0].x;
252                  b_dy = mb->b_mvs[0].y;                  b_dy = mb->b_mvs[0].y;
253    
254                  transfer_8to16sub_c(                  transfer_8to16sub_c(&dct_codes[0 * 64],
                         &dct_codes[0*64],  
255                          cur->y + (j*16)*edged_width + (i*16),                          cur->y + (j*16)*edged_width + (i*16),
256                          get_ref(b_ref->y, b_refh->y, b_refv->y, b_refhv->y,                          get_ref(b_ref->y, b_refh->y, b_refv->y, b_refhv->y,
257                                                          i*16, j*16, 1, b_dx, b_dy, edged_width),                                                                          i * 16, j * 16, 1, b_dx, b_dy,
258                          edged_width);                                                                          edged_width), edged_width);
259    
260                  transfer_8to16sub(                  transfer_8to16sub(&dct_codes[1 * 64],
                         &dct_codes[1*64],  
261                          cur->y + (j*16)*edged_width + (i*16+8),                          cur->y + (j*16)*edged_width + (i*16+8),
262                          get_ref(b_ref->y, b_refh->y, b_refv->y, b_refhv->y,                          get_ref(b_ref->y, b_refh->y, b_refv->y, b_refhv->y,
263                                                          i*16+8, j*16, 1, b_dx, b_dy, edged_width),                                                                    i * 16 + 8, j * 16, 1, b_dx, b_dy,
264                          edged_width);                                                                    edged_width), edged_width);
265    
266                  transfer_8to16sub_c(                  transfer_8to16sub_c(&dct_codes[2 * 64],
                         &dct_codes[2*64],  
267                          cur->y + (j*16+8)*edged_width + (i*16),                          cur->y + (j*16+8)*edged_width + (i*16),
268                          get_ref(b_ref->y, b_refh->y, b_refv->y, b_refhv->y,                          get_ref(b_ref->y, b_refh->y, b_refv->y, b_refhv->y,
269                                                          i*16, j*16+8, 1, b_dx, b_dy, edged_width),                                                                          i * 16, j * 16 + 8, 1, b_dx, b_dy,
270                          edged_width);                                                                          edged_width), edged_width);
271    
272                  transfer_8to16sub(                  transfer_8to16sub(&dct_codes[3 * 64],
                         &dct_codes[3*64],  
273                          cur->y + (j*16+8)*edged_width + (i*16+8),                          cur->y + (j*16+8)*edged_width + (i*16+8),
274                          get_ref(b_ref->y, b_refh->y, b_refv->y, b_refhv->y,                          get_ref(b_ref->y, b_refh->y, b_refv->y, b_refhv->y,
275                                                          i*16+8, j*16+8, 1, b_dx, b_dy, edged_width),                                                                    i * 16 + 8, j * 16 + 8, 1, b_dx, b_dy,
276                          edged_width);                                                                    edged_width), edged_width);
277    
278                  b_dx = (b_dx & 3) ? (b_dx >> 1) | 1 : b_dx / 2;                  b_dx = (b_dx & 3) ? (b_dx >> 1) | 1 : b_dx / 2;
279                  b_dy = (b_dy & 3) ? (b_dy >> 1) | 1 : b_dy / 2;                  b_dy = (b_dy & 3) ? (b_dy >> 1) | 1 : b_dy / 2;
280    
281                  /* uv-image-based compensation */                  /* uv-image-based compensation */
282                  compensate8x8_halfpel(&dct_codes[4*64], cur->u,                  compensate8x8_halfpel(&dct_codes[4 * 64], cur->u, b_ref->u, b_refh->u,
283                                          b_ref->u, b_refh->u, b_refv->u, b_refhv->u,                                                            b_refv->u, b_refhv->u, 8 * i, 8 * j, b_dx, b_dy,
284                                          8*i, 8*j, b_dx, b_dy, edged_width/2);                                                            edged_width / 2);
285                  compensate8x8_halfpel(&dct_codes[5*64], cur->v,                  compensate8x8_halfpel(&dct_codes[5 * 64], cur->v, b_ref->v, b_refh->v,
286                                          b_ref->v, b_refh->v, b_refv->v, b_refhv->v,                                                            b_refv->v, b_refhv->v, 8 * i, 8 * j, b_dx, b_dy,
287                                          8*i, 8*j, b_dx, b_dy, edged_width/2);                                                            edged_width / 2);
288    
289                  break;                  break;
290    
# Line 278  Line 295 
295                  b_dx = mb->b_mvs[0].x;                  b_dx = mb->b_mvs[0].x;
296                  b_dy = mb->b_mvs[0].y;                  b_dy = mb->b_mvs[0].y;
297    
298                  transfer_8to16sub2_c(                  transfer_8to16sub2_c(&dct_codes[0 * 64],
                                 &dct_codes[0*64],  
299                                  cur->y + (i*16) + (j*16)*edged_width,                                  cur->y + (i*16) + (j*16)*edged_width,
300                                  get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,                                                           get_ref(f_ref->y, f_refh->y, f_refv->y,
301                                                          16*i, 16*j, 1, dx, dy, edged_width),                                                                           f_refhv->y, 16 * i, 16 * j, 1, dx, dy,
302                                  get_ref(b_ref->y, b_refh->y, b_refv->y, b_refhv->y,                                                                           edged_width), get_ref(b_ref->y, b_refh->y,
303                                                          16*i, 16*j, 1, b_dx, b_dy, edged_width),                                                                                                                     b_refv->y,
304                                                                                                                       b_refhv->y, 16 * i,
305                                                                                                                       16 * j, 1, b_dx,
306                                                                                                                       b_dy, edged_width),
307                                  edged_width);                                  edged_width);
308    
309                  transfer_8to16sub2_c(                  transfer_8to16sub2_c(&dct_codes[1 * 64],
                                 &dct_codes[1*64],  
310                                  cur->y + (i*16+8) + (j*16)*edged_width,                                  cur->y + (i*16+8) + (j*16)*edged_width,
311                                  get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,                                                           get_ref(f_ref->y, f_refh->y, f_refv->y,
312                                                          16*i+8, 16*j, 1, dx, dy, edged_width),                                                                           f_refhv->y, 16 * i + 8, 16 * j, 1, dx, dy,
313                                  get_ref(b_ref->y, b_refh->y, b_refv->y, b_refhv->y,                                                                           edged_width), get_ref(b_ref->y, b_refh->y,
314                                                          16*i+8, 16*j, 1, b_dx, b_dy, edged_width),                                                                                                                     b_refv->y,
315                                                                                                                       b_refhv->y,
316                                                                                                                       16 * i + 8, 16 * j,
317                                                                                                                       1, b_dx, b_dy,
318                                                                                                                       edged_width),
319                                  edged_width);                                  edged_width);
320    
321                  transfer_8to16sub2_c(                  transfer_8to16sub2_c(&dct_codes[2 * 64],
                                 &dct_codes[2*64],  
322                                  cur->y + (i*16) + (j*16+8)*edged_width,                                  cur->y + (i*16) + (j*16+8)*edged_width,
323                                  get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,                                                           get_ref(f_ref->y, f_refh->y, f_refv->y,
324                                                          16*i, 16*j+8, 1, dx, dy, edged_width),                                                                           f_refhv->y, 16 * i, 16 * j + 8, 1, dx, dy,
325                                  get_ref(b_ref->y, b_refh->y, b_refv->y, b_refhv->y,                                                                           edged_width), get_ref(b_ref->y, b_refh->y,
326                                                          16*i, 16*j+8, 1, b_dx, b_dy, edged_width),                                                                                                                     b_refv->y,
327                                  edged_width);                                                                                                                     b_refhv->y, 16 * i,
328                                                                                                                       16 * j + 8, 1, b_dx,
329                  transfer_8to16sub2_c(                                                                                                                     b_dy, edged_width),
330                                  &dct_codes[3*64],                                                           edged_width);
331                                  cur->y + (i*16+8) + (j*16+8)*edged_width,  
332                                  get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,                  transfer_8to16sub2_c(&dct_codes[3 * 64],
333                                                          16*i + 8, 16*j + 8, 1, dx, dy, edged_width),                                                           cur->y + (i * 16 + 8) + (j * 16 +
334                                  get_ref(b_ref->y, b_refh->y, b_refv->y, b_refhv->y,                                                                                                            8) * edged_width,
335                                                          16*i + 8, 16*j + 8, 1, b_dx, b_dy, edged_width),                                                           get_ref(f_ref->y, f_refh->y, f_refv->y,
336                                                                             f_refhv->y, 16 * i + 8, 16 * j + 8, 1, dx,
337                                                                             dy, edged_width), get_ref(b_ref->y,
338                                                                                                                               b_refh->y,
339                                                                                                                               b_refv->y,
340                                                                                                                               b_refhv->y,
341                                                                                                                               16 * i + 8,
342                                                                                                                               16 * j + 8, 1,
343                                                                                                                               b_dx, b_dy,
344                                                                                                                               edged_width),
345                                  edged_width);                                  edged_width);
346    
347    
# Line 321  Line 351 
351                  b_dx = (b_dx & 3) ? (b_dx >> 1) | 1 : b_dx / 2;                  b_dx = (b_dx & 3) ? (b_dx >> 1) | 1 : b_dx / 2;
352                  b_dy = (b_dy & 3) ? (b_dy >> 1) | 1 : b_dy / 2;                  b_dy = (b_dy & 3) ? (b_dy >> 1) | 1 : b_dy / 2;
353    
354                  transfer_8to16sub2_c(                  transfer_8to16sub2_c(&dct_codes[4 * 64],
                                 &dct_codes[4*64],  
355                                  cur->u + (y*8)*edged_width/2 + (x*8),                                  cur->u + (y*8)*edged_width/2 + (x*8),
356                                  get_ref(f_ref->u, f_refh->u, f_refv->u, f_refhv->u,                                                           get_ref(f_ref->u, f_refh->u, f_refv->u,
357                                                          8*i, 8*j, 1, dx, dy, edged_width/2),                                                                           f_refhv->u, 8 * i, 8 * j, 1, dx, dy,
358                                  get_ref(b_ref->u, b_refh->u, b_refv->u, b_refhv->u,                                                                           edged_width / 2), get_ref(b_ref->u,
359                                                          8*i, 8*j, 1, b_dx, b_dy, edged_width/2),                                                                                                                             b_refh->u,
360                                                                                                                               b_refv->u,
361                                                                                                                               b_refhv->u,
362                                                                                                                               8 * i, 8 * j, 1,
363                                                                                                                               b_dx, b_dy,
364                                                                                                                               edged_width /
365                                                                                                                               2),
366                                  edged_width/2);                                  edged_width/2);
367    
368                  transfer_8to16sub2_c(                  transfer_8to16sub2_c(&dct_codes[5 * 64],
                                 &dct_codes[5*64],  
369                                  cur->v + (y*8)*edged_width/2 + (x*8),                                  cur->v + (y*8)*edged_width/2 + (x*8),
370                                  get_ref(f_ref->v, f_refh->v, f_refv->v, f_refhv->v,                                                           get_ref(f_ref->v, f_refh->v, f_refv->v,
371                                                          8*i, 8*j, 1, dx, dy, edged_width/2),                                                                           f_refhv->v, 8 * i, 8 * j, 1, dx, dy,
372                                  get_ref(b_ref->v, b_refh->v, b_refv->v, b_refhv->v,                                                                           edged_width / 2), get_ref(b_ref->v,
373                                                          8*i, 8*j, 1, b_dx, b_dy, edged_width/2),                                                                                                                             b_refh->v,
374                                                                                                                               b_refv->v,
375                                                                                                                               b_refhv->v,
376                                                                                                                               8 * i, 8 * j, 1,
377                                                                                                                               b_dx, b_dy,
378                                                                                                                               edged_width /
379                                                                                                                               2),
380                                  edged_width/2);                                  edged_width/2);
381    
382                  break;                  break;

Legend:
Removed from v.152  
changed lines
  Added in v.229

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4