Summary: | XVideo 24bit RGB image causes server crash. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Kusanagi Kouichi <slash> | ||||||||
Component: | Driver/Radeon | Assignee: | xf86-video-ati maintainers <xorg-driver-ati> | ||||||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||||||
Severity: | blocker | ||||||||||
Priority: | medium | ||||||||||
Version: | unspecified | ||||||||||
Hardware: | x86 (IA32) | ||||||||||
OS: | Linux (All) | ||||||||||
Whiteboard: | |||||||||||
i915 platform: | i915 features: | ||||||||||
Attachments: |
|
Description
Kusanagi Kouichi
2007-11-16 04:38:26 UTC
Created attachment 12591 [details] [review] patch for this bug. Thanks for the patch. > - src += hpass * srcPitch; > - dptr += hpass * bufPitch; > + src += srcPitch; > + buf += bufPitch; Looks like this is the essential fix? It shouldn't be necessary to add the buf variable though. > - dptr[0]=((sptr[0])<<24)|((sptr[1])<<16)|(sptr[2]); > +#if X_BYTE_ORDER == X_BIG_ENDIAN > + dptr[0]=((sptr[0])<<16)|((sptr[1])<<8)|(sptr[2]); > +#else > + dptr[0]=((sptr[2])<<16)|((sptr[1])<<8)|(sptr[0]); > +#endif Are you sure these changes are correct for both byte orders? Is your system big or little endian? > Looks like this is the essential fix? It shouldn't be necessary to add the buf > variable though. To add buf is necessary. I confirmed it. > Are you sure these changes are correct for both byte orders? Is your system big > or little endian? I'm not sure that this is correct for big endian. My system is little endian. (In reply to comment #3) > To add buf is necessary. I confirmed it. Something like dptr += bufPitch / 4; should do, doesn't it? > I'm not sure that this is correct for big endian. > My system is little endian. I doubt the byte order of a 3-byte format depends on endianness directly. Do you have a testcase I can try? Created attachment 12693 [details] [review] patch take 2 Is this better than previous one? Created attachment 12694 [details] testcase > I doubt the byte order of a 3-byte format depends on endianness directly. Do > you have a testcase I can try? Testcase is attached. It should display red, green and blue on top, middle and bottom respectively. Thanks for the new patch and the testcase. I'll fix it up (if necessary) on my PowerBook and push to Git when I get time. Fixes pushed. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.