aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-11-22 17:31:18 +0100
committerdec05eba <dec05eba@protonmail.com>2023-11-22 17:31:18 +0100
commit2f60f4c109f1bcc748d5f0d937476e8708a4073b (patch)
treeabbb2f6e8502c850e02b3c424468d9588831321e /src
parent6ace5405e4d5838a19f10cf11401df2016ce4645 (diff)
h264 vaapi quality 5
Diffstat (limited to 'src')
-rw-r--r--src/egl.c6
-rw-r--r--src/main.cpp4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/egl.c b/src/egl.c
index e1d44e7..faae6e7 100644
--- a/src/egl.c
+++ b/src/egl.c
@@ -227,13 +227,13 @@ static bool gsr_egl_create_window(gsr_egl *self, bool wayland) {
const int32_t attr[] = {
EGL_BUFFER_SIZE, 24,
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
- EGL_NONE, EGL_NONE
+ EGL_NONE
};
const int32_t ctxattr[] = {
EGL_CONTEXT_CLIENT_VERSION, 2,
EGL_CONTEXT_PRIORITY_LEVEL_IMG, EGL_CONTEXT_PRIORITY_HIGH_IMG, /* requires cap_sys_nice, ignored otherwise */
- EGL_NONE, EGL_NONE
+ EGL_NONE
};
if(wayland) {
@@ -249,7 +249,7 @@ static bool gsr_egl_create_window(gsr_egl *self, bool wayland) {
// Fetch globals
wl_display_roundtrip(self->wayland.dpy);
- // fetch wl_output
+ // Fetch wl_output
wl_display_roundtrip(self->wayland.dpy);
if(!self->wayland.compositor) {
diff --git a/src/main.cpp b/src/main.cpp
index 797c290..6ab0ef1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -417,6 +417,8 @@ static AVCodecContext *create_video_codec_context(AVPixelFormat pix_fmt,
//codec_context->rc_max_rate = codec_context->bit_rate;
//codec_context->rc_min_rate = codec_context->bit_rate;
//codec_context->rc_buffer_size = codec_context->bit_rate / 10;
+ // TODO: Do this when not using cqp
+ //codec_context->rc_initial_buffer_occupancy = codec_context->bit_rate * 1000;
codec_context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
@@ -735,7 +737,7 @@ static void open_video(AVCodecContext *codec_context, VideoQuality video_quality
if(codec_context->codec_id == AV_CODEC_ID_H264) {
av_dict_set(&options, "profile", "high", 0);
- av_dict_set_int(&options, "quality", 7, 0);
+ av_dict_set_int(&options, "quality", 5, 0); // quality preset
} else if(codec_context->codec_id == AV_CODEC_ID_AV1) {
av_dict_set(&options, "profile", "main", 0); // TODO: use professional instead?
av_dict_set(&options, "tier", "main", 0);