home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wvis0626.zip / warpvision_20020626.zip / libmpeg2 / interface.c < prev    next >
C/C++ Source or Header  |  2002-06-25  |  2KB  |  88 lines

  1. /*
  2.  * mpeg2dec.c
  3.  * Copyright (C) 1999-2001 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  4.  *
  5.  * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
  6.  *
  7.  * mpeg2dec is free software; you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License as published by
  9.  * the Free Software Foundation; either version 2 of the License, or
  10.  * (at your option) any later version.
  11.  *
  12.  * mpeg2dec is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  * GNU General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU General Public License
  18.  * along with this program; if not, write to the Free Software
  19.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  20.  */
  21.  
  22. #include "config.h"
  23.  
  24. #include <stdio.h>
  25. #include <stdlib.h>
  26. #include <signal.h>
  27. #include <string.h>
  28. #include <errno.h>
  29. #include <inttypes.h>
  30.  
  31. #include "video_out.h"
  32. #include "video_out_internal.h"
  33. #include "mpeg2.h"
  34. #include "mm_accel.h"
  35.  
  36. uint32_t accel;
  37.  
  38. static mpeg2dec_t mpeg2dec;
  39. extern vo_open_t vo_dive_open;
  40.  
  41. void dive_draw(YUVpicture *picture, int width, int height)
  42. {
  43. /*
  44.     ULONG bpl;
  45.     unsigned char *dive_mem;
  46.  
  47.     dive_mem = dW->BeginPaint (&bpl, DIVE_NEXTBUFFER);
  48.  
  49.     yv12toyuy2(picture->base[0], picture->base[1], picture->base[2],
  50.                (unsigned char *)dive_mem,
  51.                width, height,
  52.                width, width/2, bpl);
  53. */
  54. /*
  55.     yuv2rgb(dive_mem,
  56.             picture->base[0],
  57.             picture->base[1],
  58.             picture->base[2],
  59.             width,
  60.             height,
  61.         width,
  62.             width,
  63.             width/2
  64.            );
  65. */
  66. /*
  67.     dW->EndPaint();
  68.     dW->Switch(DIVE_NEXTBUFFER);
  69.     dW->WaitSwitch();
  70. */
  71.     return;
  72. }
  73.  
  74. void init_mpeg2(int height)
  75. {
  76.  
  77.     mpeg2_init (&mpeg2dec, mm_accel(), vo_dive_open(height));
  78.  
  79.     return;
  80. }
  81.  
  82. int decode_mpeg2(uint8_t * start, uint8_t * end)
  83. {
  84.     mpeg2_decode_data (&mpeg2dec, start, end);
  85.  
  86.     return 0;
  87. }
  88.