PS3EYEDriver icon indicating copy to clipboard operation
PS3EYEDriver copied to clipboard

image glitch

Open gaborpapp opened this issue 11 years ago • 5 comments

I experience image glitch in 640x480@60fps on slower OS X computers, especially when something cpu intensive processing is going on. Maybe it is usb packet corruption, which is not handled properly.

gaborpapp avatar Nov 14 '14 21:11 gaborpapp

I know this is a pretty old issue (understatement), but if you were seeing frame corruption in the SDL sample app, this was caused by missing thread synchronization in the app. It's possible the openframeworks/cinder sample apps also have the same issue, but I've not been able to test.

The SDL issue is solved here: https://github.com/inspirit/PS3EYEDriver/pull/21

rovarma avatar Feb 01 '16 21:02 rovarma

Just installed and built on Windows 7, using all the download versions listed in the readme. I'm seeing glitches sometimes every few seconds with the SDL sample app.

poleguy avatar Apr 17 '16 15:04 poleguy

I think this is indeed improper handling of usb packets when PTS or FID changes and last_packet_type is INTER_PACKET. Changing ps3eye.cpp line 769 fixes the issue for me:

        /* If PTS or FID has changed, start a new frame. */
        if (this_pts != last_pts || this_fid != last_fid) {
            if (last_packet_type == INTER_PACKET)
            {
                frame_add(LAST_PACKET, NULL, 0);
            }

Change to:

        /* If PTS or FID has changed, start a new frame. */
        if (this_pts != last_pts || this_fid != last_fid) {
            if (last_packet_type == INTER_PACKET)
            {
                frame_add(DISCARD_PACKET, NULL, 0);
            }

And the glitched frames are dropped!

poleguy avatar Apr 21 '16 04:04 poleguy

Is this fixed by #27 then?

mirh avatar Apr 22 '16 12:04 mirh

we should ask the author @gaborpapp

inspirit avatar Apr 22 '16 14:04 inspirit