OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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 "../../../include/fxcodec/fx_codec.h" | 7 #include "../../../include/fxcodec/fx_codec.h" |
8 #include "codec_int.h" | 8 #include "codec_int.h" |
9 CCodec_Jbig2Context::CCodec_Jbig2Context() | 9 CCodec_Jbig2Context::CCodec_Jbig2Context() |
10 { | 10 { |
11 FXSYS_memset32(this, 0, sizeof(CCodec_Jbig2Context)); | 11 FXSYS_memset32(this, 0, sizeof(CCodec_Jbig2Context)); |
12 } | 12 } |
13 CCodec_Jbig2Module::~CCodec_Jbig2Module() | 13 CCodec_Jbig2Module::~CCodec_Jbig2Module() |
14 { | 14 { |
15 } | 15 } |
16 void* CCodec_Jbig2Module::CreateJbig2Context() | 16 void* CCodec_Jbig2Module::CreateJbig2Context() |
17 { | 17 { |
18 return FX_NEW CCodec_Jbig2Context(); | 18 return new CCodec_Jbig2Context(); |
19 } | 19 } |
20 void CCodec_Jbig2Module::DestroyJbig2Context(void* pJbig2Content) | 20 void CCodec_Jbig2Module::DestroyJbig2Context(void* pJbig2Content) |
21 { | 21 { |
22 if(pJbig2Content) { | 22 if(pJbig2Content) { |
23 CJBig2_Context::DestroyContext(((CCodec_Jbig2Context*)pJbig2Content)->m_
pContext); | 23 CJBig2_Context::DestroyContext(((CCodec_Jbig2Context*)pJbig2Content)->m_
pContext); |
24 delete (CCodec_Jbig2Context*)pJbig2Content; | 24 delete (CCodec_Jbig2Context*)pJbig2Content; |
25 } | 25 } |
26 pJbig2Content = NULL; | 26 pJbig2Content = NULL; |
27 } | 27 } |
28 FX_BOOL CCodec_Jbig2Module::Decode(FX_DWORD width, FX_DWORD height, FX_LPCBYTE s
rc_buf, FX_DWORD src_size, | 28 FX_BOOL CCodec_Jbig2Module::Decode(FX_DWORD width, FX_DWORD height, FX_LPCBYTE s
rc_buf, FX_DWORD src_size, |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 dword_buf[i] = ~dword_buf[i]; | 203 dword_buf[i] = ~dword_buf[i]; |
204 } | 204 } |
205 return FXCODEC_STATUS_DECODE_FINISH; | 205 return FXCODEC_STATUS_DECODE_FINISH; |
206 } | 206 } |
207 } | 207 } |
208 return m_pJbig2Context->m_pContext->GetProcessiveStatus(); | 208 return m_pJbig2Context->m_pContext->GetProcessiveStatus(); |
209 } | 209 } |
210 | 210 |
211 | 211 |
212 | 212 |
OLD | NEW |