Apparatus and methods for designing, analyzing or simulating signal processing functions5499373Abstract Data to be processed is stored within data files 20. Associated with each data file 20 is a header file 18. The header files 18 store data specifying a wide range of attributes of the data within the data files 20. A user selects a particular signal processing function 14 that he desires to use and this then accesses one or mope selected data files 20 and associated header files 18. The selected signal processing tool 14 only needs a set of the attributes stored within the header files 18. The signal processing tool 14 reads those attributes it requires and then manipulates the data within the data file 20. The provision of this structure allows a wide range of signal processing function tools to be integrated into a single system which may also be simply expanded. Claims We claim: Description BACKGROUND OF THE INVENTION
______________________________________
0 FILENAME: string[57] n
1 CREATION string[57] n
DATE:
2 FILE TYPE: Audio Data n
3 ORIGINATING string[57] n
PROCESS:
4 PROJECT string[57] n
NAME:
5 TITLE: string[57] n
6 COMMENT1: string[57] n
7 COMMENT2: string[57] n
8 ORIGINATOR: string[57] n
9 CODING: string[57] n
10 DATA TYPE: string[1] n
11 CHANNELS: unsigned integer n
12 No BYTES PER unsigned integer n
SAMPLE:
13 No ACTIVE unsigned integer n
BITS:
14 SCALE FAC- unsigned integer n
TOR:
15 SEQUENTIAL: string[1] n
16 SAMP- WX.XXXXXXXXXXXXXXXXYZXX n
LING
RATE:
17 SIZE: unsigned integer n
18 n
19 n
20 n
21 n
22 n
23 n
24 n
25 n
26 n
27 n
28 n ;last line of header
______________________________________
HEADER SYNTAX 1. The header is restricted to 80 columns to allow for easy readability on all display devices and printouts. 2. Items after and including ";" are comments and are not part of the file format. 3. Items after column 22 are specific to each audio file and occur after the definition for each line. These items can be followed by comments up to column 79. 4. Integers are in the range of 0 to 99999999999999999999999 in a field width of 23 right justified to column 44. 5. string[n]=an array of characters of length n where the ASCII code of each character lies between 0.times.20 and 0.times.7e. Strings will be left justified to column 22. WX.XXXXXXXXXXXXXXXXYZXX are defined as follows: W =one of the set [+, ,-] X =one of the set [0,1,2,3,4,5,6,7,8,9] Y =one of the set [E,e,D,d] Z =one of the set [+,-] 7. n =new line character [0.times.0a]this should be the only character within the file header which lies outside the range 0.times.20 to 0.times.7e. 8. The file header information occupies the first 29 lines of the file. The header data is terminated by the character [0.times.fe] which occurs after the newline character of the last header line. Data in the file will start on line 29. FIELD DESCRIPTION L0: FILENAME refers to the filename of the audio file without the ".aud" extension and does not include any path. L1: CREATION DATE is specified as YYYY MM DD HH:MM:SS. Single spaces are used to separate the year, month, day and time fields. Colons are used to separate hours, minutes and seconds. L2: FILE TYPE indicates that this file contains video data and is set to `Audio Data`. L3: ORIGINATING PROCESS is the name of the program which spawned the audio data. This can be useful for back-traceability. L4: PROJECT NAME is hopefully self-explanatory. L5-7: TITLE, COMMENT1 and COMMENT2 can be used in an unrestricted way to record any useful information about the data. L8: ORIGINATOR is the name of the person who created the audio data file. L9: CODING indicates the coding used to convert the data and is set to `LINEAR`, `NICAM 676`, `NICAM 728`, `A-LAW`, etc. as may be required. L10: DATA TYPE one of the set [M,L,R,S]. This indicates the type of audio data stored in the file: M--Mono L--Left R--Right S--Stereo L11: CHANNELS gives the number of audio channels present in the file. There are inter-relations between the DATA TYPE and CHANNELS fields.
______________________________________
DATA
TYPE CHANNELS Format of Audio Data
______________________________________
Mono =1 A single audio channel
Mono >1 CHANNELS independent audio channels
Left =1 A single audio channel which was
or will be the left channel of a
stereo pair
Left >1 Not normally encountered
Right =1 A single audio channel which was
or will be right channel of a
stereo pair
Right >1 Not normally encountered
Stereo
Odd Not normally encountered
Stereo
Even CHANNELS audio channels which may
be assumed to be CHANNELS/2 stereo
pairs
CH 0 = left channel of first pair
CH 1 = right channel of first pair
CH 2 = left channel of second pair
CH 3 = right channel of second pair
etc.
______________________________________
L12: No BYTES PER SAMPLE indicates how many bytes are required to fully represent one video data sample e.g. 8 bit data requires 1 byte only but 10 bit data will require 2 bytes. If more than one byte per sample is required then the ordering is most significant byte first. The bits comprising the bytes are most significant bit first. Machine portability is ensured by accessing each sample as a sequence of `unsigned char` reads. L13: No ACTIVE BITS indicates how many bits of each sample contain valid video data e.g. 10 bit data must be represented by two bytes per sample but of these 16 bits only 10 will be active. The active data is stored in the most significant bits of the sample. L14: SCALE FACTOR this is an integer which gives the number of bits to the right of the binary point. For example, if the audio data consists of 12 bits, of which 11 are after the binary point, (i.e. the data covers the range from -1 to approximately +1) then the scale factor will be 11. L15: SEQUENTIAL one of the set [Y,N]to indicate whether or not the audio data in the file is from a sequential sample source. This field is normally only set to `Y` if the DATA TYPE field is set to `L`, `R` or "S" and signifies that the right channel samples were converted from the continuous to the sample domains one half sample period AFTER the corresponding left channel samples. Thus to convert a sequentially sampled file to the more normal SIMULTANEOUS mode, a one half sample delay is placed in the left channel. Conversely, to convert a simultaneously sampled file to a sequentially sampled file, a one half sample delay is placed in the right channel. L16: SAMPLING RATE gives the sampling rate in Hertz. Thus, typical values might be:
______________________________________
SAMPLING RATE 3.2000000000000000E + 04
SAMPLING RATE 4.4100000000000000E + 04
SAMPLING RATE 4.8000000000000000E + 04.
______________________________________
L17: SIZE gives the size in samples of each channel of the data. AUDIO DATA FORMAT 1. Audio data in the file is always in binary format 2. Audio data starts on line 29. Lines 0 to 28 contain the header information. If a data sequence is represented by a set of values D[t][c]where: t=the temporal sample position c=the channel number then the audio data is stored in file, after the header, in the following way:
______________________________________
for ( t = 0; t < SIZE; t++)
for (c = 0; c < CHANNELS; c++)
D[t][c];
______________________________________
3. The total number of bytes stored in a file should be No OF BYTES PER SAMPLE X CHANNELS X SIZE FIR FILTER GENERAL 1. This is a unified definition to represent separable and non-separable 1d, 2d and 3d FIR filter coefficients. 2. The FIR filter coefficients are stored in expanded form, i.e. symmetrical coefficients are duplicated. 3. Filter coefficients are specified as double precision numbers. The filter coefficients are represented as ascii strings. 4. This file format encompasses rounded (i.e. integer) coefficients; a header field indicates whether the double precision numbers should be cast to integer in the host program. 5. Files that conform to the FIR filter coefficient file format use the fir extension.
______________________________________
FILE
HEAD-
ER
______________________________________
0 FILE- string[57] n
NAME:
1 CREA- string[57] n
TION
DATE:
2 FILE FIR coefficient n
TYPE:
3 ORIGI- string[57] n
NATING
PROCESS:
4 PROJECT string[57] n
NAME:
5 TITLE: string[57] n
6 COM- string[57] n
MENT1:
7 COM- string[57] n
MENT2:
8 ORIGI- string[57] n
NATOR:
9 DIMEN- unsigned integer n
SIONS:
10 SEPAR- string[1] n
ABLE:
11 DATA string[3] n
REPRE-
SENTA-
TION:
12 IN- string[1] n
TEGER:
13 H WX.XXXXXXXXXXXXXXXXYZXX n
SAMPLE
RATE:
14 H unsigned integer n
ACTUAL
LENGTH:
15 H WX.XXXXXXXXXXXXXXXXYZXX n
DECIMA-
TION
FACTOR:
16 V WX.XXXXXXXXXXXXXXXXYZXX n
SAMPLE
RATE:
17 V unsigned integer n
ACTUAL
LENGTH:
18 V WX.XXXXXXXXXXXXXXXXYZXX n
DECIMA-
TION
FACTOR:
19 T WX.XXXXXXXXXXXXXXXXYZXX n
SAMPLE
RATE:
20 T unsigned integer n
ACTUAL
LENGTH:
21 T WX.XXXXXXXXXXXXXXXXYZXX n
DECIMA-
TION
FACTOR:
22 n
23 n
24 n
25 n
26 n
27 n
28 n ;last line of file header
______________________________________
HEADER SYNTAX As for AUDIO files. FIELD DESCRIPTION L0: FILENAME refers to the filename of this filter coefficient file without the .fir extension and does not include any path. Li: CREATION DATE is specified as YYYY MM DD HH:MM:SS. Single spaces are used to separate the year, month, day and time fields. Colons are used to separate hours, minutes and seconds. L2: FILE TYPE indicates that this file contains FIR filter coefficients and is recognised by the .fir extension and by the string `FIR coefficient` on this line. L3: ORIGINATING PROCESS this fields is generally used to specify the method of design used to derive the filter coefficients (e.g. Remez, Window sampling). L4: PROJECT NAME the name of the project. L5,6,7: TITLE, COMMENT1 and COMMENT2 the title and comment fields can be used in a unrestricted way. The comments may be used to record filter design parameters (e.g. Remez parameters). Alternatively, the title can be global with the comment fields representing a hierarchy of local titles. L8: ORIGINATOR the designer's name. L9: DIMENSIONS the number of dimensions can be 1, 2 or 3. L10: SEPARABLE this string is one character long of the set [Y, N]and specifies whether the filter is separable (i.e. a set of 1 dimensional filters) or non-separable. For dimensions =1 this field is set to N. L11: DATA REPRESENTATION this field indicates how the data is stored in the file after the header. This may be set to indicate either ASC or binary storage. L12: INTEGER this string is one character long of the set [Y, N]and specifies whether the coefficient data is of integer precision. This field can be used to cast the coefficients to integer representation. L13,16,19: [H,V,T]SAMPLE RATE sample rate specification in hertz for the horizontal, vertical and temporal dimensions. L14,17,20: [H,V,T]ACTUAL LENGTH the actual length refers to the number of coefficients in each dimension and corresponds to the number of data values that should be read for each dimension. L15,18,21: [H,V,T]DECIMATION FACTOR if this value is an integer >1 then the file represents an FIR filter designed as an interpolator and this value gives the decimation factor to be applied to extract each interpolator set. If this value is real between 0 and 1 then the file represents an interpolator designed by sampling the sin(x)/x function and this value gives the interpolator position (or sampling offset). If this value =1, it indicates a normal FIR filter and not an interpolator. L22-28: Reserved for future expansion. DATA FORMAT A general 3d filter can be represented as the set of data values F[h][v][t] with h=1 to k, v=1 to m and t=1 to n. The actual length fields in the file header correspond to k, m and n for the horizontal, vertical and temporal dimensions respectively. For a separable 3d filter this reduces to F1[h]F2[v]F3[t]. The format for the coefficient data is specified using some C programming language syntax.
______________________________________
Case 1:
3d non-separable filter
for (t=1; t<=n; t++)
for (v=1; v<=m; v++)
for (h=1; h<=k; h++)
F[h][v][t]
Case 2:
2d non-separable filter
for (v=1; v<=m; v++)
for (h=1; h<=k; h++)
F[h][v]
Case 3:
3d separable filter
for (h=1; h<=k; h++) F1[h]
for (v=1; v<=m; v++) F2[v]
for (t=1; t<=n; t++) F3[t]
Case 4:
2d separable filter
for (h=1; h<=k; h++) F1[h]
for (v=1; v<=m; v++) F2[v]
Case 5:
1d filter
for (h=1; h<=k; h++) F1[h]
______________________________________
1. Coefficients may be specified in ascii format. 2. Each coefficient takes the form: WX.XXXXXXXXXXXXXXXXYZXX where W=one of the set [+,,-] X=one of the set [0,1,2,3,4,5,6,7,8,9] Y=one of the set [E,e,D,d] Z=one of the set [+,-] n=newline 3. Coefficient data starts on line 29. FREQUENCY RESPONSE GENERAL 1. This is a unified definition to encompass 1d, 2d and 3d frequency response structures. 2. Frequency response data is specified as double precision numbers and is stored in ASCII format. 3. Files that conform to the following description should use the ".frq" File extension.
______________________________________
FILE
HEAD-
ER
______________________________________
0 FILE- string[57] n
NAME:
1 CREA- string[57] n
TION
DATE:
2 FILE Frequency Response n
TYPE:
3 ORIGI- string[57] n
NATING
PROCESS:
4 PROJECT string[57] n
NAME:
5 TITLE: string[57] n
6 COM- string[57] n
MENT1:
7 COM- string[57] n
MENT2:
8 ORIGI- string[57] n
NATOR:
9 DIMEN- unsigned integer n
SIONS:
10 SEPAR- string[3] n
ABLE:
11 H WX,XXXXXXXXXXXXXXXXYZXX n
SAMP-
LING
RATE:
12 H WX.XXXXXXXXXXXXXXXXYZXX n
FREQ
UPPER
LIMIT:
13 H WX.XXXXXXXXXXXXXXXXYZXX n
FREQ
LOWER
LIMIT:
14 H No OF unsigned integer n
POINTS:
15 H string[57] n
DISTRI-
BUTION:
16 V SAMP- WX.XXXXXXXXXXXXXXXXYZXX n
LING
RATE:
17 V FREQ WX.XXXXXXXXXXXXXXYXYZXX n
UPPER
LIMIT:
18 V FREQ WX.XXXXXXXXXXXXXXXXYZXX n
LOWER
LIMIT:
19 V No OF unsigned integer n
POINTS:
20 V DISTRI- string[57] n
BUTION:
21 T SAMP- WX.XXXXXXXXXXXXXXXXYZXX n
LING
RATE:
22 F FREQ WX.XXXXXXXXXXXXXXXXYZXX n
UPPER
LIMIT:
23 T FREQ WX.XXXXXXXXXXXXXXXXYZXX n
LOWER
LIMIT:
24 T No OF unsigned integer n
POINTS:
25 T DISTRI- string[57] n
BUTION:
26 n
27 n
28 n ;last line of file header
______________________________________
HEADER SYNTAX As for AUDIO files. FIELD DESCRIPTION L0: FILENAME refers to the filename of the data file without the ".frq" extension and does not include any path. L1: CREATION DATE is specified as YYYY MM DD HH:MM:SS. Single spaces are used to separate the year, month, day and time fields. Colons are used to separate hours, minutes and seconds. L2: FILE TYPE indicates that this file contains frequency response data and is set to `Frequency Response`. L3: ORIGINATING PROCESS is the name of the program which spawned the data. This can be useful for back-traceability. L5-7: TITLE, COMMENT1 and CADMMENT2 can be used in an unrestricted way to record any useful information about the data. L8: ORIGINATOR is the name of the person who created the data file. L9: DIMENSIONS should be one of the set [1,2,3]; anything else is yet meaningless. L10: DATA REPRESENTATION this indicates how the data is stored in the file after the header. This could be set to represent ASC or binary representations. L11,16,21: [H,V,T]SAMPLING RATE gives the sampling rate in Hertz in the horizontal, vertical and temporal dimensions of the data. L12,17,22: [H,V,T]NO OF POINTS gives the number of frequency response points that have been calculated in the horizontal, vertical and temporal directions. L13,18,23: [H,V,T]FREQ UPPER LIMIT gives the value of the upper frequency limit of the response data in the three dimensions. L14,19,24: [H,V,T]FREQ LOWER LIMIT gives the value of the lower frequency limit of the response data in the three dimensions. L15,20,25: [H,V,T]DISTRIBUTION one of the set [LOG, LIN] to describe the type of distribution in use. L24-28: Reserved for future expansion. DATA FORMAT 1. Data starts on line 29. Lines 0 to 28 contain the header information. 2. Each frequency response point is stored as a set of four double precision numbers representing frequency (in Hz), gain (absolute), phase (in radians) and group delay (in seconds). Frequency response points will therefore appear in the file (if stored as ASCII) as is:
______________________________________
FREQUENCY AMPLITUDE PHASE GROUP.sub.-- DELAY n
FREQUENCY AMPLITUDE PHASE GROUP.sub.-- DELAY544 n
______________________________________
Where [FREQUENCY,AMPLITUDE,PHASE,GROUP.sub.-- DELAY] are all of the form: WX.XXXXXXXXXXXXYZXZ W=one of the set [+, ,-] X=one of the set [0,1,2,3,4,5,6,7,8,9] Y=one of the set [E,e,D,d] Z=one of the set [+,-] The mantissa is of reduced resolution so that the lines containing the four floating point numbers will not occupy positions beyond column 79. If a frequency response is represented by a set of values F[h][v][t]where h, v and t are the horizontal, vertical and temporal frequencies respectively, and F[h][v][t]contains four double precision numbers one each to represent frequency, amplitude, phase and group delay then frequency response points are stored in the file, after the header, in the following way: for (t=0;t<T No OF POINTS;t++) for (v=0;<V No OF POINTS;v++) for (h=0;h<No OF POINTS;h++) F[h][v][y]; 3. The total number of lines stored in a file in this way should be H No OF POINTS.times.V No OF POINTS.times.T No OF POINTS INFINITE IMPULSE RESPONSE (IIR) FILTER GENERAL 1. This is a unified definition to represent 1 dimensional analogrue and digital IIR filters. 2. Two realisations are supported: Direct Form Transfer functions represented as a rational function of s (analogue) or z (digital) of arbitrary order. Interconnection of Biquadratic Sections Transfer functions represented as a parallel bank of cascaded sections. In most cases the filter will be implemented as either a cascade or a parallel bank of biquadratic sections. 3. Filter values are specified as double precision numbers. The filter values are represented as ASCII strings. 4. This file format encompasses rounded (i.e. integer) coefficients for digital filter implementation; a header field indicates whether the double precision numbers should be cast to integer numbers in the host program. 5. Files that conform to the IIR filter file format use the .iir extension. 6. Only 1 dimensional filter structures are supported; multiple dimension filters are normally only applicable to video signals, where the non-linear phase response of IIR filters makes them unsuitable.
______________________________________
FILE
HEAD-
ER
______________________________________
0 FILE- string[57] n
NAME:
1 CREA- string[57] n
TION
DATE:
2 FILE IIR Filter n
TYPE:
3 ORIGI- string[57] n
NATING
PROCESS:
4 PROJECT string[57] n
NAME:
5 TITLE: string[57] n
6 COM- string[57] n
MENT1:
7 COM- string[57] n
MENT2:
8 ORIGI- string[57] n
NATOR:
9 NUMER- unsigned integer n
ATOR
ORDER:
10 DENOMI- unsigned integer n
NATOR
ORDER:
11 REALISA- string[57] n
TION:
12 CAS- unsigned integer n
CADED
SEC-
TIONS:
13 PARAL- unsigned integer n
LEL
BRAN-
CHES:
14 DATA string[3] n
REPRE-
SENTA-
TION:
15 IN- string[1] n
TEGER:
16 PLANE: string[1] n
17 SAMPLE WX.XXXXXXXXXXXXXXXXYZXZ n
RATE:
18 n
19 n
20 n
21 n
22 n
23 n
24 n
25 n
26 n
27 n
28 n ;last line of file header
______________________________________
HEADER SYNTAX As for AUDIO files. FIELD DESCRIPTION L0: FILENAME refers to the filename of this filter coefficient file without the .iir extension and does not include any path. L1: CREATION DATE is specified as YYYY MM DD HH:MM:SS. Single spaces are used to separate the year, month, day and time fields. Colons are used to separate hours, minutes and seconds. L2: FILE TYPE An IIR filter file is recognised by the ".iir" extension and the string "IIR Filter" on this line. L3: ORIGINATING PROCESS This field is generally used to specify the method of design used to derive the filter values. L4: PROJECT NAME The name of the project. L5, 6,7: TITLE, COMMENT1 and COMMENT2 The title and comment fields can be used in an unrestricted way. The comments may be used to record filter design parameters (eg the prototype analogue filter used to design digital IIR filter). Alternatively, the title can be global with the comment fields representing a hierarchy of local titles. L8: ORIGINATOR The designer's name. L9: NUMERATOR ORDER is the order of the filter's transfer function (ie the highest power of s or z). This field should be set to "2" if the Realisation field is set to "BIQUAD". L10: DENOMINATOR ORDER is the order of the filter's transfer function (ie the highest power of s or z). This field should be set to "2" if the Realisation field is set to "BIQUAD". L11: REALISATION One of the set [DIRECT, BIQUAD]. The file format is capable of handling multiple order direct form or parallel cascaded biquadratic section realisations. The direct form is useful for prototyping using floating point number representation for the filter values. The parallel cascaded biquadratic section approach is the usual way of hardware implementation and therefore is necessary to investigate finite wordlength effects on digital filter performance. L12: CASCADED SECTIONS The number of cascaded biquadratic sections per parallel branch, including any first order sections (see L13). It is assumed that the number of cascaded sections is the same for all parallel branches. This field should be set to "1" if the Realisation field is set to "DIRECT". L13: PARALLEL BRANCHES The number of parallel branches of cascaded sections. This field should be set to "1" if the Realisation field is set to "DIRECT". L14: DATA REPRESENTATION This field indicates how the filter data is stored in the file after the header. This could be set to indicate ASC or binary representations. L15: INTEGER One of the set [Y, N], indicating whether or not the filter values may be cast directly as INTEGERS in the application program. This would be used when investigating finite wordlength effects in digital filters. In such cases, the stored coefficients would not necessarily be normalised to unity. L16: PLANE One of the set [S, Z], indicating in which plane the filter values are specified. Normally, "S" implies an analogue filter and "Z" implies a digital filter. L17: SAMPLE RATE The sample rate at which the digital IIR filter was designed. For analogue filter data, this field should be set to 0. DATA FORMAT A general IIR filter may be represented in two ways as described earlier. The data format for each is specified below using some C-code structures.
______________________________________
REALISATION = DIRECT
PARALLEL BRANCHES = 1
CASCADED SECTIONS = 1
NUMERATOR ORDER = m
DENOMINATOR ORDER = n
for (i=0;i<=m;i++)
fscanf(iir.sub.-- fp,"%1f",&numerator.sub.-- filter.sub.-- value);
/*a0 to am */
for (i=0;i<=n;i++)
fscanf(iir.sub.-- fp,"%1f",&denominator.sub.-- filter.sub.-- value);
/*b0 to bn */
______________________________________
where fscanf is a read command, iir.sub.-- fp is a file identifier for the file to be read, %lf specifies the data is long floating point data and &numerator.sub.-- filter.sub.-- value/&denominator.sub.-- filter.sub.13 value are the identifiers for the data structure into which the read data is to be transferred.
______________________________________
REALISATION = BIQUAD
PARALLEL BRANCHES = p
CASCADED SECTIONS = c
NUMERATOR ORDER = 2
DENOMINATOR ORDER = 2
for (i=0;i<p;i++)
for (j=0;j<c;j++)
for (k=0;k<=2;k++)
fscanf(iir.sub.-- fp,"%1f",&numerator.sub.-- filter.sub.-- value);
/* a0 to a2 */
for (k=0;k<=2;k++)
fscanf(iir.sub.-- fp, "%1f",&denominator.sub.-- filter.sub.-- value)
/* b0 to b2 */
}
______________________________________
1. Filter,values are specified in ASCII format. 2. Each value takes the form: WX. XXXXXXXXXXXXXXXXYZXZ where W=one of the set [+, , -] X=one of the set [0,1,2,3,4,5,6,7,8,9] Y=one of the set [E,e,D,d] Z=one of the set [+, -] 3. Filter data starts on line 29. VIDEO GENERAL 1. This is a unified definition to encompass 2d and 3d data structures enabling video sequences to be represented in a standard way. 2. Data in the file after the header is stored in binary format. 3. Files that conform to the following description should use the ".vid" file extension. 4. Multiple components representing the same video sequence are stored in separate files. The following file naming restrictions are imposed for the standard components:
______________________________________
R (red): name.sub.-- R.vid
or name.sub.-- r.vid
G (green): name.sub.-- G.vid
or name.sub.-- g.vid
B (blue): name.sub.-- B.vid
or name.sub.-- b.vid
Y (luminance): name.sub.-- Y.vid
or name.sub.-- y.vid
C (chrominance):
name.sub.-- C.vid
or name.sub.-- c.vid
______________________________________
HEADER SYNTAX As for AUDIO files. FIELD DESCRIPTION L0: FILENAME refers to the filename of the video file without the ".vid" extension and does not include any path. L1: CREATION DATE is specified as YYYY MM DD HH:MM:SS. Single spaces are used to separate the year, month, day and time fields. Colons are used to separate hours, minutes and seconds. L2: FILE TYPE indicates that this file contains video data and is set to `Video Data`. L3: ORIGINATING PROCESS is the name of the program which spawned the video data. This can be useful for back-traceability. L4: PROJECT NAME is hopefully self-explanatory. L5-7: TITLE, COMMENT1 and COMMENT2 can be used in an unrestricted way to record any useful information about the data. L8: ORIGINATOR is the name of the person who created the video data file. L9: DIMENSIONS should be one of the set [1,2,3]anything else is as yet meaningless. L10: VIDEO DATA TYPE one of the set [Y,C,R,G,B,P,N]. Indicating the type of video data stored in the file Y - Luminance Component C - Chrominance Component (2 sub-sampled multiplexed colour difference components) R - Red Component G - Green Component B - Blue Component P - Composite PAL N - Composite NTSC L11: SIGNED one of the set [Y,N]indicating whether the video data is stored in signed format (Y) or unsigned format (N). If signed =`Y` then 2's compliment notation is used. L12: No BYTES PER SAMPLE indicates how many bytes are required to fully represent one video data sample, e.g. 8 bit data requires 1 byte only but 10 bit data will require 2 bytes. If more than one byte per sample is required, then the ordering is most significant byte first. The bits comprising the bytes are most significant bit first. Machine portability is ensured by accessing each sample as a sequence of `unsigned char` reads. L13: No ACTIVE BITS indicates how many bits of each sample contain valid video data, e.g. 10 bit data is represented by two bytes per sample but of these 16 bits only 10 will be active. The active data is stored in the most significant bits of the sample. L14: SCALE FACTOR This is an integer which gives the number of bits to the right of the binary point. For example if the video data consists of 12 bits of which four are after the binary point (i.e. the data has a resolution of 1/16 or 0.0625) then the scale factor will be 4. L15: INTERLACED one of the set [Y,N]to indicate whether the video data in the file is from a 2:1 interlace source, i.e. that re-interlacing of two fields is required to give a correct display. L16: FIRST FIELD No one of the set [0,1,2,3,4,5,6,7]to indicate the position of the first field of video data within an eight field sequence. [For composite NTSC only the set [0,1,2,3]will be valid.) [For Components only the set [0,1]will be valid.) L17,12,25: [H,V,T]SAMPLING RATE gives the sampling rate in Hertz in the horizontal, vertical and temporal dimensions of the video data, eg a 625 line 50 Hz 2:1 interlace source sampled according to CCIR recommendation 601 would have
______________________________________
H SAMPLING RATE 1.3500000000000000E + 07
V SAMPLING RATE 1.5625000000000000E + 04
T SAMPLING RATE 5.0000000000000000E + 01
______________________________________
L18,22,26: [H,V,T]ORIGINAL SIZE gives the size (in samples) of the original source before any extraction is performed. L19,23,27: [H,V,T]EXTRACT START gives the offset (in samples) from the origin of the original sequence at which the extracted region starts. L20,24,28: [H,V,T]EXTRACT SIZE gives the size of the extracted region (in samples). L29: TIMECODE REFERENCE gives the timecode equivalent of T EXTRACT START to allow video files to be reassembled according to their source sequence positions. TIMECODE REFERENCE is specified as HH:MM:SS:FF where H represents hours, M represents minutes, S represents seconds and F represents frames. All 11 characters must be present. L30: COMPRESSION Only lossless compression is supported. The string can taken on the values: NONE--no compression JPEG--lossless baseline JPEG compression LZA--Lempel-Ziv-Walsh compression L31: COLOUR MATRIX Standard colorimetry can be specified or a customized colour transformation matrix can be defined. 1: CCIR Rec.601 colour transformation matrix 2: SMPTE 240M colour transformation matrix 3-8: other standard colour transformation matrices 9: The colour matrix values are defined in a separate file (in the same directory) of the same name without the .sub.-- ? characters and with the extension .mtx. This file consists of 18 real numbers on 18 separate lines. The data order is determined by scanning each row of the forward matrix followed by each row of the inverse matrix. L32: GAMMA can be specified mathematically as a power function (y=power(x,1/g)) or an arbitrary gamma can be defined using a lookup table for each pixel value. 1: no gamma 2: g=2.2 3-8: other standard gamma values 9: The gamma curve is defined in a separate file (in the same directory) of the same name but with the extension .gam. This file consists of n real numbers on n separate lines. The value of n is determined by the number of active bits (n=256 for 8 active bits). L33: ASPECT RATIO is expressed as a real number by dividing the display device horizontal dimension by the display device vertical dimension. This field together with the H original size and V original size can be used to compute the pixel shape. VIDEO DATA FORMAT 1. Video data in the file is in binary format. 2. Video data starts on line 34. Lines 0 to 33 contain the header information. 3. If a data sequence is represented by a set of values D[h][v][t]where h, v and t are the horizontal, vertical and temporal sample positions respectively, then video data is stored in the file, after the header, in the following way
______________________________________
for (t=0;t<T EXTRACT SIZE;t++)
for (v=0;v<V EXTRACT SIZE;v++)
for (H=0;h<H EXTRACT SIZE;h++)
D[h][v][t];
______________________________________
4. The total number of bytes stored in a file should be No OF BYTES PER SAMPLE.times. H EXTRACT SIZE.times. V EXTRACT SIZE.times. T EXTRACT SIZE EXAMPLE SIGNAL PROCESSING FUNCTION TOOL As a more detailed example of a signal processing function tool and its requirements for attribute data from above detailed VIDEO header file, an image display tool XDISP will now be described. The attributes from the VIDEO header files described above that are required are indicated between parenthesis at the end of each paragraph. The most relevant points about this tool are as follows: 1. XDISP needs to know how many bytes are used to represent each pixel. A byte is the fundamental storage unit so that each pixel is represented by an integer multiple of bytes. XDISP also needs to know how many of the bits within the bytes ape active. For example, some video standards define 10 bits of pixel resolution so that 2 bytes per pixel ape required and the lower 10 bits of the 16 bits ape active. Also XDISP needs to know whether the active bits ape signed or unsigned and whether the values have been scaled or not. (No BYTES PER SAMPLE, No ACTIVE BITS, SIGNED, SCALE FACTOR) 2. XDISP needs to know how many pixels are contained on each line and also how many lines make up the image. (H ORIGINAL SIZE, V ORIGINAL SIZE) 3. The amount of data comprising an image is large so that it is possible to store this data in a lossless compressed format. If the compression option is set then XDISP must first uncompress the data using the appropriate algorithm before displaying. (COMPRESSION ) 4. XDISP has the ability to display a single component of an image (Y, C, R, G, B etc) or it can display an image in colour by installing the appropriate display look-up table. If a colour display is required then XDISP must retrieve all the components for the image. Since, the display look-up table can only store 256 colours, an optimisation routine is used to select 256 colours which will best match the image. This routine works in the R, G, B space so that images specified as Y, U, V must first be converted using the appropriate colour matrix. (DATA TYPE, COLOUR MATRIX <also file naming convention. I,-g,-b>). 5. XDISP could be modified to display a portion of an image. For example, a video file could represent the top left quarter of an image. To display this portion in the correct position, the following fields are used (assuming a 601 image). (H EXTRACT START =0, V EXTRACT =0, H EXTRACT SIZE =360, V EXTRACT SIZE =288). 6. For XDISP the following fields are fixed (T ORIGINAL SIZE (1), DIMENSION (2)) 7. For XDISP the following fields are irrelevant or have no meaning: (T EXTRACT START, T EXTRACT SIZE, FIRST FIELD NO, INTERLACED, ASPECT RATIO, TIMECODE REFERENCE, H SAMPLING RATE, V SAMPLING RATE, T SAMPLING RATE} 8. XDISP currently does not consult the GAMMA field and displays the data directly. However, if the data has been preprocessed using a gamma incompatible with the XDISP display device, then the data has to be undistorted first and then corrected using the compatible gamma. (GAMMA). Examples of further types of signal processing function tool that may be used with the system of this inventions are: DESIGN Window--Design a 1--D FIR filter Remez--Design a 1--D FIR filter S-Filter--Design analogue filter in S-plane Window 2--D--Design a 2--D FIR filter ANALYSIS Plot--Plots filter responses graphically Plot 2--D--Plots 2--D filter responses graphically Histogram--Produces histogram of data values Spectra--Produces spectral analysis by fast Fourier transform (FFT) Spectra 2-D--Produces 2-D spectral analysis by FFT SIMULATION Filter 1--D--Filters audio data Filter 2--D--Filters video files DCT--Transforms input into DCT coefficients UTILITIES Acquire audio--Record audio in audio file Display--Show 2--D images on workstation Audio display--Listen to audio on workstation Acquire 2/3--D--Record images in video file Animate 2/3--DShow moving image sequences These various example tools may be implemented using a computer program controlling a general purpose computer. The way to produce the above and other similar tools will be apparent to those skilled in the art. READ/WRITE UTILITIES Further details of the common read/write utilities of the above described system are as follows: Each of the file formats (video, audio, fir, iir, frequency response) have five utility programs associated with them. In the description below xxx refers to rid, and fir, iir or frq. 1. Read.sub.13 XXX This utility accesses a data files and transfers the header information into a predefined structure. The associated data is then stored in a linear block of memory which is reserved using another utility called allocate .sub.13 XXX. 2. Write .sub.13 XXX This utility transfers the information contained in the header structure to an output data file. The associated data is then transferred from memory to the data file. 3. Allocate.sub.13 XXX This utility reserves a specified amount of memory to store the data associated with a data file. This technique allows for efficient memory usage for all data sizes. 4. Get.sub.13 XXX This utility extracts a specified data value from the linear block of memory containing the data set. 5. Put--XXX This utility loads a specified data value into a linear block of memory reserved for the data set. It will be appreciated that the described embodiment of this invention is an implementation using computer software controlling a general purpose computer. Various computer program languages such as C, Fortran, Cobol and the like could be used. It will also be appreciated that having described the structure and interrelationship of the computer program together with the nature and format for the data to be stored in the various types of header and data file, many different computer programs could be produced that would implement the invention. Although illustrative embodiments of the invention have been described in detail herein with reference to the accompanying drawings, it is to be understood that the invention is not limited to those precise embodiments, and that various changes and modifications can be effected therein by one skilled in the art without departing from the scope and spirit of the invention as defined by the appended claims.
|
Same subclass Same class Consider this |
||||||||||
