[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 3, Fri Mar 8 02:46:11 2002 UTC revision 209, Fri Jun 14 13:29:07 2002 UTC
# Line 1  Line 1 
1    // 01.05.2002   updated MBMotionCompensationBVOP
2    // 14.04.2002   bframe compensation
3    
4  #include "../encoder.h"  #include "../encoder.h"
5  #include "../utils/mbfunctions.h"  #include "../utils/mbfunctions.h"
6  #include "../image/interpolate8x8.h"  #include "../image/interpolate8x8.h"
7  #include "../utils/timer.h"  #include "../utils/timer.h"
8    #include "motion.h"
9    
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 25  Line 31 
31                  ddx = dx/2;                  ddx = dx/2;
32                  ddy = dy/2;                  ddy = dy/2;
33                  transfer_8to16sub(dct_codes, cur + y*stride + x,                  transfer_8to16sub(dct_codes, cur + y*stride + x,
34                                  ref + (y+ddy)*stride + x+ddx, stride);                                                    ref + (int) ((y + ddy) * stride + x + ddx), stride);
35                  break;                  break;
36    
37      case 1 :      case 1 :
38                  ddx = dx/2;                  ddx = dx/2;
39                  ddy = (dy-1)/2;                  ddy = (dy-1)/2;
40                  transfer_8to16sub(dct_codes, cur + y*stride + x,                  transfer_8to16sub(dct_codes, cur + y*stride + x,
41                                  refv + (y+ddy)*stride + x+ddx, stride);                                                    refv + (int) ((y + ddy) * stride + x + ddx), stride);
42                  break;                  break;
43    
44      case 2 :      case 2 :
45                  ddx = (dx-1)/2;                  ddx = (dx-1)/2;
46                  ddy = dy/2;                  ddy = dy/2;
47                  transfer_8to16sub(dct_codes, cur + y*stride + x,                  transfer_8to16sub(dct_codes, cur + y*stride + x,
48                                  refh + (y+ddy)*stride + x+ddx, stride);                                                    refh + (int) ((y + ddy) * stride + x + ddx), stride);
49                  break;                  break;
50    
51          default :       // case 3:          default :       // case 3:
52                  ddx = (dx-1)/2;                  ddx = (dx-1)/2;
53                  ddy = (dy-1)/2;                  ddy = (dy-1)/2;
54                  transfer_8to16sub(dct_codes, cur + y*stride + x,                  transfer_8to16sub(dct_codes, cur + y*stride + x,
55                                  refhv + (y+ddy)*stride + x+ddx, stride);                                                    refhv + (int) ((y + ddy) * stride + x + ddx), stride);
56                  break;                  break;
57      }      }
58  }  }
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 62  Line 68 
68                      const IMAGE * const refv,                      const IMAGE * const refv,
69                          const IMAGE * const refhv,                          const IMAGE * const refhv,
70                      IMAGE * const cur,                      IMAGE * const cur,
71                      int16_t dct_codes[][64],                                           int16_t * dct_codes,
72                          const uint32_t width,                          const uint32_t width,
73                          const uint32_t height,                          const uint32_t height,
74                          const uint32_t edged_width,                          const uint32_t edged_width,
# Line 72  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], 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], 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], 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], 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                  compensate8x8_halfpel(dct_codes[4], cur->u, ref->u, refh->u, refv->u, refhv->u,  #ifdef BFRAMES
103                                                                  8*i, 8*j, dx, dy, edged_width/2);                  compensate8x8_halfpel(&dct_codes[4 * 64], cur->u, ref->u, refh->u,
104                  compensate8x8_halfpel(dct_codes[5], cur->v, ref->v, refh->v, refv->v, refhv->v,                                                            refv->u, refhv->u, 8 * i, 8 * j, dx, dy,
105                                                                  8*i, 8*j, dx, dy, edged_width/2);               */                                                            edged_width / 2);
106                    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
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                  transfer_8to16sub(dct_codes[4],                                                            edged_width / 2, rounding);
113                    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                  transfer_8to16sub(dct_codes[5],                                                            edged_width / 2, rounding);
120                    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
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], 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], 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], 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], 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);
                 /* uv-image-based compensation  
                 compensate8x8_halfpel(dct_codes[4], cur->u, ref->u, refh->u, refv->u, refhv->u,  
                                                                 8*i, 8*j, dx, dy, edged_width/2);  
                 compensate8x8_halfpel(dct_codes[5], cur->v, ref->v, refh->v, refv->v, refhv->v,  
                                                                 8*i, 8*j, dx, dy, edged_width/2);               */  
149    
150                    /* uv-image-based compensation */
151    #ifdef BFRAMES
152                    compensate8x8_halfpel(&dct_codes[4 * 64], cur->u, ref->u, refh->u,
153                                                              refv->u, refhv->u, 8 * i, 8 * j, dx, dy,
154                                                              edged_width / 2);
155                    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
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                  transfer_8to16sub(dct_codes[4],                                                            edged_width / 2, rounding);
162                    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                  transfer_8to16sub(dct_codes[5],                                                            edged_width / 2, rounding);
169                    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
174            }
175    }
176    
177    
178    void
179    MBMotionCompensationBVOP(MBParam * pParam,
180                                                     MACROBLOCK * const mb,
181                                                     const uint32_t i,
182                                                     const uint32_t j,
183                                                     IMAGE * const cur,
184                                                     const IMAGE * const f_ref,
185                                                     const IMAGE * const f_refh,
186                                                     const IMAGE * const f_refv,
187                                                     const IMAGE * const f_refhv,
188                                                     const IMAGE * const b_ref,
189                                                     const IMAGE * const b_refh,
190                                                     const IMAGE * const b_refv,
191                                                     const IMAGE * const b_refhv,
192                                                     int16_t * dct_codes)
193    {
194            static const uint32_t roundtab[16] =
195                    { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 };
196    
197            const int32_t edged_width = pParam->edged_width;
198            int32_t dx, dy;
199            int32_t b_dx, b_dy;
200            int x = i;
201            int y = j;
202    
203    
204    
205            switch (mb->mode) {
206            case MODE_FORWARD:
207                    dx = mb->mvs[0].x;
208                    dy = mb->mvs[0].y;
209    
210                    transfer_8to16sub_c(&dct_codes[0 * 64],
211                                                            cur->y + (j * 16) * edged_width + (i * 16),
212                                                            get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,
213                                                                            i * 16, j * 16, 1, dx, dy, edged_width),
214                                                            edged_width);
215    
216                    transfer_8to16sub(&dct_codes[1 * 64],
217                                                      cur->y + (j * 16) * edged_width + (i * 16 + 8),
218                                                      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),
220                                                      edged_width);
221    
222                    transfer_8to16sub_c(&dct_codes[2 * 64],
223                                                            cur->y + (j * 16 + 8) * edged_width + (i * 16),
224                                                            get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,
225                                                                            i * 16, j * 16 + 8, 1, dx, dy,
226                                                                            edged_width), edged_width);
227    
228                    transfer_8to16sub(&dct_codes[3 * 64],
229                                                      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,
231                                                                      i * 16 + 8, j * 16 + 8, 1, dx, dy,
232                                                                      edged_width), edged_width);
233    
234    
235                    dx = (dx & 3) ? (dx >> 1) | 1 : dx / 2;
236                    dy = (dy & 3) ? (dy >> 1) | 1 : dy / 2;
237    
238                    /* uv-image-based compensation */
239                    compensate8x8_halfpel(&dct_codes[4 * 64], cur->u, f_ref->u, f_refh->u,
240                                                              f_refv->u, f_refhv->u, 8 * i, 8 * j, dx, dy,
241                                                              edged_width / 2);
242                    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;
247    
248            case MODE_BACKWARD:
249                    b_dx = mb->b_mvs[0].x;
250                    b_dy = mb->b_mvs[0].y;
251    
252                    transfer_8to16sub_c(&dct_codes[0 * 64],
253                                                            cur->y + (j * 16) * edged_width + (i * 16),
254                                                            get_ref(b_ref->y, b_refh->y, b_refv->y, b_refhv->y,
255                                                                            i * 16, j * 16, 1, b_dx, b_dy,
256                                                                            edged_width), edged_width);
257    
258                    transfer_8to16sub(&dct_codes[1 * 64],
259                                                      cur->y + (j * 16) * edged_width + (i * 16 + 8),
260                                                      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,
262                                                                      edged_width), edged_width);
263    
264                    transfer_8to16sub_c(&dct_codes[2 * 64],
265                                                            cur->y + (j * 16 + 8) * edged_width + (i * 16),
266                                                            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,
268                                                                            edged_width), edged_width);
269    
270                    transfer_8to16sub(&dct_codes[3 * 64],
271                                                      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,
273                                                                      i * 16 + 8, j * 16 + 8, 1, b_dx, b_dy,
274                                                                      edged_width), edged_width);
275    
276                    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;
278    
279                    /* uv-image-based compensation */
280                    compensate8x8_halfpel(&dct_codes[4 * 64], cur->u, b_ref->u, b_refh->u,
281                                                              b_refv->u, b_refhv->u, 8 * i, 8 * j, b_dx, b_dy,
282                                                              edged_width / 2);
283                    compensate8x8_halfpel(&dct_codes[5 * 64], cur->v, b_ref->v, b_refh->v,
284                                                              b_refv->v, b_refhv->v, 8 * i, 8 * j, b_dx, b_dy,
285                                                              edged_width / 2);
286    
287                    break;
288    
289    
290            case MODE_INTERPOLATE:
291                    dx = mb->mvs[0].x;
292                    dy = mb->mvs[0].y;
293                    b_dx = mb->b_mvs[0].x;
294                    b_dy = mb->b_mvs[0].y;
295    
296                    transfer_8to16sub2_c(&dct_codes[0 * 64],
297                                                             cur->y + (i * 16) + (j * 16) * edged_width,
298                                                             get_ref(f_ref->y, f_refh->y, f_refv->y,
299                                                                             f_refhv->y, 16 * i, 16 * j, 1, dx, dy,
300                                                                             edged_width), get_ref(b_ref->y, b_refh->y,
301                                                                                                                       b_refv->y,
302                                                                                                                       b_refhv->y, 16 * i,
303                                                                                                                       16 * j, 1, b_dx,
304                                                                                                                       b_dy, edged_width),
305                                                             edged_width);
306    
307                    transfer_8to16sub2_c(&dct_codes[1 * 64],
308                                                             cur->y + (i * 16 + 8) + (j * 16) * edged_width,
309                                                             get_ref(f_ref->y, f_refh->y, f_refv->y,
310                                                                             f_refhv->y, 16 * i + 8, 16 * j, 1, dx, dy,
311                                                                             edged_width), get_ref(b_ref->y, b_refh->y,
312                                                                                                                       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);
318    
319                    transfer_8to16sub2_c(&dct_codes[2 * 64],
320                                                             cur->y + (i * 16) + (j * 16 + 8) * edged_width,
321                                                             get_ref(f_ref->y, f_refh->y, f_refv->y,
322                                                                             f_refhv->y, 16 * i, 16 * j + 8, 1, dx, dy,
323                                                                             edged_width), get_ref(b_ref->y, b_refh->y,
324                                                                                                                       b_refv->y,
325                                                                                                                       b_refhv->y, 16 * i,
326                                                                                                                       16 * j + 8, 1, b_dx,
327                                                                                                                       b_dy, edged_width),
328                                                             edged_width);
329    
330                    transfer_8to16sub2_c(&dct_codes[3 * 64],
331                                                             cur->y + (i * 16 + 8) + (j * 16 +
332                                                                                                              8) * edged_width,
333                                                             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);
344    
345    
346                    dx = (dx & 3) ? (dx >> 1) | 1 : dx / 2;
347                    dy = (dy & 3) ? (dy >> 1) | 1 : dy / 2;
348    
349                    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;
351    
352                    transfer_8to16sub2_c(&dct_codes[4 * 64],
353                                                             cur->u + (y * 8) * edged_width / 2 + (x * 8),
354                                                             get_ref(f_ref->u, f_refh->u, f_refv->u,
355                                                                             f_refhv->u, 8 * i, 8 * j, 1, dx, dy,
356                                                                             edged_width / 2), get_ref(b_ref->u,
357                                                                                                                               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);
365    
366                    transfer_8to16sub2_c(&dct_codes[5 * 64],
367                                                             cur->v + (y * 8) * edged_width / 2 + (x * 8),
368                                                             get_ref(f_ref->v, f_refh->v, f_refv->v,
369                                                                             f_refhv->v, 8 * i, 8 * j, 1, dx, dy,
370                                                                             edged_width / 2), get_ref(b_ref->v,
371                                                                                                                               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);
379    
380                    break;
381    
382            case MODE_DIRECT:
383                    // todo
384                    break;
385          }          }
386    
387  }  }

Legend:
Removed from v.3  
changed lines
  Added in v.209

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