Merge branch 'gop_16_layers'

This commit is contained in:
Joose Sainio 2020-03-19 11:40:07 +02:00
commit 236bc4543a
2 changed files with 19 additions and 1 deletions

View file

@ -812,7 +812,21 @@ static int encoder_control_init_gop_layer_weights(encoder_control_t * const enco
}
}
break;
case 5:
if(!encoder->cfg.gop_lowdelay) {
// These are obtained by running HM with RA GOP 16 collecting the ratio of bits spent for each
// layer from the CTC sequences and then fitting power curve
encoder->gop_layer_weights[0] = 13.0060187535 * pow(encoder->target_avg_bpp, -0.3727651453);
encoder->gop_layer_weights[1] = 7.3654107392 * pow(encoder->target_avg_bpp, -0.0854329266);
encoder->gop_layer_weights[2] = 3.6563990701 * pow(encoder->target_avg_bpp, -0.0576990493);
encoder->gop_layer_weights[3] = 2.1486937288 * pow(encoder->target_avg_bpp, -0.0155389471);
encoder->gop_layer_weights[4] = 1;
}
else {
fprintf(stderr, "Unsupported amount of layers (%d) for lowdelay GOP\n", num_layers);
return 0;
}
break;
default:
if (!encoder->cfg.gop_lowdelay && encoder->cfg.gop_len == 16) {
fprintf(stdout,

View file

@ -13,6 +13,10 @@ valgrind_test 264x130 10 $common_args --gop=8 -p1 --owf=4
valgrind_test 264x130 10 $common_args --gop=lp-g4d3t1 -p5 --owf=4
valgrind_test 264x130 10 $common_args --gop=8 -p8 --owf=4 --no-open-gop
valgrind_test 264x130 30 $common_args --gop=8 -p16 --owf=16
valgrind_test 264x130 10 $common_args --gop=16 -p0 --owf=1
valgrind_test 264x130 10 $common_args --gop=16 -p0 --owf=4
valgrind_test 264x130 40 $common_args --gop=16 -p32 --owf=0
# Do more extensive tests in a private gitlab CI runner
if [ ! -z ${GITLAB_CI+x} ];then valgrind_test 264x130 20 $common_args --gop=8 -p8 --owf=0 --no-open-gop; fi
if [ ! -z ${GITLAB_CI+x} ];then valgrind_test 264x130 40 $common_args --gop=8 -p32 --owf=4 --no-open-gop; fi