New GOP structure for ultralow delay

This commit is contained in:
Marko Viitanen 2015-11-02 11:33:16 +02:00
parent 388986399f
commit 9a99f7972f

View file

@ -446,7 +446,39 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
cfg->gop[3].poc_offset = 4; cfg->gop[3].qp_offset = 1; cfg->gop[3].layer = 1; cfg->gop[3].qp_factor = 0.578; cfg->gop[3].is_ref = 1;
cfg->gop[3].ref_neg_count = 4; cfg->gop[3].ref_neg[0] = 1; cfg->gop[3].ref_neg[1] = 4; cfg->gop[3].ref_neg[2] = 8; cfg->gop[3].ref_neg[3] = 12;
cfg->gop[3].ref_pos_count = 0;
} else if (!strcmp(value, "ultralow")) { // Low-delay B with 1 ref frame
cfg->gop_len = 8;
cfg->gop[0].poc_offset = 1; cfg->gop[0].qp_offset = 3; cfg->gop[0].layer = 1; cfg->gop[0].qp_factor = 0.68; cfg->gop[0].is_ref = 1;
cfg->gop[0].ref_pos_count = 0;
cfg->gop[0].ref_neg_count = 1; cfg->gop[0].ref_neg[0] = 1;
cfg->gop[1].poc_offset = 2; cfg->gop[1].qp_offset = 2; cfg->gop[1].layer = 2; cfg->gop[1].qp_factor = 0.3536; cfg->gop[1].is_ref = 1;
cfg->gop[1].ref_neg_count = 1; cfg->gop[1].ref_neg[0] = 1;
cfg->gop[1].ref_pos_count = 0;
cfg->gop[2].poc_offset = 3; cfg->gop[2].qp_offset = 3; cfg->gop[2].layer = 3; cfg->gop[2].qp_factor = 0.68; cfg->gop[2].is_ref = 1;
cfg->gop[2].ref_neg_count = 1; cfg->gop[2].ref_neg[0] = 1;
cfg->gop[2].ref_pos_count = 0;
cfg->gop[3].poc_offset = 4; cfg->gop[3].qp_offset = 2; cfg->gop[3].layer = 4; cfg->gop[3].qp_factor = 0.3536; cfg->gop[3].is_ref = 1;
cfg->gop[3].ref_neg_count = 1; cfg->gop[3].ref_neg[0] = 1;
cfg->gop[3].ref_pos_count = 0;
cfg->gop[4].poc_offset = 5; cfg->gop[4].qp_offset = 3; cfg->gop[4].layer = 4; cfg->gop[4].qp_factor = 0.68; cfg->gop[4].is_ref = 1;
cfg->gop[4].ref_neg_count = 1; cfg->gop[4].ref_neg[0] = 1;
cfg->gop[4].ref_pos_count = 0;
cfg->gop[5].poc_offset = 6; cfg->gop[5].qp_offset = 2; cfg->gop[5].layer = 3; cfg->gop[5].qp_factor = 0.3536; cfg->gop[5].is_ref = 1;
cfg->gop[5].ref_neg_count = 1; cfg->gop[5].ref_neg[0] = 1;
cfg->gop[5].ref_pos_count = 0;
cfg->gop[6].poc_offset = 7; cfg->gop[6].qp_offset = 3; cfg->gop[6].layer = 4; cfg->gop[6].qp_factor = 0.68; cfg->gop[6].is_ref = 1;
cfg->gop[6].ref_neg_count = 1; cfg->gop[6].ref_neg[0] = 1;
cfg->gop[6].ref_pos_count = 0;
cfg->gop[7].poc_offset = 8; cfg->gop[7].qp_offset = 1; cfg->gop[7].layer = 4; cfg->gop[7].qp_factor = 0.68; cfg->gop[7].is_ref = 1;
cfg->gop[7].ref_neg_count = 1; cfg->gop[7].ref_neg[0] = 1;
cfg->gop[7].ref_pos_count = 0;
} else if (atoi(value)) {
fprintf(stderr, "Input error: unsupported gop length, must be 0 or 8\n");
return 0;