vo_vdpau: change how OSD is rendered
When processing OSD bitmaps, the OSD rendering code in vo_vdpau first
uploaded them to an output surface identical to main video display
surfaces, and then blended them from there. Change the code to instead
pack them into an alpha-only surface which is only resized to be
larger if necessary. The main benefit is using less video memory -
a smaller alpha-only surface instead of a fullscreen RGBA surface.
The code currently doesn't keep the bitmaps over multiple OSD calls,
so the packing isn't actually beneficial at the moment (they could
just as well be individually uploaded to and rendered from one shared
area). The code relies on some assumptions about the behavior of the
old OSD code: there can't be more than 6 separate bitmaps, and the
bitmaps provided in the draw callbacks are still valid after the call.
Since main OSD rendering uses libass now, just rendering the libass
bitmaps directly (instead of improving the rendering of the old-style
results generated from them) would be an alternative. However, not all
the OSD types are trivial to convert, and this change moves in a
direction which should help such future changes.