View Issue Details

IDProjectCategoryView StatusLast Update
0001190FSSCP---------public2012-01-09 18:06
ReporterMr_Maniac Assigned Totaylor  
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.9 
Fixed in Version3.6.9 
Summary0001190: The Background is flickering when Theora-Movies are played
DescriptionHi!
I have the following problem:
When the game plays an Theora-Movie, the background (that shouldn't be visible anymore) flickers madly.
A more specific example:
When I start FS2_Open (no matter if in Windows or Linux), the splash-screen is shown. Then fs2_open plays the intro-movie but the splash-screen still seems to be in the background. So the movie is played correctly but the "bars" over and under the movie are still containing the splash-screen and this is flickering madly (black, splash-screen, black, splash-screen...)
This happens everywhere where a movie is played.
And this also happens in the fresh released Wing Commander Saga Prologue.

Maybe it's an issue with my Graphics Card (GeForce 3)?
Oh... I'm playing in OpenGL-Mode.

Do you need any additional informations?
TagsNo tags attached.

Relationships

has duplicate 0001194 resolvedtaylor WCS Menu Flickers In and Out In Cutscenes 

Activities

taylor

2007-01-02 16:53

administrator   ~0007367

Does it do this with MVE movies too? It's the same basic code (I upgraded the MVE code to work like the Theora code) so it should happen with both.

If it only happens with Theora movies then it's specific to the Theora only code bits. If it happens with both movie types then it's probably some issue with the common code.

Mr_Maniac

2007-01-02 20:32

reporter   ~0007372

Okay... I just copied over the MVEs of FS1 and tested it with the FSPort.
And unfortunaly, it's also flickering...

Oh... And I think I saw some speed-changing in theora-movies...
Especially at scene-change it slows down...
Sometimes it's lagging for a very short time and then even the flickering is slowing down...
MVEs are played back smoothly and the flickering is very... Uhm... Consistant...

2007-01-03 14:54

 

Video.png (186,734 bytes)   
Video.png (186,734 bytes)   

Mr_Maniac

2007-01-03 14:56

reporter   ~0007374

Last edited: 2007-01-03 15:01

I've tested it with D3D now... Well... It doesn't flicker, but...
Look for yourself. I've attached an file (Video.png). That's an screenshot of the Video playing in D3D mode.

EDIT:
Okay... I think we can forget this...
It was my fault again...
Somewhen I did activate "Triple Buffering" in the nvCpl...
Now that I disabled it the video is playing fine under Windows...
Will test it later in Linux...

But movie-Playback still is a bit slow...

taylor

2007-01-03 20:46

administrator   ~0007376

I know it doesn't work in D3D, there just isn't anyone to code in proper support for it. In the future though, D3D won't even be allowed to play Theora movies until someone comes along and fills in the code for it.

The "Triple Buffering" thing ... sounds about right. It currently is only designed to be used on double-buffer at most. So what is happening is that it clears two buffers, but the third gets left in it's previous state. The video is only output to the portion of the screen in which it's shown, so the third buffer will still show whatever it had on it previously, behind the video.

I had a clear call each frame in earlier code, but took it out since that slows things down a little bit. I figured it better to have the movies play faster rather than safer. :)


Speed wise though, the Theora movies are very CPU bound. The MVEs don't really have this problem. The Theora movies first have to be decoded by the codec, into YUV, then converted by the player into RGB so that it can be shown on screen. Eventually the RGB conversion will be optional depending on your video card (with shaders I'll be able to do it on the video card itself, accelerated).

Amazingly, the Theora player is about 60% faster than it used to be. It needs further work though, so speed will increase for 3.6.10 at least. And the MVE player used to be *very* slow as well, it took a fair bit of work (almost a year or so of tweaking) to get it to the speed that it runs at now.

ARSPR

2007-01-03 21:01

reporter   ~0007379

Last edited: 2007-01-03 21:03

In my system flickering also appears if I activate triple buffering. (7800GS AGP)

(I've only tested with OGG files).

Mr_Maniac

2007-01-04 18:07

reporter   ~0007382

Just a little note:
I've deactivated triple buffering in Linux, too.
Works fine now.
And without the flickering, those speed-changes are barely noticeable :)

taylor

2007-01-05 05:03

administrator   ~0007390

Fixed locally (by clearing all three buffers). I'll resolve this once the code hits CVS.

taylor

2007-01-06 04:08

administrator   ~0007397

Someone please re-enable triple-buffering and give this build a try:
http://icculus.org/~taylor/fso/willrobinson/reboot.rar

Mr_Maniac

2007-01-06 12:33

reporter   ~0007403

Yup... Working in WinXP...
I'll try it in Linux as soon as it hits CVS (still fs2_open_3.6.9 branch or the "normal" HEAD Branch?)

taylor

2007-01-06 13:20

administrator   ~0007404

I'm behind on getting all of my changes in HEAD, but that's my project for this weekend. I won't get this particular fix in either CVS branch until I get caught up with HEAD commits though.

But it's easy enough to fix yourself. Open code/cutscene/movie.cpp and go to around line 240. You should see a gr_clear(), gr_flip(), gr_clear() sequence. Add an extra gr_flip() and gr_clear() call after that, it will then catch all 3 buffers. :)

ARSPR

2007-01-06 18:31

reporter   ~0007405

It seems fixed. Good work.

taylor

2007-01-07 13:14

administrator   ~0007413

Fixered.

Related Changesets

fs2open: trunk r3848

2007-01-07 07:29

taylor


Ported: N/A

Details Diff
add Theora player
remove DirectShow support from movie player
fix triple-buffer page flipping problem (Mantis bug 0001190)
Affected Issues
0001190
mod - /trunk/fs2_open/code/cutscene/movie.cpp Diff File
mod - /trunk/fs2_open/code/cutscene/movie.h Diff File
mod - /trunk/fs2_open/code/cutscene/mveplayer.cpp Diff File
add - /trunk/fs2_open/code/cutscene/oggplayer.cpp File
add - /trunk/fs2_open/code/cutscene/oggplayer.h File

Issue History

Date Modified Username Field Change
2007-01-02 12:48 Mr_Maniac New Issue
2007-01-02 16:53 taylor Note Added: 0007367
2007-01-02 16:54 taylor Status new => assigned
2007-01-02 16:54 taylor Assigned To => taylor
2007-01-02 20:32 Mr_Maniac Note Added: 0007372
2007-01-03 14:54 Mr_Maniac File Added: Video.png
2007-01-03 14:56 Mr_Maniac Note Added: 0007374
2007-01-03 15:01 Mr_Maniac Note Edited: 0007374
2007-01-03 20:46 taylor Note Added: 0007376
2007-01-03 20:46 taylor Relationship added has duplicate 0001194
2007-01-03 21:01 ARSPR Note Added: 0007379
2007-01-03 21:01 ARSPR Note Edited: 0007379
2007-01-03 21:03 ARSPR Note Edited: 0007379
2007-01-04 18:07 Mr_Maniac Note Added: 0007382
2007-01-05 05:03 taylor Note Added: 0007390
2007-01-06 04:08 taylor Note Added: 0007397
2007-01-06 12:33 Mr_Maniac Note Added: 0007403
2007-01-06 13:20 taylor Note Added: 0007404
2007-01-06 18:31 ARSPR Note Added: 0007405
2007-01-07 13:14 taylor Status assigned => resolved
2007-01-07 13:14 taylor Fixed in Version => 3.6.9
2007-01-07 13:14 taylor Resolution open => fixed
2007-01-07 13:14 taylor Note Added: 0007413
2012-01-05 22:55 taylor Changeset attached => Import 2012-01-05 17:52:05 trunk r3848
2012-01-09 18:06 taylor Changeset attached => fs2open_websvn trunk r3848