f_ changed the topic of ##raspberrypi-internals to: The inner workings of the Raspberry Pi (Low level VPU/HW) -- for general queries please visit #raspberrypi -- open firmware: https://librerpi.github.io/ -- VC4 VPU Programmers Manual: https://github.com/hermanhermitage/videocoreiv/wiki -- chat logs: https://libera.irclog.whitequark.org/~h~raspberrypi-internals -- bridged to matrix and discord
jcea has quit [Ping timeout: 272 seconds]
sys64738 has quit [Server closed connection]
sys64738 has joined ##raspberrypi-internals
Ad0 has quit [Ping timeout: 252 seconds]
Ad0 has joined ##raspberrypi-internals
jcea has joined ##raspberrypi-internals
bonda_000 has joined ##raspberrypi-internals
<bonda_000> clever: so my idea is
<bonda_000> you know how in math when you do multidimensional math there is a notion of dual space
<clever> not entirely
<bonda_000> say vector x
<bonda_000> x = 0.1 dot (a b c) where 0.1 is a constant and (a b c) is a vector
<bonda_000> so it is considered that 0.1 is a constant and vector (a b c) is a base
<bonda_000> and we can flip this
<bonda_000> so 0.1 is now a base
<bonda_000> and vectors such as (a b c) are constants
<bonda_000> and it is called a dual space for vector x
<clever> ah
<bonda_000> so, for instance. if I am trying to debayer a pixel in a 5x5 grid
<bonda_000> pixel 0 at the top left corner of the grid
<bonda_000> in the mosaic it's green
<bonda_000> so the closest Red pixels are 1, sqrt(5) and 3 units far from it
<bonda_000> so we get an equation
<bonda_000> weighted average it is pretty much
<bonda_000> R0 = a1 * R1 + a2 * R2 + a3 * R3
<bonda_000> where a is a weight wrt how far away it is
<bonda_000> R1 is the mosaic component
<bonda_000> one sec
<bonda_000> so the actual equation for red component
<bonda_000> R0 = a1 * R1 + a2 * R2 + a3 * R3 = 0.48107 *(r17 * 2^7 + ... + r10 * 2^0) + 0.35857 *(r27 * 2^7 + ... + r20 * 2^0) + 0.16035 *(r37 * 2^7 + ... + r30 * 2^0)
<bonda_000> 0.48 0.35 and 0.16 added together make a unity so it's just weighted 8 bit binary but we interpret our binary number as a vector
<bonda_000> and if we flip base and coefficient I came up with something like this
<bonda_000> RBIG = R1R3R2 = r17r16r15r14r13r12r11r10r37r36r35r34r33r32r31r30r27r26r25r24r23r22r21r20
<bonda_000> first I tried "cropping" it
<bonda_000> as in, taking first 4 bits from R1, then first 2 bits from R3, then first 2 bits from R2 to get a reconstructed 8-bit approximation
<bonda_000> but that is not accurate
<bonda_000> I found something else though
<bonda_000> also remember R1 is 1 unit distance away from R0, R2 is 3 units apart, R2 is sqrt(5) unit distance apart from R0, in a square pixel grid
<bonda_000> in a basic bayer pattern
<bonda_000> this operation:
<clever> i still need to figure out all of that math
<bonda_000> (R1 right shifted 2) XNOR (R2 left shifted 1) gives value very close to the Rideal which is weighted average
<bonda_000> shifts are filling with 1's by the way
<bonda_000> and then if R12 = (R1 << 2) XNOR (R2 >> 1) = r7r6r5r4r3r2r1r0 then Я12 = r4r5r6r7r0r1r2r3
<bonda_000> then Я(Я12 XNOR (R3 << 1)) = R12
<bonda_000> always, for some reason, no matter what R3 is
<bonda_000> so if this is a dimension and it has an inverse then all the rest of the math can apply to it
<bonda_000> clever: https://imgur.com/T074haD
<bonda_000> so if we operate in the dual then we operate on vectors as coefficients
<clever> yeah, that looks like pathagreons theorm
<clever> root(5) is just root(a^2 + b^2), a=1, b=2
<bonda_000> so from these distances comes the weights for the weighted average
trwbox has joined ##raspberrypi-internals
<bonda_000> the farther component is, the less influence it has on the end result
<clever> yeah
<bonda_000> but this can allow us to fiddle the 8-bit binary somehow
<bonda_000> since it now has different properties
<bonda_000> weight out individual bits
<bonda_000> that's why it was important to choose elements that are all different distance
<bonda_000> like x, y and z in three-dimensional coordinates are called orthogonal
<bonda_000> as in, independent
<bonda_000> in a similar fashion we do this
<bonda_000> the end result actually looks funny
<bonda_000> I'm gonna take a coffe break and write it up
waveform has quit [Ping timeout: 268 seconds]
trwbox has quit [Quit: Client closed]
waveform has joined ##raspberrypi-internals
<bonda_000> clever: https://imgur.com/rMogrSb
<bonda_000> so I'm not doing that anymore and instead trying to use XNOR and 1-filling shifts to get a better approximation
<bonda_000> but that's the space we are in if we want to get rid of all the usual ALU math
<bonda_000> not good approximation, because as you can see, farthest pixel R2 is pulling down the MSB of R1 as it has nothing to help it stay in the 128 values
<bonda_000> so, what I think is, if we use shifts on these 8-bit values, we can help bring them in the same weight class
<bonda_000> and then XNORing them with each other will us how similar they are when each of the corresponding bits are in the same weight class
<bonda_000> will tell*
<bonda_000> but for it being a space it is required that the base vectors 0.48107 , 0.35857 and 0.16035 are orthogonal, that is, do not contain elements of each other
<f_ridge> <c​lever___/D> @x2x6_ https://youtu.be/oRH2_jyxy8I
<f_ridge> <c​lever___/D> he mentions an I logo on the card, that signifies UHS
<f_ridge> <c​lever___/D> the lexar cards i have also clearly say UHS-I on the package
juri_ has quit [Ping timeout: 252 seconds]
bonda_000 has quit [Ping timeout: 240 seconds]
juri_ has joined ##raspberrypi-internals
jcea has quit [Ping timeout: 240 seconds]
bonda_000 has joined ##raspberrypi-internals
<bonda_000> Will be back in about an hour or so and show the second part
bonda_000 has quit [Client Quit]
bonda_000 has joined ##raspberrypi-internals
bonda_000_ has joined ##raspberrypi-internals
bonda_000 has quit [Ping timeout: 240 seconds]
Stromeko has quit [Quit: Going… gone.]
Stromeko has joined ##raspberrypi-internals
dolphinana has joined ##raspberrypi-internals
<bonda_000_> clever: https://imgur.com/CWLlsTe
<bonda_000_> it's quite interesting. I've just been thinking about it
<bonda_000_> it is kind of if we took a decimal number such as 1905
<bonda_000_> and started taking pieces of digits and making some new digits
<dolphinana> hello!
jcea has joined ##raspberrypi-internals
<f_[xmpp]> hi dolphinana
bonda_000_ has quit [Ping timeout: 256 seconds]
x^2^x6^ has joined ##raspberrypi-internals
<x^2^x6^> Hi, whats up
<clever> x^2^x6^: https://youtu.be/oRH2_jyxy8I this video goes over the details of SD card speed classes
<clever> which includes what kind of write speeds it claims to meet
<clever> how does the labeling on your card match your benchmarks? might that help in purchasing a better card?
bonda_000_ has joined ##raspberrypi-internals
t0mm13b has quit [Server closed connection]
t0mm13b has joined ##raspberrypi-internals
dolphinana has quit [Remote host closed the connection]
bonda_000_ has quit [Read error: Connection reset by peer]
t0mm13b_ has joined ##raspberrypi-internals
t0mm13b has quit [Ping timeout: 264 seconds]
<x^2^x6^> Thanks, checked it