I’ve been using SDL a fair bit for various little projects over the past
few years, but I’ve probably only used a small proportion of it. In
particular, I’ve never tried to use YUV overlays before: I’ve had little
reason, and they seem to be one of the least discussed parts of it.
Now OTOH, I’m considering maybe possibly putting in some Dirac-encoded
FMV sequences in the little game I’m working on. I’ve got roughly the
idea of how I’m supposed to use the overlay functions, from reading the
docs, wiki, and the few other bits of example code that I’ve been able
to find, but I’m left wondering about hardware support:
-I gather that SDL can tell, after creating an overlay, whether or not it
is a hardware accelerated one, and that this will (amongst other things?
I’m not sure) depend on whether the particular YUV format chosen was one
supported directly by the hardware. I understand these should handle both
YUV->RGB translation and(?) scaling, and make a big speed difference, at
least on older machines.
-I also gather that most codecs will probably support some YUV formats
more directly than others. I presume translating from one sampling format
to another is a fair bit of overhead. (Dirac apparently supports planar
4:4:4, 4:2:2, and 4:2:0, although these format names still leave me a bit
So anyway, I’m wondering how can I best figure out which YUV formats
(if any) the machine does support directly in hardware? Is it possible?
Would I have to try each type in turn and check the flags? Are there other
requirements to fullfill in order to get hardware overlays? And if there’s
a choice, which ones should I prefer in order to keep things fast? I’d
naively expect that whatever sends least data would be fastest, but maybe
not if downsampling, interleaving, etc adds overhead Or maybe that step
is never a speed problem.
As I’d have to make the video sequences as well, I might still not do
it even if the code is simple, but I’d like to find out as much as I can
before I get in way over my head! (it could at least make a useful
addition to the wiki anyway)
Many thanks in advance,
I think I need a new signature