EncodeStoreBits_JPEG2K

Produces output codestream.

Syntax

IppStatus ippiEncodeStoreBits_JPEG2K_1u(Ipp8u* pDst, int* pDstLen, IppiEncodeState_JPEG2K* pState, int* pIsNotFinish);

Parameters

pDst

Pointer to the destination data buffer.

pDstLen

Pointer to the destination buffer length.

pState

Pointer to the allocated and initialized encoder state structure.

pIsNotFinish

Pointer to the variable indicating that the encoding is completed.

Description

The function ippiEncodeStoreBits_JPEG2K is declared in the ippj.h file. This function performs the second encoding procedure and produces the output codestream.

Example “Using the ippiEncodeStoreBits_JPEG2K Function” shows how this function may be used.

Application Notes

The parameter dstLen is used both for reading and writing. It should be passed to the function with a valid buffer length, and then it will return the length of used (filled) buffer.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if the width or height of the destination buffer has zero or negative value.

ippStsContextMatchErr

Indicates an error condition if a pointer to an invalid state structure is passed.

Using the ippiEncodeStoreBits_JPEG2K Function

  int isNotFinish = 1;
  while(isNotFinish)
  {
      int len = BUFFER_LEN;
      ippiEncodeStoreBits_JPEG2K_1u(buffer, &len, state, &isNotFinish);
      // You can write compressed data to the output stream, for example:
      // fwrite(buffer, sizeof(Ipp8u), len, file);
  }

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.