OLD | NEW |
---|---|
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CORE_FXCODEC_CODEC_CCODEC_BASICMODULE_H_ | 7 #ifndef CORE_FXCODEC_CODEC_CCODEC_BASICMODULE_H_ |
8 #define CORE_FXCODEC_CODEC_CCODEC_BASICMODULE_H_ | 8 #define CORE_FXCODEC_CODEC_CCODEC_BASICMODULE_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "core/fxcrt/fx_system.h" | 12 #include "core/fxcrt/fx_system.h" |
13 | 13 |
14 class CCodec_ScanlineDecoder; | 14 class CCodec_ScanlineDecoder; |
15 | 15 |
16 class CCodec_BasicModule { | 16 class CCodec_BasicModule { |
17 public: | 17 public: |
18 bool RunLengthEncode(const uint8_t* src_buf, | |
Tom Sepez
2017/01/09 20:18:19
Can we add unit_tests and/or fuzzers for these?
rbpotter
2017/01/10 20:28:23
I added some unit tests. Will look into fuzzers.
| |
19 uint32_t src_size, | |
20 uint8_t*& dest_buf, | |
21 uint32_t& dest_size); | |
22 | |
23 bool A85Encode(const uint8_t* src_buf, | |
24 uint32_t src_size, | |
25 uint8_t*& dest_buf, | |
26 uint32_t& dest_size); | |
27 | |
18 std::unique_ptr<CCodec_ScanlineDecoder> CreateRunLengthDecoder( | 28 std::unique_ptr<CCodec_ScanlineDecoder> CreateRunLengthDecoder( |
19 const uint8_t* src_buf, | 29 const uint8_t* src_buf, |
20 uint32_t src_size, | 30 uint32_t src_size, |
21 int width, | 31 int width, |
22 int height, | 32 int height, |
23 int nComps, | 33 int nComps, |
24 int bpc); | 34 int bpc); |
25 bool RunLengthEncode(const uint8_t* src_buf, | 35 bool RunLengthEncode(const uint8_t* src_buf, |
26 uint32_t src_size, | 36 uint32_t src_size, |
27 uint8_t** dest_buf, | 37 uint8_t** dest_buf, |
28 uint32_t* dest_size); | 38 uint32_t* dest_size); |
29 bool A85Encode(const uint8_t* src_buf, | 39 bool A85Encode(const uint8_t* src_buf, |
30 uint32_t src_size, | 40 uint32_t src_size, |
31 uint8_t** dest_buf, | 41 uint8_t** dest_buf, |
32 uint32_t* dest_size); | 42 uint32_t* dest_size); |
33 }; | 43 }; |
34 | 44 |
35 #endif // CORE_FXCODEC_CODEC_CCODEC_BASICMODULE_H_ | 45 #endif // CORE_FXCODEC_CODEC_CCODEC_BASICMODULE_H_ |
OLD | NEW |