[svn] / trunk / xvidcore / src / quant / x86_asm / quantize_mpeg_xmm.asm Repository:
ViewVC logotype

Diff of /trunk/xvidcore/src/quant/x86_asm/quantize_mpeg_xmm.asm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1792, Tue Sep 2 12:23:30 2008 UTC revision 1793, Tue Nov 11 20:46:24 2008 UTC
# Line 20  Line 20 
20  ; *  along with this program ; if not, write to the Free Software  ; *  along with this program ; if not, write to the Free Software
21  ; *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA  ; *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
22  ; *  ; *
23  ; * $Id: quantize_mpeg_xmm.asm,v 1.7 2008-08-19 09:06:48 Isibaar Exp $  ; * $Id: quantize_mpeg_xmm.asm,v 1.8 2008-11-11 20:46:24 Isibaar Exp $
24  ; *  ; *
25  ; ***************************************************************************/  ; ***************************************************************************/
26    
# Line 36  Line 36 
36                  %ifdef MARK_FUNCS                  %ifdef MARK_FUNCS
37                          global _%1:function %1.endfunc-%1                          global _%1:function %1.endfunc-%1
38                          %define %1 _%1:function %1.endfunc-%1                          %define %1 _%1:function %1.endfunc-%1
39                            %define ENDFUNC .endfunc
40                  %else                  %else
41                          global _%1                          global _%1
42                          %define %1 _%1                          %define %1 _%1
43                            %define ENDFUNC
44                  %endif                  %endif
45          %else          %else
46                  %ifdef MARK_FUNCS                  %ifdef MARK_FUNCS
47                          global %1:function %1.endfunc-%1                          global %1:function %1.endfunc-%1
48                            %define ENDFUNC .endfunc
49                  %else                  %else
50                          global %1                          global %1
51                            %define ENDFUNC
52                  %endif                  %endif
53          %endif          %endif
54  %endmacro  %endmacro
# Line 204  Line 208 
208    nop    nop
209    
210  ALIGN 16  ALIGN 16
211  .loop  .loop:
212    movq mm1, [eax + 8*esi+112]       ; mm0 = [1st]    movq mm1, [eax + 8*esi+112]       ; mm0 = [1st]
213    psubw mm0, mm1 ;-mm1    psubw mm0, mm1 ;-mm1
214    movq mm4, [eax + 8*esi + 120] ;    movq mm4, [eax + 8*esi + 120] ;
# Line 252  Line 256 
256    movq [edx + 8*esi +120-16], mm7    movq [edx + 8*esi +120-16], mm7
257    jng near .loop    jng near .loop
258    
259  .done  .done:
260  ; calculate  data[0] // (int32_t)dcscalar)  ; calculate  data[0] // (int32_t)dcscalar)
261    paddw mm2, [ebx]    paddw mm2, [ebx]
262    mov ebx, [esp+24]    mov ebx, [esp+24]
# Line 268  Line 272 
272    ret    ret
273    
274  ALIGN 16  ALIGN 16
275  .q1loop  .q1loop:
276    movq mm1, [eax + 8*esi+112]       ; mm0 = [1st]    movq mm1, [eax + 8*esi+112]       ; mm0 = [1st]
277    psubw mm0, mm1                    ;-mm1    psubw mm0, mm1                    ;-mm1
278    movq mm4, [eax + 8*esi+120]    movq mm4, [eax + 8*esi+120]
# Line 317  Line 321 
321    jmp near .done    jmp near .done
322    
323  ALIGN 8  ALIGN 8
324  .lloop  .lloop:
325    movq mm1, [eax + 8*esi+112]       ; mm0 = [1st]    movq mm1, [eax + 8*esi+112]       ; mm0 = [1st]
326    psubw mm0,mm1         ;-mm1    psubw mm0,mm1         ;-mm1
327    movq mm4, [eax + 8*esi+120]    movq mm4, [eax + 8*esi+120]
# Line 367  Line 371 
371    movq [edx + 8*esi +120-16], mm7    movq [edx + 8*esi +120-16], mm7
372    jng near .lloop    jng near .lloop
373    jmp near .done    jmp near .done
374  .endfunc  ENDFUNC
375    
376    
377  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
# Line 487  Line 491 
491    
492    xor eax, eax    xor eax, eax
493    ret    ret
494  .endfunc  ENDFUNC
495    
496  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
497  ;  ;
# Line 522  Line 526 
526    nop4    nop4
527    
528  ALIGN 16  ALIGN 16
529  .loop  .loop:
530    movq mm0, [ecx+8*eax + 7*16   ]   ; mm0 = coeff[i]    movq mm0, [ecx+8*eax + 7*16   ]   ; mm0 = coeff[i]
531    pcmpgtw mm1, mm0  ; mm1 = sgn(c)    (preserved)    pcmpgtw mm1, mm0  ; mm1 = sgn(c)    (preserved)
532    movq mm2, [ecx+8*eax + 7*16 +8]   ; mm2 = coeff[i+1]    movq mm2, [ecx+8*eax + 7*16 +8]   ; mm2 = coeff[i+1]
# Line 602  Line 606 
606    
607    xor eax, eax    xor eax, eax
608    ret    ret
609  .endfunc  ENDFUNC
610    
611    
612  %ifidn __OUTPUT_FORMAT__,elf  %ifidn __OUTPUT_FORMAT__,elf

Legend:
Removed from v.1792  
changed lines
  Added in v.1793

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4