Hi,
Since
nobody answered my question, let me state my question more specifically.
Here are 2 bitstream generated from OSS software for H.245
commands:
02400106 00088175 00075800 00010001 003C8400 002E0001
800180
and,
02400106 00088175 00075800 00010001 003C05C0
01800100
The
first bitstream, if we interpret it bit-by-bit, we have:
02 0
MultimediaSystemControlMessage, no extension
00 MultimediaSystemControlMessage, choice = 1
0 RequestMessage, no extension
0010 RequestMessage, choice = 3
40 0 TerminalCapabilitySet, no extension
100 TerminalCapabilitySet, option = 0x80
0000 byte-alignment
01 0000 0001 Sequence Number, value = 1
06 0000 0110 ProtocolIdentifier, length = 6 bytes
00 0000 0000
08 0000 1000
81 1000 0001
75 0111 0101
00 0000 0000
07 0000 0111 ProtocolIdentifier, Id = 0x000881750007
58 0 MultiplexCapability, no extension
10 MultiplexCapability, choice = 3
1 H223Capability, with extension
1 TransportWithI_frames, TRUE
0 VideoWithAL1, FALSE
0 VideoWithAL2, FALSE
0 VideoWithAL3, FALSE
00 0 AudioWithAL1, FALSE
0 AudioWithAL2, FALSE
0 AudioWithAL3, FALSE
0 DataWithAL1, FALSE
0 DataWithAL2, FALSE
0 DataWithAL3, FALSE
00 byte-alignment
00 0000 0000
01 0000 0001 MaximumAl2SDUSize, value = 1
00 0000 0000
01 0000 0001 MaximumAl3SDUSize, value = 1
00 0000 0000
3C 0011 1100 MaximumDelayJitter, value = 60
84 1 H223MultiplexTableCapability, choice = 2
0 Enhanced, no extension
0001 MaximumNestingDepth, value = 2
00 byte-alignment
00 0000 0000 MaximumElementListSize, value = 2
00 0000 0000 MaximumSubElementListSize, value = 2
2E 0010 1 Indicates 6 extension elements <-- 5 bits long***
110
00 000 Extension option = 0xC0
00000 byte-alignment
01 0000 0001 1 byte for the next extension element
80 1 MaxMUXPDUSizeCapablility, TRUE
000 0000 byte-alignment
01 0000 0001 1 byte for the next extension element
80 1 NsrpSupport, TRUE
000 0000 byte-alignment
00 MultimediaSystemControlMessage, choice = 1
0 RequestMessage, no extension
0010 RequestMessage, choice = 3
40 0 TerminalCapabilitySet, no extension
100 TerminalCapabilitySet, option = 0x80
0000 byte-alignment
01 0000 0001 Sequence Number, value = 1
06 0000 0110 ProtocolIdentifier, length = 6 bytes
00 0000 0000
08 0000 1000
81 1000 0001
75 0111 0101
00 0000 0000
07 0000 0111 ProtocolIdentifier, Id = 0x000881750007
58 0 MultiplexCapability, no extension
10 MultiplexCapability, choice = 3
1 H223Capability, with extension
1 TransportWithI_frames, TRUE
0 VideoWithAL1, FALSE
0 VideoWithAL2, FALSE
0 VideoWithAL3, FALSE
00 0 AudioWithAL1, FALSE
0 AudioWithAL2, FALSE
0 AudioWithAL3, FALSE
0 DataWithAL1, FALSE
0 DataWithAL2, FALSE
0 DataWithAL3, FALSE
00 byte-alignment
00 0000 0000
01 0000 0001 MaximumAl2SDUSize, value = 1
00 0000 0000
01 0000 0001 MaximumAl3SDUSize, value = 1
00 0000 0000
3C 0011 1100 MaximumDelayJitter, value = 60
84 1 H223MultiplexTableCapability, choice = 2
0 Enhanced, no extension
0001 MaximumNestingDepth, value = 2
00 byte-alignment
00 0000 0000 MaximumElementListSize, value = 2
00 0000 0000 MaximumSubElementListSize, value = 2
2E 0010 1 Indicates 6 extension elements <-- 5 bits long***
110
00 000 Extension option = 0xC0
00000 byte-alignment
01 0000 0001 1 byte for the next extension element
80 1 MaxMUXPDUSizeCapablility, TRUE
000 0000 byte-alignment
01 0000 0001 1 byte for the next extension element
80 1 NsrpSupport, TRUE
000 0000 byte-alignment
For
the second bitstream, the first 16 bytes are identical to the first one.
We may look at the last 8 bytes and we have:
00 0000 0000
3C 0011 1100 MaximumDelayJitter, value = 60
05 0 H223MultiplexTableCapability, choice = 1
basic
000 0101 Indicates 6 extension elements <-- 7 bits long***
C0 110000 Extension option = 0xC0
00 byte-alignment
01 0000 0001 1 byte for the next extension element
80 1 MaxMUXPDUSizeCapablility, TRUE
000 0000 byte-alignment
01 0000 0001 1 byte for the next extension element
00 0 NsrpSupport, FALSE
000 0000 byte-alignment
00 0000 0000
3C 0011 1100 MaximumDelayJitter, value = 60
05 0 H223MultiplexTableCapability, choice = 1
basic
000 0101 Indicates 6 extension elements <-- 7 bits long***
C0 110000 Extension option = 0xC0
00 byte-alignment
01 0000 0001 1 byte for the next extension element
80 1 MaxMUXPDUSizeCapablility, TRUE
000 0000 byte-alignment
01 0000 0001 1 byte for the next extension element
00 0 NsrpSupport, FALSE
000 0000 byte-alignment
Compare those bits before extension option or bit_mask (which I mark ***
up there). Does anybody know how to determine how many bits should we use
while encoding? 5 bits or 7 bits?
Why?
Ka-Fong Tang
-----Original Message-----
From: PD20 Ka Fong Tang
Sent: Tuesday, May 08, 2001 10:31 AM
To: [EMAIL PROTECTED]
Subject: [ASN.1] extend bit_maskHi,
I have a question about extensible bit_mask of Sequence Type when extend bit is present. In the encoded ASN.1 bitstream, when a Sequence Type has an extend bit = 1, there will be several (usually, 5 or 7) bits before extensible bit_mask indicate the number of extensible elements in the current structure. How do we determine if it is 5 or 7 or any other number? Does it have a rule?
Ka-Fong Tang