Initialize

nn::jpeg::CTR::JpegMpEncoder::Initialize Member Function

Syntax

#include <nn/jpeg.h>

bool Initialize(
     void * workBuffer,
     size_t workBufferSize,
     u32 numImages = 0
);

Parameters

Name Description
out workBuffer Specifies the work buffer for the encoder object. Must be 4-byte aligned.
The buffer size is calculated by GetWorkBufferSize. Each encoder object requires its own work buffer.
in workBufferSize Specifies the size of the buffer in bytes. Specify the return value of GetWorkBufferSize.
in numImages Specifies the number of images to store in MP format.
Specify a value either equal to or less than the value that was specified when GetWorkBufferSize was called.
The default value is 0.

Return Values

Returns true on success. Returns false on failure. Check the alignment of workBuffer and the other arguments.

Description

Initializes the encoder object.

It also initializes the work buffer for the encoder object.

After initializing once there is no need to initialize again until after finalization, so long as the number of images stored in MP format does not change. As long as the StartMpEncoderNext function has been called, initializing again causes no problems.

Revision History

2010/04/14
Initial version.

CONFIDENTIAL