nn::jpeg::CTR::JpegMpDecoder::StartMpDecoderLR Member Function

Syntax

#include <nn/jpeg.h>

size_t StartMpDecoderLR(
     void * dstL,
     void * dstR,
     size_t dstSize,
     const u8 * src,
     size_t srcSize,
     u32 maxWidth,
     u32 maxHeight,
     PixelFormat dstPixelFormat
);

Arguments

Name Description
out dstL Specifies the buffer for storing the decoded result of the starting image.
The alignment of this buffer must match the output pixel format (in other words, the dstPixelFormat argument).
out dstR Specifies the buffer for storing the decoded result of the next individual image.
The alignment of this buffer must match the output pixel format (in other words, the dstPixelFormat argument).
in dstSize Specifies the size of dstL and dstR in bytes.
This is the size of a single image, not the sum of two images.
Specify the return value of GetDstBufferSize.
in src Specifies the MP-format data to decode.
in srcSize Specifies the size of src in bytes.
in maxWidth Specifies the maximum width (in pixels) of an image that can be decoded. (Up to 65536)
After decoding successfully completes, you can use the GetLastWidth function to get the wifth of the actual image and the GetLastOutputBufferWidth function to get the width in the buffer (for one image).
in maxHeight Specifies the maximum height (in pixels) of an image that can be decoded. (Up to 65536)
After decoding successfully completes, you can use the GetLastHeight function to get the height of the actual image and the GetLastOutputBufferHeight function to get the height in the buffer (for one image).
in dstPixelFormat Specifies the output pixel format.

Return Values

When the function succeeds, the resulting buffer size (in bytes) is returned.
This is the size of a single image, not the sum of two images.
If the function fails it returns 0.
Use the GetLastError function to get the reason for failure.

Description

Runs the JPEG decoder on a pair of images stored in the MP Format.

Much as for the StartJpegDecoder function, processing takes longer if the image size is not a multiple of 8 or 16 pixels. The same is true of the alignment of the dst argument.

The MP type of the image data stored in MP format is looked up in MP entry storage order, and only two stereoscopic images are decoded. The lookup does not check if the first stereoscopic image found is for the left eye, however, nor if the next image is for the right eye.

This function requires that both primary images are the same size. After this function completes successfully, call the GetLastWidth and GetLastHeight functions to get the original image's dimensions. If the sizes do not match, decoding fails. The function also fails if fewer than 2 original images could be decoded. Thumbnails are not decoded.

After successful decoding, this function decodes the Exif information for two stereoscopic images in the order that the MP entries are stored.
When the following functions are used to obtain Exif information, what they obtain is the Exif information for the last image decoded (stored as the second MP entry).
GetLastDateTime
GetLastSoftwarePointer
GetLastSoftwareLength
GetLastUserMakerNotePointer
GetLastUserMakerNoteSize
GetLastImageUid
GetLastOrientation
・GetLastGpsData

The following functions also work, but we do not recommend using them.
GetLastTwlPhotoMakerNote
GetLastTwlUserMakerNotePointer
GetLastTwlUserMakerNoteSize

To get the Exif information for each image, decode each individually without using this function, or use the ExtractExif function.

Revision History

2010/04/14
Initial version.

CONFIDENTIAL