summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_HuffmanTable.h
AgeCommit message (Collapse)Author
2018-05-24Do some variable cleanup in CJBig2_ContextNicolas Pena
This CL cleans up variables in CJBig2_Context. It moves some declarations further, to when the variables are actually used. It also caches huffman tables in a vector of unique_ptr. Change-Id: Id3af96f9526b1000f681e4e2b174bba07b45ee55 Reviewed-on: https://pdfium-review.googlesource.com/32715 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-05-16Move JBig2 HuffmanTables into JBig2_HuffmanTable.cppNicolas Pena
This CL changes the table information so it can be indexed, and allows moving all of the information to the CJBig2_HuffmanTable implementation, which is the only real user of the data. Change-Id: I88780bee32c8509198518fd3b1e82d68ae7ff707 Reviewed-on: https://pdfium-review.googlesource.com/32635 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-04-27Remove CJBig2_HuffmanTable::InitCodes().Lei Zhang
Use CJBig2_Context::HuffmanAssignCode() instead. Change-Id: Ief187420494a8cefa26eeedb98a55683caf7807b Reviewed-on: https://pdfium-review.googlesource.com/31538 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-04-27Change CJBig2_HuffmanTable to use struct JBig2HuffmanCode.Lei Zhang
Change-Id: I6461f81a3d8005efa75b8141c18c502a63252883 Reviewed-on: https://pdfium-review.googlesource.com/31537 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-04-27Fix style for many jbig2 methods.chromium/3412Lei Zhang
Change-Id: Ie700e132f13f2cb4851ea59b68c891e3c42af243 Reviewed-on: https://pdfium-review.googlesource.com/31531 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2017-04-10Guard against negative shift in jbig2 huffman initializationDan Sinclair
Depending on the code table, it's possible to have the largest PREFLEN value in the huffman table to be > 32. This will, potentially, cause the calcuation of ((FIRSTCODE[i - 1] + LENCOUNT[i - 1]) << 1 to overflow the int value and cause a negative shift. This Cl checks the shift value and failes the initialization if we would shift a negative value. Bug: chromium:709781 Change-Id: Ia165a01ba9412e31c5e5a43717d415fcb42eafe5 Reviewed-on: https://pdfium-review.googlesource.com/3990 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2016-09-29Move core/fxcrt/include to core/fxcrtdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2382723003
2016-03-25Remove FX_DWORD from core/ and delete definitionchromium/2695chromium/2694chromium/2693chromium/2692tsepez
Review URL: https://codereview.chromium.org/1832173003
2016-03-23Move core/include/fxcrt to core/fxcrt/include.Dan Sinclair
This CL moves the fxcrt code into the core/fxcrt directory. The only exception was fx_bidi.h which was moved into core/fxcrt as it is not used outside of core/. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1825953002 .
2016-03-14Move core/src/ up to core/.Dan Sinclair
This CL moves the core/src/ files up to core/ and fixes up the include guards, includes and build files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1800523005 .