| 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 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 { | 75 { |
| 76 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128 | 76 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128 |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 | 79 |
| 80 /* Original activity measure from Tim T's code. */ | 80 /* Original activity measure from Tim T's code. */ |
| 81 static unsigned int tt_activity_measure( VP8_COMP *cpi, MACROBLOCK *x ) | 81 static unsigned int tt_activity_measure( VP8_COMP *cpi, MACROBLOCK *x ) |
| 82 { | 82 { |
| 83 unsigned int act; | 83 unsigned int act; |
| 84 unsigned int sse; | 84 unsigned int sse; |
| 85 (void)cpi; |
| 85 /* TODO: This could also be done over smaller areas (8x8), but that would | 86 /* TODO: This could also be done over smaller areas (8x8), but that would |
| 86 * require extensive changes elsewhere, as lambda is assumed to be fixed | 87 * require extensive changes elsewhere, as lambda is assumed to be fixed |
| 87 * over an entire MB in most of the code. | 88 * over an entire MB in most of the code. |
| 88 * Another option is to compute four 8x8 variances, and pick a single | 89 * Another option is to compute four 8x8 variances, and pick a single |
| 89 * lambda using a non-linear combination (e.g., the smallest, or second | 90 * lambda using a non-linear combination (e.g., the smallest, or second |
| 90 * smallest, etc.). | 91 * smallest, etc.). |
| 91 */ | 92 */ |
| 92 act = vp8_variance16x16(x->src.y_buffer, | 93 act = vp8_variance16x16(x->src.y_buffer, |
| 93 x->src.y_stride, VP8_VAR_OFFS, 0, &sse); | 94 x->src.y_stride, VP8_VAR_OFFS, 0, &sse); |
| 94 act = act<<4; | 95 act = act<<4; |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1142 | 1143 |
| 1143 int b = 0; | 1144 int b = 0; |
| 1144 | 1145 |
| 1145 do | 1146 do |
| 1146 { | 1147 { |
| 1147 ++ bct[xd->block[b].bmi.mode]; | 1148 ++ bct[xd->block[b].bmi.mode]; |
| 1148 } | 1149 } |
| 1149 while (++b < 16); | 1150 while (++b < 16); |
| 1150 } | 1151 } |
| 1151 | 1152 |
| 1153 #else |
| 1154 (void)cpi; |
| 1152 #endif | 1155 #endif |
| 1153 | 1156 |
| 1154 ++x->ymode_count[m]; | 1157 ++x->ymode_count[m]; |
| 1155 ++x->uv_mode_count[uvm]; | 1158 ++x->uv_mode_count[uvm]; |
| 1156 | 1159 |
| 1157 } | 1160 } |
| 1158 | 1161 |
| 1159 /* Experimental stub function to create a per MB zbin adjustment based on | 1162 /* Experimental stub function to create a per MB zbin adjustment based on |
| 1160 * some previously calculated measure of MB activity. | 1163 * some previously calculated measure of MB activity. |
| 1161 */ | 1164 */ |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1412 vp8_fix_contexts(xd); | 1415 vp8_fix_contexts(xd); |
| 1413 } | 1416 } |
| 1414 else | 1417 else |
| 1415 { | 1418 { |
| 1416 vp8_stuff_mb(cpi, x, t); | 1419 vp8_stuff_mb(cpi, x, t); |
| 1417 } | 1420 } |
| 1418 } | 1421 } |
| 1419 | 1422 |
| 1420 return rate; | 1423 return rate; |
| 1421 } | 1424 } |
| OLD | NEW |