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 3470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3481 cpi->per_frame_bandwidth = cpi->per_frame_bandwidth * 5 / 4; | 3481 cpi->per_frame_bandwidth = cpi->per_frame_bandwidth * 5 / 4; |
3482 break; | 3482 break; |
3483 case 3: | 3483 case 3: |
3484 cpi->per_frame_bandwidth = cpi->per_frame_bandwidth * 5 / 4; | 3484 cpi->per_frame_bandwidth = cpi->per_frame_bandwidth * 5 / 4; |
3485 break; | 3485 break; |
3486 } | 3486 } |
3487 | 3487 |
3488 /* Note that we should not throw out a key frame (especially when | 3488 /* Note that we should not throw out a key frame (especially when |
3489 * spatial resampling is enabled). | 3489 * spatial resampling is enabled). |
3490 */ | 3490 */ |
3491 if ((cm->frame_type == KEY_FRAME)) | 3491 if (cm->frame_type == KEY_FRAME) |
3492 { | 3492 { |
3493 cpi->decimation_count = cpi->decimation_factor; | 3493 cpi->decimation_count = cpi->decimation_factor; |
3494 } | 3494 } |
3495 else if (cpi->decimation_count > 0) | 3495 else if (cpi->decimation_count > 0) |
3496 { | 3496 { |
3497 cpi->decimation_count --; | 3497 cpi->decimation_count --; |
3498 | 3498 |
3499 cpi->bits_off_target += cpi->av_per_frame_bandwidth; | 3499 cpi->bits_off_target += cpi->av_per_frame_bandwidth; |
3500 if (cpi->bits_off_target > cpi->oxcf.maximum_buffer_size) | 3500 if (cpi->bits_off_target > cpi->oxcf.maximum_buffer_size) |
3501 cpi->bits_off_target = cpi->oxcf.maximum_buffer_size; | 3501 cpi->bits_off_target = cpi->oxcf.maximum_buffer_size; |
(...skipping 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5588 } | 5588 } |
5589 | 5589 |
5590 return Total; | 5590 return Total; |
5591 } | 5591 } |
5592 | 5592 |
5593 | 5593 |
5594 int vp8_get_quantizer(VP8_COMP *cpi) | 5594 int vp8_get_quantizer(VP8_COMP *cpi) |
5595 { | 5595 { |
5596 return cpi->common.base_qindex; | 5596 return cpi->common.base_qindex; |
5597 } | 5597 } |
OLD | NEW |