Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Pixar Image Computer
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== PXR File Format == Pixar Image Computer use 'Pixar storage standard' PXR File format. PXR file have structure:<ref>Pixar Image Computer Users Manual v1.2 Dec 1986</ref> 1. Header (512 bytes) 2. Tile pointer table (8 × numberTiles bytes) 3. Picture data Origin of image is left top corner. All data in file use small endian byte order. === Header (512 bytes) === {| class="wikitable" |- ! Offset (hex) ! Length ! Field name ! Description |- | 0 (0x0000) | 4 bytes | file signature/magic number | {{tt|0x80 0xe8 0x00 0x00}} |- | 4 (0x0004) | 2 bytes | Version | File format version (only have version 0) |- | 6 (0x0006) | 246 bytes | Ascii description | String for file description |- | 252 (0x00fc) | 4 | Label Pointer | For continue label if need label longer than 246 bytes. Pointer address from start of file. |- | 256 (0x0100) | 160 bytes | colspan=2 | Unused |- | 416 (0x01a0) | 2 bytes | Picture height | Pixel height of whole picture |- | 418 (0x01a2) | 2 bytes | Picture width | Pixel width of full picture |- | 420 (0x01a4) | 2 bytes | Tile height | Pixel height of each tile (≤ full picture height) |- | 422 (0x01a6) | 2 bytes | Tile width | Pixel width of each tile (≤ full picture width) |- | 424 (0x01a8) | 2 bytes | Picture format | 4 bits for tell which channel is in file: <code>R</code> = bit 0, <code>G</code> = bit 1, <code>B</code> = bit 2, <code>A</code> = bit 3; 4 low bits in low byte. |- | 426 (0x01aa) | 2 bytes | Picture storage | Picture encoding and number bits. Have 4 values: <code>0</code> = 8 bit encoded, <code>1</code> = 12 bit encoded, <code>2</code> = 8 bit dumped, <code>3</code> = 12 bit dumped |- | 428 (0x01ac) | 2 bytes | Blocking factor | Optimum disk transfer chunk |- | 430 (0x01ae) | 2 bytes | Alpha mode | Have 2 value: <code>0</code> = matted-to-black (pre multiply); <code>1</code> = unassociated |- | 432 (0x01b0) | 2 bytes | x offset | x offset for picture |- | 434 (0x01b2) | 2 bytes | y offset | y offset for picture |- | 436 (0x01b4) | 76 bytes | colspan=2 |Unused |} === Tile pointer table (8 × numberTiles bytes) === The tile pointer table starts at byte 512 from the start of the file and has 1+ tile pointers. {| class="wikitable" |- ! 512 (0x200) | Tile pointer 1 ! Address of tile 0 (4 bytes) ! Length of tile 0 data (4 bytes) |- ! 520 (0x208) | Tile pointer 2 ! Address of tile 1 (4 bytes) ! Length of tile 1 data (4 bytes) |- ! ... ! ... ! ... ! ... |} To calculate the number of tiles for x direction: 1 + (pictureWidth − 1)/tileWidth and y direction: 1 + (pictureHeight − 1)/tileHeight Tile order is sweep from left to right, from top to bottom; first tile 0 is at left top of picture and last tile (totalNumberTiles − 1) is at right bottom of image. === Dumped & Encoded Pixel Data === Picture storage (at 2 bytes at byte 426 from start of file) can have values: 1. 0 - 8 bit channels encoded 2. 1 - 12 bit channels encoded 3. 2 - 8 bit channels dumped 4. 3 - 12 bit channels dumped Dumped tiles store pixel data direct with order RGBA (4 channels), RGB (3 channels), or R (1 channel, grey image) for whole tile and no have extra byte or mark show end of scan line. Encoded tiles use packets for store image data. Each packet have 2 byte header and encoded pixel data after. Two byte header have flag and count for packet, flag is 4 low bits of byte 2, count is top 4 bits of byte 2 (top bits) combine with 8 bits of byte 1 (low bits) create 12 bit count. Flag have values: {| class="wikitable" |- ! Flag ! Count ! RGBA ! RGB ! R ! comment |- ! 0 ! no use ! ! ! ! end of disk block |- ! 1 ! use ! RGBA RGBA ... ! RGB RGB ... ! R ... ! full channel dump |- ! 2 ! use ! λRGBA λRGBA ... ! λRGB λRGB ... ! λR λR ... ! full channel run |- ! 3 ! use ! A RGB RGB ... ! no use ! no use ! partial channel dump |- ! 4 ! use ! A λRGB λRGB ... ! no use ! no use ! partial channel run |} For flag value 1 and 3, count is ''p'' - 1 number of pixels dumped in packet. For flag value 2 and 4, count is ''n'' - 1 number of run lengths in packet, λ is 1 byte (8 bits) store ''p'' - 1 number times repeat same pixel. Flag value 3 and 4 only use one A value for that packet and store only RGBA (4 channels) data. One packet never store pixel data from different scan lines but each scan line can use different/any flag. === Pixar 12 bit pixel format === Pixar Image Computer and PXR use special 12 bit fix point format have range [-1.5; 2.5), with 10 bits of precision (the documentation describes the range as [-0.5; 1.5) plus an "overflow bit").<ref>[http://www.bitsavers.org/pdf/pixar/Pixar_Image_Computer_Users_Manual_v1.2_Dec1986.pdf]</ref> {| class="wikitable" ! Bits !! Value !! Overflow |- |1010 0000 0000||−1.5||Y |- |1100 0000 0000||−1.0||Y |- |1110 0000 0000||−0.5|| |- |0000 0000 0000||0|| |- |0010 0000 0000||0.5|| |- |0100 0000 0000||1.0|| |- |0110 0000 0000||1.5||Y |- |1000 0000 0000||2.0||Y |- |1001 1111 1111||2.4995...||Y |} === 16 bit coefficient values === Pixar Image Computer also have special 16 bit fixed point data type (for mảtix value, etc.) have name 'coefficient'. It have range [-2.0; 2.0) and use first 14 bits for fraction. For value ≥ 0, last 2 bit for whole number. For value < 0, last 2 bit for sign and whole number (use 2 complement). {| class="wikitable" |- ! decimal | hex ! binary ! value |- ! 32 768 | 0x8000 ! 1000 0000 0000 0000 ! -2.0 |- ! 40 960 | 0xa000 ! 1010 0000 0000 0000 ! -1.5 |- ! 49 152 | 0xc000 ! 1100 0000 0000 0000 ! -1.0 |- ! 57 344 | 0xe000 ! 1110 0000 0000 0000 ! -0.5 |- ! 65 536 | 0xfffff ! 1111 1111 1111 1111 ! -0.00006103515625 |- ! 0 | 0x0000 ! 0000 0000 0000 0000 ! 0.0 |- ! 8192 | 0x2000 ! 0010 0000 0000 0000 ! 0.5 |- ! 16384 | 0x4000 ! 0100 0000 0000 0000 ! 1.0 |- ! 24 576 | 0x6000 ! 0110 0000 0000 0000 ! 1.5 |- ! 32767 | 0x7fff ! 0111 1111 1111 1111 ! 1.99993896484375 |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)