MPO: Difference between revisions

Elisherer (talk | contribs)
Added information on Nintendo's MakerNote (please help)
m fixed broken link
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:File formats]]
=== Overview ===
=== Overview ===


MPO = Multi-Picture Object
MPO = Multi-Picture Object
Document describing the file format used in mpo files:
http://www.cipa.jp/std/documents/e/DC-007_E.pdf


Nintendo uses a common format for its 3D pictures.
Nintendo uses a common format for its 3D pictures.
Line 8: Line 12:


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.[http://en.wikipedia.org/wiki/Exchangeable_image_file_format]
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.[http://en.wikipedia.org/wiki/Exchangeable_image_file_format]


=== Nintendo's EXIF Data Structure ===
=== Nintendo's EXIF Data Structure ===
Line 41: Line 44:
|0x0131
|0x0131
|Software
|Software
|00204  
|Depends on the software: 00204 for the Camera (EU), 00227 for the Mii Editor (EU), 00955 for KH3D (EU)
|-
|-
|0x0132
|0x0132
Line 138: Line 141:
==== Nintendo's EXIF MakerNote Tag ====
==== Nintendo's EXIF MakerNote Tag ====
'''This still need to be figured out:'''
'''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].
The MakerNote is made with Tiff Exif information (Big Endian)
After the dynamic array starting at mnote[6 + mnote[9]] an 88 bytes array starts.


first 2 bytes are the IFD Count (IFD is a 12 byte tag), Regulary there are 2 IFDs.
'''IFD structure'''
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Offset from 6+mnote[9]
Tag
!  Description
!  Type
!  Type
Default Value
Count/Value
!  Value/Offset
|-
|2 bytes
|2 bytes
|4 bytes
|4 bytes
|}
 
'''Nintendo's IFDs'''
 
{| class="wikitable" border="1"
|-
|-
|0
!  Tag
|Comment
!  Desc
|String[24] null terminated
!  Type
|0 for a 3D picture / <some_text> if taken from AR game
!  Count/Value
!  Value/Offset
|-
|-
|24
|0x1100
|Magic
|Software-specific data
|Byte[4]
|7-Undefined
|{'3','D','S','1'}
|Count
|Count=1 ? Value : Offset
|-
|-
|28
|0x1101
|Tags
|Nintendo 64byte Note
|Unknown
|7-Undefined
|Unknown
|Count
|Offset
|}
|}


What is known that on mnote[mnote[9]+72] & mnote[mnote[9]+73] lays the parallax value.
After the IFDs comes a 4 byte Zero ( {0,0,0,0} ).
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:
And then the Data the IFDs point at (if at all)
b0 = mnote[mnote[9]+72]
b1 = mnote[mnote[9]+73]


x = (b1 - 0xC0) << 8 + b0;
'''Nintendo's 64Byte Note'''


Parallax =  - round( 2 ^ (x/128 + 2) )
Different from the wrapping structure this structure is Little-Endian.


If someone makes sense of this, please explain or maybe correct..
{| class="wikitable" border="1"
|-
!  Offset
!  Description
!  Type
!  Default Value
|-
|0x00
|Magic
|char[4]
|{'3','D','S','1'}
|-
|0x04
|?
|uint32
|1 / 2 / 4 / 5
|-
|0x08
|Timestamp
|uint32
|Number of seconds since 1/1/2000 00:00:00
|-
|0x0C
|Padding
|uint32
|0
|-
|0x10
|Title ID Low
|uint32
|like the title id low but without the last two letters
|-
|0x14
|Flags
|uint32
|
|-
|0x18
|Console ID
|byte[4]
|unique identifier
|-
|0x1C
|Padding
|byte[12]
|0
|-
|0x28
|3D Parallax
|float
|[-52,54]
|-
|0x2C
|Padding
|uint32
|0
|-
|0x30
|Category
|uint16
|0x2000 for a man, 0x4000 a woman, 0x1000 a mii...
|-
|0x32
|Filter
|uint16
|
|-
|0x34
|Padding
|byte[12]
|0
|}