mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-22 06:40:26 +00:00
Libavcodec: use tune zerolatency for x265
x265 supports only single tune parameter (in opposite to x264, where we currently use "zerolatency,fastdecode").
This commit is contained in:
@@ -1075,10 +1075,15 @@ static void setparam_default(AVCodecContext *codec_ctx, struct setparam_param *p
|
||||
|
||||
static void configure_x264_x265(AVCodecContext *codec_ctx, struct setparam_param *param)
|
||||
{
|
||||
int ret;
|
||||
ret = av_opt_set(codec_ctx->priv_data, "tune", "zerolatency,fastdecode", 0);
|
||||
const char *tune;
|
||||
if (codec_ctx->codec->id == AV_CODEC_ID_H264) {
|
||||
tune = "zerolatency,fastdecode";
|
||||
} else { // x265 supports only single tune parameter
|
||||
tune = "zerolatency";
|
||||
}
|
||||
int ret = av_opt_set(codec_ctx->priv_data, "tune", tune, 0);
|
||||
if (ret != 0) {
|
||||
log_msg(LOG_LEVEL_WARNING, "[lavc] Unable to set tune zerolatency/fastdecode.\n");
|
||||
log_msg(LOG_LEVEL_WARNING, "[lavc] Unable to set tune %s.\n", tune);
|
||||
}
|
||||
|
||||
// try to keep frame sizes as even as possible
|
||||
|
||||
Reference in New Issue
Block a user