aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/Pl_DCT.cc
AgeCommit message (Collapse)Author
2023-06-09Code tidy - Clang-Tidy rule modernize-use-equals-defaultm-holger
2023-06-02Code tidy - reflow comments and stringsm-holger
2023-05-21Rerun clang-formatJay Berkenbilt
2023-05-21Globally replace 'this->m->' with 'm->'m-holger
Using search and replace.
2023-05-20Rerun format_code (after merging clang-tidy PR)Jay Berkenbilt
2023-05-20Use auto when initializing with a castm-holger
2023-05-20Replace deprecated C++ includesm-holger
2023-05-20Remove unused include directivesm-holger
2022-09-21Replace calls to QUtil::int_to_string with std::to_stringm-holger
2022-05-04Make use of the new Pipeline methods in some placesJay Berkenbilt
2022-05-04Make Pipeline::write take an unsigned char const* (API change)Jay Berkenbilt
2022-04-16Use anonymous namespaces for file-private classesJay Berkenbilt
2022-04-16Use = default and = delete where possible in classesJay Berkenbilt
2022-04-09Replace PointerHolder with std::shared_ptr in library sources onlyJay Berkenbilt
(patrepl and cleanpatch are my own utilities) patrepl s/PointerHolder/std::shared_ptr/g {include,libqpdf}/qpdf/*.hh patrepl s/PointerHolder/std::shared_ptr/g libqpdf/*.cc patrepl s/make_pointer_holder/std::make_shared/g libqpdf/*.cc patrepl s/make_array_pointer_holder/QUtil::make_shared_array/g libqpdf/*.cc patrepl s,qpdf/std::shared_ptr,qpdf/PointerHolder, **/*.cc **/*.hh git restore include/qpdf/PointerHolder.hh cleanpatch ./format-code
2022-04-05Update some code manually to get better formatting resultsJay Berkenbilt
Add comments to force line breaks, parenthesize function arguments that are contatenated strings, etc. -- these kinds of changes improve clang-format's results and also cause emacs cc-mode to match clang-format. After this type of change, most of the time, when clang-format and emacs disagree, clang-format is better.
2022-04-04Programmatically apply new formatting to codeJay Berkenbilt
Run this: for i in **/*.cc **/*.c **/*.h **/*.hh; do clang-format < $i >| $i.new && mv $i.new $i done
2022-02-07Replace PointerHolder arrays with shared_ptr arrays where possibleJay Berkenbilt
Replace PointerHolder arrays wherever it can be done without breaking ABI.
2022-02-04PointerHolder: deprecate getPointer() and getRefcount()Jay Berkenbilt
Use get() and use_count() instead. Add #define NO_POINTERHOLDER_DEPRECATION to remove deprecation markers for these only. This commit also removes all deprecated PointerHolder API calls from qpdf's code except in PointerHolder's test suite, which must continue to test the deprecated APIs.
2020-10-22Handle jpeg library fuzz false positivesJay Berkenbilt
The jpeg library has some assembly code that is missed by the compiler instrumentation used by memory sanitization. There is a runtime environment variable that is used to work around this issue.
2020-04-16Fix warnings reported by -Wshadow=local (fixes #431)Jay Berkenbilt
2019-06-22Convert remaining public classes to use Members patternJay Berkenbilt
Have classes contain only a single private member of type PointerHolder<Members>. This makes it safe to change the structure of the Members class without breaking binary compatibility. Many of the classes already follow this pattern quite successfully. This brings in the rest of the class that are part of the public API.
2019-06-21Fix sign and conversion warnings (major)Jay Berkenbilt
This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with MSVC. This significantly reduces the likelihood of potential crashes from bogus integer values. There are some parts of the code that take int when they should take size_t or an offset. Such places would make qpdf not support files with more than 2^31 of something that usually wouldn't be so large. In the event that such a file shows up and is valid, at least qpdf would raise an error in the right spot so the issue could be legitimately addressed rather than failing in some weird way because of a silent overflow condition.
2019-03-12Undefined functions because of missing std:: or header. (#295)Thorsten Schöning
* [bcc32 Error] QPDF.cc(375): E2268 Call to undefined function 'atof' Full parser context QPDF.cc(358): parsing: void QPDF::parse(const char *) * [bcc32 Error] QPDFTokenizer.cc(183): E2268 Call to undefined function 'strtol' Full parser context QPDFTokenizer.cc(163): parsing: void QPDFTokenizer::resolveLiteral() * [bcc32 Error] pdf-split-pages.cc(52): E2268 Call to undefined function 'exit' Full parser context pdf-split-pages.cc(50): parsing: void usage() * PR #295: Including "cstdlib" should be replaced with "stdlib.h" to be more consistent. At the same time I changed the order of the surrounding includes to reflect alphabetical order, because at some files this already have been the case.
2017-09-16Fix test failure on MSVCJay Berkenbilt
2017-09-16Spell checkJay Berkenbilt
2017-09-16Fix Windows compilation errorsJay Berkenbilt
2017-09-08Pl_DCT: Use custom source and destination managers (fixes #153)Jay Berkenbilt
Avoid calling jpeg_mem_src and jpeg_mem_dest. The custom destination manager writes to the pipeline in smaller chunks to avoid having the whole image in memory at once. The source manager works directly with the Buffer object. Using customer managers avoids use of memory source and destination managers, which are not present in older versions of libjpeg still in use by some Linux distributions.
2017-08-29Fix memory leak with bad jpeg dataJay Berkenbilt
2017-08-22Do memory checksJay Berkenbilt
Slightly improve memory cleanup in Pl_DCT Make it easier to test with valgrind
2017-08-22Fix compiler warnings for clang/mac OS XJay Berkenbilt
2017-08-21Implement Pl_DCT pipelineJay Berkenbilt
Additional testing is added in later commits to be supported by additional changes in the library.