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 2798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2809 } | 2809 } |
2810 | 2810 |
2811 /* update reference frame costs since we can do better than what we got | 2811 /* update reference frame costs since we can do better than what we got |
2812 * last frame. | 2812 * last frame. |
2813 */ | 2813 */ |
2814 if (cpi->oxcf.number_of_layers == 1) | 2814 if (cpi->oxcf.number_of_layers == 1) |
2815 { | 2815 { |
2816 if (cpi->common.refresh_alt_ref_frame) | 2816 if (cpi->common.refresh_alt_ref_frame) |
2817 { | 2817 { |
2818 cpi->prob_intra_coded += 40; | 2818 cpi->prob_intra_coded += 40; |
| 2819 if (cpi->prob_intra_coded > 255) |
| 2820 cpi->prob_intra_coded = 255; |
2819 cpi->prob_last_coded = 200; | 2821 cpi->prob_last_coded = 200; |
2820 cpi->prob_gf_coded = 1; | 2822 cpi->prob_gf_coded = 1; |
2821 } | 2823 } |
2822 else if (cpi->common.frames_since_golden == 0) | 2824 else if (cpi->common.frames_since_golden == 0) |
2823 { | 2825 { |
2824 cpi->prob_last_coded = 214; | 2826 cpi->prob_last_coded = 214; |
2825 } | 2827 } |
2826 else if (cpi->common.frames_since_golden == 1) | 2828 else if (cpi->common.frames_since_golden == 1) |
2827 { | 2829 { |
2828 cpi->prob_last_coded = 192; | 2830 cpi->prob_last_coded = 192; |
(...skipping 2683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5512 } | 5514 } |
5513 | 5515 |
5514 return Total; | 5516 return Total; |
5515 } | 5517 } |
5516 | 5518 |
5517 | 5519 |
5518 int vp8_get_quantizer(VP8_COMP *cpi) | 5520 int vp8_get_quantizer(VP8_COMP *cpi) |
5519 { | 5521 { |
5520 return cpi->common.base_qindex; | 5522 return cpi->common.base_qindex; |
5521 } | 5523 } |
OLD | NEW |