On Tue, 2012-08-14 at 14:56 +0200, Hendrik Leppkes wrote:
> You should also check the profile. A lossless profile can be 8-bit
> 4:2:0, and will still fail the hardware decoder.

I didn't try to catch all cases that would fail to work with hardware.
Rather, I added a test for this case because libavcodec itself crashes.
I haven't tested the behavior with lossless though; it's plausible that
it could also crash.

Failing as early as possible does help make fallback easier and possibly
give better error messages, so having libavcodec checks even for some
things that could be cleanly detected later on hardware/driver interface
side can have benefits. You can't expect libavcodec to check for all
input configurations not compatible with hardware though. For example,
some card models have bugs which prevent decoding from working with
particular picture widths. It's not realistic to detect such things
before getting an error from the driver.


_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to