[svn] / branches / dev-api-3 / xvidcore / src / image / x86_asm / colorspace_rgb_mmx.asm Repository:
ViewVC logotype

Diff of /branches/dev-api-3/xvidcore/src/image/x86_asm/colorspace_rgb_mmx.asm

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

revision 630, Wed Nov 6 21:05:30 2002 UTC revision 631, Thu Nov 7 10:31:03 2002 UTC
# Line 1  Line 1 
1  ;/**************************************************************************  ;/**************************************************************************
2  ; *  ; *
3  ; *     XVID MPEG-4 VIDEO CODEC  ; *     XVID MPEG-4 VIDEO CODEC
4  ; *     colorspace  ; *     colorspace rgb
5  ; *  ; *
6  ; *     This program is free software; you can redistribute it and/or modify  ; *     This program is free software; you can redistribute it and/or modify
7  ; *     it under the terms of the GNU General Public License as published by  ; *     it under the terms of the GNU General Public License as published by
# Line 94  Line 94 
94    
95    
96  ;------------------------------------------------------------------------------  ;------------------------------------------------------------------------------
97  ; RGB_TO_YV12( BYTES )  ; BGR_TO_YV12( BYTES )
98  ;  ;
99  ; BYTES         3=rgb24, 4=rgb32  ; BYTES         3=bgr(24bit), 4=bgra(32-bit)
100  ;  ;
101  ; bytes=3/4, pixels = 2, vpixels=2  ; bytes=3/4, pixels = 2, vpixels=2
102  ;------------------------------------------------------------------------------  ;------------------------------------------------------------------------------
103  %macro RGB_TO_YV12_INIT         2  %macro BGR_TO_YV12_INIT         2
104                  movq mm7, [y_mul]                  movq mm7, [y_mul]
105  %endmacro  %endmacro
106    
107    
108  %macro RGB_TO_YV12                      2  %macro BGR_TO_YV12                      2
109                  ; y_out                  ; y_out
110                  pxor mm4, mm4                  pxor mm4, mm4
111                  pxor mm5, mm5                  pxor mm5, mm5
# Line 194  Line 194 
194    
195    
196  ;------------------------------------------------------------------------------  ;------------------------------------------------------------------------------
197  ; YV12_TO_RGB( BYTES )  ; YV12_TO_BGR( BYTES )
198  ;  ;
199  ; BYTES         3=rgb24, 4=rgb32  ; BYTES         3=bgr(24-bit), 4=bgra(32-bit)
200  ;  ;
201  ; bytes=3/4, pixels = 8, vpixels=2  ; bytes=3/4, pixels = 8, vpixels=2
202  ;------------------------------------------------------------------------------  ;------------------------------------------------------------------------------
203  %macro YV12_TO_RGB_INIT         2  %macro YV12_TO_BGR_INIT         2
204                  pxor mm7, mm7                   ; clear mm7                  pxor mm7, mm7                   ; clear mm7
205  %endmacro  %endmacro
206    
207    
208  %macro YV12_TO_RGB                      2  %macro YV12_TO_BGR                      2
209  %define TEMP_Y1  esp  %define TEMP_Y1  esp
210  %define TEMP_Y2  esp + 8  %define TEMP_Y2  esp + 8
211  %define TEMP_G1  esp + 16  %define TEMP_G1  esp + 16
# Line 370  Line 370 
370          punpcklbw mm0, mm3              ; 0r5g5b50r4g4b4 -> mm0          punpcklbw mm0, mm3              ; 0r5g5b50r4g4b4 -> mm0
371          punpckhbw mm5, mm3              ; 0r7g7b70r6g6b6 -> mm5          punpckhbw mm5, mm3              ; 0r7g7b70r6g6b6 -> mm5
372    
373  %if %1 == 3             ; RGB24  %if %1 == 3             ; BGR (24-bit)
374          movd [edi], mm2          movd [edi], mm2
375          psrlq mm2, 32          psrlq mm2, 32
376    
# Line 430  Line 430 
430    
431          movd [edi+edx + 21], mm5          movd [edi+edx + 21], mm5
432    
433  %else           ; RGB32  %else           ; BGRA (32-bit)
434          movq [edi], mm2          movq [edi], mm2
435          movq [edi + 8], mm4          movq [edi + 8], mm4
436          movq [edi + 16], mm0          movq [edi + 16], mm0
# Line 475  Line 475 
475    
476  ; input  ; input
477    
478  MAKE_COLORSPACE  rgb24_to_yv12_mmx,0,   3,2,2,  RGB_TO_YV12,  3, -1  MAKE_COLORSPACE  bgr_to_yv12_mmx,0,    3,2,2,  BGR_TO_YV12,  3, -1
479  MAKE_COLORSPACE  rgb32_to_yv12_mmx,0,   4,2,2,  RGB_TO_YV12,  4, -1  MAKE_COLORSPACE  bgra_to_yv12_mmx,0,   4,2,2,  BGR_TO_YV12,  4, -1
480    
481  ; output  ; output
482    
483  MAKE_COLORSPACE  yv12_to_rgb24_mmx,48,  3,8,2,  YV12_TO_RGB,  3, -1  MAKE_COLORSPACE  yv12_to_bgr_mmx,48,   3,8,2,  YV12_TO_BGR,  3, -1
484  MAKE_COLORSPACE  yv12_to_rgb32_mmx,48,  4,8,2,  YV12_TO_RGB,  4, -1  MAKE_COLORSPACE  yv12_to_bgra_mmx,48,  4,8,2,  YV12_TO_BGR,  4, -1
485    

Legend:
Removed from v.630  
changed lines
  Added in v.631

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