-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The block coder should be usable without pulling in the rest of OpenJPH #97
Comments
Any suggested API to the block coder? |
Haven't thought about it yet, but it does have an api already: https://github.com/aous72/OpenJPH/blob/master/src/core/coding/ojph_block_decoder.h#L53 If you take that as a starting point, a few things I would consider:
|
@rouault Thoughts on an API to the HT block coder that would make it easier to maintain/integrate with OpenJPEG and other projects? |
@boxerab your thoughts? |
It would be interesting to see @rouault thoughts on this. But I remember one difficulty I faced with OpenJPEG is the requirement that the code compiles with Visual Studio 2010 (or was it an older version?). That required me to modify the code significantly -- put all variable declarations at the top of function and so on. I suspect this is still a requirement. Other implementation may need to have some stub code (I think CS call it facade) to interface with the library -- OpenJPH block decoder pushes all the data to the MSBs, while OpenJPEG (and FFmpeg it think) push the data one location up, using the LSB as the center of the dequantization bin -- data is shifted by different amounts. |
This is more than our CI still sticks to that and I've found little time/motivation to update to something more modern, but that's clearly irrelevant nowadays. VS2019 / C99 support should be our baseline nowadays.
The base x86_64 version should stick with that. But we have a few AVX2 compile-time code paths in the discrete wavelet transforms. Ideally we should have dynamic SIMD selection. Probably the most blocking issue is that OpenJPEG is still a C-only lib. Personally I would have nothing against internals to be partly C++ while keeping a user facing C API. Should be discussed with the rest of the OpenJPEG community. |
It should be possible to use the block coder without pulling in the rest of OpenJPH. That would make using the block coder with out libraries (grok, OpenJPEG, etc) easier
This can be done by creating a new CMake library target "htj2kblockcoder" that OpenJPH (and other libraries) can depend on
The text was updated successfully, but these errors were encountered: