Difference between revisions of "MPO"

From 3dbrew
Jump to navigation Jump to search
(Added..)
 
(Added information on Nintendo's MakerNote (please help))
Line 135: Line 135:
 
|[DATA - 128 bytes]
 
|[DATA - 128 bytes]
 
|}
 
|}
 +
 +
==== Nintendo's EXIF MakerNote Tag ====
 +
'''This still need to be figured out:'''
 +
We will address the MakerNote byte array as 'mnote' (i.e. mnote[0] is the first byte)
 +
 +
There is a dynamic byte array at first which its size is at mnote[9].
 +
After the dynamic array starting at mnote[6 + mnote[9]] an 88 bytes array starts.
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Offset from 6+mnote[9]
 +
!  Description
 +
!  Type
 +
!  Default Value
 +
|-
 +
|0
 +
|Comment
 +
|String[24] null terminated
 +
|0 for a 3D picture / <some_text> if taken from AR game
 +
|-
 +
|24
 +
|Magic
 +
|Byte[4]
 +
|{'3','D','S','1'}
 +
|-
 +
|28
 +
|Tags
 +
|Unknown
 +
|Unknown
 +
|}
 +
 +
What is known that on mnote[mnote[9]+72] & mnote[mnote[9]+73] lays the parallax value.
 +
The parallax value is the distance that the right image needed to move in order to get focus.
 +
 +
My formula to get that value isn't so good but here it is:
 +
b0 = mnote[mnote[9]+72]
 +
b1 = mnote[mnote[9]+73]
 +
 +
x = (b1 - 0xC0) << 8 + b0;
 +
 +
Parallax =  - round( 2 ^ (x/128 + 2) )
 +
 +
If someone makes sense of this, please explain or maybe correct..

Revision as of 18:16, 28 August 2011

Overview

MPO = Multi-Picture Object

Nintendo uses a common format for its 3D pictures. MPO is basically two JPG files concatenated in one file. The two JPG files has an EXIF data structure in their headers (This was developed by CIPA).

EXIF is a standard that specifies the formats for images, sound, and ancillary tags used by digital cameras (including smartphones), scanners and other systems handling image and sound files recorded by digital cameras.[1]


Nintendo's EXIF Data Structure

ID DESCRIPTION VALUE
0x010F Manufacturer Nintendo
0x0110 Camera Nintendo 3DS
0x011A XResolution 72:1
0x011B YResolution 72:1
0x0128 ResolutionUnit 2
0x0131 Software 00204
0x0132 DateTime YYYY:MM:DD HH:mm:SS
0x0213 YCbCrPositioning 2
0x9000 ExifVersion 0220
0x9003 DateTimeOriginal YYYY:MM:DD HH:mm:SS
0x9004 DateTimeDigitized YYYY:MM:DD HH:mm:SS
0x9101 ComponentsConfiguration [0x01,0x02,0x03,0x00]
0x927C MakerNote [DATA - 174 bytes] (yet to be understood)
0xA000 FlashPixVersion 0100
0xA001 ColorSpace 1
0xA002 PixelXDimension 640
0xA003 PixelYDimension 480
0x5041 InteroperabilityIndex R98
0x5042 ExifInteroperabilityVersion 0100
0x1000 InteroperabilityVersion JPEG Exif Ver 2.2
0x501B ThumbnailData [DATA - 3000+ bytes]
0x5023 ThumbnailCompression 6
0x502D ThumbnailXResolution 72:1
0x502E ThumbnailYResolution 72:1
0x5030 ThumbnailTransferFunction 2
0x0201 JPEGInterchangeFormat 682
0x0202 JPEGInterchangeFormatLength 3000+
0x5091 ChrominanceTable [DATA - 128 bytes]
0x5090 LuminanceTable [DATA - 128 bytes]

Nintendo's EXIF MakerNote Tag

This still need to be figured out: We will address the MakerNote byte array as 'mnote' (i.e. mnote[0] is the first byte)

There is a dynamic byte array at first which its size is at mnote[9]. After the dynamic array starting at mnote[6 + mnote[9]] an 88 bytes array starts.

Offset from 6+mnote[9] Description Type Default Value
0 Comment String[24] null terminated 0 for a 3D picture / <some_text> if taken from AR game
24 Magic Byte[4] {'3','D','S','1'}
28 Tags Unknown Unknown

What is known that on mnote[mnote[9]+72] & mnote[mnote[9]+73] lays the parallax value. The parallax value is the distance that the right image needed to move in order to get focus.

My formula to get that value isn't so good but here it is: b0 = mnote[mnote[9]+72] b1 = mnote[mnote[9]+73]

x = (b1 - 0xC0) << 8 + b0;

Parallax = - round( 2 ^ (x/128 + 2) )

If someone makes sense of this, please explain or maybe correct..