[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 581, Sat Oct 5 21:42:04 2002 UTC revision 588, Thu Oct 10 12:16:00 2002 UTC
# Line 13  Line 13 
13    
14    
15  static __inline void  static __inline void
16    compensate16x16_interpolate(int16_t * const dct_codes,
17                                                        uint8_t * const cur,
18                                                        const uint8_t * const ref,
19                                                        const uint8_t * const refh,
20                                                        const uint8_t * const refv,
21                                                        const uint8_t * const refhv,
22                                                        const uint32_t x,
23                                                        const uint32_t y,
24                                                        const int32_t dx,
25                                                        const int32_t dy,
26                                                        const uint32_t stride,
27                                                        const uint32_t quarterpel,
28                                                        const uint32_t rounding)
29    {
30            if(quarterpel) {
31                    interpolate16x16_quarterpel((uint8_t *) refv, (uint8_t *) ref, (uint8_t *) refh,
32                            (uint8_t *) refh + 64, (uint8_t *) refhv, x, y, dx, dy, stride, rounding);
33    
34                    transfer_8to16sub(dct_codes, cur + y*stride + x,
35                                                      refv + y*stride + x, stride);
36                    transfer_8to16sub(dct_codes+64, cur + y*stride + x + 8,
37                                                      refv + y*stride + x + 8, stride);
38                    transfer_8to16sub(dct_codes+128, cur + y*stride + x + 8*stride,
39                                                      refv + y*stride + x + 8*stride, stride);
40                    transfer_8to16sub(dct_codes+192, cur + y*stride + x + 8*stride + 8,
41                                                      refv + y*stride + x + 8*stride+8, stride);
42    
43            }
44            else
45            {
46                    const uint8_t * reference;
47    
48                    switch (((dx & 1) << 1) + (dy & 1))     // ((dx%2)?2:0)+((dy%2)?1:0)
49                    {
50                    case 0: reference = ref + ((y + dy / 2) * stride + x + dx / 2); break;
51                    case 1: reference = refv + ((y + (dy-1) / 2) * stride + x + dx / 2); break;
52                    case 2: reference = refh + ((y + dy / 2) * stride + x + (dx-1) / 2); break;
53                    default:                                        // case 3:
54                            reference = refhv + ((y + (dy-1) / 2) * stride + x + (dx-1) / 2); break;
55                    }
56                    transfer_8to16sub(dct_codes, cur + y * stride + x,
57                                                              reference, stride);
58                    transfer_8to16sub(dct_codes+64, cur + y * stride + x + 8,
59                                                              reference + 8, stride);
60                    transfer_8to16sub(dct_codes+128, cur + y * stride + x + 8*stride,
61                                                              reference + 8*stride, stride);
62                    transfer_8to16sub(dct_codes+192, cur + y * stride + x + 8*stride+8,
63                                                              reference + 8*stride + 8, stride);
64            }
65    }
66    
67    static __inline void
68  compensate8x8_interpolate(int16_t * const dct_codes,  compensate8x8_interpolate(int16_t * const dct_codes,
69                                                    uint8_t * const cur,                                                    uint8_t * const cur,
70                                                    const uint8_t * const ref,                                                    const uint8_t * const ref,
# Line 99  Line 151 
151                          dy = mb->qmvs[0].y;                          dy = mb->qmvs[0].y;
152                  }                  }
153    
154                  compensate8x8_interpolate(&dct_codes[0 * 64], cur->y, ref->y, refh->y,                  compensate16x16_interpolate(&dct_codes[0 * 64], cur->y, ref->y, refh->y,
155                                                            refv->y, refhv->y, 16 * i, 16 * j, dx, dy,                                                            refv->y, refhv->y, 16 * i, 16 * j, dx,
                                                           edged_width, quarterpel, rounding);  
                 compensate8x8_interpolate(&dct_codes[1 * 64], cur->y, ref->y, refh->y,  
                                                           refv->y, refhv->y, 16 * i + 8, 16 * j, dx, dy,  
                                                           edged_width, quarterpel, rounding);  
                 compensate8x8_interpolate(&dct_codes[2 * 64], cur->y, ref->y, refh->y,  
                                                           refv->y, refhv->y, 16 * i, 16 * j + 8, dx, dy,  
                                                           edged_width, quarterpel, rounding);  
                 compensate8x8_interpolate(&dct_codes[3 * 64], cur->y, ref->y, refh->y,  
                                                           refv->y, refhv->y, 16 * i + 8, 16 * j + 8, dx,  
156                                                            dy, edged_width, quarterpel, rounding);                                                            dy, edged_width, quarterpel, rounding);
157    
158                  if (quarterpel)                  if (quarterpel)

Legend:
Removed from v.581  
changed lines
  Added in v.588

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