aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-08-20 01:35:32 +0200
committerdec05eba <dec05eba@protonmail.com>2024-08-20 01:35:32 +0200
commit5ac1db7a65cd366841ddb0186408c6c34f047113 (patch)
tree7df3f6de777cfc5d12daf8faf4d5e38c9ef54b78
parent1fca7080eb15bca17ee05b13399088e1d4930345 (diff)
Revert quality parameters, they were overkill
-rw-r--r--meson.build2
-rw-r--r--project.conf2
-rw-r--r--src/main.cpp68
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;
}
}