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

Side by Side Diff: source/libvpx/vp8/encoder/pickinter.c

Issue 1328593002: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 3 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/test/encode_test_driver.cc ('k') | source/libvpx/vp9/encoder/vp9_encoder.h » ('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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 806
807 // Don't do mv reuse since we want to allow for another mode besides 807 // Don't do mv reuse since we want to allow for another mode besides
808 // ZEROMV_LAST to remove dot artifact. 808 // ZEROMV_LAST to remove dot artifact.
809 if (dot_artifact_candidate) 809 if (dot_artifact_candidate)
810 parent_ref_valid = 0; 810 parent_ref_valid = 0;
811 } 811 }
812 #endif 812 #endif
813 813
814 // Check if current macroblock is in skin area. 814 // Check if current macroblock is in skin area.
815 { 815 {
816 const int y = x->src.y_buffer[7 * x->src.y_stride + 7]; 816 const int y = (x->src.y_buffer[7 * x->src.y_stride + 7] +
817 const int cb = x->src.u_buffer[3 * x->src.uv_stride + 3]; 817 x->src.y_buffer[7 * x->src.y_stride + 8] +
818 const int cr = x->src.v_buffer[3 * x->src.uv_stride + 3]; 818 x->src.y_buffer[8 * x->src.y_stride + 7] +
819 x->src.y_buffer[8 * x->src.y_stride + 8]) >> 2;
820 const int cb = (x->src.u_buffer[3 * x->src.uv_stride + 3] +
821 x->src.u_buffer[3 * x->src.uv_stride + 4] +
822 x->src.u_buffer[4 * x->src.uv_stride + 3] +
823 x->src.u_buffer[4 * x->src.uv_stride + 4]) >> 2;
824 const int cr = (x->src.v_buffer[3 * x->src.uv_stride + 3] +
825 x->src.v_buffer[3 * x->src.uv_stride + 4] +
826 x->src.v_buffer[4 * x->src.uv_stride + 3] +
827 x->src.v_buffer[4 * x->src.uv_stride + 4]) >> 2;
819 x->is_skin = 0; 828 x->is_skin = 0;
820 if (!cpi->oxcf.screen_content_mode) 829 if (!cpi->oxcf.screen_content_mode)
821 x->is_skin = is_skin_color(y, cb, cr); 830 x->is_skin = is_skin_color(y, cb, cr);
822 } 831 }
823 #if CONFIG_TEMPORAL_DENOISING 832 #if CONFIG_TEMPORAL_DENOISING
824 if (cpi->oxcf.noise_sensitivity) { 833 if (cpi->oxcf.noise_sensitivity) {
825 // Under aggressive denoising mode, should we use skin map to reduce denoi ser 834 // Under aggressive denoising mode, should we use skin map to reduce denoi ser
826 // and ZEROMV bias? Will need to revisit the accuracy of this detection fo r 835 // and ZEROMV bias? Will need to revisit the accuracy of this detection fo r
827 // very noisy input. For now keep this as is (i.e., don't turn it off). 836 // very noisy input. For now keep this as is (i.e., don't turn it off).
828 // if (cpi->denoiser.denoiser_mode == kDenoiserOnYUVAggressive) 837 // if (cpi->denoiser.denoiser_mode == kDenoiserOnYUVAggressive)
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 error4x4 = pick_intra4x4mby_modes(x, &rate, 1551 error4x4 = pick_intra4x4mby_modes(x, &rate,
1543 &best_sse); 1552 &best_sse);
1544 if (error4x4 < error16x16) 1553 if (error4x4 < error16x16)
1545 { 1554 {
1546 xd->mode_info_context->mbmi.mode = B_PRED; 1555 xd->mode_info_context->mbmi.mode = B_PRED;
1547 best_rate = rate; 1556 best_rate = rate;
1548 } 1557 }
1549 1558
1550 *rate_ = best_rate; 1559 *rate_ = best_rate;
1551 } 1560 }
OLDNEW
« no previous file with comments | « source/libvpx/test/encode_test_driver.cc ('k') | source/libvpx/vp9/encoder/vp9_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698