[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Chou cam 4912
Hello Enzo!
On Tue, 9 Jan 2001, Enzo Pascale wrote:
> Hi Matthias,
>
> Thanks a lot for the configuration file. Now it works.
>
> I have now one more problem using UMB buffers.
>
> When I snap a frame to a single UMB buffer it works well, but I need
> to snap different frames to different buffers.
> So I tried to snap several frames, to consecutive buffers
> and something weird happened.
>
> The first frame in the first buffer was ok, but the frames stored in
> the second, third, ... buffer were slightly corrupted. Like if few
> pixels were placed in a wrong position.
>
> Then I went to check umb buffers and what I found out is that the
> image dimensions are right while the size was not what I would
> expect:
>
> GIOC_GE_GET_UMBWIDTH and GIOC_GE_GET_UMBBUFSIZE return the right
> value 512X480 but
> GIOC_GE_GET_UMBBUFSIZE returns 249856 bytes like if the frame was
> 512X488. (each pixel is 8 bit deep).
>
> I did the same check without using UMB and now
> GIOC_GE_GET_MEMWIDTH, GIOC_GE_GET_MEMHEIGHT, GIOC_GE_GET_MEMBUFSIZE
> all return the right value: 512, 480 and 245760. And the frame was clear.
>
> Do you have any idea of what is going on?
>
> Thanks again,
>
> Enzo.
>
After each frame a structure called iti_info_t (see itifgExt.h) was
appendend. This holds mainly the image time stamp and some statistics.
After appending this structure, the size was rounded up to the PAGE_SIZE
size of the system, to make the things a little bit easier (mmap and
stuff).
So if you are working with umb-buffers, please use UMBBUFSIZE to calculate
the offset to the second image (not width * height * depth)!
Remark: There is also a ioctl GET_UMBBUFADDR to get the offset address of
the buffer specified with SET_UMBBUF.
matthias
-------------------------------------------------------------------------------
GOM mbH Tel.: ++49 531/3804-330
Gesellschaft fuer optische Messtechnik Fax.: ++49 531/3804-333
Rebenring 33 Mail: M.Stein@gom.com
38106 Braunschweig GERMANY http://www.gom.com
-------------------------------------------------------------------------------