StartMpEncoderLR

nn::jpeg::CTR::JpegMpEncoder::StartMpEncoderLR Member Function

Syntax

#include <nn/jpeg.h>

size_t StartMpEncoderLR(
     u8 * dst,
     size_t limit,
     const void * srcL,
     const void * srcR,
     u32 width,
     u32 height,
     u32 quality,
     PixelSampling dstPixelSampling,
     PixelFormat srcPixelFormat,
     bool addThumbnailL,
     bool addThumbnailR
);

Parameters

Name Description
out dst Specifies the buffer that stores the encoded result.
in limit Specifies the size of dst in bytes. Encoding fails if this size is exceeded.
in srcL Specifies the image data buffer to encode for the left eye. Must be 4-byte aligned.
in srcR Specifies the image data buffer to encode for the right eye. Must be 4-byte aligned.
in width Specifies the image width in pixels (equal to or less than 65536). Shared between the left and right images, except for thumbnails.
in height Specifies the image height in pixels (equal to or less than 65536). Shared between the left and right images, except for thumbnails.
in quality Specifies the encoding quality.
Values can be set from 1 to 100, with 100 being the highest quality and the largest size.
Shared between the left and right images, except for thumbnails.
in dstPixelSampling Specifies the image's output format (its pixel sampling). Shared between the left and right images, except for thumbnails.
in srcPixelFormat Specifies the input pixel format of the image to encode. This value applies to all images.
in addThumbnailL Specifies whether to add a thumbnail to the image for the left eye.
in addThumbnailR Specifies whether to add a thumbnail to the image for the right eye.

Return Values

If successful, returns the number of bytes of MP-format data that were generated. Returns 0 on failure.
Use the GetLastError function to get the reason for failure.

Description

Runs the JPEG encoder on two images and stores the results in Extended MP format (for stereoscopic display).

First, the encoder is run on the image for the left eye, and the result is stored in the MP format as the first (and representative) image. If this is successful, the image for the right eye is then encoded and stored. With this function, the viewpoint number of the left-eye image is considered to be 1, which is also the base viewpoint number. Images for the right eye have viewpoint number 2.

The widths and heights of images that this function can encode depend on the output format of the image (in other words, the dstPixelSampling argument). The same is true of the StartJpegEncoder function.

The convergence angle and baseline length take the default values {0xFFFFFFFF, 0xFFFFFFFF}.

Calling the following functions to register data has no effect.

Any values specified in calls to the following functions are valid for both images, with the same value registered.

(*) When SetDateTime has not been called, the function gets the current date and time when encoding the first image, and uses that for both images.

Revision History

2010/10/22
Made revisions to make descriptions easier to understand.
2010/04/14
Initial version.

CONFIDENTIAL