While vaDeriveImage is slightly faster than vaGetImage, there's an added cost of having to convert NV12 into YV12 later, which in practice negates any benefits.
Prefer YV12 and YUV420 formats over NV12.
This decrease time to process a VAAPI frame by over 50%: from 2.1ms/frame to 0.9ms/frame on an i7-4650U
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
libva will never return I420 fourcc code, instead it uses IYUV. The first image format returned by vaQueryImageFormat with Intel VA backend is YV12, so using I420 wasn't an issue.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
The number of threads impacts the number of surfaces that should be
allocated by the HW acceleration backend. If not enough surfaces are
allocated, the VAAPI and DXVA modules returned the oldest surface
currently in used. This technique can cause many visual glitches with
some samples. The number of allocated surfaces now scales with the
number of threads used by avcodec.
Fix#9887
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
The plugin does not correctly check decoder profiles, so it should
really not be enabled automatically. It can still be enabled manually
from the UI or CLI as before.
Re-license almost all the playback modules to LGPLv2.1+ with
authorization from their respective contributors (230+)
This includes:
- access, codec, packetizers, demux
- audio filters, audio mixers, audio output
- video filters, video chroma, video output
- text renderers
- XML parser
- ARM NEON and SSE2 optimisations (mostly for chromas and filters)
Some modules are not concerned:
- BDA and DShow access modules because Manol Manolov is AWOL
- Real RTSP, because it is derived from Xine
- x264 and t140 because they are encoders only
- DLL Loader, because it is derived from MPlayer
- DTS packetizer, because Jon Lech Johansen is AWOL
- Shine and WMAfixed, because they are derived from Rockbox
- Real demuxer, as it is derived from MPlayer and Wang Bo is AWOL
- MPC demuxer, as Yavor Doganov is AWOL
- Tivo demuxer, because it is derived from an MPlayer fork
- Playlist demuxer, (WPL and ZPL parts missing), because suheaven is AWOL
- iOS audio output and video display, because author refuses the license change
- Equalizer and compressor, because Ronald Wright is AWOL
- Mono, Headphone and Dolby, because author refuses the license change
- hqdn3d and yadif, because they are from MPlayer/libavfilter
- remoteosd, because it derives from RealVNC code
- MMX optimisations, because Ollie Lho, from SiS, is AWOL
- Rotate, because it depends on GPL motion
Nota Bene:
- Some modules depend on GPL-only libraries, a LGPL module does not mean
that the resulting binary module will be LGPL.
Libraries affected would include liba52, libdvdcss, libdvdnav, libdvdread,
faad2, libdca, libmad, libmpeg2, libpostproc, SRC, sid, zvbi and probably others.
The acceleration plugin now returns the expected pixel format instead
of checking it. That way, the avcodec module can check it directly.
This works as long as each acceleration plugin supports only one pixel
format (otherwise a table would be required).
The selected profile wasn't checked against card's ones.
(ex: resulting in sending MPEG2 to a VC1/h264 only card)
Signed-off-by: Jean-Paul Saman <jpsaman@videolan.org>