VP9E_SET_SVC_LAYER_ID sets the first spatial layer to
encoder per superframe, so add this parameter to svc encoder.
This is needed, for example, to properly set is_key_frame for
spatial layers when base spatial layer is skipped encoded.
Change-Id: Ifd4ac77f539197ec021e62f4c624a6cc79d64f43
int target = rc->avg_frame_bandwidth;
int layer = LAYER_IDS_TO_IDX(svc->spatial_layer_id, svc->temporal_layer_id,
svc->number_temporal_layers);
+ if (svc->first_spatial_layer_to_encode)
+ svc->layer_context[svc->temporal_layer_id].is_key_frame = 0;
// Periodic key frames is based on the super-frame counter
// (svc.current_superframe), also only base spatial layer is key frame.
// Key frame is set for any of the following: very first frame, frame flags
int use_set_ref_frame_config;
int temporal_layer_id_per_spatial[VPX_SS_MAX_LAYERS];
+
+ int first_spatial_layer_to_encode;
} SVC;
struct VP9_COMP;
int sl;
svc->spatial_layer_to_encode = data->spatial_layer_id;
+ svc->first_spatial_layer_to_encode = data->spatial_layer_id;
// TODO(jianj): Deprecated to be removed.
svc->temporal_layer_id = data->temporal_layer_id;
// Allow for setting temporal layer per spatial layer for superframe.