summaryrefslogtreecommitdiff
path: root/indra/llkdu
AgeCommit message (Collapse)Author
2024-04-29#824 Process source files in bulk: replace tabs with spaces, convert CRLF to ↵Andrey Lihatskiy
LF, and trim trailing whitespaces as needed
2024-01-08replace boost library to standardAiraYumi
2023-03-29Merge remote-tracking branch 'origin/main' into DRTVWR-559Brad Linden
2022-06-05Merge remote-tracking branch 'origin/DRTVWR-543-maint_cmake' into ↵Nicky
DRTVWR-543-maint_cmake
2022-05-01Remove setting of HEADER_FILE_ONLY on .h* files, cmake automaticallyNicky
sets the property on those.
2022-04-17Switch to target_include_directoriesNicky
All 3Ps include dirs are treated as SYSTEM, this will stop compilers stop emitting warnings from those files and greatly helps having high warning levels and not being swamped by warnings that come from external libraries.
2022-04-15SL-17219 WIP - Texture pipeline overhaulDave Parks
2022-04-13Rework cmake, the original plan was to maybe be able to use conan targets ↵Nicky
with the same name (that's why 3ps had names like apr::apr), but it's safer and saner to put the LL 3ps under the ll:: prefix. This also allows means it is possible to get rid of that bad "if( TRAGET ...) return() endif()" pattern and rather use include_guard().
2022-04-06Use kdu targetNicky
2022-04-06Move CMake files to modernized cmake syntax, step 1.Nicky
Change projects to cmake targetsto get rid of havig to hardcore include directories and link libraries in consumer projects.
2021-10-28SL-16148 SL-16244 SL-16270 SL-16253 Remove most BlockTimers, remove ↵Dave Parks
LLMemTracked, introduce alignas, hook most/all reamining allocs, disable synchronous occlusion, and convert frequently accessed LLSingletons to LLSimpleton
2020-07-22There was an idiom to test with LL_DARWIN if the compiler used is clang. ↵Nicky Dasmijn
This is not correct, as clang is available on all 3 platforms. The correct way to check for this is via __clang__ (https://clang.llvm.org/docs/LanguageExtensions.html#builtin-macros)
2020-03-25DRTVWR-494: Put streaming operator<<() for kdu_dims in kdu_core.Nat Goodspeed
It seems the lookup now requires that the operator<<() function be defined in the same namespace as the argument.
2018-05-21Fix broken integration and unit tests.Graham Linden graham@lindenlab.com
Update KDU stubs in integration test. Work around MAINT-8675 stale cert in llsechandler_basic for now. Update stubs for LLTrans::getString in handful of integration tests.
2017-03-06Automated merge with ssh://bitbucket.org/lindenlab/viewer-releaseNat Goodspeed
2017-01-25MergeRider Linden
2016-11-30Pull in new version of KDU third party package that is build (correctly) as ↵Callum Prentice
a static library vs. a stub library/DLL
2016-11-23DRTVWR-418: Have to #include "llkdumem.h" even when not LL_DARWIN.Nat Goodspeed
2016-11-17DRTVWR-418: Fix Windows line endings in include_kdu_xxxx.hNat Goodspeed
2016-11-03DRTVWR-418: Update KDU and llimagej2ckdu* with certain clang fixes.Nat Goodspeed
2016-11-03Automated merge with ssh://bitbucket.org/lindenlab/viewer-releaseNat Goodspeed
2016-09-16MergeRider Linden
2016-09-14MergeRider Linden
2016-09-07MAINT-6584, MAINT-5011: Change new 'throw' to LLTHROW()Nat Goodspeed
to be consistent with new exception conventions.
2016-09-07Automated merge with ssh://bitbucket.org/lindenlab/viewer-vlcNat Goodspeed
2016-08-17MAINT-5011: Catch kdu_exception (aka int) in case it leaks out.Nat Goodspeed
KDU internally throws kdu_exception, which is a typedef for int. It's possible that such an exception might leak out. Our usual strategy for unknown exceptions is to catch (...) and let boost::current_exception_diagnostic_information() handle them. However, for int (or a class not derived from std::exception), that function will only shrug and report no information available. Besides, we want to format kdu_exception specially anyway. First, the KDU #defines are in hex, so we should report the value in hex. But on inspection, certain of those hex values are actually multibyte ASCII literals in disguise -- so also report the byte string value.
2016-08-17MAINT-5011: Derive image-load exceptions from LLContinueError.Nat Goodspeed
Failure to load an image shouldn't crash the whole viewer.
2016-08-17MAINT-5011: Try to enrich catch (...) logging throughout viewer.Nat Goodspeed
Turns out we have a surprising number of catch (...) clauses in the viewer code base. If all we currently do is LL_ERRS() << "unknown exception" << LL_ENDL; then call CRASH_ON_UNHANDLED_EXCEPTION() instead. If what we do is LL_WARNS() << "unknown exception" << LL_ENDL; then call LOG_UNHANDLED_EXCEPTION() instead. Since many places need LOG_UNHANDLED_EXCEPTION() and nobody catches LLContinueError yet, eliminate LLContinueError& parameter from LOG_UNHANDLED_EXCEPTION(). This permits us to use the same log message as CRASH_ON_UNHANDLED_EXCEPTION(), just with a different severity level. Where a catch (...) clause actually provides contextual information, or makes an error string, add boost::current_exception_diagnostic_information() to try to figure out actual exception class and message.
2016-08-17MAINT-5011: Clean up indentation from merge of viewer-release.Nat Goodspeed
2016-08-17Automated merge with ssh://bitbucket.org/lindenlab/viewer-releaseNat Goodspeed
2016-08-17MAINT-5011: Use LLTHROW() instead of plain BOOST_THROW_EXCEPTION().Nat Goodspeed
A level of preprocessor indirection lets us later change the implementation if desired.
2016-08-06MAINT-6584: Don't crash on inconsistent dims in a JPEG-2000 image.Nat Goodspeed
Previous code would crump with LL_ERRS. But a bad image file should fail only the image load -- not crash the viewer. While at it, validate all components present, not just 0, 1, 2. While at it, make the failure message report which component and what the mismatched dimensions are, not just "Components don't have matching dimensions!"
2016-08-05MAINT-6584: Introduce KDUError exception from other viewer project.Nat Goodspeed
Specifically, manually apply changesets b4db8a8 and b98371d from nat_linden/viewer-mac-mainloop. We need to throw from a new place, but if we threw const char* (current convention), the new throw wouldn't be patched when we merge to new exception convention.
2016-08-05MAINT-6584: Add explanatory comments to LLImageJ2CKDU implementation.Nat Goodspeed
These comments are inherently fragile, in that they enumerate all present callers of certain methods. Adding, removing or relocating calls would invalidate these comments. However, the LLImageJ2CKDU implementation is probably pretty stable by now.
2016-08-05MAINT-6584: Clarify LLKDUMessageError::flush() throwing exception.Nat Goodspeed
2016-08-04MAINT-6584: Comment out completely unused LLImageJ2CKDU code.Nat Goodspeed
The only call to the findDiscardLevelsBoundaries() method was commented out inside initDecode(), with a comment: // Merov : Test!! DO NOT COMMIT!! This was the only caller of copy_tile(), which was the only caller of copy_block(). Commented out all three of these (biggish!) functions, since I have no idea what any of them were supposed to do or when it might be useful to call them. In other words, I can't yet rule out the possibility that I might have to uncomment them.
2016-07-27MAINT-4327/MAINT-6584 Supress the crash on memory allocation error when ↵AndreyL ProductEngine
decoding J2C images
2016-08-03MAINT-6584: Use RAII classes to manage helper object lifespans.Nat Goodspeed
Use boost::scoped_ptr instead of raw pointers to LLKDUMemSource, LLKDUDecodeState, kdu_coords and kdu_dims so cleanup is simpler, and automated on destruction of LLImageJ2CKDU. Replace pointer to kdu_codestream with a custom RAII class. kdu_codestream is itself an opaque handle, so we don't need to add another layer of indirection. Just wrap it to ensure its destroy() method is reliably called when needed. Make static instances of LLKDUMessageWarning and LLKDUMessageError self-register, eliminating the companion static bool and explicit checks in code.
2016-07-22MAINT-6584: Convert LLImage class hierarchy to standard 'bool'Nat Goodspeed
instead of legacy BOOL.
2016-07-22MAINT-6584: Rationalize custom KDU error/warning message classes.Nat Goodspeed
Derive them both from a common base class that does the message logging, instead of having each handler class log redundantly -- especially since the put_text() override accepting const kdu_uint16* was simply streaming the kdu_uint16 pointer to the log file, which would log the hex value of the pointer. Although we want a static instance of each of these handler classes, pull it out rather than nesting the instance within the class itself.
2016-07-21MAINT-6584: Streamline static LLImageJ2C implementation API.Nat Goodspeed
Specifically, remove unused function pointer types CreateLLImageJ2CFunction, DestroyLLImageJ2CFunction and EngineInfoLLImageJ2CFunction. Also eliminate static fallbackDestroyLLImageJ2CImpl() and fallbackEngineInfoLLImageJ2CImpl(), leaving only static fallbackCreateLLImageJ2CImpl(). We do need a factory function to instantiate the appropriate LLImageJ2CImpl subclass, so leave the fallbackCreateLLImageJ2CImpl() link seam in place. However, given that every known LLImageJ2CImpl subclass is cheap to instantiate, make getEngineInfo() a pure virtual method on that subclass: the static LLImageJ2C::getEngineInfo() method can temporarily construct an instance to query. While we're at it, make getEngineInfo() return std::string like LLImageJ2C::getEngineInfo(). It's ridiculous that fallbackEngineInfoLLImageJ2CImpl() implementations constructed a static std::string and returned its c_str(), only to have LLImageJ2C::getEngineInfo() construct ANOTHER std::string from the returned const char*. fallbackDestroyLLImageJ2CImpl() never did anything useful: it merely deleted the passed LLImageJ2CImpl subclass pointer as the specific subclass type. But since LLImageJ2CImpl's destructor is virtual, LLImageJ2C's destructor could simply delete the stored LLImageJ2CImpl*. In fact, make mImpl a boost::scoped_ptr<LLImageJ2CImpl> so we don't even have to delete it manually.
2016-07-21DRTVWR-427: Remove engineInfoLLImageJ2CKDU(), createLLImageJ2CKDU(),Nat Goodspeed
destroyLLImageJ2CKDU(). These were apparently intended as simple C-style DLL entry points. But as nobody calls them, and as we decided against building the viewer from DLLs, they only clutter the code.
2016-07-19MAINT-5011: Introduce LLException base class for viewer exceptions.Nat Goodspeed
This also introduces LLContinueError for exceptions which should interrupt some part of viewer processing (e.g. the current coroutine) but should attempt to let the viewer session proceed. Derive all existing viewer exception classes from LLException rather than from std::runtime_error or std::logic_error. Use BOOST_THROW_EXCEPTION() rather than plain 'throw' to enrich the thrown exception with source file, line number and containing function.
2016-07-14MAINT-5011: On advice from NickyD, say KDUError not KduError.Nat Goodspeed
Also place KDUError into anonymous namespace to emphasize that it's entirely local to this .cpp file.
2016-07-13MAINT-5011: Introduce KduError instead of throw/catch const char*.Nat Goodspeed
KduError is derived from std::runtime_error, so the message string becomes its what() message.
2016-07-13MAINT-5011: Remove alarming ll_kdu_error() functionNat Goodspeed
whose body reads: // *FIX: This exception is bad, bad, bad. It gets thrown from a // destructor which can lead to immediate program termination! throw "ll_kdu_error() throwing an exception"; which would be bad indeed... if ll_kdu_error() were ever actually referenced by anything!
2016-05-19Automated merge with tip of viewer-release to pick up 4.0.5callum_linden
2016-05-06Automatic merge with headcallum_linden
2016-05-06Merge with viewer-releasecallum_linden
2016-04-26DRTVWR-418: Match KDU_X86_INTRINSICS macro set for KDU package build.Nat Goodspeed