A II.1 Subheader Values 1.1 File Number The file number is used to identify all sectors that belong to one file. A given file may be physically interleaved with other files on the disc. All sectors of a logical file have the same value in the file number byte. The file number can be used to select sectors that belong to the same logical file and to reject any others. The file number with a byte value of 0 is only used for a file that will be read consecutively. No interleaving is possible with file 0. Files 1 to 255 (see Figure A.II.1) may be read consecutively or may be interleaved with other files. Figure A.II.1 ______________________________________ _ Byte Value _ File Number _ ______________________________________ _ 0000 0000 _ 0 (consecutive sector _ _ _ reading only) _ _ 0000 0001 _ 1 _ _ 0000 0010 _ 2 _ _ : _ : _ _ 1111 1111 _ 255 _ ______________________________________ 1.2 Channel Number A real-time record may contain several information channels. Two notable reasons why this is allowed are: - to minimize the amount of disc space wasted by gaps between audio blocks, and - to allow one of several mutually exclusive sequences to accompany each other, e.g. one of a set of audio sequences with a video sequence. A real-time record is created by merging several different pieces of information together. When this is done, each logical segment may be given a unique channel number, which is recorded in the second and sixth bytes of the subheader. Each real-time record has a maximum of 32 channels (channel numbers 0-31). Because the maximum number of audio channels is 16, audio sectors can only use channel numbers 0 to 15. In order to conserve channel codes and simplify programming, a common channel number can be used for sectors that are always to be selected together, regardless of the type of coding information (audio, video, etc.) contained in the sector. Upon playback, any combination of channels in the record may be played together if such a combination is allowed in the Base Case System. The selection is controlled by a 32-bit channel selection register. Each bit in the register corresponds to one subheader channel number. If a bit is set to one in the channel selection register, the sectors for the corresponding channel number are selected. If the bit is reset, i.e. to zero, sectors for the corresponding channel are ignored. The assignment of bits in the channel selection register is illustrated in Figure A.II.2. Figure A.II.2 31 23 15 0 _________________________________________ _1000 0000_0000 0001_0001 0000_0000 0001_ _________________________________________ For the channel selection register depicted in Figure A.II.2, sectors would be selected if their subheader contained channel number 0, 12, 16, or 31. Real-time records are always played back asynchronously. This means that the application program requesting playback continues to execute concurrently. It is possible for the application to change the channel selection register while playback is in progress, allowing an instantaneous switch between channels in real-time. Non-real-time records can use any channel number (0 - 31). Figure A.II.3 _____________________________________________ _ Channel Byte _ Channel Number _ Data _ _____________________________________________ _ 0000 0000 _ 0 _ A _ V _ D _ _ 0000 0001 _ 1 _ A _ V _ D _ _ : _ : _ : _ : _ : _ _ 0000 1111 _ 15 _ A _ V _ D _ _ 0001 0000 _ 16 _ - _ V _ D _ _ : _ : _ : _ : _ : _ _ 0001 1111 _ 31 _ - _ V _ D _ _ 0010 0000 _ reserved _ - _ - _ - _ _ : _ : _ : _ : _ : _ _ 1111 1111 _ reserved _ - _ - _ - _ _____________________________________________ Figure A.II.3 gives which channel numbers may be used. Channel numbers can be used for audio (A), video (V) and program related data (D) sectors, but audio channel numbers must be within the range of 0 to 15. The audio channel selection for the ADPCM decoder is controlled by a separate 16-bit audio channel selection register. Any audio channels selected by the 32-bit register but not the 16-bit register are transferred to the host system along with the other (non-audio) channels; the audio channel selected by the 16-bit register is transferred to the audio processor. 1.3 Submode The submode byte is bit-encoded as shown in Figure A.II.4. Figure A.II.4 _______________________________________ _ bit number _ Meaning _ _______________________________________ _ 7 _ End-Of-File (EOF) _ _ 6 _ Real-Time sector (RT) _ _ 5 _ Form (F) _ _ 4 _ Trigger (T) _ _ 3 _ Data (D) _ _ 2 _ Audio (A) _ _ 1 _ Video (V) _ _ 0 _ End Of Record (EOR) _ _______________________________________ End Of File (EOF) :This bit is set to one for the last sector of a file. Only the last sector of a file can have this bit set to one. Real-Time sector (RT):This bit must be set to one for all sectors that are part of a real-time file. This means that the data has to be processed without interrupting the real-time behaviour of the CD-I system. Form (F) :This bit is zero for all sectors recorded in Form 1 and set to one for all sectors recorded in Form 2. Trigger (T) :This bit is used for real-time synchron- ization of video, audio and program related data (e.g. text). It generates an interrupt when set to one (see VII.4). Data (D) :This bit is set to one for all sectors that contain program related data. When this bit is set to one, the form bit must be zero. Audio (A) :This bit is set to one for all sectors that contain audio data. When this bit is set to one the form bit is also set to one. Video (V) :This bit is set to one for all sectors that contain video data. End Of Record (EOR):This bit must be set to one for the last sector of a logical record. Only the last sector of a record can have this bit set to one. The use of the EOR bit is only mandatory for real-time records. The allowable combinations of the form, audio, video and data bits are specified in Figure A.II.5. Figure A.II.5 __________________________________________________ _ Coding _ Form 1 _ Form 2 _ _ (bits 3,2,1) _ (Form bit = 0) _ (Form bit = 1) _ __________________________________________________ _ Audio = 1 _ NA _ OK _ _ _ _ _ _ Video = 1 _ OK [NRT] _ OK _ _ _ _ _ _ Data = 1 _ OK _ NA _ __________________________________________________ where OK = allowed combination NA = not allowed combination NRT = only to be used for non-real-time sectors Only one of the data, audio and video bits can be set to one at the same time in any sector. If all bits of the submode byte are zero except the Form bit, then the sector does not contain any CD-I data and so is either an empty sector or a message sector. One of bit 1, bit 2 and bit 3 must be set to the value 1 for all sectors except empty or message sectors. It should be noted that the combination of the Video bit (bit 1) set to one, the Form bit (bit 5) set to zero and the Real-Time sector bit (bit 6) set to one is reserved for full screen, full motion quality video. An audio sector must contain 2304 bytes and therefore cannot be used in Form 1. A data sector cannot be used in Form 2 because data errors cannot be concealed and the integrity of the data cannot be guaranteed. Since Form 1 real time sectors may not be corrected in case of error, if this would endanger the real time behaviour of the system, it is recommended: - to group all the Form 1 sectors that need to be corrected in a separate record placed just before the real time record and to declare these Form 1 sectors as "non real time" (RT = 0) - not to mix, in the same record, real time and non real time sectors. 1.4 Coding Information 1.4.1 Audio The audio Coding Information byte is defined as follows: _____________________________________________________________ _ 0 _Emphasis_Bits per Sample_Sampling Frequency_Mono/Stereo_ _____________________________________________________________ bit 7 6 5 4 3 2 1 0 Reserved Bit 7 = Zero Emphasis (see IV.4.2) Bit 6 0 = Emphasis off 1= Emphasis on Number of Bits per Sample Bits 5-4 0 0= 4 bits 0 1 = 8 bits 1 0 = Reserved 1 1 = Reserved Sampling Frequency Bits 3-2 0 0 = 37.8 kHz 01 = 18.9 kHz 1 0 = Reserved 1 1 = Reserved Mono/Stereo Bits 1-0 0 0 = Mono 0 1 = Stereo 1 0 = Reserved 1 1 = Reserved 1.4.2Video Details of the coding method and resolution of each video data sector are contained in the Video Coding Information Byte in the subheader of each video sector. The format of this byte is: _____________________________________ _ ASCF _ EOLF _ Resolution _ Coding _ _____________________________________ bit 7 6 5 4 3 2 1 0 where ASCF = Application Specific Coding Flag Bit 7 0 = coding conforms to the specification of chapter V 1 = coding is application-specific, i.e. to be inter- preted by application software. EOLF = Even/Odd Line Bit 6 0 =Even lines 1 =Odd lines If error concealment is to be used, this flag indicates whether the sector contains the even or the odd lines of the image. If error concealment is not to be used, this bit is set to zero. Resolution Bits 5-4 0 0 = Normal 0 1 = Double 1 0 = Reserved 1 1= High Coding Bits 3 2 1 0 0 0 0 0 = CLUT4 1000 QHY 0 0 0 1 =CLUT7 1001 to 1111 Reserved 0 0 1 0 =CLUT8 0 0 1 1 =RL3 0 1 0 0 =RL7 0 1 0 1 =DYUV 0 1 1 0 =RGB555 (lower) 0 1 1 1 =RGB555 (upper) 1.4.3Data The data or program related data Coding Information byte is defined as follows: _____________________________________________ _ _ (Reserved) _ _____________________________________________ bit 7 0