summaryrefslogtreecommitdiffstats
path: root/libvpx/vp9/encoder/vp9_svc_layercontext.h
diff options
context:
space:
mode:
Diffstat (limited to 'libvpx/vp9/encoder/vp9_svc_layercontext.h')
-rw-r--r--libvpx/vp9/encoder/vp9_svc_layercontext.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/libvpx/vp9/encoder/vp9_svc_layercontext.h b/libvpx/vp9/encoder/vp9_svc_layercontext.h
index e81b0b7..2abed30 100644
--- a/libvpx/vp9/encoder/vp9_svc_layercontext.h
+++ b/libvpx/vp9/encoder/vp9_svc_layercontext.h
@@ -28,6 +28,8 @@ typedef struct {
double framerate;
int avg_frame_size;
struct twopass_rc twopass;
+ struct vpx_fixed_buf rc_twopass_stats_in;
+ unsigned int current_video_frame_in_layer;
} LAYER_CONTEXT;
typedef struct {
@@ -35,8 +37,8 @@ typedef struct {
int temporal_layer_id;
int number_spatial_layers;
int number_temporal_layers;
- // Layer context used for rate control in temporal CBR mode or spatial
- // two pass mode. Defined for temporal or spatial layers for now.
+ // Layer context used for rate control in one pass temporal CBR mode or
+ // two pass spatial mode. Defined for temporal or spatial layers for now.
// Does not support temporal combined with spatial RC.
LAYER_CONTEXT layer_context[MAX(VPX_TS_MAX_LAYERS, VPX_SS_MAX_LAYERS)];
} SVC;
@@ -51,8 +53,12 @@ void vp9_update_layer_context_change_config(struct VP9_COMP *const cpi,
const int target_bandwidth);
// Prior to encoding the frame, update framerate-related quantities
-// for the current layer.
-void vp9_update_layer_framerate(struct VP9_COMP *const cpi);
+// for the current temporal layer.
+void vp9_update_temporal_layer_framerate(struct VP9_COMP *const cpi);
+
+// Update framerate-related quantities for the current spatial layer.
+void vp9_update_spatial_layer_framerate(struct VP9_COMP *const cpi,
+ double framerate);
// Prior to encoding the frame, set the layer context, for the current layer
// to be encoded, to the cpi struct.
@@ -61,6 +67,12 @@ void vp9_restore_layer_context(struct VP9_COMP *const cpi);
// Save the layer context after encoding the frame.
void vp9_save_layer_context(struct VP9_COMP *const cpi);
+// Initialize second pass rc for spatial svc.
+void vp9_init_second_pass_spatial_svc(struct VP9_COMP *cpi);
+
+// Increment number of video frames in layer
+void vp9_inc_frame_in_layer(SVC *svc);
+
#ifdef __cplusplus
} // extern "C"
#endif