Re: mmaped rgb data does not line up

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



hrm, i dont see how grb can be rgb with a missing byte, since the red is 
between the green and blue, if you add a red, you get rgrb.  (also, when i 
set it to use rgb data, and call read() i get bgr data.  

regardless, is this normal, or am i doing something wrong? xawtv, xawdecode 
and tvtime dont have bad data, and none of them make corrections for things 
coming in the wrong order (i dont see how you could, programatically, since 
there is no way to determine if its wrong without seeing the output).

thanks
thomas

On Sunday 27 July 2003 5:23 pm, Peter Farrow wrote:
> I think you find initially its not bgr but rgb with 1 byte missing at
> the start....(i.e. 1 byte if red missing from the first pixel).
>
> p.
>
> Thomas wrote:
> >hello, i have a bt878 based hauppauge card, and im running linux
> > 2.6.0-test1. im trying to write a tv program, but when i get data off the
> > card using mmap, the data doesnt seem to be aligned properly.  it seems
> > to be in the order: GRB, instead of BGR (which is the order i get if i
> > call read() ).  i can fix this temporarily by accessing frame + 2 or
> > frame -1 when i read the data (frame is the address that mmap returns),
> > but this is obviously not what i want to do.  has anybody experienced
> > this, and can anybody tell me what im doing wrong? for mmap, im using all
> > the values in the video_mbuf struct given to me with the VIDIOCGMBUF
> > ioctl.
> >
> >thanks in advance
> >thomas
> >spiralman@xxxxxxxxxxxx
> >
> >
> >--
> >video4linux-list mailing list
> >Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
> >https://www.redhat.com/mailman/listinfo/video4linux-list
>
> --
> video4linux-list mailing list
> Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/video4linux-list




[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux