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

Diff of /trunk/xvidcore/src/quant/x86_asm/quantize_mpeg_mmx.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 21  Line 21 
21  ; *  along with this program ; if not, write to the Free Software  ; *  along with this program ; if not, write to the Free Software
22  ; *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA  ; *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
23  ; *  ; *
24  ; * $Id: quantize_mpeg_mmx.asm,v 1.9 2008-08-19 09:06:48 Isibaar Exp $  ; * $Id: quantize_mpeg_mmx.asm,v 1.10 2008-11-11 20:46:24 Isibaar Exp $
25  ; *  ; *
26  ; *************************************************************************/  ; *************************************************************************/
27    
# Line 34  Line 34 
34                  %ifdef MARK_FUNCS                  %ifdef MARK_FUNCS
35                          global _%1:function %1.endfunc-%1                          global _%1:function %1.endfunc-%1
36                          %define %1 _%1:function %1.endfunc-%1                          %define %1 _%1:function %1.endfunc-%1
37                            %define ENDFUNC .endfunc
38                  %else                  %else
39                          global _%1                          global _%1
40                          %define %1 _%1                          %define %1 _%1
41                            %define ENDFUNC
42                  %endif                  %endif
43          %else          %else
44                  %ifdef MARK_FUNCS                  %ifdef MARK_FUNCS
45                          global %1:function %1.endfunc-%1                          global %1:function %1.endfunc-%1
46                            %define ENDFUNC .endfunc
47                  %else                  %else
48                          global %1                          global %1
49                            %define ENDFUNC
50                  %endif                  %endif
51          %endif          %endif
52  %endmacro  %endmacro
# Line 237  Line 241 
241    
242    xor eax, eax              ; return(0);    xor eax, eax              ; return(0);
243    ret    ret
244  .endfunc  ENDFUNC
245    
246    
247  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
# Line 275  Line 279 
279    movq mm7, [mmx_div + eax * 8 - 8] ; divider    movq mm7, [mmx_div + eax * 8 - 8] ; divider
280    
281  ALIGN 16  ALIGN 16
282  .loop  .loop:
283    movq mm0, [esi + 8*ecx]       ; mm0 = [1st]    movq mm0, [esi + 8*ecx]       ; mm0 = [1st]
284    movq mm3, [esi + 8*ecx + 8]   ;    movq mm3, [esi + 8*ecx + 8]   ;
285    pxor mm1, mm1                 ; mm1 = 0    pxor mm1, mm1                 ; mm1 = 0
# Line 315  Line 319 
319    cmp ecx, 16    cmp ecx, 16
320    jnz near .loop    jnz near .loop
321    
322  .done  .done:
323    pmaddwd mm5, [mmx_one]    pmaddwd mm5, [mmx_one]
324    movq mm0, mm5    movq mm0, mm5
325    psrlq mm5, 32    psrlq mm5, 32
# Line 330  Line 334 
334    ret    ret
335    
336  ALIGN 16  ALIGN 16
337  .q1loop  .q1loop:
338    movq mm0, [esi + 8*ecx]       ; mm0 = [1st]    movq mm0, [esi + 8*ecx]       ; mm0 = [1st]
339    movq mm3, [esi + 8*ecx+ 8]    movq mm3, [esi + 8*ecx+ 8]
340    pxor mm1, mm1                 ; mm1 = 0    pxor mm1, mm1                 ; mm1 = 0
# Line 371  Line 375 
375    jmp .done    jmp .done
376    
377  ALIGN 16  ALIGN 16
378  .q2loop  .q2loop:
379    movq mm0, [esi + 8*ecx]       ; mm0 = [1st]    movq mm0, [esi + 8*ecx]       ; mm0 = [1st]
380    movq mm3, [esi + 8*ecx+ 8]    movq mm3, [esi + 8*ecx+ 8]
381    pxor mm1, mm1                 ; mm1 = 0    pxor mm1, mm1                 ; mm1 = 0
# Line 410  Line 414 
414    jnz near .q2loop    jnz near .q2loop
415    
416    jmp .done    jmp .done
417  .endfunc  ENDFUNC
418    
419    
420  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
# Line 478  Line 482 
482    pxor mm6, mm6     ; this is a NOP    pxor mm6, mm6     ; this is a NOP
483    
484  ALIGN 16  ALIGN 16
485  .loop  .loop:
486    movq mm0, [ecx+8*eax + 8*16]   ; mm0 = c  = coeff[i]    movq mm0, [ecx+8*eax + 8*16]   ; mm0 = c  = coeff[i]
487    movq mm3, [ecx+8*eax + 8*16 +8]; mm3 = c' = coeff[i+1]    movq mm3, [ecx+8*eax + 8*16 +8]; mm3 = c' = coeff[i+1]
488    pxor mm1, mm1    pxor mm1, mm1
# Line 550  Line 554 
554    pop ebx    pop ebx
555    
556    ret    ret
557  .endfunc  ENDFUNC
558    
559  ;-----------------------------------------------------------------------------  ;-----------------------------------------------------------------------------
560  ;  ;
# Line 582  Line 586 
586    pxor mm6, mm6     ; mismatch sum    pxor mm6, mm6     ; mismatch sum
587    
588  ALIGN 16  ALIGN 16
589  .loop  .loop:
590    movq mm0, [ecx+8*eax + 8*16   ]   ; mm0 = coeff[i]    movq mm0, [ecx+8*eax + 8*16   ]   ; mm0 = coeff[i]
591    movq mm2, [ecx+8*eax + 8*16 +8]   ; mm2 = coeff[i+1]    movq mm2, [ecx+8*eax + 8*16 +8]   ; mm2 = coeff[i+1]
592    add eax, 2    add eax, 2
# Line 664  Line 668 
668    pop ebx    pop ebx
669    
670    ret    ret
671  .endfunc  ENDFUNC
672    
673    
674  %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