Copy lowdelay GOP definition from HM

This commit is contained in:
Arttu Ylä-Outinen 2018-02-16 14:51:35 +02:00 committed by Ari Lemmetti
parent 28f99c0b87
commit 829a70e6a7
2 changed files with 62 additions and 1 deletions

View file

@ -27,6 +27,7 @@
#include <stdlib.h>
#include "cfg.h"
#include "gop.h"
#include "strategyselector.h"
#include "kvz_math.h"
@ -234,7 +235,11 @@ encoder_control_t* kvz_encoder_control_init(const kvz_config *const cfg)
if (encoder->cfg.gop_len > 0) {
if (encoder->cfg.gop_lowdelay) {
kvz_config_process_lp_gop(&encoder->cfg);
if (encoder->cfg.gop_len == 4 && encoder->cfg.ref_frames == 4) {
memcpy(encoder->cfg.gop, kvz_gop_lowdelay4, sizeof(kvz_gop_lowdelay4));
} else {
kvz_config_process_lp_gop(&encoder->cfg);
}
}
}

View file

@ -23,6 +23,62 @@
#include <kvazaar.h>
static const kvz_gop_config kvz_gop_lowdelay4[4] = {
{
.poc_offset = 1,
.layer = 1,
.qp_offset = 5,
.qp_factor = 1.0,
.qp_model_offset = -6.5,
.qp_model_scale = 0.2590,
.is_ref = 1,
.ref_neg_count = 4,
.ref_neg = { 1, 5, 9, 13 },
.ref_pos_count = 0,
.ref_pos = { 0 },
},
{
.poc_offset = 2,
.layer = 1,
.qp_offset = 4,
.qp_factor = 1.0,
.qp_model_offset = -6.5,
.qp_model_scale = 0.2590,
.is_ref = 1,
.ref_neg_count = 3,
.ref_neg = { 1, 2, 6, 10 },
.ref_pos_count = 0,
.ref_pos = { 0 },
},
{
.poc_offset = 3,
.layer = 1,
.qp_offset = 5,
.qp_factor = 1.0,
.qp_model_offset = -6.5,
.qp_model_scale = 0.2590,
.is_ref = 1,
.ref_neg_count = 3,
.ref_neg = { 1, 3, 7, 11 },
.ref_pos_count = 0,
.ref_pos = { 0 },
},
{
.poc_offset = 4,
.layer = 1,
.qp_offset = 1,
.qp_factor = 1.0,
.qp_model_offset = 0.0,
.qp_model_scale = 0.0,
.is_ref = 1,
.ref_neg_count = 3,
.ref_neg = { 1, 4, 8, 12 },
.ref_pos_count = 0,
.ref_pos = { 0 },
},
};
static const kvz_gop_config kvz_gop_ra8[8] = {
{
.poc_offset = 8,