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

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

Issue 812033011: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 5 years, 11 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/vp8/encoder/pickinter.c ('k') | source/libvpx/vp8/encoder/temporal_filter.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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 cost += cost_coeffs(mb, x->block + b, PLANE_TYPE_UV, 830 cost += cost_coeffs(mb, x->block + b, PLANE_TYPE_UV,
831 ta + vp8_block2above[b], tl + vp8_block2left[b]); 831 ta + vp8_block2above[b], tl + vp8_block2left[b]);
832 832
833 return cost; 833 return cost;
834 } 834 }
835 835
836 836
837 static int rd_inter16x16_uv(VP8_COMP *cpi, MACROBLOCK *x, int *rate, 837 static int rd_inter16x16_uv(VP8_COMP *cpi, MACROBLOCK *x, int *rate,
838 int *distortion, int fullpixel) 838 int *distortion, int fullpixel)
839 { 839 {
840 (void)cpi;
841 (void)fullpixel;
842
840 vp8_build_inter16x16_predictors_mbuv(&x->e_mbd); 843 vp8_build_inter16x16_predictors_mbuv(&x->e_mbd);
841 vp8_subtract_mbuv(x->src_diff, 844 vp8_subtract_mbuv(x->src_diff,
842 x->src.u_buffer, x->src.v_buffer, x->src.uv_stride, 845 x->src.u_buffer, x->src.v_buffer, x->src.uv_stride,
843 &x->e_mbd.predictor[256], &x->e_mbd.predictor[320], 8); 846 &x->e_mbd.predictor[256], &x->e_mbd.predictor[320], 8);
844 847
845 vp8_transform_mbuv(x); 848 vp8_transform_mbuv(x);
846 vp8_quantize_mbuv(x); 849 vp8_quantize_mbuv(x);
847 850
848 *rate = rd_cost_mbuv(x); 851 *rate = rd_cost_mbuv(x);
849 *distortion = vp8_mbuverror(x) / 4; 852 *distortion = vp8_mbuverror(x) / 4;
850 853
851 return RDCOST(x->rdmult, x->rddiv, *rate, *distortion); 854 return RDCOST(x->rdmult, x->rddiv, *rate, *distortion);
852 } 855 }
853 856
854 static int rd_inter4x4_uv(VP8_COMP *cpi, MACROBLOCK *x, int *rate, 857 static int rd_inter4x4_uv(VP8_COMP *cpi, MACROBLOCK *x, int *rate,
855 int *distortion, int fullpixel) 858 int *distortion, int fullpixel)
856 { 859 {
860 (void)cpi;
861 (void)fullpixel;
862
857 vp8_build_inter4x4_predictors_mbuv(&x->e_mbd); 863 vp8_build_inter4x4_predictors_mbuv(&x->e_mbd);
858 vp8_subtract_mbuv(x->src_diff, 864 vp8_subtract_mbuv(x->src_diff,
859 x->src.u_buffer, x->src.v_buffer, x->src.uv_stride, 865 x->src.u_buffer, x->src.v_buffer, x->src.uv_stride,
860 &x->e_mbd.predictor[256], &x->e_mbd.predictor[320], 8); 866 &x->e_mbd.predictor[256], &x->e_mbd.predictor[320], 8);
861 867
862 vp8_transform_mbuv(x); 868 vp8_transform_mbuv(x);
863 vp8_quantize_mbuv(x); 869 vp8_quantize_mbuv(x);
864 870
865 *rate = rd_cost_mbuv(x); 871 *rate = rd_cost_mbuv(x);
866 *distortion = vp8_mbuverror(x) / 4; 872 *distortion = vp8_mbuverror(x) / 4;
(...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after
2632 x->e_mbd.mode_info_context->mbmi.mode = B_PRED; 2638 x->e_mbd.mode_info_context->mbmi.mode = B_PRED;
2633 rate += rate4x4; 2639 rate += rate4x4;
2634 } 2640 }
2635 else 2641 else
2636 { 2642 {
2637 rate += rate16x16; 2643 rate += rate16x16;
2638 } 2644 }
2639 2645
2640 *rate_ = rate; 2646 *rate_ = rate;
2641 } 2647 }
OLDNEW
« no previous file with comments | « source/libvpx/vp8/encoder/pickinter.c ('k') | source/libvpx/vp8/encoder/temporal_filter.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698