[IGSTK-Developers] Tcon minutes March 29, 2007

Luis Ibanez luis.ibanez at kitware.com
Mon Apr 2 16:51:14 EDT 2007


Hi David,


            Yeap, an experiment confirms that I'm wrong.


I just ran a profile of the time that it takes to convert YUV to RGB
using the code that you contributed to the vtkWin32VideoSource.cxx.

For the same machine of my previous email, and an image of 1024 x 768 pixels
the timing is:

                                          32 milliseconds.


Attached is the code that I used for profiling the conversion.

That code produced the following output:


Probe Tag    Starts    Stops           Time
Conversion     1         1         0.0319588
FillBuffer     1         1         0.00697708




I would insist however in that any discussion related to performance
must be based on numbers that we have measured using repeatable
experiments. Otherwise we will start looking like reviewers of decadent
Journals.



    Regards,


         Luis


-----------------------------------------------------------------------------------
On 4/2/07, David Gobbi <dgobbi at atamai.com> wrote:
>
> Hi Luis,
>
> I missed the T-con last Thursday, so I might be a little bit
> out-of-context, but the cost of the color conversion will vary
> quite a bit depending on exactly which conversion is being
> done (as well as on how the conversion code is optimized).
>
> The most expensive conversions are from YUV to RGB and
> back again, since they essentially require a 3x3 matrix multiplication
> plus 3 clamp operations per pixel.   Also, these conversions
> are lossy in both directions.
>
> Conversion from greyscale to YUV or RGB is very cheap,
> essentially equivalent to a copy.  Going back to from these to
> greyscale is a bit more expensive.
>
> In any case, even 15 milliseconds is longer than we can afford to
> color-convert a frame if the computer is also doing other tasks at the
> same time, so Frank is probably right that we need the frame buffer
> to support different formats in order to eliminate the need for
> conversion.  At the GPU end of things, VTK can handle either
> gray or RGB/RGBA textures right now.
>
> - David
>
>
> Luis Ibanez wrote:
> >
> > Just a quick follow up on our discussion regarding the performance
> > of conversion between color systems.
> >
> > Here is a profile that we got for another project where we are using the
> > FFMPEG library for compressing and decompressing video sequences.
> >
> >
> > In  that particular case we have:
> >
> > 1) Image size 1024 x 768 pixels, greyscale, 1 byte per pixel
> >
> > 2) Computer
> > 2.1)  Dell Precision 450 workstation
> > 2.2) with dual processor Intel Xeon at 2.4GHz
> > 2.3) with 3Gb of RAM
> > 2.4) Linux Debian
> > 2.5) Using the gcc compiler with -O3
> >
> >
> > With this configuration it takes 30 milliseconds to do
> > the following:
> >
> > 0) Copy the input image into another buffer
> > 1) Convert the grayscale image into YUV,
> > 2) Compress the image using the Flash video codec
> > 3) Decompress the image using the Flash video codec
> > 4) Convert the decompressed image back from YUV to grayscale.
> >
> >
> > We have not profiled the conversion in isolation, but the
> > fact that two color format conversions plus video
> > compression and decompression fit in 30 milliseconds,
> > give us some indication on how much the color format
> > conversion alone could take.
> >
> >
> >      Luis
> >
> >
> >
> > ---------------------------------------------------
> > On 3/29/07, *Patrick Cheng* < cheng at isis.georgetown.edu
> > <mailto:cheng at isis.georgetown.edu>> wrote:
> >
> >     Hi everybody,
> >
> >     Here is the minutes for discussion on VideoGrabber continued from
> >     last week:
> >
> >     http://public.kitware.com/IGSTKWIKI/index.php/Minutes_032907
> >
> >     Patrick
> >     _______________________________________________
> >     IGSTK-Developers mailing list
> >     IGSTK-Developers at public.kitware.com
> >     <mailto:IGSTK-Developers at public.kitware.com>
> >     http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers
> >     <http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > IGSTK-Developers mailing list
> > IGSTK-Developers at public.kitware.com
> > http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-developers/attachments/20070402/b34a4ad6/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: colorConversionProfiling.cxx
Type: text/x-c++src
Size: 1945 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/igstk-developers/attachments/20070402/b34a4ad6/attachment.cxx>
-------------- next part --------------
PROJECT(colorConversionProfiling.cxx)

# Find ITK.
FIND_PACKAGE(ITK REQUIRED)
IF(ITK_FOUND)
  INCLUDE(${ITK_USE_FILE})
ENDIF(ITK_FOUND)

ADD_EXECUTABLE(colorConversionProfiling colorConversionProfiling.cxx )

TARGET_LINK_LIBRARIES(colorConversionProfiling ITKCommon)


More information about the IGSTK-Developers mailing list