Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
3rd May 2024, 06:30 | #1 | Link |
Registered User
Join Date: Apr 2024
Posts: 14
|
Digital Subband Video 1 - Wavelet Codec in Less than 5000 Lines of C
Hi Doom9, I recently developed this:
https://github.com/LMP88959/Digital-Subband-Video-1 DSV1 is comparable to MPEG-1 / MPEG-2 but uses wavelets instead of the DCT. Click to expand comparison images: I intend to use it as a video codec for my game but I believe it might be of interest to some of you here Here is a little slideshow presentation I made explaining the codec and some of my thoughts on video compression: https://www.youtube.com/watch?v=zDm4GN-znBo Please understand I developed this codec out of passion and interest in the field, I didn't develop this for serious/professional use. Here is a quick description: - uses mutliresolution subband analysis (aka wavelet decomposition) instead of DCT - half-pixel motion compensation - supports 4:1:1, 4:2:0, 4:2:2, and 4:4:4 chroma subsampling formats - adaptive quantization - closed GOP with intra and inter frames (no B frames, only P frames for simplicity) - no complex entropy coding (only interleaved exponential-Golomb coding) - support for much lower bitrates than MPEG-1 / MPEG-2 The README and the PDF files in the GitHub have more information if you're curious. I've seen Cineform's codec, Dirac, and Snow but none of these were made to be comparable to the first generation of MPEG video, and Snow ended up being abandoned. DSV1 is the first "complete" wavelet video codec I am aware of that is comparable to MPEG-1 / MPEG-2 and not trying to compete with H.264 or MPEG-4 part 2. Please let me know your thoughts, positive and negative. If you find any bugs please let me know as well - EMMIR Last edited by LMP88959; 3rd May 2024 at 17:18. Reason: Updated image links to a better image hosting site |
3rd May 2024, 22:55 | #2 | Link |
Registered User
Join Date: Dec 2023
Posts: 18
|
not sure i really need another video codec at this point, but i'm interested.
my superficial look is that DSV1 maintains a lot of detail at expense of blurring out other parts of the frame or worse. Last edited by modus-ms325c; 3rd May 2024 at 22:55. Reason: image -> frame |
3rd May 2024, 23:01 | #3 | Link | |
Registered User
Join Date: Jun 2013
Posts: 103
|
Quote:
__________________
https://github.com/MoSal |
|
3rd May 2024, 23:29 | #4 | Link | ||
Registered User
Join Date: Apr 2024
Posts: 14
|
Quote:
Quote:
1. To let people know DSV1 isn't competitive with codecs newer than MPEG-1 / MPEG-2 2. To help group it into the same era of video codecs. 3. To invite others to compare it with those video coding standards. I hope that clarifies things for you |
||
4th May 2024, 06:26 | #5 | Link |
Registered User
Join Date: Dec 2013
Location: Berlin, Germany
Posts: 404
|
This is great.
You probably won't be able to start a business based on that but I am sure you learned a lot. As you are using HAAR for most things, have you tried to partition the picture in macroblocks like MPEG-1/2 ? This might make things more manageable and HAAR does not have funny edge effects. And for Inter I know you want short Wavelets, have you tried Daubechies 3 ? I remember that one fondly for Inter, even if used with somewhat small pixel blocks. If you want to shave of bits from your coefficient coding I recommend Range Coding, maybe look up that IBM paper from G. N. N. Martin / 1979. I think AV1 is using a flavor of that one too. This will make things more complicated and slower though so if speed and simplicity is your goal just pass. As for no Wavelet based video codecs you know being comparable to Mpeg-1/2, please keep in mind that lots of people made Wavelet based video codecs, block based hybrid ones even, but almost none made it in the spotlight because they just don't perform as well as macroblock based DCT codecs. Wavelet Codecs are mostly some academic thing. Another thing: I stalked your Github, what do you think of the following 68K texture span inner loop (texture stride = 255) ? Code:
move.b (%a1,%d2.w),%d6 ; load texel move.b %d6,(%a0)+ ; write texel add.w %a3,%d4 ; vfrac inc scs.b %d7 ; vfrac overflowed ? add.w %a2,%d5 ; ufrac inc addx.w %d3,%d2 ; combined u int + v int + ufrac overflow texel step add.w %d7,%d2 ; additional v texel step if vfrac overflowed PS: DSV1_spec.pdf, Page 16, 2nd MIN() -> MAX |
4th May 2024, 15:34 | #6 | Link | |||||
Registered User
Join Date: Apr 2024
Posts: 14
|
Quote:
Quote:
Quote:
Quote:
Quote:
Thanks for catching that! I just fixed it in the repo |
|||||
5th May 2024, 03:42 | #7 | Link | ||||
Registered User
Join Date: Dec 2013
Location: Berlin, Germany
Posts: 404
|
Quote:
Quote:
Quote:
Quote:
Like for example I have done this: https://www.youtube.com/watch?v=3WvSVB4nqjw |
||||
Tags |
codec, subband, wavelet |
Thread Tools | Search this Thread |
Display Modes | |
|
|