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

Side by Side Diff: source/libvpx/vp9/common/vp9_mfqe.c

Issue 897063002: Revert "libvpx: Pull from upstream" (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 10 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/common/vp9_entropymode.c ('k') | source/libvpx/vp9/common/vp9_mvref_common.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) 2014 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 17 matching lines...) Expand all
28 for (r = 0; r < block_size; r++) { 28 for (r = 0; r < block_size; r++) {
29 for (c = 0; c < block_size; c++) { 29 for (c = 0; c < block_size; c++) {
30 dst[c] = (src[c] * src_weight + dst[c] * dst_weight + rounding_bit) 30 dst[c] = (src[c] * src_weight + dst[c] * dst_weight + rounding_bit)
31 >> MFQE_PRECISION; 31 >> MFQE_PRECISION;
32 } 32 }
33 src += src_stride; 33 src += src_stride;
34 dst += dst_stride; 34 dst += dst_stride;
35 } 35 }
36 } 36 }
37 37
38 void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride,
39 uint8_t *dst, int dst_stride, int src_weight) {
40 filter_by_weight(src, src_stride, dst, dst_stride, 8, src_weight);
41 }
42
43 void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride,
44 uint8_t *dst, int dst_stride,
45 int src_weight) {
46 filter_by_weight(src, src_stride, dst, dst_stride, 16, src_weight);
47 }
48
49 static void filter_by_weight32x32(const uint8_t *src, int src_stride, 38 static void filter_by_weight32x32(const uint8_t *src, int src_stride,
50 uint8_t *dst, int dst_stride, int weight) { 39 uint8_t *dst, int dst_stride, int weight) {
51 vp9_filter_by_weight16x16(src, src_stride, dst, dst_stride, weight); 40 filter_by_weight(src, src_stride, dst, dst_stride, 16, weight);
52 vp9_filter_by_weight16x16(src + 16, src_stride, dst + 16, dst_stride, 41 filter_by_weight(src + 16, src_stride, dst + 16, dst_stride, 16, weight);
53 weight); 42 filter_by_weight(src + src_stride * 16, src_stride, dst + dst_stride * 16,
54 vp9_filter_by_weight16x16(src + src_stride * 16, src_stride, 43 dst_stride, 16, weight);
55 dst + dst_stride * 16, dst_stride, weight); 44 filter_by_weight(src + src_stride * 16 + 16, src_stride,
56 vp9_filter_by_weight16x16(src + src_stride * 16 + 16, src_stride, 45 dst + dst_stride * 16 + 16, dst_stride, 16, weight);
57 dst + dst_stride * 16 + 16, dst_stride, weight);
58 } 46 }
59 47
60 static void filter_by_weight64x64(const uint8_t *src, int src_stride, 48 static void filter_by_weight64x64(const uint8_t *src, int src_stride,
61 uint8_t *dst, int dst_stride, int weight) { 49 uint8_t *dst, int dst_stride, int weight) {
62 filter_by_weight32x32(src, src_stride, dst, dst_stride, weight); 50 filter_by_weight32x32(src, src_stride, dst, dst_stride, weight);
63 filter_by_weight32x32(src + 32, src_stride, dst + 32, 51 filter_by_weight32x32(src + 32, src_stride, dst + 32,
64 dst_stride, weight); 52 dst_stride, weight);
65 filter_by_weight32x32(src + src_stride * 32, src_stride, 53 filter_by_weight32x32(src + src_stride * 32, src_stride,
66 dst + dst_stride * 32, dst_stride, weight); 54 dst + dst_stride * 32, dst_stride, weight);
67 filter_by_weight32x32(src + src_stride * 32 + 32, src_stride, 55 filter_by_weight32x32(src + src_stride * 32 + 32, src_stride,
68 dst + dst_stride * 32 + 32, dst_stride, weight); 56 dst + dst_stride * 32 + 32, dst_stride, weight);
69 } 57 }
70 58
71 static void apply_ifactor(const uint8_t *y, int y_stride, uint8_t *yd, 59 static void apply_ifactor(const uint8_t *y, int y_stride, uint8_t *yd,
72 int yd_stride, const uint8_t *u, const uint8_t *v, 60 int yd_stride, const uint8_t *u, const uint8_t *v,
73 int uv_stride, uint8_t *ud, uint8_t *vd, 61 int uv_stride, uint8_t *ud, uint8_t *vd,
74 int uvd_stride, BLOCK_SIZE block_size, 62 int uvd_stride, BLOCK_SIZE block_size,
75 int weight) { 63 int weight) {
76 if (block_size == BLOCK_16X16) { 64 if (block_size == BLOCK_16X16) {
77 vp9_filter_by_weight16x16(y, y_stride, yd, yd_stride, weight); 65 filter_by_weight(y, y_stride, yd, yd_stride, 16, weight);
78 vp9_filter_by_weight8x8(u, uv_stride, ud, uvd_stride, weight); 66 filter_by_weight(u, uv_stride, ud, uvd_stride, 8, weight);
79 vp9_filter_by_weight8x8(v, uv_stride, vd, uvd_stride, weight); 67 filter_by_weight(v, uv_stride, vd, uvd_stride, 8, weight);
80 } else if (block_size == BLOCK_32X32) { 68 } else if (block_size == BLOCK_32X32) {
81 filter_by_weight32x32(y, y_stride, yd, yd_stride, weight); 69 filter_by_weight32x32(y, y_stride, yd, yd_stride, weight);
82 vp9_filter_by_weight16x16(u, uv_stride, ud, uvd_stride, weight); 70 filter_by_weight(u, uv_stride, ud, uvd_stride, 16, weight);
83 vp9_filter_by_weight16x16(v, uv_stride, vd, uvd_stride, weight); 71 filter_by_weight(v, uv_stride, vd, uvd_stride, 16, weight);
84 } else if (block_size == BLOCK_64X64) { 72 } else if (block_size == BLOCK_64X64) {
85 filter_by_weight64x64(y, y_stride, yd, yd_stride, weight); 73 filter_by_weight64x64(y, y_stride, yd, yd_stride, weight);
86 filter_by_weight32x32(u, uv_stride, ud, uvd_stride, weight); 74 filter_by_weight32x32(u, uv_stride, ud, uvd_stride, weight);
87 filter_by_weight32x32(v, uv_stride, vd, uvd_stride, weight); 75 filter_by_weight32x32(v, uv_stride, vd, uvd_stride, weight);
88 } 76 }
89 } 77 }
90 78
91 // TODO(jackychen): Determine whether replace it with assembly code. 79 // TODO(jackychen): Determine whether replace it with assembly code.
92 static void copy_mem8x8(const uint8_t *src, int src_stride, 80 static void copy_mem8x8(const uint8_t *src, int src_stride,
93 uint8_t *dst, int dst_stride) { 81 uint8_t *dst, int dst_stride) {
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 if (frame_is_intra_only(cm)) { 372 if (frame_is_intra_only(cm)) {
385 mi = mi_prev; 373 mi = mi_prev;
386 } else { 374 } else {
387 mi = mi_local; 375 mi = mi_local;
388 } 376 }
389 mfqe_partition(cm, mi, BLOCK_64X64, y, u, v, y_stride, uv_stride, yd, ud, 377 mfqe_partition(cm, mi, BLOCK_64X64, y, u, v, y_stride, uv_stride, yd, ud,
390 vd, yd_stride, uvd_stride); 378 vd, yd_stride, uvd_stride);
391 } 379 }
392 } 380 }
393 } 381 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_entropymode.c ('k') | source/libvpx/vp9/common/vp9_mvref_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698