Page 122 - C:\Users\msi\OneDrive\Documents\Flip PDF Corporate Edition\E-Commerce\
P. 122
RIFF Palette File Format
The RIFF Palette file format contains a RIFF chunk with the Form Type "RP AL"
and a sub chunk called "data" for palette data. The Microsoft Windows logical
palette structure is enveloped in the RIFF data sub chunk. 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 tag LOGP ALETTE { WORD palVersion; II Windows 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.
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
synchronized 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