From f6107a0c5d41aa9fbaa41d64e2f6a5681f9237cc Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 14 Apr 2023 09:36:24 +0200 Subject: Fix AMD single monitor rotated display being rotated in recording If there is only one monitor connected and it's rotated then the drm buf will also be rotated. This only the case with AMD and only when using one monitor! To fix this, we perform color conversion with an opengl shader which allows us to also rotate the texture. VAAPI supports rotation but it's not implemented by AMD at least. Performance seems to be the same as when using VAAPI, even when GPU usage is 100%. --- TODO | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'TODO') diff --git a/TODO b/TODO index a3a9995..1552d20 100644 --- a/TODO +++ b/TODO @@ -39,12 +39,19 @@ Fix constant framerate not working properly on amd/intel because capture framera JPEG color range on amd seems to produce too bright video with h264 but not hevc, why? +Properly handle monitor reconfiguration (kms vaapi, nvfbc). + Better configure vaapi. The file size is too large. Better colors for vaapi. It looks a bit off when recording vscode for example. Clear vaapi surface (for focused window). Support -h and --help. -h should only show the first line and --help the full help. On error, only show that -h. -Rotated display on amd doesn't work correctly (if you only have 1 monitor connected and it's rotated), even with ffmpeg kmsgrab. The drmfd is rotated as well so it needs to be rotated in the surface copy. +Window capture performance on steam deck isn't good when playing the witcher 3 for example. The capture itself is fine but video encoding puts it to 30fps even if the game runs at 57 fps. + +Monitor capture on steam deck is slightly below the game fps, but only when capturing on the steam deck screen. If capturing on another monitor, there is no issue. + Is this related to the dma buf rotation issue? different modifier being slow? does this always happen? -Fix kms monitor capture. Broken right now on amd and performance is bad. \ No newline at end of file +Make sure rgb to yuv color conversion is 100% correct. +Fallback to vaapi copy in kms if opengl version fails. This can happen on steam deck for some reason (driver bug?). +Test if vaapi copy version uses less memory than opengl version. \ No newline at end of file -- cgit v1.2.3