vp9-svc: Fix to svc sample encoder for write_out.
When writing out stream for spatial layer N, make sure to include all spatial layers up to N. Fixes an issue with the streams when frame dropping occurs. Change-Id: I1e20b7dac6b94dcda751043541dd8a12f7df6d8c
This commit is contained in:
@@ -830,14 +830,17 @@ int main(int argc, const char **argv) {
|
|||||||
num_layers_encoded++;
|
num_layers_encoded++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tot_size = 0;
|
|
||||||
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
||||||
if (cx_pkt->data.frame.spatial_layer_encoded[sl]) {
|
unsigned int sl2;
|
||||||
tot_size += sizes[sl];
|
tot_size = 0;
|
||||||
|
for (sl2 = 0; sl2 <= sl; ++sl2) {
|
||||||
|
if (cx_pkt->data.frame.spatial_layer_encoded[sl2])
|
||||||
|
tot_size += sizes[sl2];
|
||||||
|
}
|
||||||
|
if (tot_size > 0)
|
||||||
vpx_video_writer_write_frame(
|
vpx_video_writer_write_frame(
|
||||||
outfile[sl], cx_pkt->data.frame.buf, tot_size,
|
outfile[sl], cx_pkt->data.frame.buf, tot_size,
|
||||||
cx_pkt->data.frame.pts);
|
cx_pkt->data.frame.pts);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
||||||
|
|||||||
Reference in New Issue
Block a user