diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2016-04-25 22:56:58 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2016-04-25 22:56:58 -0400 |
commit | a0052fac052c527e67f07a978a9413804427a736 (patch) | |
tree | 5f1cf6c91b8a8ddd2e948cf660232a4f754d0738 /indra/llkdu/llimagej2ckdu.cpp | |
parent | 979417fbd57ea5616d847a097e353d62c0177f07 (diff) |
DRTVWR-418: Fix indra/llkdu wrapper for changes in KDU 7.8 API.
KDU 7.8 introduces a number of changes to its API, most notably by moving
public symbols into a variety of kdu_something namespaces. While this is
laudable in a general sense, it does require quite a bit of diagnostic
building and patching to update legacy code.
Since llimagej2ckdu_test.cpp lamentably stubs out pretty much the entire KDU
API, we must also fix those stubs for signature changes even to functions we
don't otherwise reference.
NOTE: This commit still leaves four symbols undefined. Below I have taken the
liberty of juxtaposing the error line with the output from dumpbin /exports
build-vc120/packages/lib/release/kdu.lib. I see no differences.
unresolved symbol (?kdu_convert_ycc_to_rgb_rev16@kdu_core@@3P6AXPAF00H@ZA) "void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_rev16)(short *,short *,short *,int)"
?kdu_convert_ycc_to_rgb_rev16@kdu_core@@3P6AXPAF00H@ZA (void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_rev16)(short *,short *,short *,int))
unresolved symbol (?kdu_convert_ycc_to_rgb_irrev16@kdu_core@@3P6AXPAF00H@ZA) "void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_irrev16)(short *,short *,short *,int)"
?kdu_convert_ycc_to_rgb_irrev16@kdu_core@@3P6AXPAF00H@ZA (void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_irrev16)(short *,short *,short *,int))
unresolved symbol (?kdu_convert_ycc_to_rgb_rev32@kdu_core@@3P6AXPAH00H@ZA) "void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_rev32)(int *,int *,int *,int)"
?kdu_convert_ycc_to_rgb_rev32@kdu_core@@3P6AXPAH00H@ZA (void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_rev32)(int *,int *,int *,int))
unresolved symbol (?kdu_convert_ycc_to_rgb_irrev32@kdu_core@@3P6AXPAM00H@ZA) "void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_irrev32)(float *,float *,float *,int)"
?kdu_convert_ycc_to_rgb_irrev32@kdu_core@@3P6AXPAM00H@ZA (void (__cdecl* kdu_core::kdu_convert_ycc_to_rgb_irrev32)(float *,float *,float *,int))
24>C:\Users\Nat\linden\viewer64\build-vc120\newview\RelWithDebInfo\secondlife-bin.exe : fatal error LNK1120: 4 unresolved externals
Diffstat (limited to 'indra/llkdu/llimagej2ckdu.cpp')
-rwxr-xr-x | indra/llkdu/llimagej2ckdu.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index 6a8959517d..f48e544813 100755 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -32,12 +32,16 @@ #include "llmath.h" #include "llkdumem.h" -#include "kdu_block_coding.h" +#define kdu_xxxx "kdu_block_coding.h" +#include "include_kdu_xxxx.h" + +// Avoid ubiquitous necessity of kdu_core:: qualification +using namespace kdu_core; class kdc_flow_control { public: - kdc_flow_control(kdu_image_in_base *img_in, kdu_codestream codestream); + kdc_flow_control(kdu_supp::kdu_image_in_base *img_in, kdu_codestream codestream); ~kdc_flow_control(); bool advance_components(); void process_components(); @@ -46,7 +50,7 @@ private: struct kdc_component_flow_control { public: - kdu_image_in_base *reader; + kdu_supp::kdu_image_in_base *reader; int vert_subsampling; int ratio_counter; /* Initialized to 0, decremented by `count_delta'; when < 0, a new line must be processed, after @@ -108,7 +112,8 @@ const char* fallbackEngineInfoLLImageJ2CImpl() class LLKDUDecodeState { public: - LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap); + LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap, + kdu_codestream* codestreamp); ~LLKDUDecodeState(); BOOL processTileDecode(F32 decode_time, BOOL limit_time = TRUE); @@ -495,7 +500,7 @@ BOOL LLImageJ2CKDU::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 deco kdu_coords offset = tile_dims.pos - dims.pos; int row_gap = channels*dims.size.x; // inter-row separation kdu_byte *buf = buffer + offset.y*row_gap + offset.x*channels; - mDecodeState = new LLKDUDecodeState(tile, buf, row_gap); + mDecodeState = new LLKDUDecodeState(tile, buf, row_gap, mCodeStreamp); } // Do the actual processing F32 remaining_time = decode_time - decode_timer.getElapsedTimeF32(); @@ -1143,7 +1148,8 @@ all necessary level shifting, type conversion, rounding and truncation. */ } } -LLKDUDecodeState::LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap) +LLKDUDecodeState::LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap, + kdu_codestream* codestreamp) { S32 c; @@ -1189,7 +1195,7 @@ LLKDUDecodeState::LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap) mEngines[c] = kdu_synthesis(res,&mAllocator,use_shorts); } } - mAllocator.finalize(); // Actually creates buffering resources + mAllocator.finalize(*codestreamp); // Actually creates buffering resources for (c = 0; c < mNumComponents; c++) { mLines[c].create(); // Grabs resources from the allocator. @@ -1247,7 +1253,7 @@ separation between consecutive rows in the real buffer. */ // kdc_flow_control -kdc_flow_control::kdc_flow_control (kdu_image_in_base *img_in, kdu_codestream codestream) +kdc_flow_control::kdc_flow_control (kdu_supp::kdu_image_in_base *img_in, kdu_codestream codestream) { int n; |