Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
996 B

  1. // $Header: G:/SwDev/WDM/Video/bt848/rcs/Distr.cpp 1.2 1998/04/29 22:43:33 tomz Exp $
  2. #include "mytypes.h"
  3. #define label( x ) } x: _asm {
  4. void CreateDistribution( WORD OrigFPS, WORD NeededFPS, PWORD lpwDistribution )
  5. {
  6. _asm {
  7. push edi
  8. mov edi, dword ptr lpwDistribution
  9. // mov es, word ptr lpwPixWidthMap+2
  10. mov ax, NeededFPS
  11. shl eax, 16
  12. movzx ecx, word ptr OrigFPS
  13. or cx, cx
  14. jz short end
  15. xor edx, edx
  16. div ecx
  17. mov ebx, eax
  18. mov eax, 8000H
  19. label( L1 ) and eax, 0FFFFh
  20. add eax, ebx
  21. shld edx, eax, 16
  22. mov [edi], dx
  23. add edi,2
  24. dec cx
  25. jnz short L1
  26. label( end )
  27. pop edi
  28. }
  29. }