Disclaimer:
This site is not affiliated with the Eastman Kodak Company.
This page is not endorsed by the Eastman Kodak Company

Cineon Image File Format Draft

The Cineon image file format is similar to the ANSI/SMPTE DPX file format. Both have variable header lengths and the same format for the image data. However, the format of the headers is different. The DPX file headers are flexible, allowing variable image headers to accomodate the needs of different industries. The Cineon file format is more directed to digital film. The SMPTE specification is recommended to all developers.

To obtain the SMPTE specification, contact SMPTE directly at +1.914.761.1100 and ask for the specification ANSI/SMPTE 268M-1994, SMPTE Standard for File Format for Digital Moving-Picture Exchange (DPX), v 1.0, 18 February 1994. It is 14 pages, and costs $18.

This information provided here is for review purposes only. Although every attempt has been made to ensure accuracy, no guarantee of such is written or implied. This site is in no way responsible or liable for any damages arising from the use of this information. Please obtain the appropriate specifications for complete information.

Overview of the DPX File Structure

A DPX image consists of 4 parts:

Header Data structures

Often, it is easier to see the data structures (for programmers, anyway) if they are in a familiar display format. For this reason, the following header structs (in C/C++ format) are provided. There are five header types, not all of which are required, some of which are industry specific. Brief description are given of the header fields. For a more in depth description, please obtain the SMPTE specification.

Generic Image Data
The generic image data header is just that - it contains all the general information about the image (how big the headers are, what's in the image, how big the image is, etc.). The information contained is generally common to all image manipulation/graphics programs.
typedef struct file_information
{
    U32   magic_num;        /* magic number 0x53445058 (SDPX) or 0x58504453 (XPDS) */
    U32   offset;           /* offset to image data in bytes */
    ASCII vers[8];          /* which header format version is being used (v1.0)*/
    U32   file_size;        /* file size in bytes */
    U32   ditto_key;        /* read time short cut - 0 = same, 1 = new */
    U32   gen_hdr_size;     /* generic header length in bytes */
    U32   ind_hdr_size;     /* industry header length in bytes */
    U32   user_data_size;   /* user-defined data length in bytes */
    ASCII file_name[100];   /* iamge file name */
    ASCII create_time[24];  /* file creation date "yyyy:mm:dd:hh:mm:ss:LTZ" */
    ASCII creator[100];     /* file creator's name */
    ASCII project[200];     /* project name */
    ASCII copyright[200];   /* right to use or copyright info */
    U32   key;              /* encryption ( FFFFFFFF = unencrypted ) */
    ASCII Reserved[104];    /* reserved field TBD (need to pad) */
} FileInformation;

Image Information Header
The image header contains specific image information about the image (number of channels, resolution, etc.).
typedef struct _image_information
{
    U16    orientation;          /* image orientation */
    U16    element_number;       /* number of image elements */
    U32    pixels_per_line;      /* or x value */
    U32    lines_per_image_ele;  /* or y value, per element */
    struct _image_element
    {
        U32    data_sign;        /* data sign (0 = unsigned, 1 = signed ) */
				 /* "Core set images are unsigned" */
        U32    ref_low_data;     /* reference low data code value */
        R32    ref_low_quantity; /* reference low quantity represented */
        U32    ref_high_data;    /* reference high data code value */
        R32    ref_high_quantity;/* reference high quantity represented */
        U8     descriptor;       /* descriptor for image element */
        U8     transfer;         /* transfer characteristics for element */
        U8     colorimetric;     /* colormetric specification for element */
        U8     bit_size;         /* bit size for element */
	U16    packing;          /* packing for element */
        U16    encoding;         /* encoding for element */
        U32    data_offset;      /* offset to data of element */
        U32    eol_padding;      /* end of line padding used in element */
        U32    eo_image_padding; /* end of image padding used in element */
        ASCII  description[32];  /* description of element */
    } image_element[8];          /* NOTE THERE ARE EIGHT OF THESE */

    U8 reserved[52];             /* reserved for future use (padding) */
} Image_Information;

Image Orientation Information
typedef struct _image_orientation
{
    U32   x_offset;               /* X offset */
    U32   y_offset;               /* Y offset */
    R32   x_center;               /* X center */
    R32   y_center;               /* Y center */
    U32   x_orig_size;            /* X original size */
    U32   y_orig_size;            /* Y original size */
    ASCII file_name[100];         /* source image file name */
    ASCII creation_time[24];      /* source image creation date and time */
    ASCII input_dev[32];          /* input device name */
    ASCII input_serial[32];       /* input device serial number */
    U16   border[4];              /* border validity (XL, XR, YT, YB) */
    U32   pixel_aspect[2];        /* pixel aspect ratio (H:V) */
    U8    reserved[28];           /* reserved for future use (padding) */
} Image_Orientation;
Industry Headers
Film / Motion Picture
typedef struct _motion_picture_film_header
{
    ASCII film_mfg_id[2];    /* film manufacturer ID code (2 digits from film edge code) */
    ASCII film_type[2];      /* file type (2 digits from film edge code) */
    ASCII offset[2];         /* offset in perfs (2 digits from film edge code)*/
    ASCII prefix[6];         /* prefix (6 digits from film edge code) */
    ASCII count[4];          /* count (4 digits from film edge code)*/
    ASCII format[32];        /* format (i.e. academy) */
    U32   frame_position;    /* frame position in sequence */
    U32   sequence_len;      /* sequence length in frames */
    U32   held_count;        /* held count (1 = default) */
    R32   frame_rate;        /* frame rate of original in frames/sec */
    R32   shutter_angle;     /* shutter angle of camera in degrees */
    ASCII frame_id[32];      /* frame identification (i.e. keyframe) */
    ASCII slate_info[100];   /* slate information */
    U8    reserved[56];      /* reserved for future use (padding) */
} Motion_Picture_Film;
Television
typedef struct _television_header
{
    U32 tim_code;            /* SMPTE time code */
    U32 userBits;            /* SMPTE user bits */
    U8  interlace;           /* interlace ( 0 = noninterlaced, 1 = 2:1 interlace*/
    U8  field_num;           /* field number */
    U8  video_signal;        /* video signal standard (table 4)*/
    U8  unused;              /* used for byte alignment only */
    R32 hor_sample_rate;     /* horizontal sampling rate in Hz */
    R32 ver_sample_rate;     /* vertical sampling rate in Hz */
    R32 frame_rate;          /* temporal sampling rate or frame rate in Hz */
    R32 time_offset;         /* time offset from sync to first pixel */
    R32 gamma;               /* gamma value */
    R32 black_level;         /* black level code value */
    R32 black_gain;          /* black gain */
    R32 break_point;         /* breakpoint */
    R32 white_level;         /* reference white level code value */
    R32 integration_times;   /* integration time(s) */
    U8  reserved[76];        /* reserved for future use (padding) */
} Television_Header;
User Defined Data
typedef struct _user_defined_data { ASCII UserId[32]; /* User-defined identification string */ U8 *Data; /* User-defined data */ } User_Defined_Data;
UserId is a string used to identify the data found in the Data field. 
This field is used by a DPX file reader to verify that it understands the format 
of the Data field. 

Data is the actual user-defined data. The format of the field is not defined by the DPX standard and the data in this field may be up to one megabyte (1,048,576 bytes) in length.

Image Data
The image data is stored as an array of 32-bit elements made up of four signed or unsigned character values. Unsigned values are the default for DPX image data.
typedef struct _image_data_element
{
	U8 * 4  *Data;
} Image_Data_Element;

"The DPX format stores image data by pixels, separating each pixel into its component values (also called samples in other formats) and storing each value.

All components must be the same size across all elements. Valid component sizes are 1-, 8-, 10-, 12-, and 16-bit integers and 32- and 64-bit reals (IEEE floating-point). All components must be stored as words using 32-bit boundaries."


Tables

Table 1
Value		Components (and order in unpacked stream)

0		User defined (or unspecified single component)
1		Red (R)
2		Green (G)
3		Blue (B)
4		Alpha (matte)
5		
6		Luminance (Y)
7		Chrominance (CB, CR, subsampled by two)
8		Depth (Z)
9		Composite video
10 - 49		Reserved for future single components
50		R,G,B
51		R,G,B,alpha
52		Alpha, B, G, R
53 - 99		Reserved for future RGB ++ formats
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)
104 - 149	Reserved for future CBYCR ++ formats
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
157 - 254	Reserved for future formats

Notes

A few notes that explain some of the fields.
Reference low data code value
"The minimum expected code value for the image data. For printing density, the default value is 0. For CCIR 601-2 luminance, the default value is 16."


Disclaimer:
This site is not affiliated with the Eastman Kodak Company.
This page is not endorsed by the Eastman Kodak Company


Cineon File Format Version 4.5 for Digital Film Images

Image File Format for Cineon Digital Pictures

Version 4.5 , November 30, 1990 4.5 Draft - Image File Format Proposal for Digital Pictures

Introduction

All possible combinations of header field specifications are not supported by the High Resolution Electronic Intermediate System. However, to propose a minimal image file format that served the KODAK system alone, would not be generically useful for the motion picture industry as a whole.

Critical areas of information that the image file header needs to convey are:

Codes for Type fields

In this draft, the following codes are used to represent data types. The value indicating a specific field is undefined follows in parentheses.
U8	unsigned 8 bit integer	(FF hex)
U16     unsigned 16 bit integer (FFFF hex)
U32	unsigned 32 bit integer	(FFFFFFFF hex)
S32	signed 32 bit integer	(80000000 hex)
R32	32 bit real number	(7F800000 hex (+ infinity))
ASCII				(NULL  00 hex)
The assumption the relation of code value to data metric is linear is made. Therefore, given the minimum and maximum code values for a given (colour) channel, and the associated metric quantity represented, any value in between can be found via linear interpolation. For example, if the minimum code value is 0, representing 0.2 log exposure, and the maximum code value is 1169 representing 3.4 log exposure, then a code value of 584 represents 1.8 log exposure.

Section 1: Generic (Fixed Format)

This header is predefined, containing information generically useful for all digital imaging applications.

File information: Head - 2

Field #	Offset	Length	Type	Content
1.1	0	4	U32	Magic number (802A5FD7 - hex) indicates
				the start of image file and byte ordering

1.2	4	4	U32	Offset to image data in bytes

1.3	8	4	U32	Generic (fixed format) section header
				length in bytes	

1.4	12	4	U32	Industry specific (fixed format) section
				header length in bytes

1.5	16	4	U32	Length in bytes of variable length section

1.6	20	4	U32	Total image file size in bytes (includes
				header, image data and padding if any)

1.7	24	8	ASCII	Version number of header format
	
1.8	32	100	ASCII	Image file name

1.9	132	12	ASCII	Creation date - eg "yyyy:mm:dd"

1.10	144	12	ASCII	Creation time - eg "hh:mm:ssxxx" (xxx =
				time zone (eg. EST))

1.11	156	36	TBD	Reserved for future use

Image information:

Field #	Offset	Length	Type	Content
1.12	192	1	U8	Image orientation

				val 	line scan dir	page scan direction
				---	-------------	-------------------
				0	left to right	top to bottom
				1	left to right	bottom to top
				2	right to left	top to bottom
				3	right to left	bottom to top
				4	top to bottom	left to right
				5	top to bottom	right to left
				6	bottom to top	left to right
				7	bottom to top	right to left

1.13	193	1	U8	Number of channels ( 1 - 8 )
1.13.1	164	2	U8*2	UNUSED ( 2 byte space for word alignment )
1.14.1	196	1	U8	*Channel 1 designator - Byte 0 (see table 1 )
1.14.2	197	1	U8	*Channel 1 designator - Byte 1 (see table 1 )
1.14.3	198	1	U8	*Bits per pixel - channel 1
1.14.4	199	1	U8	UNUSED ( 1 byte space for word alignment )
1.14.5	200	4	U32	*Pixels per line - channel 1
1.14.6	204	4	U32	*Lines per image - channel 1
1.14.7	208	4	R32	*Minimum data value - channel 1
1.14.8	212	4	R32	*Minimum quantity represented - channel 1
1.14.9	216	4	32	*Maximum data value - channel 1
1.14.10	220	4	32	*Maximum quantity represented - channel 1
1.15	224	28	structure	Channel 2 specifier (same as channel 1)
1.16	252	28	structure	Channel 3 specifier (same as channel 1)
1.17	280	28	structure	Channel 4 specifier (same as channel 1)
1.18	308	28	structure	Channel 5 specifier (same as channel 1)
1.19	336	28	structure	Channel 6 specifier (same as channel 1)
1.20	364	28	structure	Channel 7 specifier (same as channel 1)
1.21	392	28	structure	Channel 8 specifier (same as channel 1)
1.22	420	8	R32*2	White point (colour temperature) - x, y pair
1.23	428	8	R32*2	Red primary chromaticity - x, y pair 
1.24	436	8	R32*2	Green primary chromaticity - x, y pair 
1.25	444	8	R32*2	Blue primary chromaticity - x, y pair 
1.26	452	200	ASCII	Label text (other label info in user
				area - font, size, location)
1.27	652	28	TBD	Reserved for future use

Image Data Format Information

Field #	Offset	Length	Type	Content

1.28	680	1	U8	Data interleave (if all channels are not
the same sptial resolution, data interleave must be 2, channel
interleave)
				0 = pixel interleave ( rgbrgbrgbrgb... )
				1 = line interleave (rrr.ggg.bbb.rrr.ggg.bbb.)
				2 = channel interleave (rrr...ggg...bbb...)
				3 - 254 = user defined

1.29	681	1	U8	Packing (see note 1 )
				
0 = user all bits( bitfields) - TIGHTEST - no byte, word or long word
boundaries
1 = byte ( 8 bit ) boundaries - lef justified
2 = byte ( 8 bit ) boundaries - right justified
3 = word (16 bit) bondaries - left justified
4 = word ( 16 bit) boundaries - right justified
5 = longword ( 32 bit ) boundaries - left justified
6 = longword ( 32 bit ) boundaries - right justified 

High order bit = 0 - pack at most one pixel per cell
High order bit = 1 - pack at many fields as possible per cell

1.30	682	1	U8	Data signed or unsigned
				0 = unsigned
				1 = signed
1.31	683	1	U8	Image sense
				0 = positive image
				1 = negative image
1.32	684	4	U32	End of line padding - number of bytes
1.33	688	4	U32	End of channel padding - number of bytes
1.34	692	20	TBD	Reserved for future use

Image Origination Information:

Field # Offset	Length	Type:	Content:

1.35	712	4	S32	X offset (correlate digital data to source media)
1.36	716	4	S32	Y offset (correlate digital data to source media)	
1.37	720	100	ASCII	Image filename
1.38	820	12	ASCII	Creation date (i.e. "yyyy:mm:dd" )
1.39	832	12	ASCII	Creation time (i.e. "hh:mm:ssxxx" where
xxx is time zone (i.e PST))
1.40	844	64	ASCII	Input device
1.41	908	32	ASCII	Input device model number
1.42	940	32	ASCII	Input device serial number
1.43	972	4	R32	X input device pitch (samples/mm) (X
determined by image orientation)
1.44	976	4	R32	Y input device pitch (samples/mm) (Y
determined by image orientation)
1.45	980	4	R32	Image gamma of capture device
1.46	984	40	TBD	Reserved for future use

Section 2 - Motion Picture Industry Specific (Fixed format)

Film/Frame Information:

2.1	1024	1	U8	
2.2	1025	1	U8	
2.3	1026	1	U8	
2.4	1027	1	U8	
2.5	1028	4	U32	
2.6	1032	4	U32	
2.7	1036	32	ASCII
2.8	1068	4	U32	
2.9	1072	4	R32	
2.10	1076	32	ASCII
2.11	1108	2000	ASCII
2.12	1308	740	TBD	Reserved for future use

Section 3 - User Define (Variable Length)

Field	Offset	Length	Type	Content
3.0	2048	---	---	Reserved for customer use - compression,
processing log, etc.
Note: for Cineon images, this section is currently defined to contain the postage stamp image (an image 96x64x3 channels (18 KBytes for 8 bit mode) oriented correctly for display).

Section 4 - Digital Image Data

The actual image data (pixel information) follows next. Because the data can be "packed" or not, the data can be of varying types (as specified in the Image Data Format Information header.

Table 1

Channel Designator Codes:

Byte 0		0 = Universal metric
		1 - 254 = vendor specific (i.e. 1 = Kodak);
Byte 1	if Byte 0 = 0 
	Universal Metric

	0 = B & W
	1 = red		(r,g,b printing density)
	2 = green	(r,g,b printing density)
	3 = blue	(r,g,b printing density)
	4 = red		(r,g,b CCIR XA/11)
	5 = green	(r,g,b CCIR XA/11)
	6 = blue	(r,g,b CCIR XA/11)
	7 - 254	TBD - reserved

	if 0< Byte 0 < 255
	0 - 254 Vendor defined

Note 1 (on "packing" options 1-6)

Define a CELL to be a BYTE (8 bits), WORD (16 bits) or LONGWORD (32bits).

Define a FIELD to be one occurence of a channel value. For example, with 3 channels (r,g,b), pixel interleaved, field 1 is r1, field 2 is g1, field 3 is b1, field 4 is r2, etc. With 3 channels (r, g, b), channel interleaved, field 1 is r1, field 2 is r2, field 3 is r3, etc.

The high order bit of the packing specifier either restricts packing to at most one pixel (n channels) per cell, or allows fields from adjacent pixels to spill over cell boundaries.

How to intepret PACKING specifier

If number of channels = 1 OR data interleave = 1 or 2 (line or channel interleave):

If number of channels is > 1 AND data interleave = 0 (pixel interleave)

Examples

    Number of channels = 4	6 bits 	6 bits 	6 bits	6 bits 	8 bits
    All channels, 6 bits deep	field1	field2	field3	field4	empty
    Data interleave = 0		ch1[1]	ch2[1]	ch3[1]	ch4[1]	xxxxxxxx
    Packing = 5 (High order bit clear)

    Number of channels = 4	6 bits 	6 bits 	6 bits	6 bits 	6 bits 2 bits
    All channels, 6 bits deep	field1	field2	field3	field4	field5 empty
    Data interleave = 0		ch1[1]	ch2[1]	ch3[1]	ch4[1]	ch1[2]xx
    Packing = 5 (High order bit set)


Disclaimer:
This site is not affiliated with the Eastman Kodak Company.
This page is not endorsed by the Eastman Kodak Company


[ Main || Kodak Contacts || Links || FAQs || Plugins || Contacts ]

This site is not affiliated with the Eastman Kodak Company.
Cineon and the Cineon logo are registered trademarks of Eastman Kodak Company.
Questions, Comments, Suggestions and Corrections