#174 PS3 Eye misses two pixels

open
nobody
5
2010-04-23
2010-04-23
Rob Shaw
No

The last two pixels of the PS3 Eye in 640 x 480 mode are stuck. Typical value, 0xff878787, independent of brightness.
I tried this for two different cameras, same result.

Discussion

  • hdc

    hdc - 2010-08-14

    seems like the YUV values (y1,u,y2,v) at row 479 and column 638 are all always 0

     
  • hdc

    hdc - 2010-08-15

    Does anyone know why the returned buffer is always 614396 rather than 614400?

    In digging around came across this post from Mark Ferrell where he comments on this but I can't tell if he found a solution to the buffer size or just dropped frames:

    "Found another peculiar issue, the bulk read comes up 4 bytes short every time (one pixel?). Only receiving 614396, so the framefill thread ends up appending the leading 4 bytes from the next frame onto the tail of the frame and subsequently discards the remainder.

    I cut-back the receive size on the USB bulk transfer to match the total image and as such, no longer dropping frames except when userland is late on the pickup from the frame buffer."

    (google cache of: http://forums.ps2dev.org/viewtopic.php?p=74541 )

     
  • hdc

    hdc - 2010-09-06

    In initCamera there are the following lines:

    [self setRegister:0x1c toValue:0x00];
    [self setRegister:0x1d toValue:0x40];
    [self setRegister:0x1d toValue:0x02];
    [self setRegister:0x1d toValue:0x00];
    [self setRegister:0x1d toValue:0x02];
    [self setRegister:0x1d toValue:0x57];
    [self setRegister:0x1d toValue:0xff];

    which it appears should be:

    [self setRegister:0x1c toValue:0x00];
    [self setRegister:0x1d toValue:0x40];
    [self setRegister:0x1d toValue:0x02];
    [self setRegister:0x1d toValue:0x00];
    [self setRegister:0x1d toValue:0x02];
    [self setRegister:0x1d toValue:0x58]; // 0x58 instead of 0x57
    [self setRegister:0x1d toValue:0x00]; // 0x00 instead of 0xFF

    Found this by looking at some of the linux drivers. Apparently these values define the frame size / 4:

    0x025800 * 4 = 614400 (640x480x2)

    Changing those 2 values fills in the missing pixels for me (I haven't confirmed that this change by itself works w the current 0.9.2 code from cvs)

    Perhaps this is obvious to others already but it seems that 0x1c selects the register to start at and the repeated use of 0x1d set a value and point to the next register. So the above is:

    start at 0x00
    set value of 0x00 to 0x40 and point to 0x01
    set value of 0x01 to 0x02 and point to 0x02
    set value of 0x02 to 0x00 and point to 0x03
    set value of 0x03 to 0x02 and point to 0x04
    set value of 0x04 to 0x58 and point to 0x05
    set value of 0x05 to 0x00 and point to 0x06

     
  • hdc

    hdc - 2010-09-07

    Need to add 4 to whatever value is being assigned to the sensor reg. 0x18 ( e.g. in initCamera); so 0xa4 for vga or 0x54 for qvga/sif mode. (not sure yet why this appears to work; am working on getting sif mode to use a 2x buffer rather than 4x and also to grok skipped chunks vs. fps calc.)

     
  • hdc

    hdc - 2010-10-19

    This bug can be fixed with the patch ( ID: 3064938 ) at:

    http://sourceforge.net/tracker/?func=detail&aid=3064938&group_id=44375&atid=439344

    which addresses:

    - fixes the 2 missing pixel bug (bug ID 2991591)
    - changes how QVGA/SIF buffers are handled so it is a true 320x240 frame and buffer size
    - results in fewer short buffers (w side effect that fps calc is more accurate or at least matches vsync frequency...)

     

Log in to post a comment.