Mercurial > mplayer.hg
comparison libvo/vo_svga.c @ 7691:5381fb575552
10l fix & cleanup of draw_frame(), still NO support for stride :(
author | arpi |
---|---|
date | Wed, 09 Oct 2002 23:39:36 +0000 |
parents | f78dc7d40730 |
children | 5b39e79af5fe |
comparison
equal
deleted
inserted
replaced
7690:d8ce19f6b1fe | 7691:5381fb575552 |
---|---|
482 static const vo_info_t* get_info(void) { | 482 static const vo_info_t* get_info(void) { |
483 return (&vo_info); | 483 return (&vo_info); |
484 } | 484 } |
485 | 485 |
486 static uint32_t draw_frame(uint8_t *src[]) { | 486 static uint32_t draw_frame(uint8_t *src[]) { |
487 uint8_t *s=src[0]; | |
488 #if 0 | |
489 // draw_frame() is never called for YV12 | |
487 if (pformat == IMGFMT_YV12) { | 490 if (pformat == IMGFMT_YV12) { |
488 if(bpp==1) | 491 if(bpp==1) |
489 yuv2rgb(yuvbuf, src[0], src[1], src[2], orig_w, orig_h, (orig_w+7)/8, orig_w, orig_w / 2); | 492 yuv2rgb(yuvbuf, src[0], src[1], src[2], orig_w, orig_h, (orig_w+7)/8, orig_w, orig_w / 2); |
490 else | 493 else |
491 yuv2rgb(yuvbuf, src[0], src[1], src[2], orig_w, orig_h, orig_w * BYTESPERPIXEL, orig_w, orig_w / 2); | 494 yuv2rgb(yuvbuf, src[0], src[1], src[2], orig_w, orig_h, orig_w * BYTESPERPIXEL, orig_w, orig_w / 2); |
492 src[0] = yuvbuf; | 495 s = yuvbuf; |
493 } | 496 } |
497 #endif | |
494 if (bpp_conv) { | 498 if (bpp_conv) { |
495 switch(bpp) { | 499 switch(bpp) { |
496 case 32: { | 500 case 32: |
497 uint8_t *source = src[0]; | 501 rgb24to32(src[0],bppbuf,maxw * maxh * 3); |
498 uint8_t *dest = bppbuf; | 502 break; |
499 register uint32_t i = 0; | 503 case 16: |
500 | |
501 while (i < (maxw * maxh * 4)) { | |
502 dest[i] = source[i]; | |
503 dest[i+1] = source[i+1]; | |
504 dest[i+2] = source[i+2]; | |
505 dest[i+3] = 0; | |
506 i += 4; | |
507 } | |
508 } break; | |
509 case 16: { | |
510 rgb15to16(src[0],bppbuf,maxw * maxh * 2); | 504 rgb15to16(src[0],bppbuf,maxw * maxh * 2); |
511 } break; | 505 break; |
512 } | 506 } |
513 src[0] = bppbuf; | 507 s = bppbuf; |
514 } | 508 } |
515 putbox(x_pos, y_pos, maxw, maxh, src[0], 1); | 509 putbox(x_pos, y_pos, maxw, maxh, s, 1); |
516 | |
517 return (0); | 510 return (0); |
518 } | 511 } |
519 | 512 |
520 static uint32_t draw_slice(uint8_t *image[], int stride[], | 513 static uint32_t draw_slice(uint8_t *image[], int stride[], |
521 int w, int h, int x, int y) { | 514 int w, int h, int x, int y) { |