OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 y_stride = 32; | 386 y_stride = 32; |
387 /* Copy 18 rows x 32 cols area to intermediate buffer before searching. */ | 387 /* Copy 18 rows x 32 cols area to intermediate buffer before searching. */ |
388 vfp->copymem(y_0 - 1 - pre_stride, pre_stride, xd->y_buf, y_stride, 18); | 388 vfp->copymem(y_0 - 1 - pre_stride, pre_stride, xd->y_buf, y_stride, 18); |
389 y = xd->y_buf + y_stride + 1; | 389 y = xd->y_buf + y_stride + 1; |
390 #else | 390 #else |
391 unsigned char *y = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride
+ bestmv->as_mv.col; | 391 unsigned char *y = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride
+ bestmv->as_mv.col; |
392 y_stride = pre_stride; | 392 y_stride = pre_stride; |
393 #endif | 393 #endif |
394 | 394 |
395 /* central mv */ | 395 /* central mv */ |
396 bestmv->as_mv.row <<= 3; | 396 bestmv->as_mv.row *= 8; |
397 bestmv->as_mv.col <<= 3; | 397 bestmv->as_mv.col *= 8; |
398 startmv = *bestmv; | 398 startmv = *bestmv; |
399 | 399 |
400 /* calculate central point error */ | 400 /* calculate central point error */ |
401 bestmse = vfp->vf(y, y_stride, z, b->src_stride, sse1); | 401 bestmse = vfp->vf(y, y_stride, z, b->src_stride, sse1); |
402 *distortion = bestmse; | 402 *distortion = bestmse; |
403 bestmse += mv_err_cost(bestmv, ref_mv, mvcost, error_per_bit); | 403 bestmse += mv_err_cost(bestmv, ref_mv, mvcost, error_per_bit); |
404 | 404 |
405 /* go left then right and check error */ | 405 /* go left then right and check error */ |
406 this_mv.as_mv.row = startmv.as_mv.row; | 406 this_mv.as_mv.row = startmv.as_mv.row; |
407 this_mv.as_mv.col = ((startmv.as_mv.col - 8) | 4); | 407 this_mv.as_mv.col = ((startmv.as_mv.col - 8) | 4); |
(...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2021 ++mv_mode_cts[3][1]; | 2021 ++mv_mode_cts[3][1]; |
2022 } | 2022 } |
2023 } | 2023 } |
2024 } | 2024 } |
2025 } | 2025 } |
2026 } | 2026 } |
2027 | 2027 |
2028 #endif/* END MV ref count VP8_ENTROPY_STATS stats code */ | 2028 #endif/* END MV ref count VP8_ENTROPY_STATS stats code */ |
2029 | 2029 |
2030 #endif | 2030 #endif |
OLD | NEW |