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

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

Issue 484923003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 oxcf->best_allowed_q) / 2; 62 oxcf->best_allowed_q) / 2;
63 lrc->avg_frame_qindex[INTER_FRAME] = (oxcf->worst_allowed_q + 63 lrc->avg_frame_qindex[INTER_FRAME] = (oxcf->worst_allowed_q +
64 oxcf->best_allowed_q) / 2; 64 oxcf->best_allowed_q) / 2;
65 if (oxcf->ss_play_alternate[layer]) 65 if (oxcf->ss_play_alternate[layer])
66 lc->alt_ref_idx = alt_ref_idx++; 66 lc->alt_ref_idx = alt_ref_idx++;
67 else 67 else
68 lc->alt_ref_idx = -1; 68 lc->alt_ref_idx = -1;
69 lc->gold_ref_idx = -1; 69 lc->gold_ref_idx = -1;
70 } 70 }
71 71
72 lrc->buffer_level = vp9_rescale((int)(oxcf->starting_buffer_level_ms), 72 lrc->buffer_level = oxcf->starting_buffer_level_ms *
73 lc->target_bandwidth, 1000); 73 lc->target_bandwidth / 1000;
74 lrc->bits_off_target = lrc->buffer_level; 74 lrc->bits_off_target = lrc->buffer_level;
75 } 75 }
76 76
77 // Still have extra buffer for base layer golden frame 77 // Still have extra buffer for base layer golden frame
78 if (svc->number_spatial_layers > 1 && alt_ref_idx < REF_FRAMES) 78 if (svc->number_spatial_layers > 1 && alt_ref_idx < REF_FRAMES)
79 svc->layer_context[0].gold_ref_idx = alt_ref_idx; 79 svc->layer_context[0].gold_ref_idx = alt_ref_idx;
80 } 80 }
81 81
82 // Update the layer context from a change_config() call. 82 // Update the layer context from a change_config() call.
83 void vp9_update_layer_context_change_config(VP9_COMP *const cpi, 83 void vp9_update_layer_context_change_config(VP9_COMP *const cpi,
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 buf->svc_params[cpi->svc.spatial_layer_id].spatial_layer = -1; 355 buf->svc_params[cpi->svc.spatial_layer_id].spatial_layer = -1;
356 if (cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1) { 356 if (cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1) {
357 vp9_lookahead_pop(ctx, drain); 357 vp9_lookahead_pop(ctx, drain);
358 } 358 }
359 } 359 }
360 } 360 }
361 361
362 return buf; 362 return buf;
363 } 363 }
364 #endif 364 #endif
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_speed_features.c ('k') | source/libvpx/vp9/encoder/x86/vp9_dct_sse2.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698