| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 | 369 |
| 370 // Free localy allocated storage | 370 // Free localy allocated storage |
| 371 vpx_free(arf_not_zz); | 371 vpx_free(arf_not_zz); |
| 372 } | 372 } |
| 373 | 373 |
| 374 void vp9_update_mbgraph_stats(VP9_COMP *cpi) { | 374 void vp9_update_mbgraph_stats(VP9_COMP *cpi) { |
| 375 VP9_COMMON *const cm = &cpi->common; | 375 VP9_COMMON *const cm = &cpi->common; |
| 376 int i, n_frames = vp9_lookahead_depth(cpi->lookahead); | 376 int i, n_frames = vp9_lookahead_depth(cpi->lookahead); |
| 377 YV12_BUFFER_CONFIG *golden_ref = get_ref_frame_buffer(cpi, GOLDEN_FRAME); | 377 YV12_BUFFER_CONFIG *golden_ref = get_ref_frame_buffer(cpi, GOLDEN_FRAME); |
| 378 | 378 |
| 379 assert(golden_ref != NULL); |
| 380 |
| 379 // we need to look ahead beyond where the ARF transitions into | 381 // we need to look ahead beyond where the ARF transitions into |
| 380 // being a GF - so exit if we don't look ahead beyond that | 382 // being a GF - so exit if we don't look ahead beyond that |
| 381 if (n_frames <= cpi->rc.frames_till_gf_update_due) | 383 if (n_frames <= cpi->rc.frames_till_gf_update_due) |
| 382 return; | 384 return; |
| 383 | 385 |
| 384 if (n_frames > MAX_LAG_BUFFERS) | 386 if (n_frames > MAX_LAG_BUFFERS) |
| 385 n_frames = MAX_LAG_BUFFERS; | 387 n_frames = MAX_LAG_BUFFERS; |
| 386 | 388 |
| 387 cpi->mbgraph_n_frames = n_frames; | 389 cpi->mbgraph_n_frames = n_frames; |
| 388 for (i = 0; i < n_frames; i++) { | 390 for (i = 0; i < n_frames; i++) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 403 assert(q_cur != NULL); | 405 assert(q_cur != NULL); |
| 404 | 406 |
| 405 update_mbgraph_frame_stats(cpi, frame_stats, &q_cur->img, | 407 update_mbgraph_frame_stats(cpi, frame_stats, &q_cur->img, |
| 406 golden_ref, cpi->Source); | 408 golden_ref, cpi->Source); |
| 407 } | 409 } |
| 408 | 410 |
| 409 vp9_clear_system_state(); | 411 vp9_clear_system_state(); |
| 410 | 412 |
| 411 separate_arf_mbs(cpi); | 413 separate_arf_mbs(cpi); |
| 412 } | 414 } |
| OLD | NEW |