Date: Sun, 20 Apr 1997 19:44:47 -0700 From: Amancio Hasty <hasty@rah.star-gate.com> To: multimedia@freebsd.org Subject: The clip code should be ready tonite 8) Message-ID: <199704210244.TAA01761@rah.star-gate.com>
next in thread | raw e-mail | index | archive | help
So far testing is favorable over here so after code clean up and further testing I will release the code tonite. The clip algorithm is only for rectangles. If there is interest I may look into implement polygons which is not necessarily easy to do at the driver because I want to avoid as much as possible recursion. Here is a sample of the code to use hardware clipping: This code alternates between not clipping, by setting clip_region[0].y_min and clip_region[0].y_max to 0, and specifying two clipping rectangles. The maximum number of rectangles that we can specify is 100 which I think is plenty. Setting clip_region[0].y_min and clip_region[1].y_max sets the number of clip rectangles to 0 in the driver . The rectangles should be sorted by the application . "x" first then "y". I will do error checking to ensure that the policy is enforced. while (got_signal) { ++j; if ( (j - ( j / 60 ) * 60) == 0 ) { i = METEOR_CAP_STOP_CONT; ioctl(video, METEORCAPTUR, &i); if (clip_region[0].y_min == 0 ) { clip_region[0].x_min = 10; clip_region[0].x_max = 20; clip_region[0].y_min = 20; clip_region[0].y_max = 40; clip_region[1].x_min = 10; clip_region[1].x_max = 20; clip_region[1].y_min = 80; clip_region[1].y_max = 100; printf("clip \n"); } else { printf("don't clip \n"); clip_region[0].y_min = 0; clip_region[0].y_max = 0; } ioctl( video, BT848SCLIP, &clip_region ); } i = METEOR_CAP_SINGLE ; /* buffer up 1 frame */ ioctl(video, METEORCAPTUR, &i); . . . I will probably change Bt848SCLIP to METEORSCLIP ... Last but not least we clip much faster than the latest Win95 WinCast client. Every time clipping gets activated in win95 in order for the clip to take effect the whole screen gets refresh at least with the latest Wincast client and my lastest S3 driver. Enjoy, Amancio
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704210244.TAA01761>