summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/jbig2
AgeCommit message (Collapse)Author
2015-11-05Fix all relative includes to third_party.chromium/2560chromium/2559chromium/2558chromium/2557Lei Zhang
- In non-standalone builds, use the provided jpeg library. - Run gn format over all the GN files. - Also roll DEPS for buildtools to c2f2598. BUG=541704 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425153006 .
2015-10-19Sanity check the values of TRUE and FALSE.Lei Zhang
Get rid of cond ? TRUE : FALSE. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1405723003 .
2015-10-09Sanitize CJBig2_SymbolDict's memory usage.chromium/2534chromium/2533chromium/2532Lei Zhang
- Use std::vector<JBig2ArithCtx> instead of storing pointers to arrays. - Make CJBig2_SymbolDict's members private with accessors. - Use std::vector<JBig2ArithCtx> in related places. - Steal Chromium's vector_as_array() and use it as an adaptor as needed. BUG=514891 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1388203003 .
2015-10-09Fix a bad refactoring error from commit 8a9ce57.Lei Zhang
BUG=541323 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1400773002 .
2015-10-08Fix a bunch of sign mismatch warnings.Lei Zhang
Also remove some gotos and move code into an anonymous namespace. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1356373003 .
2015-10-08Fix a malloc/delete mismatch introduced in commit 8a9ce57.Lei Zhang
Just get rid of the malloc altogether and use CJBig2_List instead. BUG=540873 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1394933002 .
2015-10-09Various changes to JBig2 cache:David Lattimore
- Makes the cache be per-document - Keys the cache on ObjNum and stream offset instead of keying on a pointer to the data (which can result in false cache hits). - Makes it so the cache is only used for the globals stream. - Reenable the cache. R=thestig@chromium.org BUG=pdfium:207 Review URL: https://codereview.chromium.org/1380243004 .
2015-10-08Put CJBig2_SymbolDict's images in a CJBig2_List container.Lei Zhang
Also mark it private. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1395613003 .
2015-10-07Stop inlining CJBig2_BitStream.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1393823002 .
2015-10-07Fix the Windows build after commit 8a9ce57.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1396533002 .
2015-10-07Remove gotos in JBig2 code.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1382613003 .
2015-10-07Fix include paths for fx_system.hDavid Lattimore
R=thestig@chromium.org BUG= Review URL: https://codereview.chromium.org/1390863002 .
2015-10-05Fix regression in JBIG2 decoding from commit ce37d73.chromium/2530chromium/2529Lei Zhang
many callers can tolerate CJBig2_ArithIntDecoder::decode() OOB failure. BUG=539749, pdfium:209 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1384663007 .
2015-10-05Disable JBIG2 cache; prevent data corruption - try 2.Lei Zhang
Also change CJBig2_SymbolDict::DeepCopy() to return a unique_ptr to prevent a potential leak if the cache size was 0. BUG=pdfium:207 R=tsepez@chromium.org, jbreiden@google.com Review URL: https://codereview.chromium.org/1374633004 .
2015-10-02Prevent divide by zeros in CJBig2_GSIDProc::decode_MMR().Lei Zhang
Check the image size before attempting to decode. BUG=538103 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1377493005 .
2015-10-01Disable JBIG2 cache; prevent data corruptionLei Zhang
BUG=pdfium:207 Original author: jbreiden@google.com Original CL: http://codereview.chromium.org/1362133003/ R=jbreiden@google.com Review URL: https://codereview.chromium.org/1382073002 .
2015-10-01Cleanup JBig2_ArithIntDecoder.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1359013003 .
2015-09-29Cleanup CJBig2_ArithDecoder.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1368153003 .
2015-09-28Cleanup some fx_codec_fax.cpp code.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1367633005 .
2015-09-24Fix a leak in CJBig2_Context.chromium/2520Lei Zhang
- Remove dead code - Use unique_ptr BUG=pdfium:202 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1365903002 .
2015-09-24Split up JBig2_GeneralDecoder.cpp.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1359233002 .
2015-09-15Cleanup JBig2_GeneralDecoder.cpp.Lei Zhang
- FX_Alloc() can't fail and return. - Use unique_ptr / remove gotos. - NULL -> nullptr. - Combine common code. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1337823003 .
2015-09-15Cleanup: Fix a typo. s/Processive/Processing/Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1338573002 .
2015-09-11Convert some unneeded gotos into returns.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1332193002 .
2015-09-11Cleanup casting of FX_Alloc() return values.Lei Zhang
Also convert some FX_AllocOrDie() calls to FX_Alloc(). R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1332173002 .
2015-09-10Guard against null image data in CJBig2_GRRDProc.chromium/2509chromium/2508Lei Zhang
Credit to karl at skomski.com for the initial version of the CL. BUG=527174 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1305033006 .
2015-09-10Remove CJBig2_Object, CJBig2_Module, and friends.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1326953006 .
2015-09-03Remove CJBig2_Module::JBig2_Error and friends.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1327983003 .
2015-09-03Make a bunch of JBig2 classes independent of CJBig2_Object.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1319713003 .
2015-09-02Remove dead JBig2 code.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1328643002 .
2015-08-28Replace signed char with int8_t. Fix Linux ARM build after r7830e9e.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1321883002 .
2015-08-20Remove a bunch of dead JBIG2 code.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1293393002 .
2015-08-14Clean: Fix some unneeded semi-colons and bad spacing.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1284193005 .
2015-08-04clang-format all pdfium code.Nico Weber
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163' | \ xargs ../../buildtools/mac/clang-format -i See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1265503005 .
2015-07-27Revert "FX Bool considered harmful, part 3"Tom Sepez
This reverts commit ff46aaf499edcf153ee2f57c7016587aa96dcfa0. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1255293002 .
2015-07-27FX Bool considered harmful, part 3Tom Sepez
Try to reland this patch after fixing underlying issues that caused it to be reverted. fx_system.h is the only manual edit. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1258093002 .
2015-07-23Revert "FX_BOOL considered harmful, part 2."Tom Sepez
This reverts commit 320b2313d19869333ed453af546e61a9fc2b81c9. Reason for revert: build failure. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1255693002 .
2015-07-23FX_BOOL considered harmful, part 2.Tom Sepez
Fully automatic change, execpt for cleanup in fx_system.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1254703002 .
2015-07-23Fix FX_BOOL type mismatches.Tom Sepez
Extracted from https://codereview.chromium.org/1252613002/ R=thestig@chromium.org Review URL: https://codereview.chromium.org/1253603002 .
2015-07-22Merge to master: _FETAL => _FATAL.Tom Sepez
(cherry picked from commit 8a0a834d2aea61fc92590839b86471ac73daa967) Original Review URL: https://codereview.chromium.org/1247213002 . Note: inadvertantly landed on XFA first. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1252013002 .
2015-07-16Cleanup: Do not check pointers before deleting them, part 2.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1195363002 .
2015-07-10Make CJBig2_Object::operator delete accept nullptrchromium/2455Vitaly Buka
Standard delete operator should do noting for nullptr. Overloaded CJBig2_Object::operator delete de-referenced provided pointer causing crashes after https://codereview.chromium.org/1192743004/ TBR=thestig BUG=508197 Review URL: https://codereview.chromium.org/1230763007 .
2015-06-19Cleanup: Do not check pointers before deleting them.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1192743004.
2015-06-15Do some IWYU cleanups.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1176333002.
2015-06-11Kill FXSYS_mem{cpy,cmp,set.move}{32,8}.Tom Sepez
At one point in time, it may have made sense to indicate the expected alignment of the memory you're about to copy, but that was last century. The compiler will take care of it just fine. I stopped short of removing the FXSYS_ wrapper macros entirely. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1179693003.
2015-06-10Cleanup: Remove uses of "this->" in core/Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1173223002.
2015-06-10Remove typdefs for pointer types in fx_system.h.Tom Sepez
This involves fixing some multiple variable per line declarations, as the textually-substituted "*" applies only to the first one. This involves moving some consts around following the substitution. This involves replacing some typedefs used as constructors with better code. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1171733003
2015-06-09Use stdint.h types throughout PDFium.Tom Sepez
It's redundant nowadays to provide our own equivalents, now that this is done for us by the system header. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1177483002
2015-06-04Move fx_safe_types.h to include/ directory.Tom Sepez
Small bit of OCD here, since this file is included cross-library (i.e. from fpdfsk), it can't be in src/. In other words, the following should be empty: grep -R 'include.*core/src/' fpdfsdk Fix some IWYU in it at the same time. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1147353006
2015-05-21Fix an endless loop in CJBig2_HuffmanTable::parseFromCodedBufferJUN FANG
This issue is trigged by the conversion from unsigned int to signed int. A large unsigned int is converted to int. It's represented as a negative int which is used in the condition of while later. BUG=482639 R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1146913003