github akai-katto/dandere2x 0.3.3.1
CPP Rework

latest releases: 3.7, 3.6.1b, 3.6b...
pre-release2 years ago

Massive Wall of Text

After literally over a year (I put this on hold and resumed it in 2021, so not really a year) the c++ rework is looking ready to be merged into master. I wish this would have been released faster, just issues with perfectionism and life issues that got in the way.

Over the rework, I found numerous bugs, some new and some existing for a while:

  • I realized that I had commented out "fade" many months ago, resulting in the fade plugin not being activated on the python part of things. This lead to poorer looking videos.

  • I had a typo in the SSIM code where the pixels were iterating over the wrong values, meaning that SSIM's were being incorrectly computed (I have no idea how I let this slip by).

Problems I've noticed that I'm worried about:

  • New C++ compiler is having anti-virus issues, hoping this isn't a problem.

  • Pyinstaller behavior seems to be acting different on my windows machine, I'm not sure if a windows security update changed behavior somewhere of how pyinstaller works, but I had to debug for a few days what was going wrong before I gave up and just hard-coded a solution.

The new features that are useful to me as a developer are:

  • Dandere2x_CPP now has a log file. This is incredibly important since the original c++ code was written when I was 20 or something, and everything worked with print statements.

  • Dandere2x_CPP can now be modular-ly set which loss function to use, i.e SSIM or MEAN-SQUARED-ERROR. I prefer mean squared error for it's speed.

  • The code can change color space if need be, but I had poor results with this.

  • Compression of images for constant quality rate loss for dandere2x is now done in-house using c++, eliminating the python dependency.

  • Block matching algorithms can be modularly hot-swapped (more on this later, can't get block matching to work but further work can be done now)

Changes that were made during this:

  • Mean Squared Error is the default loss function (higher quality)

  • PNG is now the default file type for image processing.

  • Disabled "fade" plugin due to bugs I haven't figured out the origin of.

  • SSIM seems to be buggy, but thank god it's modular and can be changed to MSE whenever.

Work Needing to be Done Still:

  • Figuring out how to code up "noise=c0s=8:c0f=u" into c++ code. I would like to ideally remove the ffmpeg requirement of adding noise to normalize the lum layers of a video, but manually coding this up never resulted in any deliverable results.

  • Since I can't figure out the above bullet point, re-encoding two separate videos, one for purely computations, and one for purely upscaling, this way realSR can work (since realSR doesn't work right now since we have to add noise to the LUM layer in order to balance out temporal noise)

  • Doing the above would also allow for better block matching, but holding off on research since it's a time sink.

0.3.3.1 Changes

Fixed bug causing dandere2x to crash entirely on redraw frames.

Virus Total:

https://www.virustotal.com/gui/file-analysis/ZTc3NTFkMGY0MzIwZTgwYzZkNDUyMTE5MDFhODNlZjk6MTYyMTIwOTAxOQ==/detection

Some false positives due to pyinstaller being automatically flagged

Don't miss a new dandere2x release

NewReleases is sending notifications on new releases.