Opened 20 years ago
Closed 19 years ago
Last modified 19 years ago
#2649 closed enhancement (fixed)
Opengl video renderer
| Reported by: | Owned by: | danielk | |
|---|---|---|---|
| Priority: | minor | Milestone: | unknown |
| Component: | mythtv | Version: | head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
Video renderer using opengl for the mythtv-vid branch. Highlighs/lowlights include:-
- Works with XGL
- tested with XGL 7.0.0, Beryl 0.1.1 on Ubuntu 6.0.6 (Dapper).
- but large(ish) performance penalty under xgl.
- some window issues
- Hardware yuv to rgb conversion
- based on xine/glitz fragment program
- uses rectangular textures when available
- added colour adjustment as well (enable xv colour controls to use) - brightness, contrast, colour only (no hue).
- Vertical sync
- takes care of itself if opengl sync to vblank is enabled (nvidia-settings) and GPU can keep up
- 'normal' opengl vsync will fail silently
- better sync (less tearing) at 1080i when using buggy nvidia drivers (i.e. don't need to disable sync to vblank for xv)
- PiP
- hardware scaling of pip
- pip sizing should be accurate for XrandR/aspect ratios etc
- but pip is currently rendered over osd
- XRandR
- appears to be working pretty well (but see ticket:2648)
- Performance
- worse than xvideo but seems to be on par with mplayer/xine using opengl
- FX5200 seems to cope with main video and pip at SD resolutions
- EPG
- preview EPG not currently supported
- To do
- if RGB OSD surfaces become available, hardware rendering of OSD
- scaling of video resize for interactive tv - easy; but dependant on OSD above.
- support for non YV12 picture formats (e.g. YUV422p, RGB24 - should be easy enough)
- preview EPG if using opengl painter in mythui?
- use QGLWidget for portability?
- bobdeint - I've tried more approaches than I can remember. Doubling the refresh rate is easy enough but impacts so badly on texture sampling that you lose the fields. You end up with nothing more than a form of linear blend.
You'll need to tweak your display profiles and use --override-setting UseOpenglVideo=1 (probably a short term hack) to get it working.
Regards
Mark
Attachments (12)
Change History (27)
by , 20 years ago
| Attachment: | opengl.diff added |
|---|
by , 20 years ago
| Attachment: | videoout_opengl.cpp added |
|---|
by , 20 years ago
| Attachment: | videoout_opengl.h added |
|---|
comment:1 by , 20 years ago
| Owner: | changed from to |
|---|
comment:2 by , 20 years ago
by , 20 years ago
| Attachment: | openglv2.diff added |
|---|
by , 20 years ago
| Attachment: | util-opengl.cpp added |
|---|
by , 20 years ago
| Attachment: | util-opengl.h added |
|---|
by , 20 years ago
| Attachment: | videoout_opengl.2.cpp added |
|---|
by , 20 years ago
| Attachment: | videoout_opengl.2.h added |
|---|
by , 20 years ago
| Attachment: | video_opengl_v2.diff.gz added |
|---|
unified diff of the v2 patches. makes its a little easier to apply to mythtv-vid branch.
comment:3 by , 20 years ago
(In [12693]) Refs #2287. Refs #2649. Adds Mark Kendall's OpenGL video rendering to mythtv-vid tree.
I've made this default to being included in ./configure. You just need to select opengl as a video renderer for one of your display profiles to use this. Here it looks pretty rotten with SD material, but looks quite good with HD material.
comment:5 by , 20 years ago
comment:6 by , 20 years ago
(In [12708]) Refs #2649. Fixes #3036. More OpenGL cleanup in mythtv-vid branch.
This also appears to have fixed the stability issue with using OpenGL OSD with OpenGL Video, the problem was that two OpenGL OSD renderers were being initialized, the pbuffer one used for XvMC OpenGL Video and the framebuffer one used for non-XvMC OpenGL Video.
comment:8 by , 20 years ago
comment:9 by , 20 years ago
comment:10 by , 20 years ago
comment:11 by , 20 years ago
Opengl OSD performance improvements.
- Rather than converting the YUV OSD frame each time it is displayed, we render into a framebuffer and only update when necessary. This is a major performance improvement, esp. if used in conjunction with the new option to enable/disable the OSD fade.
- Make sure the viewport is set for the osd filter (it otherwise defaults to 1920x1080).
comment:12 by , 20 years ago
Opengl Deinterlacing fixes.
- Make sure the resize 'filter' is applied last, otherwise the field information is distorted for the hardware deinterlacers.
- Tidy up OpenglVideo.
- Ensure opengl deinterlacing is preserved following an input change.
comment:13 by , 19 years ago
Use 3 textures for YUV texture upload
By using 3 textures rather than one for frame upload, we avoid having to calculate the frame offsets and avoid 'random' memory reads during yuv to rgb conversion. There appears to be no upload penalty for 3 textures rather than one.
On my test system (FX5200), this yields a 15-30% performance improvement, depending on display size.
by , 19 years ago
| Attachment: | opengl_3textures.diff added |
|---|
Use 3 textures for frame upload/colour conversion
comment:14 by , 19 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
(In [13287]) Refs #2287. Fixes #3044. Fixes #2649. OpenGL video renderer improvements and fixes.
This improves the speed of the YUV->RGB conversion by accessing the texels with greater coherency. This fixes removes a doubled call to the resize filter. This avoids a segfault by leaking some memory (temporary fix).

Version 2 of the OpenGL renderer(substantially re-written).