@@ -82707,7 +82707,7 @@ static void vc_init_encoder_h265(Logger *log, VCSession *vc, uint32_t bit_rate,
82707
82707
// LOGGER_API_WARNING(vc->av->tox, "H265 encoder init");
82708
82708
82709
82709
x265_param *param = x265_param_alloc();
82710
- if (x265_param_default_preset(param, "ultrafast ", "zerolatency") != 0) {
82710
+ if (x265_param_default_preset(param, "superfast ", "zerolatency") != 0) {
82711
82711
// LOGGER_API_WARNING(vc->av->tox, "H265 encoder:x265_param_default_preset error");
82712
82712
printf("vc_init_encoder_h265: H265 encoder:x265_param_default_preset error\n");
82713
82713
// goto fail;
@@ -82735,7 +82735,7 @@ static void vc_init_encoder_h265(Logger *log, VCSession *vc, uint32_t bit_rate,
82735
82735
x265_param_parse(param, "input-csp", "i420");
82736
82736
82737
82737
// x265_param_parse(param, "rd", "1");
82738
- x265_param_parse(param, "intra-refresh", "1");
82738
+ //**// x265_param_parse(param, "intra-refresh", "1");
82739
82739
// x265_param_parse(param, "pools", "3");
82740
82740
82741
82741
// logLevelNames = "none", "error", "warning", "info", "debug", "full"
@@ -82751,9 +82751,9 @@ static void vc_init_encoder_h265(Logger *log, VCSession *vc, uint32_t bit_rate,
82751
82751
82752
82752
param->rc.bitrate = (int)(bit_rate / 1000);
82753
82753
// printf("vc_init_encoder_h265:bit_rate = %d\n", (int)(bit_rate / 1000));
82754
- param->rc.vbvBufferSize = ((int)(bit_rate / 1000)) * VIDEO_BUF_FACTOR_H264;
82755
- param->rc.vbvMaxBitrate = (int)(bit_rate / 1000) * 1;
82756
- x265_param_parse(param, "strict-cbr", "1");
82754
+ //**// param->rc.vbvBufferSize = ((int)(bit_rate / 1000)) * VIDEO_BUF_FACTOR_H264;
82755
+ //**// param->rc.vbvMaxBitrate = (int)(bit_rate / 1000) * 1;
82756
+ //**// x265_param_parse(param, "strict-cbr", "1");
82757
82757
82758
82758
// Range of values: an integer from 0 to 51
82759
82759
// x265_param_parse(param, "qp", "50");
@@ -82905,9 +82905,8 @@ int vc_reconfigure_encoder_h265(Logger *log, VCSession *vc, uint32_t bit_rate,
82905
82905
82906
82906
param->rc.bitrate = (int)(bit_rate / 1000);
82907
82907
// printf("vc_init_encoder_h265:bit_rate = %d\n", (int)(bit_rate / 1000));
82908
- param->rc.vbvBufferSize = ((int)(bit_rate / 1000)) * VIDEO_BUF_FACTOR_H264;
82909
- param->rc.vbvMaxBitrate = (int)(bit_rate / 1000) * 1;
82910
- // x265_param_parse(param, "strict-cbr", "1");
82908
+ //**// param->rc.vbvBufferSize = ((int)(bit_rate / 1000)) * VIDEO_BUF_FACTOR_H264;
82909
+ //**// param->rc.vbvMaxBitrate = (int)(bit_rate / 1000) * 1;
82911
82910
82912
82911
int res = x265_encoder_reconfig(vc->h265_encoder, param);
82913
82912
// printf("x265_encoder_reconfig:res=%d bitrate=%d\n", (int)res, (int)(bit_rate / 1000));
0 commit comments