You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.
keyword_fmvresolution_fixedtype_patch (an actual patch, not a request for one) | by Zarel
Since cybersphinx hasn't ticketed this, I shall:
Here's a patch to make Warzone use regular textures to display the videos. This is the "hacky" version, the one that only needs a small and localized amount of changed code.
It uses one texture with a fixed size for videos (the old code allocated a new texture once per frame). The texture size is set at 512x512, which is enough for the current 320x240 videos. I think at least for 2.2 that is acceptable, since we don't have larger videos anyway. There are no error checks yet, so any video larger than 512x512 will behave badly.
The proper way would be to use a struct for the video info that is set up for every video played, where the texture is allocated according to video size etc., but that might make things unstable, so not suitable for 2.2 imo.
I've changed the multiplier to the texcoords from 255 to 256, since the matrix is set up as 1/256. This should be changed any way, I guess.
In addition to this patch the message about the radar not working should probably be removed, and since the YUV converter seems YUV420 specific, a check for other formats.
Updated patch.
I've moved texture creation from video_write() into seq_Play(), where it makes more sense, and added a check for the video size. I've also removed the radar warning message, and added a check for the YUV420 format (though those should be committed separately).
Issue migrated from trac:375 at 2022-04-15 18:08:20 -0700
The text was updated successfully, but these errors were encountered:
keyword_fmvresolution_fixedtype_patch (an actual patch, not a request for one)| by ZarelSince cybersphinx hasn't ticketed this, I shall:
Here's a patch to make Warzone use regular textures to display the videos. This is the "hacky" version, the one that only needs a small and localized amount of changed code.
It uses one texture with a fixed size for videos (the old code allocated a new texture once per frame). The texture size is set at 512x512, which is enough for the current 320x240 videos. I think at least for 2.2 that is acceptable, since we don't have larger videos anyway. There are no error checks yet, so any video larger than 512x512 will behave badly.
The proper way would be to use a struct for the video info that is set up for every video played, where the texture is allocated according to video size etc., but that might make things unstable, so not suitable for 2.2 imo.
I've changed the multiplier to the texcoords from 255 to 256, since the matrix is set up as 1/256. This should be changed any way, I guess.
In addition to this patch the message about the radar not working should probably be removed, and since the YUV converter seems YUV420 specific, a check for other formats.
Updated patch.
I've moved texture creation from video_write() into seq_Play(), where it makes more sense, and added a check for the video size. I've also removed the radar warning message, and added a check for the YUV420 format (though those should be committed separately).
Issue migrated from trac:375 at 2022-04-15 18:08:20 -0700
The text was updated successfully, but these errors were encountered: