diff options
author | rws <empty> | 1994-01-12 19:42:39 +0000 |
---|---|---|
committer | rws <empty> | 1994-01-12 19:42:39 +0000 |
commit | eec7f931d1c5998c6471c97c05577733d1705f26 (patch) | |
tree | f9a4b0f799c75438646544f3dab905f1e7e01fdd /xc/lib/XIE | |
parent | 3f4de5dfb16a66b841d05703b0e666232edfa930 (diff) |
changes for final AGE release
Diffstat (limited to 'xc/lib/XIE')
-rw-r--r-- | xc/lib/XIE/XIElib.h | 29 | ||||
-rw-r--r-- | xc/lib/XIE/conven.c | 54 | ||||
-rw-r--r-- | xc/lib/XIE/elements.c | 14 | ||||
-rw-r--r-- | xc/lib/XIE/events.c | 8 | ||||
-rw-r--r-- | xc/lib/XIE/photomap.c | 10 | ||||
-rw-r--r-- | xc/lib/XIE/technique.c | 72 |
6 files changed, 138 insertions, 49 deletions
diff --git a/xc/lib/XIE/XIElib.h b/xc/lib/XIE/XIElib.h index 3dc3e9bb8..d9320d195 100644 --- a/xc/lib/XIE/XIElib.h +++ b/xc/lib/XIE/XIElib.h @@ -1,4 +1,4 @@ -/* $XConsortium: XIElib.h,v 1.3 93/10/28 15:17:36 mor Exp $ */ +/* $XConsortium: XIElib.h,v 1.4 93/10/30 14:57:34 rws Exp $ */ /****************************************************************************** Copyright 1993 by the Massachusetts Institute of Technology, @@ -575,7 +575,13 @@ typedef struct { typedef struct { XieInterleave interleave; XieOrientation band_order; -} XieDecodeJPEGBaselineParam, XieDecodeJPEGLosslessParam; + Bool up_sample; +} XieDecodeJPEGBaselineParam; + +typedef struct { + XieInterleave interleave; + XieOrientation band_order; +} XieDecodeJPEGLosslessParam; /* Dither */ @@ -624,8 +630,14 @@ typedef struct { } XieEncodeG42DParam; typedef struct { + unsigned int preference; +} XieEncodeServerChoiceParam; + +typedef struct { XieInterleave interleave; XieOrientation band_order; + unsigned char horizontal_samples[3]; + unsigned char vertical_samples[3]; char *q_table; unsigned int q_size; char *ac_table; @@ -1696,7 +1708,8 @@ extern XieDecodeTIFFPackBitsParam *XieTecDecodeTIFFPackBits ( extern XieDecodeJPEGBaselineParam *XieTecDecodeJPEGBaseline ( #if NeedFunctionPrototypes XieInterleave /* interleave */, - XieOrientation /* band_order */ + XieOrientation /* band_order */, + Bool /* up_sample */ #endif ); @@ -1759,10 +1772,18 @@ extern XieEncodeG42DParam *XieTecEncodeG42D ( #endif ); +extern XieEncodeServerChoiceParam *XieTecEncodeServerChoice ( +#if NeedFunctionPrototypes + unsigned int /* preference */ +#endif +); + extern XieEncodeJPEGBaselineParam *XieTecEncodeJPEGBaseline ( #if NeedFunctionPrototypes XieInterleave /* interleave */, - XieOrientation /* band_order */, + XieOrientation /* band_order */, + unsigned char[3] /* horizontal_samples[3] */, + unsigned char[3] /* vertical_samples[3] */, char * /* q_table */, unsigned int /* q_size */, char * /* ac_table */, diff --git a/xc/lib/XIE/conven.c b/xc/lib/XIE/conven.c index 6183edf92..87a13e068 100644 --- a/xc/lib/XIE/conven.c +++ b/xc/lib/XIE/conven.c @@ -1,4 +1,4 @@ -/* $XConsortium: conven.c,v 1.1 93/10/26 09:43:49 rws Exp $ */ +/* $XConsortium: conven.c,v 1.5 93/10/28 15:17:48 mor Exp $ */ /****************************************************************************** Copyright 1993 by the Massachusetts Institute of Technology @@ -1235,10 +1235,11 @@ Bool normal; XieDecodeJPEGBaselineParam * -XieTecDecodeJPEGBaseline (interleave, band_order) +XieTecDecodeJPEGBaseline (interleave, band_order, up_sample) XieInterleave interleave; XieOrientation band_order; +Bool up_sample; { XieDecodeJPEGBaselineParam *param = (XieDecodeJPEGBaselineParam *) @@ -1246,6 +1247,7 @@ XieOrientation band_order; param->interleave = interleave; param->band_order = band_order; + param->up_sample = up_sample; return (param); } @@ -1400,11 +1402,16 @@ XieOrientation encoded_order; XieEncodeJPEGBaselineParam * -XieTecEncodeJPEGBaseline (interleave, band_order, q_table, q_size, - ac_table, ac_size, dc_table, dc_size) +XieTecEncodeJPEGBaseline (interleave, band_order, + horizontal_samples, vertical_samples, + q_table, q_size, + ac_table, ac_size, + dc_table, dc_size) XieInterleave interleave; XieOrientation band_order; +unsigned char horizontal_samples[3]; +unsigned char vertical_samples[3]; char *q_table; unsigned int q_size; char *ac_table; @@ -1416,15 +1423,24 @@ unsigned int dc_size; XieEncodeJPEGBaselineParam *param = (XieEncodeJPEGBaselineParam *) Xmalloc (sizeof (XieEncodeJPEGBaselineParam)); - param->interleave = interleave; - param->band_order = band_order; - param->q_size = q_size; - param->ac_size = ac_size; - param->dc_size = dc_size; + param->interleave = interleave; + param->band_order = band_order; + + param->horizontal_samples[0] = horizontal_samples[0]; + param->horizontal_samples[1] = horizontal_samples[1]; + param->horizontal_samples[2] = horizontal_samples[2]; + + param->vertical_samples[0] = vertical_samples[0]; + param->vertical_samples[1] = vertical_samples[1]; + param->vertical_samples[2] = vertical_samples[2]; - param->q_table = (char *) Xmalloc (q_size); - param->ac_table = (char *) Xmalloc (ac_size); - param->dc_table = (char *) Xmalloc (dc_size); + param->q_size = q_size; + param->ac_size = ac_size; + param->dc_size = dc_size; + + param->q_table = (char *) Xmalloc (q_size); + param->ac_table = (char *) Xmalloc (ac_size); + param->dc_table = (char *) Xmalloc (dc_size); memcpy (param->q_table, q_table, q_size); memcpy (param->ac_table, ac_table, ac_size); @@ -1492,6 +1508,20 @@ XieOrientation encoded_order; return (param); } +XieEncodeServerChoiceParam * +XieTecEncodeServerChoice (preference) + +unsigned int preference; + +{ + XieEncodeServerChoiceParam *param = (XieEncodeServerChoiceParam *) + Xmalloc (sizeof (XieEncodeServerChoiceParam)); + + param->preference = preference; + + return (param); +} + XieGeomAntialiasByAreaParam * XieTecGeomAntialiasByArea (simple) diff --git a/xc/lib/XIE/elements.c b/xc/lib/XIE/elements.c index dcbdecbf9..96aac5778 100644 --- a/xc/lib/XIE/elements.c +++ b/xc/lib/XIE/elements.c @@ -1,4 +1,4 @@ -/* $XConsortium: elements.c,v 1.1 93/10/26 09:42:17 rws Exp $ */ +/* $XConsortium: elements.c,v 1.3 93/10/28 15:17:50 mor Exp $ */ /****************************************************************************** Copyright 1993 by the Massachusetts Institute of Technology @@ -648,9 +648,9 @@ XiePhotoElement *elemSrc; BEGIN_ELEM_HEAD (ConvertFromRGB, elemSrc, LENOF (xieFloConvertFromRGB) + techLen, *bufDest, elemDest); - elemDest->src = elemSrc->data.ConvertFromRGB.src; - elemDest->colorspace = elemSrc->data.ConvertFromRGB.color_space; - elemDest->lenParams = techLen; + elemDest->src = elemSrc->data.ConvertFromRGB.src; + elemDest->convert = elemSrc->data.ConvertFromRGB.color_space; + elemDest->lenParams = techLen; END_ELEM_HEAD (ConvertFromRGB, *bufDest, elemDest); @@ -713,9 +713,9 @@ XiePhotoElement *elemSrc; BEGIN_ELEM_HEAD (ConvertToRGB, elemSrc, LENOF (xieFloConvertToRGB) + techLen, *bufDest, elemDest); - elemDest->src = elemSrc->data.ConvertToRGB.src; - elemDest->colorspace = elemSrc->data.ConvertToRGB.color_space; - elemDest->lenParams = techLen; + elemDest->src = elemSrc->data.ConvertToRGB.src; + elemDest->convert = elemSrc->data.ConvertToRGB.color_space; + elemDest->lenParams = techLen; END_ELEM_HEAD (ConvertToRGB, *bufDest, elemDest); diff --git a/xc/lib/XIE/events.c b/xc/lib/XIE/events.c index 27ea2a5d4..0d8b8aecd 100644 --- a/xc/lib/XIE/events.c +++ b/xc/lib/XIE/events.c @@ -1,4 +1,4 @@ -/* $XConsortium$ */ +/* $XConsortium: events.c,v 1.1 93/07/19 11:39:20 mor Exp $ */ /****************************************************************************** Copyright 1993 by the Massachusetts Institute of Technology @@ -94,9 +94,9 @@ xEvent *wire; host_event->flo_id = wire_event->instanceFloID; host_event->src = wire_event->src; host_event->elem_type = wire_event->type; - host_event->data[0] = wire_event->data1; - host_event->data[1] = wire_event->data2; - host_event->data[2] = wire_event->data3; + host_event->data[0] = wire_event->data0; + host_event->data[1] = wire_event->data1; + host_event->data[2] = wire_event->data2; return (True); } diff --git a/xc/lib/XIE/photomap.c b/xc/lib/XIE/photomap.c index 5039b8abc..4523aec3b 100644 --- a/xc/lib/XIE/photomap.c +++ b/xc/lib/XIE/photomap.c @@ -1,4 +1,4 @@ -/* $XConsortium: photomap.c,v 1.2 93/07/26 19:03:42 mor Exp $ */ +/* $XConsortium: photomap.c,v 1.3 93/10/28 15:17:56 mor Exp $ */ /****************************************************************************** Copyright 1993 by the Massachusetts Institute of Technology @@ -76,14 +76,14 @@ XiePhotomap photomap; Status -XieQueryPhotomap (display, photomap, populated_ret, datatype_ret, class_ret, - decode_technique_ret, width_ret, height_ret, levels_ret) +XieQueryPhotomap (display, photomap, populated_ret, datatype_ret, + dataclass_ret, decode_technique_ret, width_ret, height_ret, levels_ret) Display *display; XiePhotomap photomap; Bool *populated_ret; XieDataType *datatype_ret; -XieDataClass *class_ret; +XieDataClass *dataclass_ret; XieDecodeTechnique *decode_technique_ret; XieLTriplet width_ret; XieLTriplet height_ret; @@ -116,7 +116,7 @@ XieLTriplet levels_ret; *populated_ret = rep.populated; *datatype_ret = rep.dataType; - *class_ret = rep.data; + *dataclass_ret = rep.dataClass; *decode_technique_ret = rep.decodeTechnique; width_ret[0] = rep.width0; width_ret[1] = rep.width1; diff --git a/xc/lib/XIE/technique.c b/xc/lib/XIE/technique.c index 96aa4d23a..712cdd0f6 100644 --- a/xc/lib/XIE/technique.c +++ b/xc/lib/XIE/technique.c @@ -1,4 +1,4 @@ -/* $XConsortium: technique.c,v 1.1 93/10/26 09:41:38 rws Exp $ */ +/* $XConsortium: technique.c,v 1.4 93/10/28 15:17:57 mor Exp $ */ /****************************************************************************** Copyright 1993 by the Massachusetts Institute of Technology @@ -274,8 +274,8 @@ int encode; dstParam->bias0 = _XieConvertToIEEE (srcParam->bias[0]); dstParam->bias1 = _XieConvertToIEEE (srcParam->bias[1]); dstParam->bias2 = _XieConvertToIEEE (srcParam->bias[2]); - dstParam->gamutTechnique = srcParam->gamut_tech; - dstParam->numGamutParams = gamutLen; + dstParam->gamutCompress = srcParam->gamut_tech; + dstParam->lenGamutParams = gamutLen; END_TECHNIQUE (xieTecYCbCrToRGB, *bufDest, dstParam); @@ -317,8 +317,8 @@ int encode; dstParam->lumaGreen = _XieConvertToIEEE (srcParam->luma_green); dstParam->lumaBlue = _XieConvertToIEEE (srcParam->luma_blue); dstParam->scale = _XieConvertToIEEE (srcParam->scale); - dstParam->gamutTechnique = srcParam->gamut_tech; - dstParam->numGamutParams = gamutLen; + dstParam->gamutCompress = srcParam->gamut_tech; + dstParam->lenGamutParams = gamutLen; END_TECHNIQUE (xieTecYCCToRGB, *bufDest, dstParam); @@ -367,10 +367,10 @@ int encode; dstParam->matrix21 = _XieConvertToIEEE (srcParam->matrix[7]); dstParam->matrix22 = _XieConvertToIEEE (srcParam->matrix[8]); - dstParam->whiteAdjusted = srcParam->white_adjust_tech; - dstParam->numWhiteParams = whiteLen; - dstParam->gamutTechnique = srcParam->gamut_tech; - dstParam->numGamutParams = gamutLen; + dstParam->whiteAdjusted = srcParam->white_adjust_tech; + dstParam->lenWhiteParams = whiteLen; + dstParam->gamutCompress = srcParam->gamut_tech; + dstParam->lenGamutParams = gamutLen; END_TECHNIQUE (xieTecCIELabToRGB, *bufDest, dstParam); @@ -599,6 +599,7 @@ int encode; dstParam->interleave = srcParam->interleave; dstParam->bandOrder = srcParam->band_order; + dstParam->upSample = srcParam->up_sample; END_TECHNIQUE (xieTecDecodeJPEGBaseline, *bufDest, dstParam); } @@ -757,6 +758,33 @@ int encode; int +_XieEncodeServerChoiceParam (bufDest, srcParam, encode) + +char **bufDest; +XieEncodeServerChoiceParam *srcParam; +int encode; + +{ + int length = LENOF (xieTecEncodeServerChoice); + xieTecEncodeServerChoice *dstParam; + + if (srcParam == NULL) + return(0); + + if (encode) + { + BEGIN_TECHNIQUE (xieTecEncodeServerChoice, *bufDest, dstParam); + + dstParam->preference = srcParam->preference; + + END_TECHNIQUE (xieTecEncodeServerChoice, *bufDest, dstParam); + } + + return (length); +} + + +int _XieEncodeG32DParam (bufDest, srcParam, encode) char **bufDest; @@ -837,6 +865,12 @@ int encode; dstParam->interleave = srcParam->interleave; dstParam->bandOrder = srcParam->band_order; + dstParam->horizontalSamples[0] = srcParam->horizontal_samples[0]; + dstParam->horizontalSamples[1] = srcParam->horizontal_samples[1]; + dstParam->horizontalSamples[2] = srcParam->horizontal_samples[2]; + dstParam->verticalSamples[0] = srcParam->vertical_samples[0]; + dstParam->verticalSamples[1] = srcParam->vertical_samples[1]; + dstParam->verticalSamples[2] = srcParam->vertical_samples[2]; dstParam->lenQtable = srcParam->q_size; dstParam->lenACtable = srcParam->ac_size; dstParam->lenDCtable = srcParam->dc_size; @@ -1141,22 +1175,22 @@ _XieInitTechFuncTable () xieValColorAllocRequantize, _XieColorAllocRequantizeParam); _XieRegisterTechFunc (xieValConvertFromRGB, - xieValCIELab, _XieRGBToCIELabParam); + xieValRGBToCIELab, _XieRGBToCIELabParam); _XieRegisterTechFunc (xieValConvertFromRGB, - xieValCIEXYZ, _XieRGBToCIEXYZParam); + xieValRGBToCIEXYZ, _XieRGBToCIEXYZParam); _XieRegisterTechFunc (xieValConvertFromRGB, - xieValYCbCr, _XieRGBToYCbCrParam); + xieValRGBToYCbCr, _XieRGBToYCbCrParam); _XieRegisterTechFunc (xieValConvertFromRGB, - xieValYCC, _XieRGBToYCCParam); + xieValRGBToYCC, _XieRGBToYCCParam); _XieRegisterTechFunc (xieValConvertToRGB, - xieValCIELab, _XieCIELabToRGBParam); + xieValCIELabToRGB, _XieCIELabToRGBParam); _XieRegisterTechFunc (xieValConvertToRGB, - xieValCIEXYZ, _XieCIEXYZToRGBParam); + xieValCIEXYZToRGB, _XieCIEXYZToRGBParam); _XieRegisterTechFunc (xieValConvertToRGB, - xieValYCbCr, _XieYCbCrToRGBParam); + xieValYCbCrToRGB, _XieYCbCrToRGBParam); _XieRegisterTechFunc (xieValConvertToRGB, - xieValYCC, _XieYCCToRGBParam); + xieValYCCToRGB, _XieYCCToRGBParam); _XieRegisterTechFunc (xieValConstrain, xieValConstrainClipScale, _XieClipScaleParam); @@ -1196,8 +1230,12 @@ _XieInitTechFuncTable () _XieRegisterTechFunc (xieValDither, xieValDitherOrdered, _XieDitherOrderedParam); +/* _XieRegisterTechFunc (xieValEncode, xieValEncodeServerChoice, 0); +*/ + _XieRegisterTechFunc (xieValEncode, + xieValEncodeServerChoice, _XieEncodeServerChoiceParam); _XieRegisterTechFunc (xieValEncode, xieValEncodeUncompressedSingle, _XieEncodeUncompressedSingleParam); _XieRegisterTechFunc (xieValEncode, |