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

Re: Testers needed for TV benchmark



The true color version of my test procedure gives slightly lower display
and animation rates, at least on my system:

PRO TEST_TRUE, DELAY=DELAY

;- Load the image
filename = filepath('rose.jpg', subdir='examples/data')
read_jpeg, filename, image
xsize = 3 * 227
ysize = 3 * 149
image = rebin(image, 3, xsize, ysize)

;- Set initial parameters
nframes = 20
if (n_elements(delay) eq 0) then delay = 0.05

;- Display image in pixmap windows
t0 = systime(1)
for frame = 0, nframes - 1 do begin
  window, frame, /pixmap, xsize=xsize, ysize=ysize
  tv, shift(image, 0, 10 * frame, 0), true=1
endfor
t1 = systime(1)
print, 'Display rate (frames/sec) = ', $
  float(nframes) / (t1 - t0)

;- Animate the images
window, /free, xsize=xsize, ysize=ysize
t0 = systime(1)
for frame = 0, nframes - 1 do begin
  device, copy=[0, 0, xsize, ysize, 0, 0, frame]
  wait, delay
endfor
t1 = systime(1)
print, 'Animation rate (frames/sec) = ', $
  float(nframes) / (t1 - t0)

END

IDL> test_true
Display rate (frames/sec) =        3.3394557
Animation rate (frames/sec) =        15.491868
IDL> test_true, delay=0.0
Display rate (frames/sec) =        3.3344448
Animation rate (frames/sec) =        45.351475

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/