diff options
Diffstat (limited to 'src/video_out/video_out_xshm.c')
-rw-r--r-- | src/video_out/video_out_xshm.c | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index a33ee9922..061710973 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xshm.c,v 1.16 2001/07/10 19:33:05 guenter Exp $ + * $Id: video_out_xshm.c,v 1.17 2001/07/11 23:31:44 guenter Exp $ * * video_out_xshm.c, X11 shared memory extension interface for xine * @@ -71,6 +71,7 @@ typedef struct xshm_frame_s { XImage *image; uint8_t *rgb_dst; int stripe_inc; + int y_off, uv_off; XShmSegmentInfo shminfo; } xshm_frame_t; @@ -350,7 +351,9 @@ static void xshm_frame_copy (vo_frame_t *vo_img, uint8_t **src) { this->yuv2rgb->yuv2rgb_fun (this->yuv2rgb, frame->rgb_dst, - src[0], src[1], src[2]); + src[0]+frame->y_off, + src[1]+frame->uv_off, + src[2]+frame->uv_off); #ifdef DETAILED_TIMING cycles = rdtsc() - tsc; @@ -362,6 +365,45 @@ static void xshm_frame_copy (vo_frame_t *vo_img, uint8_t **src) { static void xshm_frame_field (vo_frame_t *vo_img, int which_field) { /* FIXME: implement */ + xshm_frame_t *frame = (xshm_frame_t *) vo_img ; + xshm_driver_t *this = (xshm_driver_t *) vo_img->instance->driver; + + switch (which_field) { + case 1: + frame->rgb_dst = frame->image->data; + frame->stripe_inc = 2*this->stripe_height * frame->image->bytes_per_line; + frame->y_off = 0; + frame->uv_off = 0; + yuv2rgb_setup (this->yuv2rgb, + this->delivered_width, + 16, + this->delivered_width*2, + this->delivered_width, + this->output_width, + this->stripe_height, + frame->image->bytes_per_line*2); + + break; + case 2: + frame->rgb_dst = frame->image->data + frame->image->bytes_per_line ; + frame->stripe_inc = 2*this->stripe_height * frame->image->bytes_per_line; + frame->y_off = 0; /* this->delivered_width; FIXME ?!*/ + frame->uv_off = 0; /* this->delivered_width/2; */ + yuv2rgb_setup (this->yuv2rgb, + this->delivered_width, + 16, + this->delivered_width*2, + this->delivered_width, + this->output_width, + this->stripe_height, + frame->image->bytes_per_line*2); + break; + case 3: + frame->rgb_dst = frame->image->data; + frame->y_off = 0; + frame->uv_off = 0; + break; + } } static void xshm_frame_dispose (vo_frame_t *vo_img) { |