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 11 matching lines...) Expand all Loading... |
22 typedef struct { | 22 typedef struct { |
23 RATE_CONTROL rc; | 23 RATE_CONTROL rc; |
24 int target_bandwidth; | 24 int target_bandwidth; |
25 double framerate; | 25 double framerate; |
26 int avg_frame_size; | 26 int avg_frame_size; |
27 TWO_PASS twopass; | 27 TWO_PASS twopass; |
28 struct vpx_fixed_buf rc_twopass_stats_in; | 28 struct vpx_fixed_buf rc_twopass_stats_in; |
29 unsigned int current_video_frame_in_layer; | 29 unsigned int current_video_frame_in_layer; |
30 int is_key_frame; | 30 int is_key_frame; |
31 vpx_svc_parameters_t svc_params_received; | 31 vpx_svc_parameters_t svc_params_received; |
| 32 struct lookahead_entry *alt_ref_source; |
| 33 int alt_ref_idx; |
| 34 int has_alt_frame; |
| 35 size_t layer_size; |
32 } LAYER_CONTEXT; | 36 } LAYER_CONTEXT; |
33 | 37 |
34 typedef struct { | 38 typedef struct { |
35 int spatial_layer_id; | 39 int spatial_layer_id; |
36 int temporal_layer_id; | 40 int temporal_layer_id; |
37 int number_spatial_layers; | 41 int number_spatial_layers; |
38 int number_temporal_layers; | 42 int number_temporal_layers; |
| 43 |
| 44 // Store scaled source frames to be used for temporal filter to generate |
| 45 // a alt ref frame. |
| 46 YV12_BUFFER_CONFIG scaled_frames[MAX_LAG_BUFFERS]; |
| 47 |
39 // Layer context used for rate control in one pass temporal CBR mode or | 48 // Layer context used for rate control in one pass temporal CBR mode or |
40 // two pass spatial mode. Defined for temporal or spatial layers for now. | 49 // two pass spatial mode. Defined for temporal or spatial layers for now. |
41 // Does not support temporal combined with spatial RC. | 50 // Does not support temporal combined with spatial RC. |
42 LAYER_CONTEXT layer_context[MAX(VPX_TS_MAX_LAYERS, VPX_SS_MAX_LAYERS)]; | 51 LAYER_CONTEXT layer_context[MAX(VPX_TS_MAX_LAYERS, VPX_SS_MAX_LAYERS)]; |
43 } SVC; | 52 } SVC; |
44 | 53 |
45 struct VP9_COMP; | 54 struct VP9_COMP; |
46 | 55 |
47 // Initialize layer context data from init_config(). | 56 // Initialize layer context data from init_config(). |
48 void vp9_init_layer_context(struct VP9_COMP *const cpi); | 57 void vp9_init_layer_context(struct VP9_COMP *const cpi); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Get a future source buffer to encode | 99 // Get a future source buffer to encode |
91 struct lookahead_entry *vp9_svc_lookahead_peek(struct VP9_COMP *const cpi, | 100 struct lookahead_entry *vp9_svc_lookahead_peek(struct VP9_COMP *const cpi, |
92 struct lookahead_ctx *ctx, | 101 struct lookahead_ctx *ctx, |
93 int index, int copy_params); | 102 int index, int copy_params); |
94 | 103 |
95 #ifdef __cplusplus | 104 #ifdef __cplusplus |
96 } // extern "C" | 105 } // extern "C" |
97 #endif | 106 #endif |
98 | 107 |
99 #endif // VP9_ENCODER_VP9_SVC_LAYERCONTEXT_ | 108 #endif // VP9_ENCODER_VP9_SVC_LAYERCONTEXT_ |
OLD | NEW |