[Mplayer-cvslog] CVS: main/postproc yuv2rgb_template.c,1.9,1.10
Michael Niedermayer
michael at mplayer.dev.hu
Mon Apr 8 16:43:28 CEST 2002
Update of /cvsroot/mplayer/main/postproc
In directory mplayer:/var/tmp.root/cvs-serv10238
Modified Files:
yuv2rgb_template.c
Log Message:
fixing black stripe at right if width%8!=0 && stride%8==0 reported by kabi
Index: yuv2rgb_template.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/yuv2rgb_template.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- yuv2rgb_template.c 20 Jan 2002 18:36:09 -0000 1.9
+++ yuv2rgb_template.c 8 Apr 2002 14:43:18 -0000 1.10
@@ -136,6 +136,10 @@
uint8_t *_py = py;
uint8_t *_pu = pu;
uint8_t *_pv = pv;
+ int internal_h_size= h_size;
+ int aligned_h_size= (h_size+7)&~7;
+
+ if(rgb_stride >= aligned_h_size*2) internal_h_size= aligned_h_size;
b5Dither= dither8[y&1];
g6Dither= dither4[y&1];
@@ -150,7 +154,7 @@
: : "r" (_py), "r" (_pu), "r" (_pv));
- for (x = h_size >> 3; --x >= 0; ) {
+ for (x = internal_h_size >> 3; --x >= 0; ) {
/* this mmx assembly code deals with SINGLE scan line at a time, it convert 8
pixels in each iteration */
@@ -237,6 +241,10 @@
uint8_t *_py = py;
uint8_t *_pu = pu;
uint8_t *_pv = pv;
+ int internal_h_size= h_size;
+ int aligned_h_size= (h_size+7)&~7;
+
+ if(rgb_stride >= aligned_h_size*2) internal_h_size= aligned_h_size;
b5Dither= dither8[y&1];
g6Dither= dither4[y&1];
@@ -251,7 +259,7 @@
: : "r" (_py), "r" (_pu), "r" (_pv));
- for (x = h_size >> 3; --x >= 0; ) {
+ for (x = internal_h_size >> 3; --x >= 0; ) {
/* this mmx assembly code deals with SINGLE scan line at a time, it convert 8
pixels in each iteration */
@@ -334,6 +342,10 @@
uint8_t *_py = py;
uint8_t *_pu = pu;
uint8_t *_pv = pv;
+ int internal_h_size= h_size;
+ int aligned_h_size= (h_size+7)&~7;
+
+ if(rgb_stride >= aligned_h_size*3) internal_h_size= aligned_h_size;
/* load data for start of next scan line */
__asm__ __volatile__ (
@@ -343,7 +355,7 @@
: : "r" (_py), "r" (_pu), "r" (_pv));
- for (x = h_size >> 3; --x >= 0; ) {
+ for (x = internal_h_size >> 3; --x >= 0; ) {
/* this mmx assembly code deals with SINGLE scan line at a time, it convert 8
pixels in each iteration */
@@ -489,6 +501,10 @@
uint8_t *_py = py;
uint8_t *_pu = pu;
uint8_t *_pv = pv;
+ int internal_h_size= h_size;
+ int aligned_h_size= (h_size+7)&~7;
+
+ if(rgb_stride >= aligned_h_size*4) internal_h_size= aligned_h_size;
/* load data for start of next scan line */
__asm__ __volatile__
@@ -499,7 +515,7 @@
: : "r" (_py), "r" (_pu), "r" (_pv)
);
- for (x = h_size >> 3; --x >= 0; ) {
+ for (x = internal_h_size >> 3; --x >= 0; ) {
/* this mmx assembly code deals with SINGLE scan line at a time, it convert 8
pixels in each iteration */
__asm__ __volatile__ (
More information about the MPlayer-cvslog
mailing list