156 |
const uint32_t rounding) |
const uint32_t rounding) |
157 |
{ |
{ |
158 |
|
|
159 |
const uint8_t * const src = refn + (y + (dy>>1)) * stride + x + (dx>>1); |
const uint8_t * const src = refn + (int)((y + (dy>>1)) * stride + x + (dx>>1)); |
160 |
uint8_t * const dst = cur + y * stride + x; |
uint8_t * const dst = cur + (int)(y * stride + x); |
161 |
|
|
162 |
switch (((dx & 1) << 1) + (dy & 1)) { /* ((dx%2)?2:0)+((dy%2)?1:0) */ |
switch (((dx & 1) << 1) + (dy & 1)) { /* ((dx%2)?2:0)+((dy%2)?1:0) */ |
163 |
case 0: |
case 0: |
221 |
const uint32_t rounding) |
const uint32_t rounding) |
222 |
{ |
{ |
223 |
|
|
224 |
const uint8_t * const src = refn + (y + (dy>>1)) * stride + x + (dx>>1); |
const uint8_t * const src = refn + (int)((y + (dy>>1)) * stride + x + (dx>>1)); |
225 |
|
|
226 |
switch (((dx & 1) << 1) + (dy & 1)) { /* ((dx%2)?2:0)+((dy%2)?1:0) */ |
switch (((dx & 1) << 1) + (dy & 1)) { /* ((dx%2)?2:0)+((dy%2)?1:0) */ |
227 |
case 0: |
case 0: |
249 |
const uint32_t stride, |
const uint32_t stride, |
250 |
const uint32_t rounding) |
const uint32_t rounding) |
251 |
{ |
{ |
252 |
const int32_t xRef = x*4 + dx; |
const int32_t xRef = (int)x*4 + dx; |
253 |
const int32_t yRef = y*4 + dy; |
const int32_t yRef = (int)y*4 + dy; |
254 |
|
|
255 |
uint8_t *src, *dst; |
uint8_t *src, *dst; |
256 |
uint8_t *halfpel_h, *halfpel_v, *halfpel_hv; |
uint8_t *halfpel_h, *halfpel_v, *halfpel_hv; |
268 |
|
|
269 |
y_frac = yRef - (4*y_int); |
y_frac = yRef - (4*y_int); |
270 |
|
|
271 |
src = refn + y_int * stride + x_int; |
src = refn + y_int * (int)stride + x_int; |
272 |
halfpel_h = refh; |
halfpel_h = refh; |
273 |
halfpel_v = refv; |
halfpel_v = refv; |
274 |
halfpel_hv = refhv; |
halfpel_hv = refhv; |
375 |
const uint32_t stride, |
const uint32_t stride, |
376 |
const uint32_t rounding) |
const uint32_t rounding) |
377 |
{ |
{ |
378 |
const int32_t xRef = x*4 + dx; |
const int32_t xRef = (int)x*4 + dx; |
379 |
const int32_t yRef = y*4 + dy; |
const int32_t yRef = (int)y*4 + dy; |
380 |
|
|
381 |
uint8_t *src, *dst; |
uint8_t *src, *dst; |
382 |
uint8_t *halfpel_h, *halfpel_v, *halfpel_hv; |
uint8_t *halfpel_h, *halfpel_v, *halfpel_hv; |
394 |
|
|
395 |
y_frac = yRef - (4*y_int); |
y_frac = yRef - (4*y_int); |
396 |
|
|
397 |
src = refn + y_int * stride + x_int; |
src = refn + y_int * (int)stride + x_int; |
398 |
halfpel_h = refh; |
halfpel_h = refh; |
399 |
halfpel_v = refv; |
halfpel_v = refv; |
400 |
halfpel_hv = refhv; |
halfpel_hv = refhv; |