| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |