[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-multimedia
Subject:    Re: Video Planning Meeting
From:       Martin Vogt <mvogt () rhrk ! uni-kl ! de>
Date:       2002-01-26 11:01:13
[Download RAW message or body]



Hello


On Mon, Jan 14, 2002 at 04:18:52AM -0800, Neil Stevens wrote:
> When: Saturday, January 26, 2002
>       10pm CET / 1pm PST
> 
> Where: #kde-multimedia on irc.kde.org
>        http://www.openprojects.net/
> 


This is a longer articel about what I think a new
aRts video MM system should have. 
I don't think that anybody really reads it, but it can
be helpfull if someone starts to code this support for aRts.

1. The Beginning
----------------

Before we can speak about demuxers and 
mpeg/divx/quicktime video player in arts
we need to have some basic image support in it.

Here are some things which I think should be
available through an arts framework:

2. Format. 
----------
   There are different image formats/colorspaces.
   Every video codec has its own understanding of the
   best colorspace for it.

   -RGB[8..32]   (png,gif, X11 Server Standard)
   -YUV12        (mpeg)
   -YUY2         (M$, divx)

   

3. Memory
---------
   Video Codecs operate the computer at the RAM bandwith
   limits.

   Result: For performance reasons we need to use shared mem,
   but its not possible to use it always.

   Here are some numbers:
   
   For example a DVD video with  as an RGB_32 image "produces":

   712x512 DVD image * 4 RGB_32 == 364544 * 4 == 1458176 Bytes == 1 MB per
   image

   If you have 30 images (NTSC) this means 30 MB. But this is not the end.

   First the decoder "produces" these 30 MB this means you transform
   from the decoder 30 MB into the images. (write operation)
   Then you transfer these 30 MB from the RAM into the RAM of the
   graphics card, this is a "read" operations.
   This makes now 60MB/second as an absolute minimum which is always needed
   for the video playback.
   Any copy operation (what arts now does in every module for audio)
   doubles this.

   Result:
   Arts need to get a method to pass the images by reference,
   its not usefull to transfer images by value.


4. Conversion between colorspaces and formats.
----------------------------------------------

   When we have the mpeg video player, we want to
   put the image on the X11 desktop.
   Due to limitations of your graphics card and
   your X11 server and your location. (remote X11 session, local session)
   we need to transform images between colorspaces.

   Example:

   The RGB colorspace supported by X11 is tied to the
   current resolution. (example RGB 24)
   The "YUV" colorspaces are only supported on XFree 4.x
   and newer graphic cards, but only some YUV formats
   are supported on all of them

   An mpeg video player produces YUV12 images, 
   but the X11 Server has only support for RGB16.
   Some graphics cards has the XVideo extension, but
   I think the i810 can only handle YUY2, thus
   there need to be conversion from YUV12->YUY2
   for XVideo support.
   "reverse" dithering can be usefull too.
   If you have an image in RGB colorspace (png,gif)
   its usefull to dither it back to eg YUY2/YUV12 because
   this allows resize/fullscreen with hardware support.


5.X11 Output system
-------------------

    When there is support for images, its usefull to draw them.
    X11 supports 4 different drawing methods.

   RGB:
   ---
     - standard PutXimage
     - PutSharedMemXImage with shared mem

   XV: (only on newer video cards & XFree 4.x)
   ---
     - YUY2 seems to be supprted on all
     - YUV12 YUYV & I420 seems to be supported often
     - there are ram and shared memory implementations.



6.Fullscreen support
--------------------

   One nice feature is to turn the video player in fullscreen modus.
   The implementation for this depends on the hardware and X11 Server.

   VidMode Extension
   -----------------
   - Here we remove the borders of the window resize
     the window calculate an offset for the image position
     query the X server for video resolutions
     and switch to this resoltion.

   XV extension
   ------------
   - For XVideo enabled Servers/card we resize the window
     and remove the borders.



Well, I think these are the essential things the arts video system
needs to have. I'm not speaking about implementation and demuxers
and video codecs. 
The current state is, that the "video packages" like mplayer,xine,mpeglib
implement all these things for themself.
I think this basic functionallity should be in kde-mm itsself.



regards,

Martin









_______________________________________________
kde-multimedia mailing list
kde-multimedia@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-multimedia
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic