From 5ac1db7a65cd366841ddb0186408c6c34f047113 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 20 Aug 2024 01:35:32 +0200 Subject: Revert quality parameters, they were overkill --- meson.build | 2 +- project.conf | 2 +- src/main.cpp | 68 ++++++++++++++++++++++++++++++------------------------------ 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/meson.build b/meson.build index bbf2fba..649357f 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('gpu-screen-recorder', ['c', 'cpp'], version : '4.1.3', default_options : ['warning_level=2']) +project('gpu-screen-recorder', ['c', 'cpp'], version : '4.1.4', default_options : ['warning_level=2']) add_project_arguments('-Wshadow', language : ['c', 'cpp']) if get_option('buildtype') == 'debug' diff --git a/project.conf b/project.conf index b51ddf9..76e5bb8 100644 --- a/project.conf +++ b/project.conf @@ -1,7 +1,7 @@ [package] name = "gpu-screen-recorder" type = "executable" -version = "4.1.3" +version = "4.1.4" platforms = ["posix"] [config] diff --git a/src/main.cpp b/src/main.cpp index 9ac958a..d3edf55 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -746,16 +746,16 @@ static void open_video_software(AVCodecContext *codec_context, VideoQuality vide if(codec_context->codec_id == AV_CODEC_ID_AV1) { switch(video_quality) { case VideoQuality::MEDIUM: - av_dict_set_int(&options, "qp", 35 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 37 * qp_multiply, 0); break; case VideoQuality::HIGH: - av_dict_set_int(&options, "qp", 30 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 32 * qp_multiply, 0); break; case VideoQuality::VERY_HIGH: - av_dict_set_int(&options, "qp", 25 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 28 * qp_multiply, 0); break; case VideoQuality::ULTRA: - av_dict_set_int(&options, "qp", 22 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 24 * qp_multiply, 0); break; } } else if(codec_context->codec_id == AV_CODEC_ID_H264) { @@ -767,25 +767,25 @@ static void open_video_software(AVCodecContext *codec_context, VideoQuality vide av_dict_set_int(&options, "qp", 30 * qp_multiply, 0); break; case VideoQuality::VERY_HIGH: - av_dict_set_int(&options, "qp", 23 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 26 * qp_multiply, 0); break; case VideoQuality::ULTRA: - av_dict_set_int(&options, "qp", 20 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 22 * qp_multiply, 0); break; } } else { switch(video_quality) { case VideoQuality::MEDIUM: - av_dict_set_int(&options, "qp", 35 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 37 * qp_multiply, 0); break; case VideoQuality::HIGH: - av_dict_set_int(&options, "qp", 30 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 32 * qp_multiply, 0); break; case VideoQuality::VERY_HIGH: - av_dict_set_int(&options, "qp", 25 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 28 * qp_multiply, 0); break; case VideoQuality::ULTRA: - av_dict_set_int(&options, "qp", 22 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 24 * qp_multiply, 0); break; } } @@ -837,16 +837,16 @@ static void open_video_hardware(AVCodecContext *codec_context, VideoQuality vide if(codec_context->codec_id == AV_CODEC_ID_AV1) { switch(video_quality) { case VideoQuality::MEDIUM: - av_dict_set_int(&options, "qp", 35 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 37 * qp_multiply, 0); break; case VideoQuality::HIGH: - av_dict_set_int(&options, "qp", 30 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 32 * qp_multiply, 0); break; case VideoQuality::VERY_HIGH: - av_dict_set_int(&options, "qp", 25 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 28 * qp_multiply, 0); break; case VideoQuality::ULTRA: - av_dict_set_int(&options, "qp", 22 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 24 * qp_multiply, 0); break; } } else if(codec_context->codec_id == AV_CODEC_ID_H264) { @@ -858,40 +858,40 @@ static void open_video_hardware(AVCodecContext *codec_context, VideoQuality vide av_dict_set_int(&options, "qp", 30 * qp_multiply, 0); break; case VideoQuality::VERY_HIGH: - av_dict_set_int(&options, "qp", 23 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 26 * qp_multiply, 0); break; case VideoQuality::ULTRA: - av_dict_set_int(&options, "qp", 20 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 22 * qp_multiply, 0); break; } } else if(codec_context->codec_id == AV_CODEC_ID_HEVC) { switch(video_quality) { case VideoQuality::MEDIUM: - av_dict_set_int(&options, "qp", 35 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 37 * qp_multiply, 0); break; case VideoQuality::HIGH: - av_dict_set_int(&options, "qp", 30 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 32 * qp_multiply, 0); break; case VideoQuality::VERY_HIGH: - av_dict_set_int(&options, "qp", 25 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 28 * qp_multiply, 0); break; case VideoQuality::ULTRA: - av_dict_set_int(&options, "qp", 22 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 24 * qp_multiply, 0); break; } } else if(codec_context->codec_id == AV_CODEC_ID_VP8 || codec_context->codec_id == AV_CODEC_ID_VP9) { switch(video_quality) { case VideoQuality::MEDIUM: - av_dict_set_int(&options, "qp", 35 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 37 * qp_multiply, 0); break; case VideoQuality::HIGH: - av_dict_set_int(&options, "qp", 30 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 32 * qp_multiply, 0); break; case VideoQuality::VERY_HIGH: - av_dict_set_int(&options, "qp", 25 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 28 * qp_multiply, 0); break; case VideoQuality::ULTRA: - av_dict_set_int(&options, "qp", 22 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 24 * qp_multiply, 0); break; } } @@ -968,40 +968,40 @@ static void open_video_hardware(AVCodecContext *codec_context, VideoQuality vide av_dict_set_int(&options, "qp", 30 * qp_multiply, 0); break; case VideoQuality::VERY_HIGH: - av_dict_set_int(&options, "qp", 23 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 26 * qp_multiply, 0); break; case VideoQuality::ULTRA: - av_dict_set_int(&options, "qp", 20 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 22 * qp_multiply, 0); break; } } else if(codec_context->codec_id == AV_CODEC_ID_HEVC) { switch(video_quality) { case VideoQuality::MEDIUM: - av_dict_set_int(&options, "qp", 35 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 37 * qp_multiply, 0); break; case VideoQuality::HIGH: - av_dict_set_int(&options, "qp", 30 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 32 * qp_multiply, 0); break; case VideoQuality::VERY_HIGH: - av_dict_set_int(&options, "qp", 25 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 28 * qp_multiply, 0); break; case VideoQuality::ULTRA: - av_dict_set_int(&options, "qp", 22 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 24 * qp_multiply, 0); break; } } else if(codec_context->codec_id == AV_CODEC_ID_VP8 || codec_context->codec_id == AV_CODEC_ID_VP9) { switch(video_quality) { case VideoQuality::MEDIUM: - av_dict_set_int(&options, "qp", 35 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 37 * qp_multiply, 0); break; case VideoQuality::HIGH: - av_dict_set_int(&options, "qp", 30 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 32 * qp_multiply, 0); break; case VideoQuality::VERY_HIGH: - av_dict_set_int(&options, "qp", 25 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 28 * qp_multiply, 0); break; case VideoQuality::ULTRA: - av_dict_set_int(&options, "qp", 22 * qp_multiply, 0); + av_dict_set_int(&options, "qp", 24 * qp_multiply, 0); break; } } -- cgit v1.2.3