| 1 |
/*****************************************************************************/ |
| 2 |
// Copyright 2006-2019 Adobe Systems Incorporated |
| 3 |
// All Rights Reserved. |
| 4 |
// |
| 5 |
// NOTICE: Adobe permits you to use, modify, and distribute this file in |
| 6 |
// accordance with the terms of the Adobe license agreement accompanying it. |
| 7 |
/*****************************************************************************/ |
| 8 |
|
| 9 |
/** \file |
| 10 |
* Functions for encoding and decoding lossless JPEG format. |
| 11 |
*/ |
| 12 |
|
| 13 |
/*****************************************************************************/ |
| 14 |
|
| 15 |
#ifndef __dng_lossless_jpeg__ |
| 16 |
#define __dng_lossless_jpeg__ |
| 17 |
|
| 18 |
/*****************************************************************************/ |
| 19 |
|
| 20 |
#include "dng_classes.h" |
| 21 |
#include "dng_simd_type.h" |
| 22 |
#include "dng_types.h" |
| 23 |
|
| 24 |
/*****************************************************************************/ |
| 25 |
|
| 26 |
class dng_spooler |
| 27 |
{ |
| 28 |
|
| 29 |
protected: |
| 30 |
|
| 31 |
virtual ~dng_spooler () |
| 32 |
{ |
| 33 |
} |
| 34 |
|
| 35 |
public: |
| 36 |
|
| 37 |
virtual void Spool (const void *data, |
| 38 |
uint32 count) = 0; |
| 39 |
|
| 40 |
}; |
| 41 |
|
| 42 |
/*****************************************************************************/ |
| 43 |
|
| 44 |
template<SIMDType simd> |
| 45 |
void DecodeLosslessJPEG (dng_stream &stream, |
| 46 |
dng_spooler &spooler, |
| 47 |
uint32 minDecodedSize, |
| 48 |
uint32 maxDecodedSize, |
| 49 |
bool bug16, |
| 50 |
uint64 endOfData); |
| 51 |
|
| 52 |
template<SIMDType simd> |
| 53 |
void EncodeLosslessJPEG (const uint16 *srcData, |
| 54 |
uint32 srcRows, |
| 55 |
uint32 srcCols, |
| 56 |
uint32 srcChannels, |
| 57 |
uint32 srcBitDepth, |
| 58 |
int32 srcRowStep, |
| 59 |
int32 srcColStep, |
| 60 |
dng_stream &stream); |
| 61 |
|
| 62 |
/*****************************************************************************/ |
| 63 |
|
| 64 |
#endif |
| 65 |
|
| 66 |
/*****************************************************************************/ |