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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 ++lc->current_video_frame_in_layer; | 216 ++lc->current_video_frame_in_layer; |
217 } | 217 } |
218 | 218 |
219 int vp9_is_upper_layer_key_frame(const VP9_COMP *const cpi) { | 219 int vp9_is_upper_layer_key_frame(const VP9_COMP *const cpi) { |
220 return cpi->use_svc && | 220 return cpi->use_svc && |
221 cpi->svc.number_temporal_layers == 1 && | 221 cpi->svc.number_temporal_layers == 1 && |
222 cpi->svc.spatial_layer_id > 0 && | 222 cpi->svc.spatial_layer_id > 0 && |
223 cpi->svc.layer_context[cpi->svc.spatial_layer_id].is_key_frame; | 223 cpi->svc.layer_context[cpi->svc.spatial_layer_id].is_key_frame; |
224 } | 224 } |
225 | 225 |
| 226 #if CONFIG_SPATIAL_SVC |
226 int vp9_svc_lookahead_push(const VP9_COMP *const cpi, struct lookahead_ctx *ctx, | 227 int vp9_svc_lookahead_push(const VP9_COMP *const cpi, struct lookahead_ctx *ctx, |
227 YV12_BUFFER_CONFIG *src, int64_t ts_start, | 228 YV12_BUFFER_CONFIG *src, int64_t ts_start, |
228 int64_t ts_end, unsigned int flags) { | 229 int64_t ts_end, unsigned int flags) { |
229 struct lookahead_entry *buf; | 230 struct lookahead_entry *buf; |
230 int i, index; | 231 int i, index; |
231 | 232 |
232 if (vp9_lookahead_push(ctx, src, ts_start, ts_end, flags)) | 233 if (vp9_lookahead_push(ctx, src, ts_start, ts_end, flags)) |
233 return 1; | 234 return 1; |
234 | 235 |
235 index = ctx->write_idx - 1; | 236 index = ctx->write_idx - 1; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 // spatial_layer to -1 for lower layers. | 346 // spatial_layer to -1 for lower layers. |
346 buf->svc_params[cpi->svc.spatial_layer_id].spatial_layer = -1; | 347 buf->svc_params[cpi->svc.spatial_layer_id].spatial_layer = -1; |
347 if (cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1) { | 348 if (cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1) { |
348 vp9_lookahead_pop(ctx, drain); | 349 vp9_lookahead_pop(ctx, drain); |
349 } | 350 } |
350 } | 351 } |
351 } | 352 } |
352 | 353 |
353 return buf; | 354 return buf; |
354 } | 355 } |
| 356 #endif |
OLD | NEW |