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 |
11 | 11 |
12 #include "vpx_config.h" | 12 #include "vpx_config.h" |
13 #include "./vpx_scale_rtcd.h" | 13 #include "./vpx_scale_rtcd.h" |
14 #include "./vp8_rtcd.h" | |
15 #include "vp8/common/onyxc_int.h" | 14 #include "vp8/common/onyxc_int.h" |
16 #include "vp8/common/blockd.h" | 15 #include "vp8/common/blockd.h" |
17 #include "onyx_int.h" | 16 #include "onyx_int.h" |
18 #include "vp8/common/systemdependent.h" | 17 #include "vp8/common/systemdependent.h" |
19 #include "quantize.h" | 18 #include "quantize.h" |
20 #include "vp8/common/alloccommon.h" | 19 #include "vp8/common/alloccommon.h" |
21 #include "mcomp.h" | 20 #include "mcomp.h" |
22 #include "firstpass.h" | 21 #include "firstpass.h" |
23 #include "vpx/internal/vpx_psnr.h" | 22 #include "vpx/internal/vpx_psnr.h" |
24 #include "vpx_scale/vpx_scale.h" | 23 #include "vpx_scale/vpx_scale.h" |
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1754 // If the number of temporal layers are changed we must start at the | 1753 // If the number of temporal layers are changed we must start at the |
1755 // base of the pattern cycle, so set the layer id to 0 and reset | 1754 // base of the pattern cycle, so set the layer id to 0 and reset |
1756 // the temporal pattern counter. | 1755 // the temporal pattern counter. |
1757 if (cpi->temporal_layer_id > 0) { | 1756 if (cpi->temporal_layer_id > 0) { |
1758 cpi->temporal_layer_id = 0; | 1757 cpi->temporal_layer_id = 0; |
1759 } | 1758 } |
1760 cpi->temporal_pattern_counter = 0; | 1759 cpi->temporal_pattern_counter = 0; |
1761 reset_temporal_layer_change(cpi, oxcf, prev_number_of_layers); | 1760 reset_temporal_layer_change(cpi, oxcf, prev_number_of_layers); |
1762 } | 1761 } |
1763 | 1762 |
1764 if (!cpi->initial_width) | |
1765 { | |
1766 cpi->initial_width = cpi->oxcf.Width; | |
1767 cpi->initial_height = cpi->oxcf.Height; | |
1768 } | |
1769 | |
1770 cm->Width = cpi->oxcf.Width; | 1763 cm->Width = cpi->oxcf.Width; |
1771 cm->Height = cpi->oxcf.Height; | 1764 cm->Height = cpi->oxcf.Height; |
1772 assert(cm->Width <= cpi->initial_width); | |
1773 assert(cm->Height <= cpi->initial_height); | |
1774 | 1765 |
1775 /* TODO(jkoleszar): if an internal spatial resampling is active, | 1766 /* TODO(jkoleszar): if an internal spatial resampling is active, |
1776 * and we downsize the input image, maybe we should clear the | 1767 * and we downsize the input image, maybe we should clear the |
1777 * internal scale immediately rather than waiting for it to | 1768 * internal scale immediately rather than waiting for it to |
1778 * correct. | 1769 * correct. |
1779 */ | 1770 */ |
1780 | 1771 |
1781 /* VP8 sharpness level mapping 0-7 (vs 0-10 in general VPx dialogs) */ | 1772 /* VP8 sharpness level mapping 0-7 (vs 0-10 in general VPx dialogs) */ |
1782 if (cpi->oxcf.Sharpness > 7) | 1773 if (cpi->oxcf.Sharpness > 7) |
1783 cpi->oxcf.Sharpness = 7; | 1774 cpi->oxcf.Sharpness = 7; |
(...skipping 4204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5988 } | 5979 } |
5989 | 5980 |
5990 return Total; | 5981 return Total; |
5991 } | 5982 } |
5992 | 5983 |
5993 | 5984 |
5994 int vp8_get_quantizer(VP8_COMP *cpi) | 5985 int vp8_get_quantizer(VP8_COMP *cpi) |
5995 { | 5986 { |
5996 return cpi->common.base_qindex; | 5987 return cpi->common.base_qindex; |
5997 } | 5988 } |
OLD | NEW |