[cvs] / xvidcore / src / motion / motion_comp.c Repository:
ViewVC logotype

Diff of /xvidcore/src/motion/motion_comp.c

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

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

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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