[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 229, Thu Jun 20 14:05:58 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    #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 25  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 62  Line 70 
70                      const IMAGE * const refv,                      const IMAGE * const refv,
71                          const IMAGE * const refhv,                          const IMAGE * const refhv,
72                      IMAGE * const cur,                      IMAGE * const cur,
73                      int16_t dct_codes[][64],                                           int16_t * dct_codes,
74                          const uint32_t width,                          const uint32_t width,
75                          const uint32_t height,                          const uint32_t height,
76                          const uint32_t edged_width,                          const uint32_t edged_width,
# Line 72  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], 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], 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], 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], 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                  compensate8x8_halfpel(dct_codes[4], cur->u, ref->u, refh->u, refv->u, refhv->u,  #ifdef BFRAMES
105                                                                  8*i, 8*j, dx, dy, edged_width/2);                  compensate8x8_halfpel(&dct_codes[4 * 64], cur->u, ref->u, refh->u,
106                  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,
107                                                                  8*i, 8*j, dx, dy, edged_width/2);               */                                                            edged_width / 2);
108                    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
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                  transfer_8to16sub(dct_codes[4],                                                            edged_width / 2, rounding);
115                    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                  transfer_8to16sub(dct_codes[5],                                                            edged_width / 2, rounding);
122                    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
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], 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], 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], 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], 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);
                 /* 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);               */  
151    
152                    /* uv-image-based compensation */
153    #ifdef BFRAMES
154                    compensate8x8_halfpel(&dct_codes[4 * 64], cur->u, ref->u, refh->u,
155                                                              refv->u, refhv->u, 8 * i, 8 * j, dx, dy,
156                                                              edged_width / 2);
157                    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
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                  transfer_8to16sub(dct_codes[4],                                                            edged_width / 2, rounding);
164                    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                  transfer_8to16sub(dct_codes[5],                                                            edged_width / 2, rounding);
171                    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
176            }
177    }
178    
179    
180    void
181    MBMotionCompensationBVOP(MBParam * pParam,
182                                                     MACROBLOCK * const mb,
183                                                     const uint32_t i,
184                                                     const uint32_t j,
185                                                     IMAGE * const cur,
186                                                     const IMAGE * const f_ref,
187                                                     const IMAGE * const f_refh,
188                                                     const IMAGE * const f_refv,
189                                                     const IMAGE * const f_refhv,
190                                                     const IMAGE * const b_ref,
191                                                     const IMAGE * const b_refh,
192                                                     const IMAGE * const b_refv,
193                                                     const IMAGE * const b_refhv,
194                                                     int16_t * dct_codes)
195    {
196            static const uint32_t roundtab[16] =
197                    { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 };
198    
199            const int32_t edged_width = pParam->edged_width;
200            int32_t dx, dy;
201            int32_t b_dx, b_dy;
202            int x = i;
203            int y = j;
204    
205    
206    
207            switch (mb->mode) {
208            case MODE_FORWARD:
209                    dx = mb->mvs[0].x;
210                    dy = mb->mvs[0].y;
211    
212                    transfer_8to16sub_c(&dct_codes[0 * 64],
213                                                            cur->y + (j * 16) * edged_width + (i * 16),
214                                                            get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,
215                                                                            i * 16, j * 16, 1, dx, dy, edged_width),
216                                                            edged_width);
217    
218                    transfer_8to16sub(&dct_codes[1 * 64],
219                                                      cur->y + (j * 16) * edged_width + (i * 16 + 8),
220                                                      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),
222                                                      edged_width);
223    
224                    transfer_8to16sub_c(&dct_codes[2 * 64],
225                                                            cur->y + (j * 16 + 8) * edged_width + (i * 16),
226                                                            get_ref(f_ref->y, f_refh->y, f_refv->y, f_refhv->y,
227                                                                            i * 16, j * 16 + 8, 1, dx, dy,
228                                                                            edged_width), edged_width);
229    
230                    transfer_8to16sub(&dct_codes[3 * 64],
231                                                      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,
233                                                                      i * 16 + 8, j * 16 + 8, 1, dx, dy,
234                                                                      edged_width), edged_width);
235    
236    
237                    dx = (dx & 3) ? (dx >> 1) | 1 : dx / 2;
238                    dy = (dy & 3) ? (dy >> 1) | 1 : dy / 2;
239    
240                    /* uv-image-based compensation */
241                    compensate8x8_halfpel(&dct_codes[4 * 64], cur->u, f_ref->u, f_refh->u,
242                                                              f_refv->u, f_refhv->u, 8 * i, 8 * j, dx, dy,
243                                                              edged_width / 2);
244                    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;
249    
250            case MODE_BACKWARD:
251                    b_dx = mb->b_mvs[0].x;
252                    b_dy = mb->b_mvs[0].y;
253    
254                    transfer_8to16sub_c(&dct_codes[0 * 64],
255                                                            cur->y + (j * 16) * edged_width + (i * 16),
256                                                            get_ref(b_ref->y, b_refh->y, b_refv->y, b_refhv->y,
257                                                                            i * 16, j * 16, 1, b_dx, b_dy,
258                                                                            edged_width), edged_width);
259    
260                    transfer_8to16sub(&dct_codes[1 * 64],
261                                                      cur->y + (j * 16) * edged_width + (i * 16 + 8),
262                                                      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,
264                                                                      edged_width), edged_width);
265    
266                    transfer_8to16sub_c(&dct_codes[2 * 64],
267                                                            cur->y + (j * 16 + 8) * edged_width + (i * 16),
268                                                            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,
270                                                                            edged_width), edged_width);
271    
272                    transfer_8to16sub(&dct_codes[3 * 64],
273                                                      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,
275                                                                      i * 16 + 8, j * 16 + 8, 1, b_dx, b_dy,
276                                                                      edged_width), edged_width);
277    
278                    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;
280    
281                    /* uv-image-based compensation */
282                    compensate8x8_halfpel(&dct_codes[4 * 64], cur->u, b_ref->u, b_refh->u,
283                                                              b_refv->u, b_refhv->u, 8 * i, 8 * j, b_dx, b_dy,
284                                                              edged_width / 2);
285                    compensate8x8_halfpel(&dct_codes[5 * 64], cur->v, b_ref->v, b_refh->v,
286                                                              b_refv->v, b_refhv->v, 8 * i, 8 * j, b_dx, b_dy,
287                                                              edged_width / 2);
288    
289                    break;
290    
291    
292            case MODE_INTERPOLATE:
293                    dx = mb->mvs[0].x;
294                    dy = mb->mvs[0].y;
295                    b_dx = mb->b_mvs[0].x;
296                    b_dy = mb->b_mvs[0].y;
297    
298                    transfer_8to16sub2_c(&dct_codes[0 * 64],
299                                                             cur->y + (i * 16) + (j * 16) * edged_width,
300                                                             get_ref(f_ref->y, f_refh->y, f_refv->y,
301                                                                             f_refhv->y, 16 * i, 16 * j, 1, dx, dy,
302                                                                             edged_width), get_ref(b_ref->y, b_refh->y,
303                                                                                                                       b_refv->y,
304                                                                                                                       b_refhv->y, 16 * i,
305                                                                                                                       16 * j, 1, b_dx,
306                                                                                                                       b_dy, edged_width),
307                                                             edged_width);
308    
309                    transfer_8to16sub2_c(&dct_codes[1 * 64],
310                                                             cur->y + (i * 16 + 8) + (j * 16) * edged_width,
311                                                             get_ref(f_ref->y, f_refh->y, f_refv->y,
312                                                                             f_refhv->y, 16 * i + 8, 16 * j, 1, dx, dy,
313                                                                             edged_width), get_ref(b_ref->y, b_refh->y,
314                                                                                                                       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);
320    
321                    transfer_8to16sub2_c(&dct_codes[2 * 64],
322                                                             cur->y + (i * 16) + (j * 16 + 8) * edged_width,
323                                                             get_ref(f_ref->y, f_refh->y, f_refv->y,
324                                                                             f_refhv->y, 16 * i, 16 * j + 8, 1, dx, dy,
325                                                                             edged_width), get_ref(b_ref->y, b_refh->y,
326                                                                                                                       b_refv->y,
327                                                                                                                       b_refhv->y, 16 * i,
328                                                                                                                       16 * j + 8, 1, b_dx,
329                                                                                                                       b_dy, edged_width),
330                                                             edged_width);
331    
332                    transfer_8to16sub2_c(&dct_codes[3 * 64],
333                                                             cur->y + (i * 16 + 8) + (j * 16 +
334                                                                                                              8) * edged_width,
335                                                             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);
346    
347    
348                    dx = (dx & 3) ? (dx >> 1) | 1 : dx / 2;
349                    dy = (dy & 3) ? (dy >> 1) | 1 : dy / 2;
350    
351                    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;
353    
354                    transfer_8to16sub2_c(&dct_codes[4 * 64],
355                                                             cur->u + (y * 8) * edged_width / 2 + (x * 8),
356                                                             get_ref(f_ref->u, f_refh->u, f_refv->u,
357                                                                             f_refhv->u, 8 * i, 8 * j, 1, dx, dy,
358                                                                             edged_width / 2), get_ref(b_ref->u,
359                                                                                                                               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);
367    
368                    transfer_8to16sub2_c(&dct_codes[5 * 64],
369                                                             cur->v + (y * 8) * edged_width / 2 + (x * 8),
370                                                             get_ref(f_ref->v, f_refh->v, f_refv->v,
371                                                                             f_refhv->v, 8 * i, 8 * j, 1, dx, dy,
372                                                                             edged_width / 2), get_ref(b_ref->v,
373                                                                                                                               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);
381    
382                    break;
383    
384            case MODE_DIRECT:
385                    // todo
386                    break;
387          }          }
388    
389  }  }

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

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