diff options
author | Matthew Wozniak <me@woz.blue> | 2024-11-04 11:11:57 -0500 |
---|---|---|
committer | Matthew Wozniak <me@woz.blue> | 2024-11-04 11:11:57 -0500 |
commit | 3c19c509af38424cd04df53e1af7ef1b20a191ef (patch) | |
tree | 7db1fab7aeadab3f74b3ec218861dd78c52c5994 /render.c | |
parent | 5296fc43920de4c6548f888a4d026f981b476cf7 (diff) | |
download | rt-3c19c509af38424cd04df53e1af7ef1b20a191ef.tar.gz rt-3c19c509af38424cd04df53e1af7ef1b20a191ef.zip |
allow the user to change the quality vs speed setting
Diffstat (limited to 'render.c')
-rw-r--r-- | render.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -101,7 +101,7 @@ void VIRTUAL hook_stop_playback(struct demoplayer *this) { } bool render_init(int width, int height, int framerate, bool use_bitrate, - int quality, const char *output_file) { + int quality, const char *output_file, int qvs) { bool r = os_mprot((*videomode)->vt, 28 * sizeof(void *), PAGE_EXECUTE_READWRITE); if (!r) bail("couldn't mprotect videomode vtable"); @@ -178,9 +178,8 @@ bool render_init(int width, int height, int framerate, bool use_bitrate, VARIANT _quality = { .vt = VT_UI4, .ulVal = quality }; HR(codec->lpVtbl->SetValue(codec, &CODECAPI_AVEncCommonQuality, &_quality)); - // even at 100 it is still very quick, really no reason to change it - VARIANT qvs = { .vt = VT_UI4, .ulVal = 100 }; - HR(codec->lpVtbl->SetValue(codec, &CODECAPI_AVEncCommonQualityVsSpeed, &qvs)); + VARIANT _qvs = { .vt = VT_UI4, .ulVal = qvs }; + HR(codec->lpVtbl->SetValue(codec, &CODECAPI_AVEncCommonQualityVsSpeed, &_qvs)); // set the gop size to 2 seconds VARIANT gop = { .vt = VT_UI4, .ulVal = 2 * ctx.fps }; |