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

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

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

revision 616, Wed Oct 30 18:06:41 2002 UTC revision 619, Sat Nov 2 15:52:31 2002 UTC
# Line 6  Line 6 
6  #include "../encoder.h"  #include "../encoder.h"
7  #include "../utils/mbfunctions.h"  #include "../utils/mbfunctions.h"
8  #include "../image/interpolate8x8.h"  #include "../image/interpolate8x8.h"
 #include "../image/qpel.h"  
9  #include "../utils/timer.h"  #include "../utils/timer.h"
10  #include "motion.h"  #include "motion.h"
11    
# Line 120  Line 119 
119                                           const uint32_t quarterpel,                                           const uint32_t quarterpel,
120                                           const uint32_t rounding)                                           const uint32_t rounding)
121  {  {
122          if (mb->mode == MODE_NOT_CODED) {          if (mb->mode == MODE_NOT_CODED || mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) {
123    
124                    int32_t dx = (quarterpel ? mb->qmvs[0].x : mb->mvs[0].x);
125                    int32_t dy = (quarterpel ? mb->qmvs[0].y : mb->mvs[0].y);
126    
127                    if ( (mb->mode == MODE_NOT_CODED) && (dx==0) && (dy==0) ) {     /* quick copy */
128                  transfer8x8_copy(cur->y + 16 * (i + j * edged_width),                  transfer8x8_copy(cur->y + 16 * (i + j * edged_width),
129                                                          ref->y + 16 * (i + j * edged_width),                                                          ref->y + 16 * (i + j * edged_width),
130                                                          edged_width);                                                          edged_width);
# Line 142  Line 146 
146                                                          edged_width / 2);                                                          edged_width / 2);
147                  return;                  return;
148          }          }
149            /* quick MODE_NOT_CODED for GMC with MV!=(0,0) is still needed */
         if (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) {  
                 int32_t dx = mb->mvs[0].x;  
                 int32_t dy = mb->mvs[0].y;  
   
                 if(quarterpel) {  
                         dx = mb->qmvs[0].x;  
                         dy = mb->qmvs[0].y;  
                 }  
150    
151                  compensate16x16_interpolate(&dct_codes[0 * 64], cur->y, ref->y, refh->y,                  compensate16x16_interpolate(&dct_codes[0 * 64], cur->y, ref->y, refh->y,
152                                                            refv->y, refhv->y, 16 * i, 16 * j, dx,                                                            refv->y, refhv->y, 16 * i, 16 * j, dx,
# Line 158  Line 154 
154    
155                  if (quarterpel)                  if (quarterpel)
156                  {                  {
157                          dx = (dx >> 2) + roundtab_78[dx & 0x7];                          dx /= 2;
158                          dy = (dy >> 2) + roundtab_78[dy & 0x7];                          dy /= 2;
159                  }                  }
160                  else {  
161                          dx = (dx >> 1) + roundtab_79[dx & 0x3];                          dx = (dx >> 1) + roundtab_79[dx & 0x3];
162                          dy = (dy >> 1) + roundtab_79[dy & 0x3];                          dy = (dy >> 1) + roundtab_79[dy & 0x3];
                 }  
163    
164                  /* uv-block-based compensation */                  /* uv-block-based compensation */
165                  transfer_8to16sub(&dct_codes[4 * 64],                  transfer_8to16sub(&dct_codes[4 * 64],
# Line 226  Line 221 
221                                                          cur->v + 8 * j * edged_width / 2 + 8 * i,                                                          cur->v + 8 * j * edged_width / 2 + 8 * i,
222                                                          interpolate8x8_switch2(refv->u, ref->v, 8 * i, 8 * j,                                                          interpolate8x8_switch2(refv->u, ref->v, 8 * i, 8 * j,
223                                                                                                          dx, dy, edged_width / 2, rounding),                                                                                                          dx, dy, edged_width / 2, rounding),
   
224                                                          edged_width / 2);                                                          edged_width / 2);
225          }          }
226  }  }

Legend:
Removed from v.616  
changed lines
  Added in v.619

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