Changeset 466


Ignore:
Timestamp:
Oct 8, 2009, 10:50:34 AM (16 years ago)
Author:
Paul Smedley
Message:

Fixes/optimisation from Pasha for convert.asm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OCO/trunk/drv16/convert.asm

    r33 r466  
    297297            PushRegs
    298298            SetupParameters
     299;;PS+++ 20090927
     300            test  ecx,ecx                     ; be sure 4gb we don't want to convert
     301            jnz   short RightPar
     302;;            int   3
     303            jmp   short ExitCon8MT16SC
     304RightPar:
     305;;End PS
    299306           
    300307;unoptimized
    301308            xor  eax, eax
    302309loopm8st16signchange:           
    303             mov  ah, byte ptr [esi]     ; stereo_sample = ((mono_sample8 ^ 0x80) << 24) | ((mono_sample8 ^ 0x80) << 8)
    304             xor  ah, 80h
     310;;PS+++ optimizations 20090927
     311            db   67h
     312            lodsb
     313            xor  al,80h
     314;;            mov  ah, byte ptr [esi]     ; stereo_sample = ((mono_sample8 ^ 0x80) << 24) | ((mono_sample8 ^ 0x80) << 8)
     315;;            xor  ah, 80h
    305316            mov  bx, ax
    306             shl  eax, 16
    307             mov  ax, bx
    308            
    309             dec  ecx
    310            
    311             mov  dword ptr [edi], eax
    312             inc  esi
    313             add  edi, 4
    314 
    315             cmp  ecx, 0
    316             jnz  loopm8st16signchange
    317 
     317;;            shl  eax, 16
     318            shl  eax, 16+8
     319;;            mov  ax, bx
     320            mov  ah, bl
     321           
     322;;            dec  ecx
     323           
     324;;            mov  dword ptr [edi], eax
     325            db   67h
     326            stosd
     327;;            inc  esi
     328;;            add  edi, 4
     329
     330;;            cmp  ecx, 0
     331;;            jnz  loopm8st16signchange
     332            loop   short  loopm8st16signchange
     333;;PS End optimiztions
     334ExitCon8MT16SC:
    318335            PopRegs
    319336            ret
     
    661678
    662679            shr  ecx, 1                 ;sample size = 2           
    663            
     680;;PS+++ 20090927
     681            test  ecx,ecx                     ; be sure 4gb we don't want to convert
     682            jnz   short RightParC16MT16S
     683;;            int   3
     684            jmp   short ExitCon16MT16S
     685RightParC16MT16S:
     686           
    664687;unoptimized
    665688loopm16m16st:
     
    677700            cmp  ecx, 0
    678701            jnz  loopm16m16st
     702ExitCon16MT16S:
    679703
    680704            PopRegs
Note: See TracChangeset for help on using the changeset viewer.