Closed Bug 510057 Opened 11 years ago Closed 10 years ago

Add support for accelerated full-screen video

Categories

(Core :: Graphics, defect)

defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 555839

People

(Reporter: jrmuizel, Assigned: bas.schouten)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

In order to have performant fullscreen video we are going to need to use opengl/directx.

Support for older graphics chips will be trickier but on something modern we can use just use one texture per plane and do the rgb -> yuv conversion in a pixel shader.
Also interesting will be other OS-level primitives for doing the YUV->RGB quicker than in straight software, especially for non-programmable hardware.
Summary: Add support for gl accelerated full-screen video → Add support for accelerated full-screen video
OS: Mac OS X → All
Hardware: x86 → All
I included a patch which offers limited initial support. It does the following:

- Add a fullscreen attribute, when set to true, video is displayed fullscreen OGL accelerated.
- No controls are available in fullscreen.
- When any keypress is detected switch back to normal view.

The performance seems a bit disappointing. On my powerful ATI graphics card on Vista, the GL rendering calls seem to cause more extra CPU usage than expected for some reason. I could be doing something wrong, or poor ATI driver functionality for OGL.
(In reply to comment #2)
> Created an attachment (id=404037) [details]
> Initial simple fullscreen video implementation
> 
> I included a patch which offers limited initial support. It does the following:
> 
> - Add a fullscreen attribute, when set to true, video is displayed fullscreen
> OGL accelerated.
> - No controls are available in fullscreen.
> - When any keypress is detected switch back to normal view.
> 
> The performance seems a bit disappointing. On my powerful ATI graphics card on
> Vista, the GL rendering calls seem to cause more extra CPU usage than expected
> for some reason. I could be doing something wrong, or poor ATI driver
> functionality for OGL.
I forgot to add in there, this is currently windows only, some context selection code and the correct libraries need to be added for other OS.
Sorry, just wondering does this mean that using the GL accel that you're actually more CPU vs. the non-accel path?
(In reply to comment #4)
> Sorry, just wondering does this mean that using the GL accel that you're
> actually more CPU vs. the non-accel path?

Not really. I haven't tested. But it was still quite playable with GL accel fullscreen. I'd expect software fullscreen to be much worse. I was just meaning to say I would expect virtually no CPU overhead from drawing the quad on the screen(which is what I usually get with a single quad when doing Direct3D). But there was quite some overhead, more than I expected.
probably big wins by sending YUV to hardware
Assignee: nobody → bas.schouten
I attached the current working full screen accelerated video implementation. It works with controls. But it doesn't display the poster image, nor the context menu when you right-click it. There's a small redraw issue with the top of the volume slider when it extends. Not sure what the cause of this is. Performance is reasonable with hardware acceleration. In fullscreen it might get a bit slow when stalling on the video, see bug 520614 for the reason.
Attachment #404037 - Attachment is obsolete: true
Depends on: 523492
blocking2.0: --- → ?
Is this a duplicate of bug 555839 now?
Blocks: 523492
No longer depends on: 523492
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 555839
blocking2.0: ? → ---
You need to log in before you can comment on or make changes to this bug.