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

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

Issue 1162573005: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 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_speed_features.c ('k') | source/libvpx/vp9/encoder/vp9_subexp.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
11 #include <math.h> 11 #include <math.h>
12 #include "./vp9_rtcd.h" 12 #include "./vp9_rtcd.h"
13 #include "vpx_ports/mem.h"
13 #include "vp9/encoder/vp9_ssim.h" 14 #include "vp9/encoder/vp9_ssim.h"
14 15
15 void vp9_ssim_parms_16x16_c(uint8_t *s, int sp, uint8_t *r, 16 void vp9_ssim_parms_16x16_c(uint8_t *s, int sp, uint8_t *r,
16 int rp, unsigned long *sum_s, unsigned long *sum_r, 17 int rp, unsigned long *sum_s, unsigned long *sum_r,
17 unsigned long *sum_sq_s, unsigned long *sum_sq_r, 18 unsigned long *sum_sq_s, unsigned long *sum_sq_r,
18 unsigned long *sum_sxr) { 19 unsigned long *sum_sxr) {
19 int i, j; 20 int i, j;
20 for (i = 0; i < 16; i++, s += sp, r += rp) { 21 for (i = 0; i < 16; i++, s += sp, r += rp) {
21 for (j = 0; j < 16; j++) { 22 for (j = 0; j < 16; j++) {
22 *sum_s += s[j]; 23 *sum_s += s[j];
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 source->uv_stride, dest->uv_stride, 491 source->uv_stride, dest->uv_stride,
491 source->uv_crop_width, source->uv_crop_height, bd); 492 source->uv_crop_width, source->uv_crop_height, bd);
492 *ssim_y = a; 493 *ssim_y = a;
493 *ssim_u = b; 494 *ssim_u = b;
494 *ssim_v = c; 495 *ssim_v = c;
495 ssim_all = (a * 4 + b + c) / 6; 496 ssim_all = (a * 4 + b + c) / 6;
496 497
497 return ssim_all; 498 return ssim_all;
498 } 499 }
499 #endif // CONFIG_VP9_HIGHBITDEPTH 500 #endif // CONFIG_VP9_HIGHBITDEPTH
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_speed_features.c ('k') | source/libvpx/vp9/encoder/vp9_subexp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698