[MPlayer-dev-eng] [PATCH] VOBSUB/DVDSUB bytecode handling

Christof Buergi christof at buergi.lugs.ch
Mon Nov 18 22:36:30 CET 2002


Hello there

Okay, this one is kind of a beast. It works for me, but I think it 
needs some thorough testing. And some altering, too, perhaps. What it 
does, is this:

- spudec_process_control is changed, so it handles only one control
  chain at a time. It is also changed to stop at the end of the
  package, even if there is no final 0xff.
- spudec_decode is changed, so it resets some values, so
  spudec_process_control knows, that it has a new package.
- spudec_heartbeat is changed, so it checks every time, whether the
  next control chain in the current subtitle package has to be handled,
  and calls spudec_process_control if so.
- spudec_visible and spudec_reset are slightly changed to handle
  visibility detection more properly.
- spudec_handle_t gets 4 extra variables, so the above stuff can be
  handled properly.

Now, those working on the subtitle stuff might have already seen, what 
I'm up to. If you haven't:

The VOBSUB and DVDSUB subtitles contain a bytecode, which describes, 
how the subtitle is to be displayed. This bytecode is split into 
several chains with a timecode each. MPlayer, up to now, handles the 
whole bytecode at once, as soon as it got the complete package. 
Normally, this is no trouble. On some DVDs however, this doesn't work. 
In particular, I have two DVDs here, that set the subtitle to "all 
transparent", just before it is officially stopped. On MPlayer, this 
means disaster: The subtitle is all transparent all the time, making it 
just a little bit hard to read. So, what I actually changed, was this: 
the chains are not executed all at once, but one by one, each as soon 
as his timecode has been reached.

Problems:
- It's slower than the original code, of course. It might be to big a
  solution for the problem. However, we might run into more trouble
  with the current code, when (if!) DVDs actually make use of the
  bytecodes potential.
- This patch doesn't touch hardware SPU. (Is there any, yet?)
- Since spu_handle_t has been changed, any copy in other programs or
  modules has to be changed as well (IIRC, this only affects
  subrip.c).

Okay, now it's up to you.

-- 
                     _ ___      http://www.p2501.ch/             / \
|/  /\   /\   /\  | \   |  |    christof at buergi.lugs.ch          \ /
|\ /--\ /  \ /  \ | /_  |  |    I'm breaking for DAUs, too!       x
                                Say NO to HTML in mail and news  / \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spudec.patch
Type: text/x-diff
Size: 9471 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20021118/556c92c3/attachment.patch>


More information about the MPlayer-dev-eng mailing list