discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Waterfall display


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Waterfall display
Date: Mon, 15 Nov 2004 08:17:17 -0800
User-agent: Mutt/1.5.6i

On Mon, Nov 15, 2004 at 02:34:06AM -0600, David Carr wrote:
> Hi all,
> 
> I've been doing a bit of python hacking in an attempt to get some sort 
> of "waterfall" / spectrogram type display working.  Currently I have a 
> very crude bit of python that works -- sorta.  The biggest issue is that 
> its slow and its only going to get slower.
> 
> I'm curious about the best way to implement the "persistence:" part of 
> the display.  It seems wasteful to have to store all previous data on 
> (now on screen) in order to be able to redraw everything.  Is there a 
> less memory and time expensive way to handle the scrolling type behavior? 
> 
> I'm fishing for helpful tidbits/good architectural ideas... if you have 
> any ideas about how this should work send them my way.
> 
> -David Carr

My suggestion is that you use an off screen pixmap (IIRC, this may be called
a MemoryDC in wx), and then when you have new data:

  (1) bit blit (move) the old data in the off screen pixmap up one row
  (2) overwrite the bottom row with the new data
  (3) copy the off screen bit map to the display

If you look at the various wxPython DC methods, I think you'll find
all of these operations.

The off screen memory resource is basically negligible.  Assuming
16-bit pixels, and 800 x 600 window, you're loooking at 960kB.

If these hand-wavy tips aren't sufficient, this would be a great
question for the wxpython users list.

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]