Open
Conversation
63ff960 to
c281f7f
Compare
831f6db to
c9a3e63
Compare
|
Leaving some comments:
|
1c88971 to
209c391
Compare
This was referenced Nov 26, 2024
3aa1a01 to
ee719d0
Compare
|
Can you rename the packages from |
Owner
Author
|
@AntsyLich yes, I can. I will just do a final refactor of the code and submit a PR to your fork, with that change. |
Owner
Author
|
@AntsyLich should it really be |
|
we also own mihon.dev and packages can't have |
Owner
Author
|
Ok, I will use |
3 tasks
d92f53d to
a646d50
Compare
8489abb to
7394f33
Compare
Also only run assembleDebug for now, full assemble is too slow.
Also rely on the existing build tool of each external project, instead of patching CMake into them. Most `ExternalProject_Add` wrappers were copied from Komelia, at [https://github.com/Snd-R/Komelia/tree/8b938397e5c8743d4e995d2cc16203367de6f67d/image-decoder/native/cmake], but modified to make sure all libraries are staticaly linked.
Took me a while to figure out how the API work
Was trying to optimize by cropping the image to the desired region, and then resizing only that, but libvips seems to already be smart enough, so that is not necessary.
The intermediate buffer is not necessary, the `decode` function will already take care of outputing in the correct format.
Was looping to detect memory corruption. Not needed anymore.
And groupId/artifactId as `dev.mihon:image-decoder`
7394f33 to
5866515
Compare
Only `bounds` were being used, so I only keeped that.
This folder is genrated by clangd
Mihon was crashing somethimes crashing when decoding the first image. I notice Mihon was decoding two images at the same time, which made me think it could be a threading issue. Reading libvips documentation, it states that it is safe, but VIPS_INIT must only be called in a single-thread. I was calling VIPS_INIT for every decoder created, which I believe was the issue. This commit moves VIPS_INIT to JNI_OnLoad, which is called only once when the library is loaded.
5866515 to
863efc9
Compare
The emulator is failing to create due to lack of space. Maybe the previous build is using too much? I removed the build step, but it will still be built after the emulator is created, let's see if it will still break.
This will just check if the benchmark can run without errors.
02ca207 to
a71fc01
Compare
I am not very confident that building with the cache will work, even more if we modify the CMakeLists.txt file between builds. But waiting >20min per build is very painful (and there are both Debug and Release builds).
a1179a7 to
e78dbd8
Compare
The typo came from Androids documentation...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR aims to integrate libvips into this project to get a better algorithm for downsampling images (mangas frequently use half-tone shading, which is very susceptible to aliasing when downsampling). As a bonus, it will allow moving all image format implementations upstream, decreasing the maintenance burden.
Roadmap:
ExternalProject(as Komelia currently does).decoder_vipsthat accepts all formats it can, and implementing resize using a Lanczos filter or similar. This resize alone will not be enough to remove all aliasing; this will need to be addressed in real-time in subsampling-scale-image-view to fully fix it.decoder_vips.h/cppcropBorders