8#include "./AOI_Renderer.h"
9#include <ACPL/Multithreading.h>
10#include <ACPL/CString.h>
12#include "../GBitmap.h"
14namespace aur {
namespace PDF {
16 class ColorSpaceObject;
31 aur::ACPL::CriticalSection mSemaphore;
36 void AddBuffer( Unit* );
38 void DestroyBuffers();
40 typedef struct ImageDefinition
42 uint32_t channelCount;
48 aur::PDF::Document* mDocument;
49 aur::ACPL::FileSpec* mImageSpec;
50 aur::PDF::Renderer* mColorConvertor;
51 aur::PDF::Mapping mRenderMapping;
52 aur::PDF::Mapping mImageMapping;
53 ImageDefinition mInputOriginal;
54 ImageDefinition mOutputOriginal;
55 ImageDefinition mInputClipped;
56 ImageDefinition mOutputClipped;
62 volatile bool mContinue;
66 uint32_t mY_Input_Start;
67 uint32_t mInput_X_OffsetBytes;
70 double mY_Input_Threshold;
72 UnitQueue mReaderQueue;
73 ACPL_THREAD mReaderThreadH;
74 volatile bool mReaderEnded;
75 static ACPL_RES ReaderCreate(
void* );
77 static aur::ExceptionCode ReaderPlugSetup(
void* ref,
const aur::PDF::BitmapT& inBitmap );
78 static aur::ExceptionCode ReaderPlugSaveLine(
void* ref,
const uint8_t* inImageLine );
81 ACPL_THREAD mCMMThreadH;
82 volatile bool mCMMEnded;
84 void* mColorConvertRef;
85 aur::PDF::CMM* mInputCMM;
86 aur::PDF::CMM* mOutputCMM;
87 aur::PDF::ColorSpaceObject* mInputCS;
88 aur::PDF::ColorSpaceObject* mOutputCS;
89 static ACPL_RES CMMCreate(
void* );
91 void SimpleConvert( uint32_t width,
const uint8_t* src, uint8_t* dest );
92 void DownscaleFree( uint32_t channels,
const uint8_t* inImage, int32_t inWidth, uint8_t* outImage, int32_t outWidth );
93 void UpscaleFree( uint32_t channels,
const uint8_t* inImage, int32_t inWidth, uint8_t* outImage, int32_t outWidth );
95 uint32_t mY_Output_Start;
96 uint32_t mOutput_X_OffsetBytes;
97 double mY_Output_Threshold;
98 UnitQueue mWriterQueue;
102 aur::ExceptionCode Setup(
const aur::ACPL::FileSpec&,
const aur::ACPL::StringList&,
void* banddata, int32_t w, int32_t h,
bool alpha );
105 void SetMapping(
const AOI_Mapping& docToBandMap );
bool(* ColorConvertCB)(ColorConvert_Data &, void *)
CMM callback routine.