ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput
kabaka101 has quit [Ping timeout: 480 seconds]
adamtajti has joined #wayland
MrCooper_ has joined #wayland
MrCooper has quit [Read error: Connection reset by peer]
adamtajti_ has quit [Ping timeout: 480 seconds]
ity1 has joined #wayland
ity has quit [Ping timeout: 480 seconds]
Hypfer has quit [Ping timeout: 480 seconds]
MrCooper_ has quit [Read error: Connection reset by peer]
MrCooper has joined #wayland
Hypfer has joined #wayland
kabaka101 has joined #wayland
tokyo4j has quit [Read error: Connection reset by peer]
glennk has quit [Ping timeout: 480 seconds]
tokyo4j has joined #wayland
garnacho has quit [Ping timeout: 480 seconds]
Dami_Lu has quit [Remote host closed the connection]
MrCooper has quit [Read error: Connection reset by peer]
MrCooper has joined #wayland
MrCooper_ has joined #wayland
MrCooper has quit [Remote host closed the connection]
karenw has joined #wayland
feaneron has quit [Remote host closed the connection]
bwbuhse has joined #wayland
bwbuhse has quit [Remote host closed the connection]
bwbuhse has joined #wayland
bwbuhse has quit [Remote host closed the connection]
feaneron has joined #wayland
Brainium has quit [Quit: Konversation terminated!]
<upichika>
the client is giving the data to the compositor as dmabuf in YUV. Could some one please help me to point, where exactly this buffer is being fed to shaders ?
<upichika>
I see in gl-renderer.c -> gl_renderer_attach_dmabuf() -> gr->image_target_texture_2d(target, gb->images[i]);
<upichika>
Is this is correct ?
<pq>
upichika, the dmabug is imported into an EGLImage or a few, then those are bound as textures, and the shader samples from those. Depending on the importing and formats, the shader does YUV-to-RGB conversion.
<pq>
*dmabuf
<pq>
upichika, that is a texture binding step, yes.
<upichika>
will it be possible to read the pixel data from this dmabuf before shader reads this data ?
<pq>
what do you mean?
<pq>
by CPU?
<upichika>
yes
<pq>
well, GBM does have API for it, but it will likely take significant time to do so.
<pq>
as in, it's slow.
<pq>
For what purpose?
<any1>
I doubt that gbm_bo_map is implemented for YCbCr on any platform
<pq>
true - one could lie about the format through, it's likely DRM_FORMAT_MOD_LINEAR I guess.
<upichika>
I wanted to implement a small functionality to get the mean brightness of the frame on CPU side
<pq>
that's probably going to be quite slow
<upichika>
okay, but is there any feasibility of that ?
<pq>
feasiblity as in, can it work, even if slow? Theoretically yes, if gbm_bo_map() does not refuse.
<pq>
Maybe a compute shader would be a performant way.
<upichika>
Yeah, I got it
<any1>
Well, you're intested in the brightness, so you only need the luma plane
<upichika>
can we differentiate only luma plane data from the dmabuf ?
<any1>
yes
<upichika>
Y-plane data
<any1>
yep
<pq>
if it's a planar pixel format
<any1>
Let's hop that it's not that interleaved YUYV crap :p
<any1>
hope*
<upichika>
Got it
<any1>
But, yeah, if it's coming from a webcam, it's most likely interleaved
<pq>
unfortunately luma is not quite luminance
<pq>
upichika, is this about computing maxFALL specifically, or something else?
<upichika>
that is the reason, am trying to calculate the brightness of the whole pixels in the frame
<upichika>
pq, as the content is not giving maxFAL, am trying to calculate it in the compositor
<upichika>
maxFALL*
feaneron has quit [Quit: feaneron]
feaneron has joined #wayland
<pq>
upichika, there a few problems with that. One is that the compositor can take max() over only the frames it has already seen (and displayed), but it has no knowledge of the future. Future frames may change the current idea of maxFALL radically. If you use maxFALL for tone mapping purposes, the tone mapping won't be stable - or even deterministic.
<pq>
upichika, while you get some sort of approximation by averaging the luma channel, the algorithm in CTA-861-I uses max(R, G, B), which requires you to convert YUV to R'G'B' and then use the EOTF.
p7cq has joined #wayland
<pq>
given that luma is in electrical domain, it might be a poor approximation, since the average is supposed to be computed in optical domain.
<pq>
If it's a live video stream, I suspect it might be better to not try to measure any FALL.
bjorkintosh has joined #wayland
<pq>
Maybe a player application can do some dynamic contrast control, maybe a sliding window for estimating maxFALL and then communicate that to the compositor. The player knows when that estimate needs to be reset for deterministic tone mapping, while the compositor does not.
kts has joined #wayland
<pq>
e.g. user switches videos, or rewinds the video for re-play
<upichika>
we cant use the maxFALL calculated based on the luma plane.
<upichika>
to get the proper brightness value, we need to convert to linear data first
p7cq4 has joined #wayland
p7cq has quit [Read error: Connection reset by peer]
p7cq4 is now known as p7cq
feaneron has quit [Quit: feaneron]
feaneron has joined #wayland
<pq>
upichika, right.
<upichika>
pq, thanks for the info
_whitelogger has joined #wayland
feaneron has quit [Quit: feaneron]
feaneron has joined #wayland
iomari891 has quit [Ping timeout: 480 seconds]
feaneron has quit [Quit: feaneron]
feaneron has joined #wayland
feaneron has quit []
feaneron has joined #wayland
p7cq has quit [Read error: No route to host]
p7cq has joined #wayland
nerdopolis has quit [Read error: Connection reset by peer]
<bluetail>
seriously, are there any works in regard of fixing xwayland and making it work with wayland without having to force one screen to be at pos 0 0? It even applies for winecfg, and the issue has been stale upstream at winehq now for a while. And it is because in wayland positions are relative, compared to xorg where they are absolute.
p7cq has joined #wayland
tzimmermann has quit [Quit: Leaving]
leon-anavi has quit [Remote host closed the connection]
<ofourdan>
no, I tried and it's been discussed in https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/395 and the consensus is it's easier to fix your Wayland ouput configuration than making Xwayland accept non-zero coordinate for the top left screen corner.
<ofourdan>
so I gave up on this.
<bluetail>
that kind of sucks.
adamtajti has joined #wayland
<bluetail>
okay, so I am going to ask at #sway more about a convenient mode switch.
<bluetail>
I got 7 screens at the moment, and it would just need to reload part of the config
feaneron has quit [Quit: feaneron]
feaneron has joined #wayland
<bluetail>
I use sway. If you already got some convenient script, you could share it, otherwise I'd temporarily comment/uncomment stuff and reload
<ofourdan>
I don't use sway myself, but it looks like you can play with the config using swaymsg?
<bluetail>
correct. I currently use output identifiers, but the proper call to them is somewhere in my notes, it's somewhat of a lemon. And I know it will work...
<bluetail>
oh yea, found. The syntax is: swaymsg "focus output 'BNQ ZOWIE XL LCD REDACTED'"
<bluetail>
instead, I would define pos
rasterman has quit [Quit: Gettin' stinky!]
<soreau>
there is a wlr function to get the nearest output to a point IIRC
upichika has quit [Remote host closed the connection]
coldfeet has joined #wayland
feaneron has quit [Quit: feaneron]
feaneron has joined #wayland
feaneron has quit [Quit: feaneron]
feaneron has joined #wayland
feaneron has quit [Quit: feaneron]
feaneron has joined #wayland
rasterman has joined #wayland
sewn has quit [Ping timeout: 480 seconds]
feaneron has quit [Read error: Connection reset by peer]
feaneron has joined #wayland
feaneron has quit []
feaneron has joined #wayland
rasterman- has joined #wayland
rasterman has quit [Read error: Connection reset by peer]
feaneron has quit [Quit: feaneron]
feaneron has joined #wayland
iomari891 has joined #wayland
rasterman- has quit []
rasterman has joined #wayland
feaneron has quit [Quit: feaneron]
feaneron has joined #wayland
iomari891 has quit [Ping timeout: 480 seconds]
rasterman has quit [Quit: Gettin' stinky!]
sewn has joined #wayland
feaneron has quit [Read error: Connection reset by peer]
feaneron has joined #wayland
pochu has quit [Quit: reboot]
pochu has joined #wayland
karenw has joined #wayland
feaneron has quit [Quit: feaneron]
feaneron has joined #wayland
coldfeet has quit [Quit: Lost terminal]
feaneron has quit [Read error: Connection reset by peer]