Visible to Intel only — GUID: GUID-75A6CFD1-FBEB-4E2D-8F9F-91796CAAC4DD
Getting Help and Support
Introducing the Intel® Integrated Performance Primitives for Intel® Architecture
Notational Conventions
Related Products
Getting Started with Intel® Integrated Performance Primitives
Intel® Integrated Performance Primitives Theory of Operation
Linking Your Application with Intel® Integrated Performance Primitives
Using Intel® Integrated Performance Primitives Platform-Aware Functions
Using Intel® Integrated Performance Primitives Threading Layer (TL) Functions
Using Custom Library Tool for Intel® Integrated Performance Primitives
Using Integration Wrappers for Intel® Integrated Performance Primitives
Programming Considerations
Programming with Intel® Integrated Performance Primitives in the Microsoft* Visual Studio* IDE
Appendix: Performance Test Tool Command-Line Options
Appendix: Intel(R) IPP Threading and OpenMP* Support
Intel® IPP API Reference
Notices and Disclaimers
Intel® Integrated Performance Primitives Concepts
Support Functions
Vector Initialization Functions
Essential Functions
Filtering Functions
Transform Functions
Fixed-Accuracy Arithmetic Functions
Long Term Evolution (LTE) Wireless Support Functions
Data Compression Functions
String Functions
Appendix A: Handling of Special Cases
Appendix B: Removed Functions for Signal Processing
Bibliography for Signal Processing
Glossary
SortAscend, SortDescend
SortIndexAscend, SortIndexDescend
SortRadixGetBufferSize
SortRadixAscend, SortRadixDescend
SortRadixIndexGetBufferSize
SortRadixIndexAscend, SortRadixIndexDescend
TopKGetBufferSize
TopKInit
TopK
SwapBytes
Convert
Conj
ConjFlip
Magnitude
Phase
PowerSpectr
Real
Imag
RealToCplx
CplxToReal
Threshold
Threshold_LT, Threshold_GT
Threshold_LTAbs, Threshold_GTAbs
Threshold_LTVal, Threshold_LTAbsVal, Threshold_GTVal, Threshold_LTValGTVal
Threshold_LTInv
CartToPolar
PolarToCart
MaxOrder
Flip
FindNearestOne
FindNearest
Special Parameters
Adler32
CRC32, CRC32C
DeflateLZ77
DeflateLZ77Fast
DeflateLZ77Fastest
DeflateLZ77FastestGenHeader
DeflateLZ77FastestGenHuffTable
DeflateLZ77FastestGetStat
DeflateLZ77FastestPrecompHeader
DeflateLZ77Slow
DeflateDictionarySet
DeflateUpdate Hash
DeflateHuff
InflateBuildHuffTable
Inflate
EncodeRLEInit_BZ2
RLEGetSize_BZ2
EncodeRLE_BZ2
EncodeRLEFlush_BZ2
RLEGetInUseTable
DecodeRLEStateInit_BZ2
DecodeRLEState_BZ2
DecodeRLEStateFlush_BZ2
EncodeZ1Z2_BZ2
DecodeZ1Z2_BZ2
ReduceDictionary
ExpandDictionary
CRC32_BZ2
EncodeHuffGetSize_BZ2
EncodeHuffInit_BZ2
PackHuffContext_BZ2
EncodeHuff_BZ2
DecodeHuffGetSize_BZ2
DecodeHuffInit_BZ2
UnpackHuffContext_BZ2
DecodeHuff_BZ2
DecodeBlockGetSize_BZ2
DecodeBlock_BZ2
EncodeZfpGetStateSize
EncodeZfpInit, EncodeZfpInitLong
EncodeZfpSet
EncodeZfpSetAccuracy
EncodeZfp444
EncodeZfpGetCompressedBitSize
EncodeZfpFlush
EncodeZfpGetCompressedSize, EncodeZfpGetCompressedSizeLong
DecodeZfpGetStateSize
DecodeZfpInit, DecodeZfpInitLong
DecodeZfpSet
DecodeZfpSetAccuracy
DecodeZfp444
DecodeZfpGetCompressedSize, DecodeZfpGetCompressedSizeLong
Intel® Integrated Performance Primitives Concepts
Support Functions
Image Data Exchange and Initialization Functions
Image Arithmetic and Logical Operations
Image Color Conversion
Threshold and Compare Operations
Morphological Operations
Filtering Functions
Image Linear Transforms
Image Statistics Functions
Image Geometry Transforms
Miscellaneous Image Transforms
Wavelet Transforms
Computer Vision
3D Data Processing Functions
Appendix A: Handling of Special Cases
Appendix B: Interpolation in Image Geometric Transform Functions
Appendix C: Removed Functions for Image and Video Processing
Bibliography for Image Processing
Glossary
RGBToYUV
YUVToRGB
RGBToYUV422
YUV422ToRGB
RGBToYUV420
YUV420ToRGB
BGRToYUV420
YUV420ToBGR
YUV422v210ToRGB, YUV422v210ToBGR
YUV422v210ToGray
RGBToYCbCr
YCbCrToRGB
YCbCrToBGR
YCbCrToBGR_709CSC
RGBToYCbCr422
YCbCr422ToRGB
RGBToYCrCb422
YCrCb422ToRGB, YCrCb422ToBGR
BGRToYCbCr422
YCbCr422ToBGR
YCbCr422ToGray
RGBToCbYCr422, RGBToCbYCr422Gamma
CbYCr422ToRGB
BGRToCbYCr422
BGRToCbYCr422_709HDTV
CbYCr422ToBGR
CbYCr422ToBGR_709HDTV
RGBToYCbCr420
YCbCr420ToRGB, YCbCr420ToBGR
RGBToYCrCb420
YCrCb420ToRGB, YCrCb420ToBGR
BGRToYCbCr420
BGRToYCbCr420_709CSC
BGRToYCbCr420_709HDTV
BGRToYCrCb420_709CSC
YCbCr420ToBGR
YCbCr420ToBGR_709CSC
YCbCr420ToBGR_709HDTV
BGRToYCrCb420
BGRToYCbCr411
YCbCr411ToBGR
RGBToXYZ
XYZToRGB
RGBToLUV, BGRToLUV
LUVToRGB, LUVToBGR
BGRToLab, RGBToLab
LabToBGR, LabToRGB
RGBToYCC
YCCToRGB
RGBToHLS
HLSToRGB
BGRToHLS
HLSToBGR
RGBToHSV
HSVToRGB
RGBToYCoCg
YCoCgToRGB
BGRToYCoCg
SBGRToYCoCg
YCoCgToBGR
YCoCgToSBGR
BGRToYCoCg_Rev
SBGRToYCoCg_Rev
YCoCgToBGR_Rev
YCoCgToSBGR_Rev
YCbCr422
YCbCr422ToYCrCb422
YCbCr422ToCbYCr422
YCbCr422ToYCbCr420
YCbCr422To420_Interlace
YCbCr422ToYCrCb420
YCbCr422ToYCbCr411
YCrCb422ToYCbCr422
YCrCb422ToYCbCr420
YCrCb422ToYCbCr411
CbYCr422ToYCbCr422
CbYCr422ToYCbCr420
CbYCr422ToYCbCr420_Interlace
CbYCr422ToYCrCb420
CbYCr422ToYCbCr411
YCbCr420
YCbCr420ToYCbCr422
YCbCr420ToYCbCr422_Filter
YCbCr420To422_Interlace
YCbCr420ToCbYCr422
YCbCr420ToCbYCr422_Interlace
YCbCr420ToYCrCb420
YCbCr420ToYCrCb420_Filter
YCbCr420ToYCbCr411
YCrCb420ToYCbCr422
YCrCb420ToYCbCr422_Filter
YCrCb420ToCbYCr422
YCrCb420ToYCbCr420
YCrCb420ToYCbCr411
YCbCr411
YCbCr411ToYCbCr422
YCbCr411ToYCrCb422
YCbCr411ToYCbCr420, YCbCr411To420
YCbCr411ToYCrCb420
Dilate3x3
Dilate
DilateBorder
DilateGetBufferSize
DilateGetSpecSize
DilateInit
Erode3x3
Erode
ErodeBorder
ErodeGetBufferSize
ErodeGetSpecSize
ErodeInit
GrayDilateBorder
GrayErodeBorder
MorphAdvInit
MorphAdvGetSize
MorphGetBufferSize
MorphGetSpecSize
MorphInit
MorphologyBorderGetSize
MorphologyBorderInit
MorphBlackhat
MorphBlackhatBorder
MorphClose
MorphCloseBorder
MorphGradient
MorphGradientBorder
MorphOpen
MorphOpenBorder
MorphTophat
MorphTophatBorder
MorphGrayInit
MorphGrayGetSize
MorphReconstructGetBufferSize
MorphReconstructDilate
MorphReconstructErode
MorphSetMode
FilterBilateral
FilterBilateralGetBufferSize
FilterBilateralInit
FilterBilateralBorderGetBufferSize
FilterBilateralBorderInit
FilterBilateralBorder
FilterBoxBorderGetBufferSize
FilterBoxBorder
FilterBox
FilterGaussianBorder
SumWindow
SumWindowGetBufferSize
SumWindowRow
SumWindowColumn
FilterMaxBorderGetBufferSize, FilterMinBorderGetBufferSize
FilterMaxBorder, FilterMinBorder
DecimateFilterRow, DecimateFilterColumn
FilterRowBorderPipelineGetBufferSize, FilterRowBorderPipelineGetBufferSize_Low
FilterRowBorderPipeline, FilterRowBorderPipeline_Low
FilterColumnPipelineGetBufferSize, FilterColumnPipelineGetBufferSize_Low
FilterColumnPipeline, FilterColumnPipeline_Low
FilterSeparable
FilterSeparableGetBufferSize
FilterSeparableGetSpecSize
FilterSeparableInit
FilterGaussianGetBufferSize
FilterGaussianGetSpecSize
FilterGaussianInit
FilterGaussian
FilterHipassBorderGetBufferSize
FilterHipassBorder
FilterLaplaceBorderGetBufferSize
FilterLaplaceBorder
FilterLaplacianGetBufferSize
FilterLaplacianBorder
FilterLowpassGetBufferSize
FilterLowpassBorder
FilterPrewittHorizBorderGetBufferSize
FilterPrewittHorizBorder
FilterPrewittVertBorderGetBufferSize
FilterPrewittVertBorder
FilterRobertsUpBorderGetBufferSize
FilterRobertsUpBorder
FilterRobertsDownBorderGetBufferSize
FilterRobertsDownBorder
FilterScharrHorizMaskBorderGetBufferSize
FilterScharrHorizMaskBorder
FilterScharrVertMaskBorderGetBufferSize
FilterScharrVertMaskBorder
FilterSharpenBorderGetBufferSize
FilterSharpenBorder
FilterSobelGetBufferSize
FilterSobelInit
FilterSobel
FilterSobelHorizBorderGetBufferSize
FilterSobelHorizBorder
FilterSobelHorizSecondBorderGetBufferSize
FilterSobelHorizSecondBorder
FilterSobelVertBorderGetBufferSize
FilterSobelVertBorder
FilterSobelVertSecondBorderGetBufferSize
FilterSobelNegVertBorderGetBufferSize
FilterSobelNegVertBorder
FilterSobelVertSecondBorder
FilterSobelCrossGetBufferSize
FilterSobelCrossBorder
GenSobelKernel
Sum
Integral
SqrIntegral
TiltedIntegral
TiltedSqrIntegral
Mean
Mean_StdDev
RectStdDev
TiltedRectStdDev
HistogramGetBufferSize
HistogramGetLevels
HistogramInit, HistogramUniformInit
Histogram
CountInRange
BlockMinMax
Min
MinIndx
Max
MaxIndx
MinMax
MinMaxIndx
MaxEvery
MinEvery
FindPeaks3x3GetBufferSize
FindPeaks3x3
Image Moments
Image Norms
Image Quality Index
Image Proximity Measures
Using Intel® IPP Resize Functions with Prior Initialization
ResizeGetSize
ResizeGetBufferSize
ResizeGetBorderSize
ResizeGetSrcOffset
ResizeGetSrcRoi
ResizeSetMode
ResizeNearestInit
ResizeNearest
ResizeLinearInit
ResizeLinear
ResizeCubicInit
ResizeCubic
ResizeLanczosInit
ResizeLanczos
ResizeSuperShiftInit
ResizeSuperInit
ResizeSuper
ResizeAntialiasingLinearInit
ResizeAntialiasingCubicInit
ResizeAntialiasingLanczosInit
ResizeAntialiasing
ResizeFilterGetSize
ResizeFilterInit
ResizeFilter
ResizeYUV420GetSize
ResizeYUV420GetSrcRoi
ResizeYUV420LanczosInit
ResizeYUV420SuperInit
ResizeYUV420GetBorderSize
ResizeYUV420GetSrcOffset
ResizeYUV420GetBufferSize
ResizeYUV420Lanczos
ResizeYUV420Super
ResizeYUV422GetSize
ResizeYUV422GetBorderSize
ResizeYUV422GetSrcOffset
ResizeYUV422GetBufSize
ResizeYUV422GetSrcRoi
ResizeYUV422NearestInit
ResizeYUV422LinearInit
ResizeYUV422Nearest
ResizeYUV422Linear
Using Intel® IPP Warp Affine Functions with Prior Initialization
Edge Smoothing
GetAffineQuad
GetAffineBound
GetAffineSrcRoi
GetAffineTransform
GetRotateTransform
GetRotateShift
WarpAffineGetSize
WarpQuadGetSize
WarpGetBufferSize
WarpAffineNearestInit
WarpQuadNearestInit
WarpAffineNearest
WarpAffineLinearInit
WarpQuadLinearInit
WarpAffineLinear
WarpAffineCubicInit
WarpQuadCubicInit
WarpAffineCubic
GetPerspectiveQuad
GetPerspectiveBound
GetPerspectiveTransform
WarpGetRectInfinite
WarpPerspectiveGetSize
WarpPerspectiveNearestInit
WarpPerspectiveNearest
WarpPerspectiveLinearInit
WarpPerspectiveLinear
WarpPerspectiveCubicInit
WarpPerspectiveCubic
Visible to Intel only — GUID: GUID-75A6CFD1-FBEB-4E2D-8F9F-91796CAAC4DD
EncodeLZSSFlush
Encodes the last few bits in the bitstream and aligns the output data on the byte boundary.
Syntax
IppStatus ippsEncodeLZSSFlush_8u (Ipp8u** ppDst, int* pDstLen, IppLZSSState_8u* pLZSSState);
Include Files
ippdc.h
Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Parameters
ppDst |
Double pointer to the destination buffer. |
pDstLen |
Pointer to the length of destination buffer. |
pLZSSState |
Pointer to the LZSS encoder state structure. |
Description
This function encodes the last few bits (remainder) in the bitstream, writes them to ppDst, and aligns the output data on a byte boundary.
Return Values
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error if one of the pointers is NULL. |
ippStsSizeErr |
Indicates an error if pDstLen is less than or equal to 0. |
ippStsDstSizeLessExpected |
Indicates a warning that the size of the destination buffer is insufficient for completing the operation. |
Example
/*******************************************************************************
* Copyright 2015 Intel Corporation.
*
*
* This software and the related documents are Intel copyrighted materials, and your use of them is governed by
* the express license under which they were provided to you ('License'). Unless the License provides otherwise,
* you may not use, modify, copy, publish, distribute, disclose or transmit this software or the related
* documents without Intel's prior written permission.
* This software and the related documents are provided as is, with no express or implied warranties, other than
* those that are expressly stated in the License.
*******************************************************************************/
// The example below shows how to use the function ippsEncodeLZSS_8u and supporting functions:
// ippsLZSSGetSize_8u, ippsEncodeLZSSInit_8u
// ippsEncodeLZSS_8u
// ippsEncodeLZSSFlush_8u
#include <stdio.h>
#include "ipp.h"
#define INBLOCKSIZE 65536
#define OUTBLOCKSIZE 16384
/* Next two defines are created to simplify code reading and understanding */
#define EXIT_MAIN exitLine: /* Label for Exit */
#define check_sts(st) if((st) != ippStsNoErr) goto exitLine; /* Go to Exit if Intel(R) Integrated Primitives (Intel(R) IPP) function returned status different from ippStsNoErr */
/* Results of ippMalloc() are not validated because Intel(R) IPP functions perform bad arguments check and will return an appropriate status */
int main(void)
{
FILE *inFile = NULL, *outFile = NULL;
Ipp8u *pSrc = NULL, *pDst = NULL, *startpSrc = NULL, *startpDst = NULL;
int srcLen, dstLen = 0;
int commonDstLen = 0;
IppLZSSState_8u *pLZSSState = NULL;
int szState = 0;
IppStatus status = ippStsNoErr;
inFile = fopen("EncodeLZSSFlush.c", "rb");
if ( !inFile )
{
printf("\nCan't open input data file ""EncodeLZSSFlush.c"". program terminated.\n");
goto exitLine;
}
outFile = fopen("EncodeLZSSFlush.bin", "wb");
if ( !outFile ) {
printf("\nCan't open output data file ""EncodeLZSSFlush.bin"". program terminated.\n");
goto exitLine;
}
/*************************************************************/
/* Memory allocation for input data and output code buffers, */
/* and for the internal encoding state structure: */
/*************************************************************/
startpSrc = ippsMalloc_8u( (INBLOCKSIZE) * sizeof(char) );
startpDst = ippsMalloc_8u( (OUTBLOCKSIZE) * sizeof(char) );
check_sts( status = ippsLZSSGetSize_8u( &szState ) )
pLZSSState = (IppLZSSState_8u*)ippsMalloc_8u( szState );
check_sts( status = ippsEncodeLZSSInit_8u( pLZSSState ) )
/*************************************************************/
/* Initializing the arguments, reading srcLen bytes of */
/* input data from input data file to startpSrc: */
/*************************************************************/
commonDstLen = (OUTBLOCKSIZE);
pDst = startpDst;
dstLen = commonDstLen;
srcLen = fread( startpSrc, sizeof(Ipp8u), INBLOCKSIZE, inFile );
if (srcLen <= 0) {
printf("\nInput data file ""EncodeLZSSFlush.c"" is corrupted. program terminated.\n");
goto exitLine;
}
pSrc = startpSrc;
/**************************************************************/
/* The main loop. In every iteration program calls the */
/* ippsEncodeLZSS_8u. ippsEncodeLZSS_8u changes the values */
/* of pSrc, srcLen, pDst and dstLen. ippsEncodeLZSS_8u */
/* returns ippStsDstSizeLessExpected if there is no */
/* room in the destination buffer pDst to continue encoding. */
/* In this case dstLen == 0. Such case is handled by */
/* flushing the pDst to the output file. If ippsEncodeLZSS_8u */
/* returns ippStsNoErr, then the program flushes the current */
/* pDst of length of (commonDstLen - dstLen) bytes to */
/* the output file and reads next srcLen bytes of input data */
/* to startpSrc. */
/**************************************************************/
for( ; ; ) {
status = ippsEncodeLZSS_8u(&pSrc, &srcLen, &pDst, &dstLen, pLZSSState);
if( status == ippStsDstSizeLessExpected ) {
fwrite( startpDst, sizeof(Ipp8u), (commonDstLen - dstLen), outFile );
dstLen = commonDstLen;
pDst = startpDst;
} else if( status == ippStsNoErr ) {
fwrite( startpDst, sizeof(Ipp8u), (commonDstLen - dstLen), outFile );
pDst = startpDst;
dstLen = commonDstLen;
srcLen = fread( startpSrc, sizeof(Ipp8u), INBLOCKSIZE, inFile );
if( srcLen <= 0 )
break;
pSrc = startpSrc;
} else {
check_sts( status )
}
}
/**************************************************************/
/* The call of ippsEncodeLZSSFlush_8u flushes the last few */
/* bits of code to the destination buffer: */
/**************************************************************/
check_sts( ippsEncodeLZSSFlush_8u(&pDst, &dstLen, pLZSSState) )
fwrite( startpDst, sizeof(Ipp8u), (commonDstLen - dstLen), outFile );
printf( "\n EncodeLZSSFlush.c successfully encoded to EncodeLZSSFlush.bin \n");
EXIT_MAIN
ippsFree( pLZSSState );
ippsFree( startpSrc );
ippsFree( startpDst );
if ( inFile ) fclose( inFile );
if ( outFile ) fclose( outFile );
printf("Exit status %d (%s)\n", (int)status, ippGetStatusString(status));
return (int)status;
}
Parent topic: LZSS Compression Functions