HackerTrans
TopNewTrendsCommentsPastAskShowJobs

dubiousconst281

no profile record

comments

dubiousconst281
·قبل 4 سنوات·discuss
Back a while I tried to implement a MP4 demuxer, and I can kind of relate to that. The mdat box is sometimes an opaque blob and you need to parse the codec framing to split packets (fMP4 helps with this a bit), each codec has its own set of boxes, and the specs for each of them are paywalled...

Matroska/WebM is so much simpler and easier to parse, you can essentially abstract it away in a JSON-like DOM (obviously without loading 1GB of data into memory) and just get what you want, it's great.
dubiousconst281
·قبل 4 سنوات·discuss
ReferenceSource is the code from the Windows framework and I'm pretty sure it should be considered deprecated at this point. The runtime and core libraries are now at https://github.com/dotnet/runtime, kinda weird that this is not directly linked in the home page repo.
dubiousconst281
·قبل 4 سنوات·discuss
It's mind blowing how much effort they put into this, the MCHPRS server even JIT compiles redstone into native code using Cranelift: https://github.com/MCHPR/MCHPRS/blob/master/docs/Redpiler.md

It really saddens me that their post was removed from r/Minecraft, for crediting a server by including its IP address for literally one second in the video.
dubiousconst281
·قبل 4 سنوات·discuss
One fast way to do palette reduction is by using a 16-bit RGB565 lookup table filled with all the closest colors relative to each entry index, then you can replace each pixel in the image using just a few bitwise ops and one array access.
dubiousconst281
·قبل 4 سنوات·discuss
It seems that the exact opposite problem (phi elimination / translating out of SSA form) is rarely discussed in depth, especially in introductory material.

From what I've seen, most compilers rely on the register allocator to deal with this problem (which makes total sense), or just don't bother at all and instead keep SSA in "conventional" form.

But the problem isn't really that difficult. In Sreedhar/Boissinot et al.'s paper (which btw has a typo in the copy sequentialization algorithm), the idea is quite simple: create copies for each phi argument, plus an additional copy for the phi result, then coalesce those copies to the same variable if their live-ranges don't intersect. The devil is on the details of course, and it just takes a lot more effort to implement compared to the text book construction algorithm.
dubiousconst281
·قبل 4 سنوات·discuss
I wonder how signed distance fields performs in practice. Seems like it would fix, or at least minimize the scaling/offset issues quite nicely.

https://github.com/Chlumsky/msdfgen
dubiousconst281
·قبل 4 سنوات·discuss
There's also the chroma subsampling issue. With the standard 4:2:0 ratios, you'll get half the resolution for the two chroma channels, and if I'm not mistaken, they are more aggressively quantized.

It would be better to use YUV/YCbCr directly instead of RGB.