#asahi-re · 2022-03-20 10:22
rqou_uh, i wonder what the last two entries do?#asahi-re · 2022-03-20 10:22
rqou_awesome, thanks#asahi-re · 2022-03-20 10:21
Jamie[m]1nice :D#asahi-re · 2022-03-20 10:21
abrasive(with truncation rather than rounding, so)#asahi-re · 2022-03-20 10:21
abrasiveinverting that matrix gives me ['0x100', '0x0', '0x166', '0x100', '-0x58', '-0xb6', '0xff', '0x1c5', '0x0']#asahi-re · 2022-03-20 10:18
abrasivehttp://james.wah.net.au/ycbcr.png#asahi-re · 2022-03-20 10:17
Jamie[m]1ahhh, 3x3 matrix plus a separate numerator/denominator for the whole thing?#asahi-re · 2022-03-20 10:17
henje[m]But 11 values? Shouldn’t that be 9?#asahi-re · 2022-03-20 10:17
abrasivebecause YCbCr -> RGB is about that#asahi-re · 2022-03-20 10:16
henje[m]Yes#asahi-re · 2022-03-20 10:16
abrasiveis JPEG in YCbCr?#asahi-re · 2022-03-20 10:16
abrasiveoh, um#asahi-re · 2022-03-20 10:16
henje[m]Ah thx#asahi-re · 2022-03-20 10:16
Jamie[m]1they're in the gist henje#asahi-re · 2022-03-20 10:15
henje[m]rqou_: if you mind, could you dump the values and share them?#asahi-re · 2022-03-20 10:13
henje[m]So if it’s a quantization matrix in some form, later entries should effect higher frequency contents, i.e. sharp edges#asahi-re · 2022-03-20 10:12
Jamie[m]1vary them and see what happens to the image? :D#asahi-re · 2022-03-20 10:11
Jamie[m]1given the leading ffffff in some of them#asahi-re · 2022-03-20 10:11
Jamie[m]1it certainly looks like 32-bit signed values#asahi-re · 2022-03-20 10:11
rqou_but the driver refers to it as a matrix multiplication... thingy#asahi-re · 2022-03-20 10:11
rqou_possibly not even a matrix#asahi-re · 2022-03-20 10:11
rqou_a matrix with 11 entries of 4 bytes each#asahi-re · 2022-03-20 10:10
Jamie[m]1the latter, it looks like#asahi-re · 2022-03-20 10:09
abrasivean 11×11 matrix, or a matrix with 11 nonzero entries?#asahi-re · 2022-03-20 10:08
rqou_this is a matrix for... something else#asahi-re · 2022-03-20 10:08
rqou_yeah, that's in a separate block of registers#asahi-re · 2022-03-20 10:07
henje[m]JPEG encodes blocks of 8x8 pixels using a discrete cosine transformation. The cosine coefficients form a matrix and are multiplied with a quantization matrix, which effectively eliminates unneeded coefficients. But both matrices should be 8x8.#asahi-re · 2022-03-20 10:03
rqou_btw if anybody is deeply familiar with jpeg and can tell me why there's a 11-entry matrix involved in the process, that would be appreciated#asahi-re · 2022-03-20 09:47
rqou_(this one https://gist.github.com/alyssarosenzweig/7d8099cdb227d2de0a9e83b7de34c7f8)#asahi-re · 2022-03-20 09:46
rqou_which is itself hardcoded to these parameters#asahi-re · 2022-03-20 09:46
rqou_i _barely_ understand how to drive this hardware and basically just duplicated exactly what happens when you run alyssa's poc#asahi-re · 2022-03-20 09:46
rqou_it currently gives back raw rgb, but there should be other options as well#asahi-re · 2022-03-20 09:45
j`eydumb q, what does it give you back? just some raw rgb values in some format?#asahi-re · 2022-03-20 09:45
rqou_aka exactly what alyssa's iosurface poc was hardcoded for#asahi-re · 2022-03-20 09:44
rqou_works only with a 4:2:0 jpeg that is 120x80 in size#asahi-re · 2022-03-20 09:43
Jamie[m]1haha nice#asahi-re · 2022-03-20 09:41
rqou_success! (note contains reverse engineered macos driver code) https://gist.github.com/rqou/2dafd40cfe0362cc84c3ee26c68b2b36#asahi-re · 2022-03-20 09:19
jannauthat's from simpler times when there was only m1 or it was only ever used on m1 and not m1 pro/max#asahi-re · 2022-03-20 09:07
rqou_i tried copying the function from audio_capture.py which... doesn't do that#asahi-re · 2022-03-20 09:06
rqou_oops no, that fixes it#asahi-re · 2022-03-20 09:03
jannaurqou_: are you using DART.from_adt()? if not it might be simply the wrong dart type#asahi-re · 2022-03-20 09:00
rqou_hmm, the dart iomap function seems to be crashing m1n1 when i try to run it in the shell?#asahi-re · 2022-03-20 05:09
rqou_finally figured out how to use the mmio tracing framework. is there an example of how to use _reloadcls? i can't seem to figure out how that's intended to be used#asahi-re · 2022-03-20 04:14
rqou_ah, figured it out. need to turn on the dart with pmgr_adt_clocks_enable first#asahi-re · 2022-03-20 03:59
rqou_i guess i'm clearly struggling trying to figure out how the m1n1 tooling works, since addresses that i can trace the macos kernel accessing crash whenever i try to read32 them#asahi-re · 2022-03-20 03:57
rqou_tracing with trace_device works, but i'm trying to understand how to create a more complicated tracing tool#asahi-re · 2022-03-20 03:45
rqou_hmm, trying to create a DARTTracer for the jpeg dart crashes m1n1#asahi-re · 2022-03-19 21:25
rqou_oh yeah, maybe also figure out the typec efuse for m1 max while i'm at it? although i do not have any of the context on that#asahi-re · 2022-03-19 21:11
rqou_Eventually(TM) i would like to look into ANE#asahi-re · 2022-03-19 21:11
rqou_i'm still trying to get my feet wet and figure out all the tooling, so currently i'm looking at the JPEG block (which i assume should be simple and straightforward)