[vlc-devel] VCD OGT subtitles and rescaling

R. Bernstein rocky at panix.com
Tue Dec 23 04:53:31 CET 2003


A rough cut at SVCD subtitles now works. A small problem seems to be
the rescaling and positioning of them. The subtitle bitmaps have
aspect ratio 1:1 while the video picture used is 4:3. 

Also the video seems to be scaled down say with respect to what's
shown in xine.  In vlc the video window is 480 x 360 pixels while in
xine it is 768 x 480 pixels. The video is in fact 480x480 pixels.  Any
suggestions for how to scale the subpicture? Or have it blended with
scaling?  It would also be nice if there is an option to antialias it
as well.

Which leads me to rendering. Internally I've made the bitmaps be in
the form used in the spudec, the DVD subtitle render routine. However
a couple things I notice. A simple format would remove the run-length
encoding and just have a simple list of pixels interpreted as a
2-dimensional array. However there is a run-length of in the upper
nibble the low-order byte of a 16-bit word. For OGT subtitles I've
encoded with a run-length of 1 everwhere. The second weird thing is
that although the color number and run length are put in a single
byte, but each pixel occupies a 16-bit word. Given this, the code
would be simplified and sped up by removing the shift/unshift-ing
or'ing and going on in the AddNibble routine of spudec and instead
just store by bytes, e.g. 8-bit run-length in one byte, 8-bit color on
another, rather than 0-byte, 4-bit run-length, and 4-bit color. But
again, removing the run-length would make scaling and anitaliasing
easier.

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list