| OLD | NEW |
| 1 // Copyright 2015 PDFium Authors. All rights reserved. | 1 // Copyright 2015 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "core/fxcodec/jbig2/JBig2_TrdProc.h" | 7 #include "core/fxcodec/jbig2/JBig2_TrdProc.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 for (IDI = 0; IDI < SBNUMSYMS; IDI++) { | 82 for (IDI = 0; IDI < SBNUMSYMS; IDI++) { |
| 83 if ((nBits == SBSYMCODES[IDI].codelen) && | 83 if ((nBits == SBSYMCODES[IDI].codelen) && |
| 84 (nVal == SBSYMCODES[IDI].code)) { | 84 (nVal == SBSYMCODES[IDI].code)) { |
| 85 break; | 85 break; |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 if (IDI < SBNUMSYMS) { | 88 if (IDI < SBNUMSYMS) { |
| 89 break; | 89 break; |
| 90 } | 90 } |
| 91 } | 91 } |
| 92 FX_BOOL RI = 0; | 92 bool RI = 0; |
| 93 if (SBREFINE != 0 && pStream->read1Bit(&RI) != 0) { | 93 if (SBREFINE != 0 && pStream->read1Bit(&RI) != 0) { |
| 94 return nullptr; | 94 return nullptr; |
| 95 } | 95 } |
| 96 CJBig2_Image* IBI = nullptr; | 96 CJBig2_Image* IBI = nullptr; |
| 97 if (RI == 0) { | 97 if (RI == 0) { |
| 98 IBI = SBSYMS[IDI]; | 98 IBI = SBSYMS[IDI]; |
| 99 } else { | 99 } else { |
| 100 int32_t RDWI; | 100 int32_t RDWI; |
| 101 int32_t RDHI; | 101 int32_t RDHI; |
| 102 int32_t RDXI; | 102 int32_t RDXI; |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 CURS += WI - 1; | 396 CURS += WI - 1; |
| 397 } else if (TRANSPOSED == 1 && ((REFCORNER == JBIG2_CORNER_TOPLEFT) || | 397 } else if (TRANSPOSED == 1 && ((REFCORNER == JBIG2_CORNER_TOPLEFT) || |
| 398 (REFCORNER == JBIG2_CORNER_TOPRIGHT))) { | 398 (REFCORNER == JBIG2_CORNER_TOPRIGHT))) { |
| 399 CURS += HI - 1; | 399 CURS += HI - 1; |
| 400 } | 400 } |
| 401 ++NINSTANCES; | 401 ++NINSTANCES; |
| 402 } | 402 } |
| 403 } | 403 } |
| 404 return SBREG.release(); | 404 return SBREG.release(); |
| 405 } | 405 } |
| OLD | NEW |