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

Side by Side Diff: source/libvpx/vp9/encoder/vp9_svc_layercontext.c

Issue 1217053002: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 lrc->buffer_level = MIN(lrc->buffer_level, lrc->maximum_buffer_size); 145 lrc->buffer_level = MIN(lrc->buffer_level, lrc->maximum_buffer_size);
146 lc->framerate = cpi->framerate / oxcf->ts_rate_decimator[tl]; 146 lc->framerate = cpi->framerate / oxcf->ts_rate_decimator[tl];
147 lrc->avg_frame_bandwidth = (int)(lc->target_bandwidth / lc->framerate); 147 lrc->avg_frame_bandwidth = (int)(lc->target_bandwidth / lc->framerate);
148 lrc->max_frame_bandwidth = rc->max_frame_bandwidth; 148 lrc->max_frame_bandwidth = rc->max_frame_bandwidth;
149 lrc->worst_quality = rc->worst_quality; 149 lrc->worst_quality = rc->worst_quality;
150 lrc->best_quality = rc->best_quality; 150 lrc->best_quality = rc->best_quality;
151 } 151 }
152 } 152 }
153 } else { 153 } else {
154 int layer_end; 154 int layer_end;
155 float bitrate_alloc = 1.0;
156 155
157 if (svc->number_temporal_layers > 1 && cpi->oxcf.rc_mode == VPX_CBR) { 156 if (svc->number_temporal_layers > 1 && cpi->oxcf.rc_mode == VPX_CBR) {
158 layer_end = svc->number_temporal_layers; 157 layer_end = svc->number_temporal_layers;
159 } else { 158 } else {
160 layer_end = svc->number_spatial_layers; 159 layer_end = svc->number_spatial_layers;
161 } 160 }
162 161
163 for (layer = 0; layer < layer_end; ++layer) { 162 for (layer = 0; layer < layer_end; ++layer) {
164 LAYER_CONTEXT *const lc = &svc->layer_context[layer]; 163 LAYER_CONTEXT *const lc = &svc->layer_context[layer];
165 RATE_CONTROL *const lrc = &lc->rc; 164 RATE_CONTROL *const lrc = &lc->rc;
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 buf = vp9_lookahead_peek(ctx, 0); 636 buf = vp9_lookahead_peek(ctx, 0);
638 if (buf != NULL) { 637 if (buf != NULL) {
639 // Only remove the buffer when pop the highest layer. 638 // Only remove the buffer when pop the highest layer.
640 if (cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1) { 639 if (cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1) {
641 vp9_lookahead_pop(ctx, drain); 640 vp9_lookahead_pop(ctx, drain);
642 } 641 }
643 } 642 }
644 } 643 }
645 return buf; 644 return buf;
646 } 645 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_speed_features.c ('k') | source/libvpx/vp9/encoder/vp9_tokenize.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698