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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 int y_stride; | 228 int y_stride; |
229 int offset; | 229 int offset; |
230 int pre_stride = x->e_mbd.pre.y_stride; | 230 int pre_stride = x->e_mbd.pre.y_stride; |
231 unsigned char *base_pre = x->e_mbd.pre.y_buffer; | 231 unsigned char *base_pre = x->e_mbd.pre.y_buffer; |
232 | 232 |
233 | 233 |
234 #if ARCH_X86 || ARCH_X86_64 | 234 #if ARCH_X86 || ARCH_X86_64 |
235 MACROBLOCKD *xd = &x->e_mbd; | 235 MACROBLOCKD *xd = &x->e_mbd; |
236 unsigned char *y0 = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride
+ bestmv->as_mv.col; | 236 unsigned char *y0 = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride
+ bestmv->as_mv.col; |
237 unsigned char *y; | 237 unsigned char *y; |
238 int buf_r1, buf_r2, buf_c1, buf_c2; | 238 int buf_r1, buf_r2, buf_c1; |
239 | 239 |
240 /* Clamping to avoid out-of-range data access */ | 240 /* Clamping to avoid out-of-range data access */ |
241 buf_r1 = ((bestmv->as_mv.row - 3) < x->mv_row_min)?(bestmv->as_mv.row - x->m
v_row_min):3; | 241 buf_r1 = ((bestmv->as_mv.row - 3) < x->mv_row_min)?(bestmv->as_mv.row - x->m
v_row_min):3; |
242 buf_r2 = ((bestmv->as_mv.row + 3) > x->mv_row_max)?(x->mv_row_max - bestmv->
as_mv.row):3; | 242 buf_r2 = ((bestmv->as_mv.row + 3) > x->mv_row_max)?(x->mv_row_max - bestmv->
as_mv.row):3; |
243 buf_c1 = ((bestmv->as_mv.col - 3) < x->mv_col_min)?(bestmv->as_mv.col - x->m
v_col_min):3; | 243 buf_c1 = ((bestmv->as_mv.col - 3) < x->mv_col_min)?(bestmv->as_mv.col - x->m
v_col_min):3; |
244 buf_c2 = ((bestmv->as_mv.col + 3) > x->mv_col_max)?(x->mv_col_max - bestmv->
as_mv.col):3; | |
245 y_stride = 32; | 244 y_stride = 32; |
246 | 245 |
247 /* Copy to intermediate buffer before searching. */ | 246 /* Copy to intermediate buffer before searching. */ |
248 vfp->copymem(y0 - buf_c1 - pre_stride*buf_r1, pre_stride, xd->y_buf, y_strid
e, 16+buf_r1+buf_r2); | 247 vfp->copymem(y0 - buf_c1 - pre_stride*buf_r1, pre_stride, xd->y_buf, y_strid
e, 16+buf_r1+buf_r2); |
249 y = xd->y_buf + y_stride*buf_r1 +buf_c1; | 248 y = xd->y_buf + y_stride*buf_r1 +buf_c1; |
250 #else | 249 #else |
251 unsigned char *y = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride +
bestmv->as_mv.col; | 250 unsigned char *y = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride +
bestmv->as_mv.col; |
252 y_stride = pre_stride; | 251 y_stride = pre_stride; |
253 #endif | 252 #endif |
254 | 253 |
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2017 ++mv_mode_cts[3][1]; | 2016 ++mv_mode_cts[3][1]; |
2018 } | 2017 } |
2019 } | 2018 } |
2020 } | 2019 } |
2021 } | 2020 } |
2022 } | 2021 } |
2023 | 2022 |
2024 #endif/* END MV ref count ENTROPY_STATS stats code */ | 2023 #endif/* END MV ref count ENTROPY_STATS stats code */ |
2025 | 2024 |
2026 #endif | 2025 #endif |
OLD | NEW |