Opened 12 years ago

Closed 11 years ago

Last modified 21 months ago

#8948 closed patch

BS1/BS2: Video simplification/rewrite & MPEG2 removal

Reported by: bluegr Owned by: bluegr
Priority: normal Component: Engine: Sword1
Keywords: Cc:
Game: Broken Sword 1


Hello there

I'm attaching 2 patches, one by me, and one by eriktorbjorn. These overlap each other somewhat, so I've included them both.

eriktorbjorn's patch removes support for MPEG2 movies

The removal of MPEG2 support simplifies the overall code a LOT, and it means that libmpeg2 is no longer necessary.

My patch removes MPEG2 support like what eriktorbjorn's patch does, with some extras. In particular, it removes support for version 1 cutscenes of BS1. From what I understood, the original plan was to have 1 language add-on instead of a separate addon for each language. This is accomplished by having OGG files with multiple substreams, which can be read by the SplittedAudioStream class. Since we don't have such a pack in our downloads page for BS1, I removed support for version 1 cutscenes, which simplifies code a lot as well, together with the whole SplittedAudioStream class and the inbuilt credits player. From what I understood, the plan was to remove the credits video file altogether and replace it with a text file, which would be read by the credits player class. Also, the credits in the original MPEG2 cutscenes were too hard to read because of the MPEG artifacts.

Moreover, I've removed the unneeded implementation of setPalette, since both the DXA and the SMK players have a default implementation for that. Also, I've rewritten the BS1 video player to use the new VideoPlayer() class. This further simplifies the code a lot.

Finally, I've added support for the original Smacker movies of both games as well. This is currently disabled, and can be enabled by defining USE_SWORD_SMACKS in the sword1 and sword2 engines. I've set BS1 to use the high-resolution Smacker movies (in the SMACKSHI folder)

The only thing I don't really like is the inclusion of readSoundHeader() in video_player.h, which is not really pretty

Ticket imported from: #2524272. Ticket imported from: patches/1053.

Attachments (3)

bs-patch.patch (40.0 KB ) - added by bluegr 12 years ago.
Improved patch by thebluegr/md5
mpeg2-removal.patch (17.0 KB ) - added by bluegr 12 years ago.
Patch by eriktorbjorn
sword_smk_latest.patch (52.8 KB ) - added by bluegr 11 years ago.
Patch against the latest SVN

Download all attachments as: .zip

Change History (11)

by bluegr, 12 years ago

Attachment: bs-patch.patch added

Improved patch by thebluegr/md5

comment:1 by bluegr, 12 years ago

File Added: bs-patch.patch

by bluegr, 12 years ago

Attachment: mpeg2-removal.patch added

Patch by eriktorbjorn

comment:2 by bluegr, 12 years ago

File Added: mpeg2-removal.patch

comment:3 by sev-, 12 years ago

Owner: set to sev-

comment:4 by wjp, 11 years ago

I think we should probably commit this to trunk now that 0.13 has been branched. Do you agree? We can always improve it further afterwards, if necessary.

by bluegr, 11 years ago

Attachment: sword_smk_latest.patch added

Patch against the latest SVN

comment:5 by bluegr, 11 years ago

Same patch against the latest SVN

Things are still fuzzy with the Smacker videos in BS1/BS2. 3 years ago, there was a concern that adding Smacker support would be bad, as RAD Game Tools would object to it. However, now we got a Smacker video decoder, based on specs which are publicly available, and on FFMPEG. joostp has also talked with Tony Warriner, who is one of the directors in Revolution, and he mentioned that this approach would be fine (the e-mail has been sent to -devel).

So, we could add this for now, as Smacker support is disabled by default anyway, and we could improve it further afterwards, as mentioned

So, should we go ahead and commit this? File Added: sword_smk_latest.patch

comment:6 by bluegr, 11 years ago

Owner: changed from sev- to bluegr
Status: newclosed

comment:7 by bluegr, 11 years ago

Applied the patch as-is, as the situation with the Smacker videos has been resolved (we've contacted Revolution about this).


comment:8 by digitall, 21 months ago

Component: Engine: Sword1
Game: Broken Sword 1
Note: See TracTickets for help on using tickets.