[MPlayer-dev-eng] [PATCH] vobsub positioning code clean-up & scaling & all

Csillag Kristof fenwick at freemail.hu
Fri Jan 21 18:31:43 CET 2005


Hi!

I finished the clean-up & the scaling.

1. About the clean-up stuff:

This patch removes some redundancy from the code.

Nothing umportant is changed;  only some things that were calculated
multiple times (at multiple places of the code) are now centered.

I fixed some small bugs in the process, though:
  - If the SPU frame size exactly matches the targeted video-size,
	and so now rescaling is needed, the -spualign and -subpos
	options did not	work; the vobsub was always rendered to the
	original position. Fixed that.
  - I already mentioned that sometimes unsigned integers were used to
	store positions, and then tested whether they are smaller than
	zero. (I also submitted a patch for this bug.)
	I fixed that in the porcess, so that patch is now obsolate.
  - When the subpos variable is changed (r & t keys), the subtitle
	OSD-objects are marked to force-update. However, since SPU
	also listens to this option, and )it _does_ influence the
	drawing of SPU subtitles), the SPU objects has to be marked
	for updating, too. (Otherwise, the OSD object's BBOX information
	will get obsolated, and ... arcane things may happen, I don't
	know.)
	(See the one-line insert in mplayer.c in the patch.)
	
	
2. the scaling patch.

Now it's done.

Adds options:
	-spu-scale <factor>
	-spu-center

Description:

The VobSub subtitles are scaled with <factor>.  (0.1 <= factor <=4)
They are never scaled to wider than the value given by -subwidth

If -spu-center is given, the subtitle is centered around the center of
the screen, if it's not given, the subtitle is centered around the
center of the un-scaled subtitle.

  * * *

I have updated my other patches so that everything works togethet.

  * * *

Dependencies:

The A1 patch (scaling) depends on the A0 patch (pos.cleanup)
The B1 patch (black_box) depends on the B0 patch (cron_horizontally)

Note: some stream contain subtitle images that have the same size than
to movie. You can not scale these up without the crop-horizontally-too
patch. So, albeit A1 does not depend on B1, you might need it.

Patches C and D (missing_palette_bug and (calculate_alpha_efficiently)
are independent.


  * * *

Sooo. what to I have to do to get these included?


-- 
Csillag Kristof <fenwick at freemail.hu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a0_positioning-fix-and-cleanup.patch
Type: text/x-patch
Size: 10383 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050121/782ad41a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a1_scaling.patch
Type: text/x-patch
Size: 4533 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050121/782ad41a/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: b0_crop_horizontally_too.patch
Type: text/x-patch
Size: 4408 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050121/782ad41a/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: b1_black_box_bg.patch
Type: text/x-patch
Size: 3816 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050121/782ad41a/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c_mkv_missing_palette_bugfix.patch
Type: text/x-patch
Size: 1934 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050121/782ad41a/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: d_calculate_alpha_efficiently.patch
Type: text/x-patch
Size: 888 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050121/782ad41a/attachment-0005.bin>


More information about the MPlayer-dev-eng mailing list