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

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

Issue 1124333011: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: only update to last nights LKGR Created 5 years, 7 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
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_mcomp.c ('k') | source/libvpx/vp9/encoder/vp9_pickmode.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
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 int filt_best; 74 int filt_best;
75 75
76 // Start the search at the previous frame filter level unless it is now out of 76 // Start the search at the previous frame filter level unless it is now out of
77 // range. 77 // range.
78 int filt_mid = clamp(lf->filter_level, min_filter_level, max_filter_level); 78 int filt_mid = clamp(lf->filter_level, min_filter_level, max_filter_level);
79 int filter_step = filt_mid < 16 ? 4 : filt_mid / 4; 79 int filter_step = filt_mid < 16 ? 4 : filt_mid / 4;
80 // Sum squared error at each filter level 80 // Sum squared error at each filter level
81 int64_t ss_err[MAX_LOOP_FILTER + 1]; 81 int64_t ss_err[MAX_LOOP_FILTER + 1];
82 82
83 // Set each entry to -1 83 // Set each entry to -1
84 vpx_memset(ss_err, 0xFF, sizeof(ss_err)); 84 memset(ss_err, 0xFF, sizeof(ss_err));
85 85
86 // Make a copy of the unfiltered / processed recon buffer 86 // Make a copy of the unfiltered / processed recon buffer
87 vpx_yv12_copy_y(cm->frame_to_show, &cpi->last_frame_uf); 87 vpx_yv12_copy_y(cm->frame_to_show, &cpi->last_frame_uf);
88 88
89 best_err = try_filter_frame(sd, cpi, filt_mid, partial_frame); 89 best_err = try_filter_frame(sd, cpi, filt_mid, partial_frame);
90 filt_best = filt_mid; 90 filt_best = filt_mid;
91 ss_err[filt_mid] = best_err; 91 ss_err[filt_mid] = best_err;
92 92
93 while (filter_step > 0) { 93 while (filter_step > 0) {
94 const int filt_high = MIN(filt_mid + filter_step, max_filter_level); 94 const int filt_high = MIN(filt_mid + filter_step, max_filter_level);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 int filt_guess = ROUND_POWER_OF_TWO(q * 20723 + 1015158, 18); 182 int filt_guess = ROUND_POWER_OF_TWO(q * 20723 + 1015158, 18);
183 #endif // CONFIG_VP9_HIGHBITDEPTH 183 #endif // CONFIG_VP9_HIGHBITDEPTH
184 if (cm->frame_type == KEY_FRAME) 184 if (cm->frame_type == KEY_FRAME)
185 filt_guess -= 4; 185 filt_guess -= 4;
186 lf->filter_level = clamp(filt_guess, min_filter_level, max_filter_level); 186 lf->filter_level = clamp(filt_guess, min_filter_level, max_filter_level);
187 } else { 187 } else {
188 lf->filter_level = search_filter_level(sd, cpi, 188 lf->filter_level = search_filter_level(sd, cpi,
189 method == LPF_PICK_FROM_SUBIMAGE); 189 method == LPF_PICK_FROM_SUBIMAGE);
190 } 190 }
191 } 191 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_mcomp.c ('k') | source/libvpx/vp9/encoder/vp9_pickmode.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698