Einzelnen Beitrag anzeigen

derMischka

Registriert seit: 21. Jun 2007
Ort: Dresden
32 Beiträge
 
Delphi 7 Professional
 
#6

AW: Bit Reverse Algorithmus

  Alt 21. Jun 2017, 16:27
Zitat:
Zu Deinem Problem der variablen Länge: Ich gehe davon aus, daß sich die Bitfolge immer glatt in Nibbles aufteilen läßt
Nein, z.B. 9 Bit sind auch möglich.

selbst eine Assembler LUT version wäre nicht so klein ...

Pseudo-Asm-Code

Code:
  // eax = Value
  // edx = BitCount
  movzx ecx, al
  mov  cl, [LUT + ebx]
  movzx ebx, ah
  mov  ch, [LUT + ebx]
  shr  eax, 16
  movzx ebx, al
  mov  bl, [LUT + ebx]
  shr  eax, 8
  mov  bh, [LUT + eax]
  or   ebx, ecx
  bswap ebx
  mov  ecx, edx
  rol  ebx, cl
  mov  eax, ebx

Geändert von derMischka (21. Jun 2017 um 16:32 Uhr)
  Mit Zitat antworten Zitat