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 "core/fxcodec/codec/codec_int.h" | 7 #include "core/fxcodec/codec/codec_int.h" |
8 #include "core/fxcodec/include/fx_codec.h" | 8 #include "core/fxcodec/include/fx_codec.h" |
9 | 9 |
10 namespace { | 10 namespace { |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 FX_BOOL CCodec_FaxModule::Encode(const uint8_t* src_buf, | 803 FX_BOOL CCodec_FaxModule::Encode(const uint8_t* src_buf, |
804 int width, | 804 int width, |
805 int height, | 805 int height, |
806 int pitch, | 806 int pitch, |
807 uint8_t*& dest_buf, | 807 uint8_t*& dest_buf, |
808 uint32_t& dest_size) { | 808 uint32_t& dest_size) { |
809 CCodec_FaxEncoder encoder(src_buf, width, height, pitch); | 809 CCodec_FaxEncoder encoder(src_buf, width, height, pitch); |
810 encoder.Encode(dest_buf, dest_size); | 810 encoder.Encode(dest_buf, dest_size); |
811 return TRUE; | 811 return TRUE; |
812 } | 812 } |
813 ICodec_ScanlineDecoder* CCodec_FaxModule::CreateDecoder( | 813 CCodec_ScanlineDecoder* CCodec_FaxModule::CreateDecoder( |
814 const uint8_t* src_buf, | 814 const uint8_t* src_buf, |
815 uint32_t src_size, | 815 uint32_t src_size, |
816 int width, | 816 int width, |
817 int height, | 817 int height, |
818 int K, | 818 int K, |
819 FX_BOOL EndOfLine, | 819 FX_BOOL EndOfLine, |
820 FX_BOOL EncodedByteAlign, | 820 FX_BOOL EncodedByteAlign, |
821 FX_BOOL BlackIs1, | 821 FX_BOOL BlackIs1, |
822 int Columns, | 822 int Columns, |
823 int Rows) { | 823 int Rows) { |
824 CCodec_FaxDecoder* pDecoder = new CCodec_FaxDecoder; | 824 CCodec_FaxDecoder* pDecoder = new CCodec_FaxDecoder; |
825 pDecoder->Create(src_buf, src_size, width, height, K, EndOfLine, | 825 pDecoder->Create(src_buf, src_size, width, height, K, EndOfLine, |
826 EncodedByteAlign, BlackIs1, Columns, Rows); | 826 EncodedByteAlign, BlackIs1, Columns, Rows); |
827 return pDecoder; | 827 return pDecoder; |
828 } | 828 } |
OLD | NEW |