comparison src/video/quartz/SDL_QuartzYUV.m @ 1648:9f59d4c5aaea

Mac OS X fat build works! :)
author Sam Lantinga <slouken@libsdl.org>
date Sat, 22 Apr 2006 19:17:14 +0000
parents 157001382dfd
children 14717b52abc0
comparison
equal deleted inserted replaced
1647:2af911d41a08 1648:9f59d4c5aaea
45 static void QZ_UnlockYUV (_THIS, SDL_Overlay *overlay) { 45 static void QZ_UnlockYUV (_THIS, SDL_Overlay *overlay) {
46 46
47 ; 47 ;
48 } 48 }
49 49
50 static int QZ_DisplayYUV (_THIS, SDL_Overlay *overlay, SDL_Rect *dstrect) { 50 static int QZ_DisplayYUV (_THIS, SDL_Overlay *overlay, SDL_Rect *src, SDL_Rect *dst) {
51 51
52 OSErr err; 52 OSErr err;
53 CodecFlags flags; 53 CodecFlags flags;
54 54
55 if (dstrect->x != 0 || dstrect->y != 0) { 55 if (dst->x != 0 || dst->y != 0) {
56 56
57 SDL_SetError ("Need a dstrect at (0,0)"); 57 SDL_SetError ("Need a dst at (0,0)");
58 return -1; 58 return -1;
59 } 59 }
60 60
61 if (dstrect->w != yuv_width || dstrect->h != yuv_height) { 61 if (dst->w != yuv_width || dst->h != yuv_height) {
62 62
63 Fixed scale_x, scale_y; 63 Fixed scale_x, scale_y;
64 64
65 scale_x = FixDiv ( Long2Fix (dstrect->w), Long2Fix (overlay->w) ); 65 scale_x = FixDiv ( Long2Fix (dst->w), Long2Fix (overlay->w) );
66 scale_y = FixDiv ( Long2Fix (dstrect->h), Long2Fix (overlay->h) ); 66 scale_y = FixDiv ( Long2Fix (dst->h), Long2Fix (overlay->h) );
67 67
68 SetIdentityMatrix (yuv_matrix); 68 SetIdentityMatrix (yuv_matrix);
69 ScaleMatrix (yuv_matrix, scale_x, scale_y, Long2Fix (0), Long2Fix (0)); 69 ScaleMatrix (yuv_matrix, scale_x, scale_y, Long2Fix (0), Long2Fix (0));
70 70
71 SetDSequenceMatrix (yuv_seq, yuv_matrix); 71 SetDSequenceMatrix (yuv_seq, yuv_matrix);
72 72
73 yuv_width = dstrect->w; 73 yuv_width = dst->w;
74 yuv_height = dstrect->h; 74 yuv_height = dst->h;
75 } 75 }
76 76
77 if( ( err = DecompressSequenceFrameS( 77 if( ( err = DecompressSequenceFrameS(
78 yuv_seq, 78 yuv_seq,
79 (void*)yuv_pixmap, 79 (void*)yuv_pixmap,