| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 { | 199 { |
| 200 int b; | 200 int b; |
| 201 | 201 |
| 202 for (b = 0; b < xd->mbmi.partition_count; b++) | 202 for (b = 0; b < xd->mbmi.partition_count; b++) |
| 203 { | 203 { |
| 204 inter_b_modes[x->partition->bmi[b].mode] ++; | 204 inter_b_modes[x->partition->bmi[b].mode] ++; |
| 205 } | 205 } |
| 206 } | 206 } |
| 207 | 207 |
| 208 #endif | 208 #endif |
| 209 // Keep track of how many (consecutive) times a block |
| 210 // is coded as ZEROMV_LASTREF, for base layer frames. |
| 211 // Reset to 0 if its coded as anything else. |
| 212 if (cpi->current_layer == 0) { |
| 213 if (xd->mode_info_context->mbmi.mode == ZEROMV && |
| 214 xd->mode_info_context->mbmi.ref_frame == |
| 215 LAST_FRAME) { |
| 216 // Increment, check for wrap-around. |
| 217 if (cpi->consec_zero_last[map_index+mb_col] < 255) |
| 218 cpi->consec_zero_last[map_index+mb_col] += |
| 219 1; |
| 220 } else { |
| 221 cpi->consec_zero_last[map_index+mb_col] = 0; |
| 222 } |
| 223 } |
| 209 | 224 |
| 210 /* Special case code for cyclic refresh | 225 /* Special case code for cyclic refresh |
| 211 * If cyclic update enabled then copy | 226 * If cyclic update enabled then copy |
| 212 * xd->mbmi.segment_id; (which may have been updated | 227 * xd->mbmi.segment_id; (which may have been updated |
| 213 * based on mode during | 228 * based on mode during |
| 214 * vp8cx_encode_inter_macroblock()) back into the | 229 * vp8cx_encode_inter_macroblock()) back into the |
| 215 * global segmentation map | 230 * global segmentation map |
| 216 */ | 231 */ |
| 217 if ((cpi->current_layer == 0) && | 232 if ((cpi->current_layer == 0) && |
| 218 (cpi->cyclic_refresh_mode_enabled && | 233 (cpi->cyclic_refresh_mode_enabled && |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 sem_destroy(&cpi->h_event_start_lpf); | 661 sem_destroy(&cpi->h_event_start_lpf); |
| 647 | 662 |
| 648 /* free thread related resources */ | 663 /* free thread related resources */ |
| 649 vpx_free(cpi->h_event_start_encoding); | 664 vpx_free(cpi->h_event_start_encoding); |
| 650 vpx_free(cpi->h_encoding_thread); | 665 vpx_free(cpi->h_encoding_thread); |
| 651 vpx_free(cpi->mb_row_ei); | 666 vpx_free(cpi->mb_row_ei); |
| 652 vpx_free(cpi->en_thread_data); | 667 vpx_free(cpi->en_thread_data); |
| 653 } | 668 } |
| 654 } | 669 } |
| 655 #endif | 670 #endif |
| OLD | NEW |