[MPlayer-dev-eng] [PATCH] VF Overlay
Jason Tackaberry
tack at urandom.ca
Sat Feb 27 23:39:09 CET 2010
On Wed, 2010-02-24 at 15:35 -0500, Jason Tackaberry wrote:
> Let me take some time this weekend though and try to address the last
> batch of review comments. I'll submit a patch for another (hopefully
> final) review.
Updated patch attached. Changes since last submission by Ben:
1. Initialize premultiplied buffers; the whole premul buffer is
used on blending, but an invalidate command may cause only a
subregion of the whole buffer to get premultiplied. (The fact
that this has ever worked must be a fluke.)
2. Added the maligned atexit code back in. AFAICT it's needed
because MPlayer is obligated to destroy the shmem segment it
creates, and there is no uninit for the vf because we want to
survive across loadfiles or loops. If we don't, ipcs exposes
the cruft that MPlayer leaves behind. Maybe someone has an idea
for an alternative approach?
3. Enforced that only one instance of vf_overlay can exist in the
filter chain, and documented why. (Fixes the persistence
problem reported by Aleks Huson on 2009-08-27.)
4. Fixed the asm operand constraints based on Reimar's suggestions.
5. Moved initialization of mm5/mm7 registers and emms from
blend_image() to the more inner blend_plane_MMX in order to
reduce the probability that the compiler decides to use these
registers for some other reason.
6. Added a comment to blend_plane_MMX() explaining why the change
discussed in #5 above isn't _quite_ correct still, but in
practice it's probably fine.
7. Rewrote TOOLS/overlay-test.c to be both cleverer and correct.
(The previous example required the user image to be exactly the
same as the overlay size or else it would display wrong.) But
the example now requires imlib2 instead of SDL. Probably fine,
since it's just an example, and imlib2 is widely available
anyway.
8. I did _not_ remove the input stubs from mencoder.c because the
suggested alternatives weren't feasible:
* Moving vf_overlay.c to SRCS-MPLAYER instead of
SRCS-COMMON broke mencoder because vf_info_overlay is
referenced in libmpcodecs/vf.c. I could create a
special vf_overlay-mencoder.c file that redeclares a
dummy vf_info_overlay (because vf_overlay is not usable
with mencoder anyway), but that's very kludgey.
* Including the necessary objects in mencoder quickly spun
out of control, requiring input/input.c, input/lirc.c,
input/appleir.c, mp_fifo.c, linking in lirc, not to
mention the need to resolve newly introduced duplicated
declarations (like mplayer_put_key).
Any suggestions for #2 or #8, or any further comments, suggestions, or
flames?
Jason.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vf_overlay-2010-02-27.diff
Type: text/x-patch
Size: 66308 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100227/921f4f6c/attachment.bin>
More information about the MPlayer-dev-eng
mailing list