Home | | Graphics and Multimedia | Data and File Formats Standards

Chapter: Graphics and Multimedia : Multimedia File Handling

Data and File Formats Standards

There are large number of formats and standards available for multimedia system. Let us discuss about the following file formats: .:. Rich-Text Format (RTF) .:. Tagged Image file Format (TIFF) .:. Resource Image File Format (RIFF) .:. Musical Instrument Digital Interface (MIDI) .:. Joint Photographic Experts Group (JPEG) .:. Audio Video Interleaved (AVI) Indeo file format .:. TWAIN.

DATA AND FILE FORMATS STANDARDS

 

There are large number of formats and standards available for multimedia system. Let us discuss about the following file formats:

 

.:. Rich-Text Format (RTF)

.:. Tagged Image file Format (TIFF)

.:. Resource Image File Format (RIFF)

.:. Musical Instrument Digital Interface (MIDI)

.:. Joint Photographic Experts Group (JPEG)

.:. Audio Video Interleaved (AVI) Indeo file format

.:. TWAIN.

 

Rich Text Format

 

This format extends the range of information from one word processor application or DTP system to another.

 

The key format information carried across in RTF documents are given below: Character Set: It determines the characters that supports in a particular implementation.

 

Font Table: This lists all fonts used. Then, they are mapped to the fonts available in receiving application for displaying text.

 

Color Table: It lists the colors used in the documents. The color table then mapped for display by receiving application to the nearer set of colors available to that applications.

 

Document Formatting: Document margins and paragraph indents are specified here.

 

Section Formatting: Section breaks are specified to define separation of groups of paragraphs. Paragraph Formatting: It specifies style sheds. It specifies control characters for specifying paragraph justification, tab positions, left, right and first indents relative to document margins, and the spacing between paragraphs.

 

General Formatting: It includes footnotes, annotations, bookmarks and pictures.

 

Character Formatting: It includes bold, italic, underline (continuous, dotted or word), strike through, shadow text, outline text, and hidden text.

 

Special Characters: It includes hyphens, spaces, backslashes, underscore and so on

 

TIFF File Format

 

TIFF is an industry-standard file format designed to represent raster image data generated by scanners, frame grabbers, and paint/ photo retouching applications.

 

TIFF Version 6.0 .

It offers the following formats:

 

(i)               Grayscale, palette color, RGB full-color images and black and white.

(ii)             Run-length encoding, uncompressed images and modified Huffman data compression

schemes.

The additional formats are:

(i)        Tiled images, compression schemes, images using CMYK, YCbCr color models.

TIFF Structure

 

TIFF files consists of a header. The header consists of byteordering flag, TIFF file format version number, and a pointer to a table. The pointer points image file directory. This directory contains table of entries of various tags and their information.

 

TIFF file format Header:


TIFF Tags

The first two bytes of each directory entry contain a field called the Tag ID.

 

Tag IDs arc grouped into several categories. They are Basic, Informational, Facsimile, Document storage and Retrieval.

 

TIFF Classes: (Version 5.0)

It has five classes

 

1. Class B for binary images

 

2. Class F for Fax

3. Class G for gray-scale images

4. Class P for palette color images

5. Class R for RGB full-color images.

 

Resource Interchange File Format (RIFF)

 

The RIFF file formats consist' of blocks of data called chunks. They are RIFF Chunk - defines the content of the RIFF file.

 

List Chunk - allows to embed archival location copy right information and creating date. Subchunk - allow additional information to a primary chunk

 

The first chunk in a RIFF file must be a RIFF chunk and it may contain one or more sub chunk

 

The first four bytes of the RIFF chunk data field are allocated for the form type field containing four characters to identify the format of the data stored in the file: AVI, WAV, RMI, PAL and so


The sub chunk contains a four-character ASCII string 10 to identify the type of data.

 

Four bytes of size contains the count of data values, and the data. The data structure of a chunk is same as all other chunks.

 

RIFF ChunkThe first 4 characters of the RlFF chunk are reserved for the "RIFF" ASCII string. The next four bytes define the total data size.

 

The first four characters of the data field are reserved for form tyPe. The rest of the data field contains two subchunk:

 

(i)    fmt ~ defines the recording characteristics of the waveform.

(ii)   data ~ contains the data for the waveform.

 

LIST Chunk

RlFF chunk may contains one or more list chunks.

 

List chunks allow embedding additional file information such as archival location, copyright information, creating date, description of the content of the file.

 

RlFF MIDI FILE FORMAT

 

RlFF MIDI contains a RlFF chunk with the form type "RMID"and a subchunk called "data" for MIDI data.

 

The 4 bytes are for ID of the RlFF chunk. 4 bytes are for size 4 bytes are for form type 4 bytes are for ID of the subchunk data and 4 bytes are for the size of MIDI data.

 

RIFF DIBS (Device-Independent Bit Maps) .

 

DIB is a Microsoft windows standard format. It defines bit maps and color attributes for bit maps independent of devices. DIEs are normally embedded in .BMP files, .WMF meta data files, and .CLP files.

 

DIB Structure


BIT MAP INFOHEADER is the bit map information header.

RGBEQUAD is the color table structure.

PIXELs are the array of bytes for the pixel bit map.

The following shows the DIE file format


A RIFF DIB file format contains a RIFF chunk with the Form Type "RDIB" and a subchunk called "data" for DIB data.

 

4 bytes denote ID of the RIFF chunk

4 bytes refer size ofXYZ.RDI   4 bytes define Forum Type

4 bytes describe ID of the sub chunk data 4 bytes define size of DIB data.

 

RIFF PALETTE File format

 

The RIFF Palette file format contains a RIFF chunk with the Form Type "RP AL" and a subchunk called "data" for palette data. The Microsoft Windows logical palette structure is enveloped in the RIFF data subchunk. The palette structure contains the palette version number, number of palette entries, the intensity of red, green and blue colours, and flags for the palette usage. The palette structure is described by the following code segment:

 

typedef struct tagLOGP ALETTE {

 

WORD palVersion; IIWindows version number for the structure I !Number of.palettes color entries

 

PALETIEENTRY palpalEntry []; llarray of PALEN TRY data } LOGPALETTE; structure the form type "AVI" and two mandatory list chunks, "hdr 1" and "n10vi".

 

The "hdr 1" defines the format of the data "Movi" contains the data for the audio-video streams. The third list chunk called "id xl", is an optional index chunk.

 

Boundary condition Handling for AVI files

 

Each audio and video stream is grouped together to form a ree chunk. If the size of a rec chunk is not a multiple of2048 bytes, then the rec chunk is padded to make the size of each rec chunk a multiple of 2048 bytes. To align data on a 2048 byte boundary, dummy data is added by a "JUNK" data chunk. The JUNK chunk is a standard RIFF chunk with a 4 character identifier, "JUNK," followed by the dummy data.

 

MIDI File Format

 

The MIDI file format follows music recording metaphor to provide the means of storing separate tracks of music for each instrument so that they can be read and syn~hronized when they are played.

 

The MIDI file format also contains chunks (i.e., blocks) of data. There are two types of chunks: (i) header chunks (ii) track chunks.

 

Header Chunk

It is made up of 14 bytes .

The first four-character string is the identifier string, "MThd" .

 

 The second four bytes contain the data size for the header chunk. It is set to a fixed value of six bytes .

The last six bytes contain data for header chunk.

 

Track chunk

The Track chunk is organized as follows:

 

.:.        The first 4-character string is the identifier.

.:.        The second 4 bytes contain track length.

 

MIDI Communication Protocol

This protocol uses 2 or more bytes messages.

 

The number of bytes depends on the types of message. There are two types of messages:

(i)  Channel messages and (ii) System messages.

 

Channel Messages

 

A channel message can have up to three bytes in a message. The first byte is called a status byte, and other two bytes are called data bytes. The channel number, which addresses one of the 16 channels, is encoded by the lower nibble of the status byte. Each MIDI voice has a channel number; and messages are sent to the channel whose channel number matches the channel number encoded in the lower nibble of the status byte. There are two types of channel messages: voice messages and the mode messages.

 

Voice messages

 

Voice messages are used to control the voice of the instrument (or device); that is, switch the notes on or off and sent key pressure messages indicating that the key is depressed, and send control messages to control effects like vibrato, sustain, and tremolo. Pitch wheel messages are used to change the pitch of all notes .

Mode messages

Mode messages are used for assigning voice relationships for up to 16 channels; that is, to set the device to MOWO mode or POLY mode. Omny Mode on enables the device to receive voice messages on all channels.

 

System Messages

 

System messages apply to the complete system rather than specific channels and do not contain any channel numbers. There are three types of system messages: common messages, real-time messages, and exclusive messages. In the following, we will see how these messages are used.

 

Common Messages These messages are common to the complete system. These messages provide for functions such as select a song, setting the song position pointer with number of beats, and sending a tune request to an analog synthesizer.

 

System Real Time Messages

 

These messages are used for setting the system's real-time parameters. These parameters include the timing clock, starting and stopping the sequencer, ressuming the sequencer from a stopped position, and resetting the system.

 

System Exclusive messages

 

These messages contain manufacturer-specific data such as identification, serial number, model number, and other information. Here, a standard file format is generated which can be moved across platforms and applications.

 

JPEG Motion Image:

 

JPEG Motion image will be embedded in A VI RIFF file format. There are two standards available:

 

(i)  MPEG ~ In this, patent and copyright issues are there.

(ii) MPEG 2 ~ It provide better resolution and picture quality.

 

TWAIN

 

To address the problem of custom interfaces, the TWAIN working group was formed to define an open industry standard interface for input devices. They designed a standard interface called a generic TW AIN . interface. It allows applications to interface scanners, digital still cameras, video cameras.

 

TWAIN ARCHITECHTURE:



o   The Twain architecture defines a set of application programming interfaces (APls) and a protocol to acquire data from input devices.

 

o   It is a layered architecture.

 

o   It has application layer, the protocol layer, the acquisition layer and device layer.

 

o   Application Layer: This layer sets up a logical connection with a device. The application layer interfaces with protocol layer.

 

o   Protocol Layer: This layer is responsible for communications between the application and acquisition layers.

o   The main part of the protocol layer is the source Manager.

o   Source manager manages all sessions between an application and the sources, and monitors data acquisition transactions. The protocol layer is a complex layer.

 

It provides the important aspects of device and application interfacing functions. The Acquisition Layer: It contains the virtual device driver.

 

It interacts directly with the device driver. This layer is also known as source. It performs the following functions:

 

1.Control of the device.

2.Acquisition of data from the device.

3.Transfer of data in agreed format.

4.Provision of user interface to control the device.

 

The Device Layer: The device layer receives software commands and controls the device hardware. NEW WAVE RIFF File Format: This format contains two subchunks:

(i)                Fmt (ii) Data.

 

It may contain optional subchunks:

 

(i)    Fact

(ii) Cue points

(iii)Play list

(iv) Associated datalist.

 

Fact Chunk: It stores file-dependent information about the contents of the WAVE file. Cue Points Chunk: It identifies a series of positions in the waveform data stream. Playlist Chunk: It specifies a play order for series of cue points. Associated Data Chunk: It provides the ability to attach information, such as labels, to sections of the waveform data stream. Inst Chunk: The file format stores sampled sound synthesizer's samples.


Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
Graphics and Multimedia : Multimedia File Handling : Data and File Formats Standards |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.