Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Side by Side Diff: source/libvpx/vp8/encoder/onyx_if.c

Issue 958693004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/libvpx/third_party/x86inc/x86inc.asm ('k') | source/libvpx/vp8/encoder/onyx_int.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
14 #include "vp8/common/onyxc_int.h" 15 #include "vp8/common/onyxc_int.h"
15 #include "vp8/common/blockd.h" 16 #include "vp8/common/blockd.h"
16 #include "onyx_int.h" 17 #include "onyx_int.h"
17 #include "vp8/common/systemdependent.h" 18 #include "vp8/common/systemdependent.h"
18 #include "quantize.h" 19 #include "quantize.h"
19 #include "vp8/common/alloccommon.h" 20 #include "vp8/common/alloccommon.h"
20 #include "mcomp.h" 21 #include "mcomp.h"
21 #include "firstpass.h" 22 #include "firstpass.h"
22 #include "vpx/internal/vpx_psnr.h" 23 #include "vpx/internal/vpx_psnr.h"
23 #include "vpx_scale/vpx_scale.h" 24 #include "vpx_scale/vpx_scale.h"
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 // If the number of temporal layers are changed we must start at the 1754 // If the number of temporal layers are changed we must start at the
1754 // base of the pattern cycle, so set the layer id to 0 and reset 1755 // base of the pattern cycle, so set the layer id to 0 and reset
1755 // the temporal pattern counter. 1756 // the temporal pattern counter.
1756 if (cpi->temporal_layer_id > 0) { 1757 if (cpi->temporal_layer_id > 0) {
1757 cpi->temporal_layer_id = 0; 1758 cpi->temporal_layer_id = 0;
1758 } 1759 }
1759 cpi->temporal_pattern_counter = 0; 1760 cpi->temporal_pattern_counter = 0;
1760 reset_temporal_layer_change(cpi, oxcf, prev_number_of_layers); 1761 reset_temporal_layer_change(cpi, oxcf, prev_number_of_layers);
1761 } 1762 }
1762 1763
1764 if (!cpi->initial_width)
1765 {
1766 cpi->initial_width = cpi->oxcf.Width;
1767 cpi->initial_height = cpi->oxcf.Height;
1768 }
1769
1763 cm->Width = cpi->oxcf.Width; 1770 cm->Width = cpi->oxcf.Width;
1764 cm->Height = cpi->oxcf.Height; 1771 cm->Height = cpi->oxcf.Height;
1772 assert(cm->Width <= cpi->initial_width);
1773 assert(cm->Height <= cpi->initial_height);
1765 1774
1766 /* TODO(jkoleszar): if an internal spatial resampling is active, 1775 /* TODO(jkoleszar): if an internal spatial resampling is active,
1767 * and we downsize the input image, maybe we should clear the 1776 * and we downsize the input image, maybe we should clear the
1768 * internal scale immediately rather than waiting for it to 1777 * internal scale immediately rather than waiting for it to
1769 * correct. 1778 * correct.
1770 */ 1779 */
1771 1780
1772 /* VP8 sharpness level mapping 0-7 (vs 0-10 in general VPx dialogs) */ 1781 /* VP8 sharpness level mapping 0-7 (vs 0-10 in general VPx dialogs) */
1773 if (cpi->oxcf.Sharpness > 7) 1782 if (cpi->oxcf.Sharpness > 7)
1774 cpi->oxcf.Sharpness = 7; 1783 cpi->oxcf.Sharpness = 7;
(...skipping 4204 matching lines...) Expand 10 before | Expand all | Expand 10 after
5979 } 5988 }
5980 5989
5981 return Total; 5990 return Total;
5982 } 5991 }
5983 5992
5984 5993
5985 int vp8_get_quantizer(VP8_COMP *cpi) 5994 int vp8_get_quantizer(VP8_COMP *cpi)
5986 { 5995 {
5987 return cpi->common.base_qindex; 5996 return cpi->common.base_qindex;
5988 } 5997 }
OLDNEW
« no previous file with comments | « source/libvpx/third_party/x86inc/x86inc.asm ('k') | source/libvpx/vp8/encoder/onyx_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698