[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 1719, Tue Jul 11 10:01:27 2006 UTC revision 1728, Fri Sep 22 03:40:11 2006 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.7 2006-07-11 10:01:27 chl Exp $  ; * $Id: quantize_mpeg_mmx.asm,v 1.8 2006-09-22 03:40:11 syskin Exp $
25  ; *  ; *
26  ; *************************************************************************/  ; *************************************************************************/
27    
# Line 221  Line 221 
221    ; calculate DC    ; calculate DC
222    movsx eax, word [eax]     ; data[0]    movsx eax, word [eax]     ; data[0]
223    mov ecx, [esp + 4 + 16]   ; dcscalar    mov ecx, [esp + 4 + 16]   ; dcscalar
224    mov edx, ecx    mov edx, eax
225    shr edx, 1                ; edx = dcscalar /2    mov edi, ecx
226    mov edi, edx    shr ecx, 1                ; ecx = dcscalar/2
227    neg edi    sar edx, 31               ; edx = sign extend of eax (ready for division too)
228      xor ecx, edx              ; adjust ecx according to the sign of data[0]
229    cmp eax, 0    sub ecx, edx
230    cmovg edx, edi    add eax, ecx
231    sub eax, edx  
232      mov ecx, [esp + 4 + 4]        ; coeff again
233    mov edi, [esp + 4 + 4]        ; coeff again    idiv edi                  ; eax = edx:eax / dcscalar
234      mov [ecx], ax             ; coeff[0] = ax
   cdq                       ; expand eax -> edx:eax  
   idiv ecx                  ; eax = edx:eax / dcscalar  
   
   mov [edi], ax             ; coeff[0] = ax  
235    
236    pop edi    pop edi
237    

Legend:
Removed from v.1719  
changed lines
  Added in v.1728

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