22 Commits

Author SHA1 Message Date
Graham Brereton 6469df1baa VIDEO: Check validity of granulepos in TheoraVideoTrack::decodePacket
A fix was introduced in 43c5d3e7c9, which
adds handling for dropped frames in theora decoding. However, this
didn't handle the case where the granule position for the current packet
is invalid.

These changes introduce a check on the granule position of the current
packet. If the granule position is valid, proceed to properly calculate
the frame number and the next frame start time from the granule
position. If the granule position is not valid, use best estimation of
for these values.

These changes also refactor to combine the checks for the two cases
where the granule position is passed to theora functions. The
documentation for both of these functions states that they will return
-1 in the case that the provided granule position is negative.
2026-04-13 23:02:39 +03:00
Dario Scarpa 43c5d3e7c9 VIDEO: fix TheoraDecoder handling of dup frames
Before this fix, `decodePacket` adjusted `_nextFrameStartTime` and
`_curFrame` only when `th_decode_packetin` returned `0`. But there's
another "non-error" value which can be returned by such function,
`TH_DUPFRAME` (1). This value shows up when a "dup" frame gets decoded,
meaning that playback is proceeding, but there's no need to update
`_surface` (because the contents of the decoded frame buffer have not
changed). Still, one should update `_curFrame` and
`_nextFrameStartTime` to prevent a/v/subtitle sync issues.
2026-01-18 12:36:58 +02:00
Donovan Watteau 2ae50a5059 JANITORIAL: Update some old URLs, and use web.archive.org for deleted content 2025-10-29 14:22:37 +01:00
Cameron Cawley 1c7e5a75c2 IMAGE: Unify the default pixel format for YUV codecs 2025-07-13 20:01:28 +03:00
Walter Agazzi 237cb4d52a VIDEO: Add YUV422 and YUV444 to Theora decoder 2023-06-19 08:43:40 +03:00
Cameron Cawley 70a6159af5 VIDEO: Implement setOutputPixelFormat() for TheoraDecoder 2023-04-05 12:45:13 +02:00
Matthew Duggan b4647bc3f6 VIDEO: Fix rate set on theora decoder, add API to get frame rate.
PR #4276 incorrectly assumed "rate" was the frame rate of the video, but it
should be the playback rate.  Revert that change.

Instead, add an alternate API for fetching frame rate from TheoraDecoder.
2023-02-23 13:44:07 +09:00
Matthew Duggan b2a9df06e2 VIDEO: Set decoder frame rate when loading Theora video. 2022-09-22 03:11:40 +03:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Cameron Cawley 06446d36f5 VIDEO: More fixes when building with Theora and Tremor 2018-08-18 13:33:43 +02:00
Cameron Cawley 5cf3b75deb VIDEO: Fix Theora playback when building with Tremor 2018-08-03 14:52:09 +02:00
Bastien Bouclet ec49730711 VIDEO: Allow setting the mixer sound type used to play audio tracks 2017-07-27 06:40:07 +02:00
Fedor Strizhnev 7225101e62 Add Theora support to systems which use libtremor 2015-01-05 16:53:35 +03:00
Johannes Schickel 8f3a923686 VIDEO: Make GPL headers consistent in themselves. 2014-02-18 02:39:39 +01:00
Einar Johan Trøan Sømåen 6454721e31 VIDEO: Set stereo as bool instead of writing channel amount directly 2013-08-12 00:12:14 +02:00
Johannes Schickel 0cb1504a5b VIDEO: Do not set Surface::pixels directly anymore. 2013-08-03 04:14:08 +02:00
Johannes Schickel 89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Matthew Hoops 09269fce8c GRAPHICS: Implement different luminance ranges
Bink and Theora are now much improved
2012-09-18 16:50:01 -04:00
Matthew Hoops 893a2b37ff GRAPHICS: Rework YUV->RGB code a bit 2012-09-17 19:30:46 -04:00
Matthew Hoops 18823198ad VIDEO: Merge AdvancedVideoDecoder into VideoDecoder 2012-08-16 14:00:14 -04:00
Matthew Hoops 92432a136b VIDEO: Convert TheoraDecoder to the new AdvancedVideoDecoder API 2012-08-13 16:25:03 -04:00
Matthew Hoops 7831225b28 VIDEO: Move TheoraDecoder to video/ 2012-08-12 08:58:00 -04:00