If the AV1 extra data in the container don't match the bitstream (invalid file)
we end up missing some pictures when using extra resolution.
This can be triggered by this bug in Handbrake with SVT-AV1:
https://github.com/HandBrake/HandBrake/issues/5081
Ref. #28002
When decoding AV1 bitstreams using super resolution, we end up deadlocking
in the decoder pool because we don't have engouh pictures.
We need to add more pictures to the pool so that the decoder works properly.
It seems to need only one extra when using a single thread and 2 when using
more that one thread.
Ref. #28002
When the super resolution of AV1 is used, some frames may be encoded smaller
than the max resolution, but they are actually decoded at the max resolution
by dav1d. So we need to provide a buffer large enough.
Ref. #28002
android_utils depends on GLES2_LIBS and EGL_LIBS, but it isn't forwarded
correctly from the convenience library. In particlar, it contains mostly
video-related code, and some helpers for the android environment state,
which is why the non-video code is using the utils library.
Move the code in a separate convenience library so that it can be
imported without constraints.
Favor the DXVA_xxx variants which are the most common ones. Redirect
missing DXVA_xxx variants to existing alternatives in mingw-w64.
Some GUIDs do not exist in any SDK so we need to define them ourselves.
The we share the redirections with dxva_blocklist.
Just use --verbose=-1 which is strictly equivalent.
This module should not depend on another module's option. And we don't
really need that option anyway.
`CleanInputVideo()` is linked to the input side of the decoder
(.pf_decode) but `video.timestamp_fifo` can be used from the output side
(threads from mediacodec) and is actually also tied to the life cycle of
the video context, as visible in the destructor `CloseDecoder`. Since
the life cycle of the video context is at least the one from the input
side, destroy the timestamp_fifo there.
Fixes a use-after-free when the video context is not released from
CloseDestructor() while mediacodec is still running (not joined yet).
Regression from cdff503ed2 and
57323ddadb