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 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1848 this_sad = cpi->fn_ptr[bsize].sdf(src_buf, src_stride, | 1848 this_sad = cpi->fn_ptr[bsize].sdf(src_buf, src_stride, |
1849 ref_buf, ref_stride); | 1849 ref_buf, ref_stride); |
1850 if (this_sad < best_sad) { | 1850 if (this_sad < best_sad) { |
1851 best_sad = this_sad; | 1851 best_sad = this_sad; |
1852 tmp_mv->row = search_pos[idx].row + this_mv.row; | 1852 tmp_mv->row = search_pos[idx].row + this_mv.row; |
1853 tmp_mv->col = search_pos[idx].col + this_mv.col; | 1853 tmp_mv->col = search_pos[idx].col + this_mv.col; |
1854 } | 1854 } |
1855 } | 1855 } |
1856 tmp_mv->row *= 8; | 1856 tmp_mv->row *= 8; |
1857 tmp_mv->col *= 8; | 1857 tmp_mv->col *= 8; |
1858 x->pred_mv[LAST_FRAME] = *tmp_mv; | |
1859 | 1858 |
1860 return best_sad; | 1859 return best_sad; |
1861 } | 1860 } |
1862 | 1861 |
1863 /* do_refine: If last step (1-away) of n-step search doesn't pick the center | 1862 /* do_refine: If last step (1-away) of n-step search doesn't pick the center |
1864 point as the best match, we will do a final 1-away diamond | 1863 point as the best match, we will do a final 1-away diamond |
1865 refining search */ | 1864 refining search */ |
1866 int vp9_full_pixel_diamond(const VP9_COMP *cpi, MACROBLOCK *x, | 1865 int vp9_full_pixel_diamond(const VP9_COMP *cpi, MACROBLOCK *x, |
1867 MV *mvp_full, int step_param, | 1866 MV *mvp_full, int step_param, |
1868 int sadpb, int further_steps, int do_refine, | 1867 int sadpb, int further_steps, int do_refine, |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2286 break; | 2285 break; |
2287 default: | 2286 default: |
2288 assert(0 && "Invalid search method."); | 2287 assert(0 && "Invalid search method."); |
2289 } | 2288 } |
2290 | 2289 |
2291 if (method != NSTEP && rd && var < var_max) | 2290 if (method != NSTEP && rd && var < var_max) |
2292 var = vp9_get_mvpred_var(x, tmp_mv, ref_mv, fn_ptr, 1); | 2291 var = vp9_get_mvpred_var(x, tmp_mv, ref_mv, fn_ptr, 1); |
2293 | 2292 |
2294 return var; | 2293 return var; |
2295 } | 2294 } |
OLD | NEW |