OLD | NEW |
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 | 11 |
12 #include "vpx_config.h" | 12 #include "vpx_config.h" |
13 #include "vp8_rtcd.h" | 13 #include "vp8_rtcd.h" |
| 14 #include "./vpx_dsp_rtcd.h" |
14 #include "encodemb.h" | 15 #include "encodemb.h" |
15 #include "encodemv.h" | 16 #include "encodemv.h" |
16 #include "vp8/common/common.h" | 17 #include "vp8/common/common.h" |
17 #include "onyx_int.h" | 18 #include "onyx_int.h" |
18 #include "vp8/common/extend.h" | 19 #include "vp8/common/extend.h" |
19 #include "vp8/common/entropymode.h" | 20 #include "vp8/common/entropymode.h" |
20 #include "vp8/common/quant_common.h" | 21 #include "vp8/common/quant_common.h" |
21 #include "segmentation.h" | 22 #include "segmentation.h" |
22 #include "vp8/common/setupintrarecon.h" | 23 #include "vp8/common/setupintrarecon.h" |
23 #include "encodeintra.h" | 24 #include "encodeintra.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 unsigned int act; | 84 unsigned int act; |
84 unsigned int sse; | 85 unsigned int sse; |
85 (void)cpi; | 86 (void)cpi; |
86 /* TODO: This could also be done over smaller areas (8x8), but that would | 87 /* TODO: This could also be done over smaller areas (8x8), but that would |
87 * require extensive changes elsewhere, as lambda is assumed to be fixed | 88 * require extensive changes elsewhere, as lambda is assumed to be fixed |
88 * over an entire MB in most of the code. | 89 * over an entire MB in most of the code. |
89 * Another option is to compute four 8x8 variances, and pick a single | 90 * Another option is to compute four 8x8 variances, and pick a single |
90 * lambda using a non-linear combination (e.g., the smallest, or second | 91 * lambda using a non-linear combination (e.g., the smallest, or second |
91 * smallest, etc.). | 92 * smallest, etc.). |
92 */ | 93 */ |
93 act = vp8_variance16x16(x->src.y_buffer, | 94 act = vpx_variance16x16(x->src.y_buffer, |
94 x->src.y_stride, VP8_VAR_OFFS, 0, &sse); | 95 x->src.y_stride, VP8_VAR_OFFS, 0, &sse); |
95 act = act<<4; | 96 act = act<<4; |
96 | 97 |
97 /* If the region is flat, lower the activity some more. */ | 98 /* If the region is flat, lower the activity some more. */ |
98 if (act < 8<<12) | 99 if (act < 8<<12) |
99 act = act < 5<<12 ? act : 5<<12; | 100 act = act < 5<<12 ? act : 5<<12; |
100 | 101 |
101 return act; | 102 return act; |
102 } | 103 } |
103 | 104 |
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 vp8_fix_contexts(xd); | 1415 vp8_fix_contexts(xd); |
1415 } | 1416 } |
1416 else | 1417 else |
1417 { | 1418 { |
1418 vp8_stuff_mb(cpi, x, t); | 1419 vp8_stuff_mb(cpi, x, t); |
1419 } | 1420 } |
1420 } | 1421 } |
1421 | 1422 |
1422 return rate; | 1423 return rate; |
1423 } | 1424 } |
OLD | NEW |