Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(958)

Side by Side Diff: source/libvpx/vp9/encoder/vp9_mbgraph.c

Issue 375983002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_lookahead.c ('k') | source/libvpx/vp9/encoder/vp9_mcomp.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 #include <limits.h> 11 #include <limits.h>
12 12
13 #include "vpx_mem/vpx_mem.h" 13 #include "vpx_mem/vpx_mem.h"
14 #include "vp9/encoder/vp9_rdopt.h"
15 #include "vp9/encoder/vp9_segmentation.h" 14 #include "vp9/encoder/vp9_segmentation.h"
16 #include "vp9/encoder/vp9_mcomp.h" 15 #include "vp9/encoder/vp9_mcomp.h"
17 #include "vp9/common/vp9_blockd.h" 16 #include "vp9/common/vp9_blockd.h"
18 #include "vp9/common/vp9_reconinter.h" 17 #include "vp9/common/vp9_reconinter.h"
19 #include "vp9/common/vp9_reconintra.h" 18 #include "vp9/common/vp9_reconintra.h"
20 #include "vp9/common/vp9_systemdependent.h" 19 #include "vp9/common/vp9_systemdependent.h"
21 20
22 21
23 static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi, 22 static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi,
24 const MV *ref_mv, 23 const MV *ref_mv,
25 MV *dst_mv, 24 MV *dst_mv,
26 int mb_row, 25 int mb_row,
27 int mb_col) { 26 int mb_col) {
28 MACROBLOCK *const x = &cpi->mb; 27 MACROBLOCK *const x = &cpi->mb;
29 MACROBLOCKD *const xd = &x->e_mbd; 28 MACROBLOCKD *const xd = &x->e_mbd;
30 const MV_SPEED_FEATURES *const mv_sf = &cpi->sf.mv; 29 const MV_SPEED_FEATURES *const mv_sf = &cpi->sf.mv;
31 const vp9_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[BLOCK_16X16]; 30 const vp9_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[BLOCK_16X16];
32 31
33 const int tmp_col_min = x->mv_col_min; 32 const int tmp_col_min = x->mv_col_min;
34 const int tmp_col_max = x->mv_col_max; 33 const int tmp_col_max = x->mv_col_max;
35 const int tmp_row_min = x->mv_row_min; 34 const int tmp_row_min = x->mv_row_min;
36 const int tmp_row_max = x->mv_row_max; 35 const int tmp_row_max = x->mv_row_max;
37 MV ref_full; 36 MV ref_full;
38 37
39 // Further step/diamond searches as necessary 38 // Further step/diamond searches as necessary
40 int step_param = mv_sf->reduce_first_step_size + 39 int step_param = mv_sf->reduce_first_step_size;
41 (cpi->oxcf.speed > 5 ? 1 : 0); 40 step_param = MIN(step_param, MAX_MVSEARCH_STEPS - 2);
42 step_param = MIN(step_param, mv_sf->max_step_search_steps - 2);
43 41
44 vp9_set_mv_search_range(x, ref_mv); 42 vp9_set_mv_search_range(x, ref_mv);
45 43
46 ref_full.col = ref_mv->col >> 3; 44 ref_full.col = ref_mv->col >> 3;
47 ref_full.row = ref_mv->row >> 3; 45 ref_full.row = ref_mv->row >> 3;
48 46
49 /*cpi->sf.search_method == HEX*/ 47 /*cpi->sf.search_method == HEX*/
50 vp9_hex_search(x, &ref_full, step_param, x->errorperbit, 0, &v_fn_ptr, 0, 48 vp9_hex_search(x, &ref_full, step_param, x->errorperbit, 0, &v_fn_ptr, 0,
51 ref_mv, dst_mv); 49 ref_mv, dst_mv);
52 50
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 assert(q_cur != NULL); 399 assert(q_cur != NULL);
402 400
403 update_mbgraph_frame_stats(cpi, frame_stats, &q_cur->img, 401 update_mbgraph_frame_stats(cpi, frame_stats, &q_cur->img,
404 golden_ref, cpi->Source); 402 golden_ref, cpi->Source);
405 } 403 }
406 404
407 vp9_clear_system_state(); 405 vp9_clear_system_state();
408 406
409 separate_arf_mbs(cpi); 407 separate_arf_mbs(cpi);
410 } 408 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_lookahead.c ('k') | source/libvpx/vp9/encoder/vp9_mcomp.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698