Closed Bug 596091 Opened 14 years ago Closed 14 years ago

Video colors flipped after reading to WebGL texture

Categories

(Core :: Graphics: CanvasWebGL, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 593496

People

(Reporter: mrsmkl, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.55 Safari/534.3
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b5) Gecko/20100101 Firefox/4.0b5

gl.texture2D seems to at least sometimes flip the red and blue color channels of video frame after it has been read.


Reproducible: Always

Steps to Reproduce:
1. Read the texture twice.

Actual Results:  
Get a texture where red and blue color channels are switched.

Expected Results:  
Normal colors.

http://sami-code.110mb.com/gl/mozilla-video.html is just the example from Firefox samples. I modified it a bit to get it working with latest versions. The same issue has existed for a while already. There is no video on my site, so if you want to test, you have to save the page to your own computer and download the video from Firefox site (also happens with other videos). Sometimes the y-coordinate can be flipped too, but I cannot reproduce that with this example.
With shader validator OFF, your URL does not work. I have the following error :"An error occurred compiling the shaders: ERROR: 0:3: 'precision' : syntax error parse error"With shader validator ON, I have a blank page.Did you try with a new profile :http://support.mozilla.com/en-US/kb/managing+profilesCan you provide the graphic informations in about:support page
Component: General → Canvas: WebGL
Product: Firefox → Core
QA Contact: general → canvas.webgl
Version: unspecified → Trunk
As I said, you need to set up the web pages yourself, my site does not have the video. Also I tested the issue with virtualized Ubuntu 10.04 (Mesa), same problem.
(In reply to comment #0)
> User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
> AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.55 Safari/534.3
> Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b5) Gecko/20100101
> Firefox/4.0b5
> 
> gl.texture2D seems to at least sometimes flip the red and blue color channels
> of video frame after it has been read.

Yes, there is a big bug in our texImage2D implementation making it overwrite in-place the source buffer. It isn't specific to video. The good news is that it's fixed by the patch in bug 593496 which will soon be pushed.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.