On Wed, 4 Oct 2017 23:27:18 +0100 Mark Thompson <[email protected]> wrote:
> On 04/10/17 23:16, wm4 wrote: > > On Wed, 4 Oct 2017 23:01:47 +0100 > > Mark Thompson <[email protected]> wrote: > >>> > >>> In addition to this, should there be an AVCodec flag that tells the API > >>> user whether this decoder can do half-transparent software fallback? > >>> Half-transparent as in it can call get_format mid-stream to reconfigure > >>> it to sw decoding. > >>> > >>> Or would such a flag be redundant with AVCodecHWConfig.hwaccel? > >> > >> Is there any decoder which does support software output formats but > >> doesn't support this case from the point of view of the user? (Including > >> in the other tine.) > >> > >> I think all decoders which offer a software format in get_format() are > >> required to be able to do this - if they can't then they need to filter > >> the list provided to get_format(). > > > > Well, as an API user I'd definitely want to know whether this is a true > > hwaccel or not, because a true hwaccel will have 1. API-visible > > software fallback, and 2. doesn't require the API user to do any sort > > of explicit software fallback. > > > > A simple AVCodec flag whether something is a builtin decoder or an > > external wrapper might help too with this. Personally I don't really > > want to guess. > > It sounds like this is more what you want. Is not the problem you are > actually trying to solve that some external decoders have narrower codec > support that the internal ones? (E.g. you feed any hardware decoder an > 11-bit YUV 4:2:2 H.264 stream and it immediately explodes.) Yes. The main thing is actually that if a full-stream hardware decoder obviously fails, I'd want to restart decoding with the builtin codec. But if it's a hwaccel, this would be counter-productive, because the hwaccel can fall back transparently. > The flag directly on the decoder hwconfig doesn't really help, because > software output is possible on many of these decoders (though it may just be > the driver downloading it internally) so the flag should be set. So, an AVCodec cap maybe? _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
