Einzelnen Beitrag anzeigen

Benutzerbild von Amnon82
Amnon82

Registriert seit: 5. Jan 2005
186 Beiträge
 
FreePascal / Lazarus
 
#1

HEX und String (Bit 6 auslesen)

  Alt 18. Mär 2006, 22:31
Ich hab ein Problem.

Ich code grad an einem kleinen Tool um D2V-Dateien in Delphi zu prasen.

Hier mal die relevanten Auszüge aus dem D2V-Handbuch:

Zitat:
Following is a typical data section (real ones will typically be much longer):
d00 6 0 0 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 384035 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 768034 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 1152609 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0
d00 6 0 1537064 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0

Therefore, the second line in the typical data section given above would break down as follows:

info matrix file position vob cell flags
d00 6 0 384035 0 0 b0 b0 90 b0 b0 a0 b0 b0 a0 b0 b0 a0 b0 b0 a0

The info field is a 12-bit hex number bit-mapped as follows:

bit 11 1 (Always 1 to signal start of data line)
bit 10 1 (This line's pictures are part of a closed GOP)
0 (Open GOP)
bit 9 1 (This line's pictures are part of a progressive sequence)
0 (Otherwise)
bit 8 1 (This I picture starts a new GOP)
0 (Otherwise)
bits 7-0 0 (Reserved)

The sequence of Flags fields contains per-picture data corresponding to the pictures in display order, that is, the Flags fields are re-ordered into display order. End Of Stream is signaled with a Flags field value of ff. Each per-picture Flags field is an 8-bit hex number bit-mapped as follows:

bit 7 1 (Picture is decodable without the previous GOP)
0 (Otherwise)
bit 6 Progressive_Frame Flag (See notes below)
0 (Interlaced)
1 (Progressive)
bits 5-4 Picture_Coding_Type Flag
00 (Reserved)
01 (I-Frame)
10 (P-Frame)
11 (B-Frame)
bits 3-2 00 (Reserved)
01 (Reserved)
10 (Reserved)
11 (Reserved)
bit 1 TFF Flag
bit 0 RFF Flag
Ich möchte nun gerne den Wert für Bit 6 herausfinden:

bit 6 Progressive_Frame Flag (See notes below)
0 (Interlaced)
1 (Progressive)

Nur wie?

D2VParse Thread @ doom9.org
  Mit Zitat antworten Zitat