Skip to content

Commit

Permalink
add DPX specification file
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Noel committed Dec 12, 2013
1 parent e0262e2 commit fde8994
Showing 1 changed file with 215 additions and 0 deletions.
215 changes: 215 additions & 0 deletions fileSpecification/dpx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
{
"description": {
"label": "Digital Picture Exchange",
"id": "dpx",
"type": "image",
"extension": [
".dpx"
]
},

"content": [
{ "id": "file_information", "label": "Generic Image Data", "group": [
{ "type": "ascii", "id": "magic_num", "label": "Magick number", "values": ["SDPX", "XPDS" ] },
{ "type": "uint32", "id": "image_offset", "label": "Offset to image data in bytes" },
{ "type": "raw", "id": "version", "label": "Version", "size": "8", "display": "ascii" },
{ "type": "uint32", "id": "file_size", "label": "File size in bytes" },
{ "type": "uint32", "id": "ditto_key", "label": "Read-time shortcut only", "map": [
{ "0": "Same as previous frame" },
{ "1": "New" } ] },
{ "type": "uint32", "id": "gen_hdr_size", "label": "Generic header length in bytes" },
{ "type": "uint32", "id": "ind_hdr_size", "label": "Industry header length in bytes" },
{ "type": "uint32", "id": "user_data_size", "label": "User-defined data length in bytes" },
{ "type": "raw", "id": "file_name", "label": "File name", "size": "100", "display": "ascii" },
{ "type": "raw", "id": "create_time", "label": "File creation date", "size": "24", "display": "ascii" },
{ "type": "raw", "id": "creator", "label": "File creator's name", "size": "100", "display": "ascii" },
{ "type": "raw", "id": "project", "label": "Project name", "size": "200", "display": "ascii" },
{ "type": "raw", "id": "copyright", "label": "Right to use or copyright info", "size": "200", "display": "ascii" },
{ "type": "uint32", "id": "key", "label": "Encryption Key", "map": [ { "4294967295" : "Not crypted" } ] },
{ "type": "raw", "id": "Reserved", "label": "Reserved field TBD (need to pad)", "size": "104", "display": "ascii" }
] },
{ "id": "image_information", "label" : "Image Information Header", "group": [
{ "type": "uint16", "id": "orientation", "label": "Image orientation", "map": [
{ "0" : "Line direction: left to right & Frame direction: top to bottom" },
{ "1" : "Line direction: right to left & Frame direction: top to bottom" },
{ "2" : "Line direction: left to right & Frame direction: bottom to top" },
{ "3" : "Line direction: right to left & Frame direction: bottom to top" },
{ "4" : "Line direction: top to bottom & Frame direction: left to right" },
{ "5" : "Line direction: top to bottom & Frame direction: right to left" },
{ "6" : "Line direction: bottom to top & Frame direction: left to right" },
{ "7" : "Line direction: bottom to top & Frame direction: right to left" } ] },
{ "type": "uint16", "id": "element_number", "label": "Number of image elements" },
{ "type": "uint32", "id": "pixels_per_line", "label": "Pixels per line" },
{ "type": "uint32", "id": "lines_per_image_element", "label": "Lines per Image element" },

{ "id": "image_element", "label": "Image Element", "repetition" : "8", "group" : [
{ "type": "uint32", "id": "data_sign", "label": "Data sign", "map": [
{ "0" : "Unsigned" },
{ "1" : "Signed" },
{ "4294967295" : "Undefined" } ] },
{ "type": "uint32", "id": "ref_low_data", "label": "Reference low data code value", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "float", "id": "ref_low_quantity", "label": "Reference low quantity represented", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "uint32", "id": "ref_high_data", "label": "Reference high data code value", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "float", "id": "ref_high_quantity", "label": "Reference high quantity represented", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "uint8", "id": "descriptor", "label": "Descriptor for image element", "map" : [
{ "0" : "User defined (or unspecified single component)" },
{ "1" : "Red (R)" },
{ "2" : "Green (G)" },
{ "3" : "Blue (B)" },
{ "4" : "Alpha (matte)" },
{ "6" : "Luma (Y)" },
{ "7" : "Color difference (Cb, Cr, subsampled by two)" },
{ "8" : "Depth (Z)" },
{ "9" : "Composite video" },
{ "50" : "R,G,B" },
{ "51" : "R,G,B,alpha" },
{ "52" : "A, B, G, R" },
{ "100" : "CB, Y, CR, Y (4:2:2) -- based on SMPTE 125M" },
{ "101" : "CB, Y, a, CR, Y, a (4:2:2:4)" },
{ "102" : "CB, Y, CR (4:4:4)" },
{ "103" : "CB, Y, CR, a (4:4:4:4)" },
{ "150" : "User-defined 2-component element" },
{ "151" : "User-defined 3-component element" },
{ "152" : "User-defined 4-component element" },
{ "153" : "User-defined 5-component element" },
{ "154" : "User-defined 6-component element" },
{ "155" : "User-defined 7-component element" },
{ "156" : "User-defined 8-component element" },
{ "255" : "Undefined" } ] },
{ "type": "uint8", "id": "transfer", "label": "Transfer characteristics for element", "map" : [
{ "0" : "User-defined" },
{ "1" : "Printing density" },
{ "2" : "Linear" },
{ "3" : "Logarithmic" },
{ "4" : "Unspecified video" },
{ "5" : "SMPTE 274M" },
{ "6" : "CCIR 709-4" },
{ "7" : "CCIR 601-5 system B or G" },
{ "8" : "CCIR 601-5 system M" },
{ "9" : "NTSC composite video" },
{ "10" : "PAL composite video" },
{ "11" : "Z linear" },
{ "12" : "Z homogeneous" },
{ "255" : "Undefined" } ] },
{ "type": "uint8", "id": "colorimetric", "label": "Colormetric specification for element", "map" : [
{ "0" : "User-defined" },
{ "1" : "Printing density" },
{ "2" : "Linear" },
{ "4" : "Unspecified video" },
{ "5" : "SMPTE 240M" },
{ "6" : "CCIR 709-1" },
{ "7" : "CCIR 601-2 system B or G" },
{ "8" : "CCIR 601-2 system M" },
{ "9" : "NTSC composite video" },
{ "10" : "PAL composite video" },
{ "255" : "Undefined" } ] },
{ "type": "uint8", "id": "bit_size", "label": "Bit size for element", "map":[
{ "1" : "1 bit per component (integer)" },
{ "8" : "8 bits per component (integer)" },
{ "10" : "10 bits per component (integer)" },
{ "12" : "12 bits per component (integer)" },
{ "16" : "16 bits per component (integer)" },
{ "32" : "32 bits per component (IEEE floating point - R32)" },
{ "64" : "64 bits per component (IEEE floating point - R64)" },
{ "255" : "Undefined" } ] },
{ "type": "uint16", "id": "packing", "label": "Packing for element", "map" : [
{ "0" : "Packed into 32-bit words" },
{ "1" : "Filled to 32-bit words, Method A (padding bits precede data)" },
{ "2" : "Filled to 32-bit words, Method B (padding bits follow data)" },
{ "65535" : "Undefined" } ] },
{ "type": "uint16", "id": "encoding", "label": "Encoding for element", "map" : [
{ "0" : "No encoding applied" },
{ "1" : "Run-length encoded" },
{ "65535" : "Undefined" } ] },
{ "type": "uint32", "id": "data_offset", "label": "Offset to data of element", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "uint32", "id": "eol_padding", "label": "End of line padding used in element", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "uint32", "id": "eo_image_padding", "label": "End of image padding used in element", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "raw", "id": "description", "label": "Description of element", "size" : "32", "display" : "ascii" }
] },

{ "type": "raw", "id": "Reserved", "label": "Reserved field TBD (need to pad)", "size": "52", "display": "ascii" }
] },

{ "id": "image_orientation", "label" : "Image Orientation Information", "group": [
{ "type": "uint32", "id": "x_offset", "label": "X offset", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "uint32", "id": "y_offset", "label": "Y offset", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "float", "id": "x_center", "label": "X center", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "float", "id": "y_center", "label": "Y center", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "uint32", "id": "x_orig_size", "label": "X original size", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "uint32", "id": "y_orig_size", "label": "Y original size", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "raw", "id": "file_name", "label": "Source image file name", "size": "100", "display": "ascii" },
{ "type": "raw", "id": "creation_time", "label": "Source image creation date and time", "size": "24", "display": "ascii" },
{ "type": "raw", "id": "input_dev", "label": "Input device name", "size": "32", "display": "ascii" },
{ "type": "raw", "id": "input_serial", "label": "Input device serial number", "size": "32", "display": "ascii" },
{ "type": "uint16", "id": "borderxl", "label": "X-Left border validity", "map": [ { "65535" : "Undefined" } ] },
{ "type": "uint16", "id": "borderxr", "label": "X-Right border validity", "map": [ { "65535" : "Undefined" } ] },
{ "type": "uint16", "id": "borderyt", "label": "Y-Top border validity", "map": [ { "65535" : "Undefined" } ] },
{ "type": "uint16", "id": "borderyb", "label": "Y-Bottom border validity", "map": [ { "65535" : "Undefined" } ] },
{ "type": "uint32", "id": "pixel_aspect_h", "label": "Pixel aspect ratio: Horizontal", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "uint32", "id": "pixel_aspect_v", "label": "Pixel aspect ratio: Vertical", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "float", "id": "x_scanned_size", "label": "X Scanned Size", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "float", "id": "y_scanned_size", "label": "Y Scanned Size", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "raw", "id": "reserved", "label": "Reserved", "size": "20" }
] },
{ "id": "motion_picture_film_header", "label" : "Film/Motion Picture", "group": [
{ "type": "raw", "id": "film_mfg_id", "label": "Film manufacturer ID code (2 digits from film edge code)", "size": "2", "display":"ascii" },
{ "type": "raw", "id": "film_type", "label": "File type (2 digits from film edge code)", "size": "2", "display":"ascii" },
{ "type": "raw", "id": "offset", "label": "Offset in perfs (2 digits from film edge code)", "size": "2", "display":"ascii" },
{ "type": "raw", "id": "prefix", "label": "Prefix (6 digits from film edge code)", "size": "6", "display":"ascii" },
{ "type": "raw", "id": "size", "label": "Count (4 digits from film edge code)", "size": "4", "display":"ascii" },
{ "type": "raw", "id": "format", "label": "Format (i.e. academy)", "size":"32", "display":"ascii" },
{ "type": "uint32", "id": "frame_position", "label": "Frame position in sequence", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "uint32", "id": "sequence_len", "label": "Sequence length in frames", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "uint32", "id": "held_count", "label": "Held count (1 = default)", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "float", "id": "frame_rate", "label": "Frame rate of original in frames/sec", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "float", "id": "shutter_angle", "label": "Shutter angle of camera in degrees", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "raw", "id": "frame_id", "label": "Frame identification (i.e. keyframe)", "size": "32", "display":"ascii" },
{ "type": "raw", "id": "slate_info", "label": "Slate information", "size":"100", "display":"ascii" },
{ "type": "raw", "id": "reserved", "label": "Reserved for future use (padding)", "size": "56", "display":"ascii" }
] },
{ "id": "television_header", "label" : "Television", "group": [
{ "type": "uint32", "id": "time_code", "label": "SMPTE time code", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "uint32", "id": "userBits", "label": "SMPTE user bits", "map": [ { "4294967295" : "Undefined" } ] },
{ "type": "uint8", "id": "interlace", "label": "Interlace", "map": [
{ "0" : "non interlaced" },
{ "1" : "2:1 interlace" },
{ "255" : "Undefined" } ] },
{ "type": "uint8", "id": "field_number", "label": "Field number", "map": [ { "255" : "Undefined" } ] },
{ "type": "uint8", "id": "video_signal", "label": "Video signal standard (table 4)", "map": [
{ "0": "Undefined" },
{ "1": "NTSC" },
{ "2": "PAL" },
{ "3": "PAL-M" },
{ "4": "SECAM" },
{ "50": "YCBCR ITU-R 601-5 525-line, 2:1 interlace, 4:3 aspect ratio" },
{ "51": "YCBCR ITU-R 601-5 625-line, 2:1 interlace, 4:3 aspect ratio" },
{ "100": "YCBCR ITU-R 601-5 525-line, 2:1 interlace, 16:9 aspect ratio" },
{ "101": "YCBCR ITU-R 601-5 625-line, 2:1 interlace, 16:9 aspect ratio" },
{ "150": "YCBCR 1050-line, 2:1 interlace, 16:9 aspect ratio" },
{ "151": "YCBCR 1125-line, 2:1 interlace, 16:9 aspect ratio (SMPTE 274M)" },
{ "152": "YCBCR 1250-line, 2:1 interlace, 16:9 aspect ratio" },
{ "153": "YCBCR 1125-line, 2:1 interlace, 16:9 aspect ratio (SMPTE 240M)" },
{ "200": "YCBCR 525-line, 1:1 progressive, 16:9 aspect ratio" },
{ "201": "YCBCR 625-line, 1:1 progressive, 16:9 aspect ratio" },
{ "202": "YCBCR 750-line, 1:1 progressive, 16:9 aspect ratio (SMPTE 296M)" },
{ "203": "YCBCR 1125-line, 1:1 progressive, 16:9 aspect ratio (SMPTE 274M)" },
{ "255" : "Undefined" } ] },
{ "type": "uint8", "id": "unused", "label": "Used for byte alignment only", "map": [ { "255": "Undefined" } ] },
{ "type": "float", "id": "hor_sample_rate", "label": "Horizontal sampling rate in Hz", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "float", "id": "ver_sample_rate", "label": "Vertical sampling rate in Hz", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "float", "id": "frame_rate", "label": "Temporal sampling rate or frame rate in Hz", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "float", "id": "time_offset", "label": "Time offset from sync to first pixel", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "float", "id": "gamma", "label": "Gamma value", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "float", "id": "black_level", "label": "Black level code value", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "float", "id": "black_gain", "label": "Black gain", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "float", "id": "break_point", "label": "Breakpoint", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "float", "id": "white_level", "label": "Reference white level code value", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "float", "id": "integration_times", "label": "Integration time(s)", "map": [ { "4294967295" : "Undefined" }, { "nan" : "Undefined" } ] },
{ "type": "raw", "id": "reserved", "label": "Reserved for future use (padding)", "size":"76", "display":"ascii" }
] },

{ "type": "raw", "id": "user_id", "label": "User Identification", "size": "32", "display":"ascii" },
{ "type": "raw", "id": "user_content", "label": "User-defined content", "size": "image_offset - 2080", "display":"ascii" },
{ "type": "raw", "id": "image_data_element", "label": "Image Data Element", "size": "file_size - image_offset" }
]
}

1 comment on commit fde8994

@valnoel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue #14

Please sign in to comment.