From: Ovaron Date: Thu, 10 Feb 2022 20:51:21 +0000 (+0100) Subject: Update buffer size for h264 and hevc X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f90831c015889b5430602b34ba224358243540b5;p=thirdparty%2Ftvheadend.git Update buffer size for h264 and hevc Increased buffer for h264 and hevc transcoding (from ((self->bit_rate) * 1000) * 2 to ((self->bit_rate) * 1000) * 3). With bigger buffer picture creates less artefacts on lower bitrates. --- diff --git a/src/transcoding/codec/codecs/libs/vaapi.c b/src/transcoding/codec/codecs/libs/vaapi.c index 8fa33402d..6c18d596c 100644 --- a/src/transcoding/codec/codecs/libs/vaapi.c +++ b/src/transcoding/codec/codecs/libs/vaapi.c @@ -177,7 +177,7 @@ tvh_codec_profile_vaapi_h264_open(tvh_codec_profile_vaapi_t *self, if (self->bit_rate) { AV_DICT_SET_BIT_RATE(opts, self->bit_rate); AV_DICT_SET_INT(opts, "maxrate", (self->bit_rate) * 1000, AV_DICT_DONT_OVERWRITE); - AV_DICT_SET_INT(opts, "bufsize", ((self->bit_rate) * 1000) * 2, AV_DICT_DONT_OVERWRITE); + AV_DICT_SET_INT(opts, "bufsize", ((self->bit_rate) * 1000) * 3, AV_DICT_DONT_OVERWRITE); AV_DICT_SET(opts, "force_key_frames", "expr:gte(t,n_forced*3)", AV_DICT_DONT_OVERWRITE); } else { @@ -239,7 +239,7 @@ tvh_codec_profile_vaapi_hevc_open(tvh_codec_profile_vaapi_t *self, if (self->bit_rate) { AV_DICT_SET_BIT_RATE(opts, self->bit_rate); AV_DICT_SET_INT(opts, "maxrate", (self->bit_rate) * 1000, AV_DICT_DONT_OVERWRITE); - AV_DICT_SET_INT(opts, "bufsize", ((self->bit_rate) * 1000) * 2, AV_DICT_DONT_OVERWRITE); + AV_DICT_SET_INT(opts, "bufsize", ((self->bit_rate) * 1000) * 3, AV_DICT_DONT_OVERWRITE); AV_DICT_SET(opts, "force_key_frames", "expr:gte(t,n_forced*3)", AV_DICT_DONT_OVERWRITE); } else {