the swscale cpu feature flags were deprecated in 2012 and removed in 2015
([1]) in favour of auto-detection, hence the version guard used within the
`GetSwsCpuMask()` function.
in vlc v4.0-dev we are purging MMX/MMXEXT and so have a need to remove the
corresponding portions of the function. this alone though would leave the
function and related code only catering to enabling altivec in the one
special case of compiling with an old swscale version. i felt that it was
probably better to just rip it all out.
[1]: 9d58639e27
...to use short labels like `PLUGIN_PLAIN` and `PLUGIN_SSE2` rather than
`MODULE_NAME_IS_xxx_yyy[_zzz]`. this makes the code cleaner, easier to read,
and improves consistency. it also helps remove a source of plugin vs.
module confusion.
trying to recognise that something like `MODULE_NAME_IS_i420_yuy2` refers
to the 'plain' variant, compared to `MODULE_NAME_IS_i420_yuy2_sse2` for the
SSE2 variant, was problematic.
the `#else // defined(MODULE_NAME_IS_xxx_yyy_sse2)` instances have been
changed to `#elif defined(PLUGIN_SSE2)` in the i420 plugin.
the flag passed to the nv12 plugin was removed (rather than replaced with
`PLUGIN_PLAIN`) because it is unused.
the i420_rgb plugin used short `SSE2` type defines. these have been changed
to `PLUGIN_SSE2` style for consistency.
notes:
- this removes all SIMD acceleration for x86/x86_64. originally this work
started by converting the MMX code to SSE2, then purged remaining
artifacts, but a build error on android has blocked that work from
being merged for now. this commit thus takes a different approach of
simply purging the old MMX/MMXEXT code first, with getting the SSE2
implementation working to be done as a follow up.
- the `EndMMX()` function is retained (renamed to `EndSSE()`) because it
is still used under the merge code. the `emms` instruction will be
replaced with an `sfence` instruction separately, as more appropriate.
This fixes building with the very latest nightly version of mingw-w64.
In 7fb7c9f6e4,
the MFVideoFormat_L8 mediatype GUID was added, conflicting with our
own definition with the same name.
The callbacks needed to be defined with the correct order and without
oversight since C++14 doesn't support designated initializer. But
vlc_player and playlist callbacks are all optional and there's no point
in having such constraint for C++ code. Use a static lambda initializer
with an initial zero-initializer to circumvent this limitation.
The callbacks needed to be defined with the correct order and without
oversight since C++14 doesn't support designated initializer. But
vlc+playlist callbacks are all optional and there's no point in having
such constraint for C++ code. Use a static lambda initializer with an
initial zero-initializer to circumvent this limitation.
The callbacks needed to be defined with the correct order and without
oversight since C++14 doesn't support designated initializer. But
vlc+playlist callbacks are all optional and there's no point in having
such constraint for C++ code. Use a static lambda initializer with an
initial zero-initializer to circumvent this limitation.
The callbacks needed to be defined with the correct order and without
oversight since C++14 doesn't support designated initializer. But
vlc_player callbacks are all optional and there's no point in having
such constraint for C++ code. Use a static lambda initializer with an
initial zero-initializer to circumvent this limitation.
The picture_t was released implicitly from vout_dispay_Display().
If the caller explicitly wants to check if the display callback is NULL
for other reasons, they might be tempted to avoid calling
vout_display_Display() at all, which would leak the picture.
EACCES means that an operation is not possible in the current state.
This is not to be confused with EPERM meaning that the user does not
have the necessary credentials. Also compare HTTP results 401 and 403.
Also compare with EINVAL (VLC_EBARVAR) meaning that operating is not
possible because the value of a parameter is invalid.
It's already in vd->cfg and cannot change without a call to
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE. The value in vd->cfg during Prepare is always
the correct one.
Contrary to all other hardware decoders, vaapi can't work with a
hwaccel_context anymore. It requires a hw_device_ctx or a hw_frames_ctx
to work.
This first implementation use a hw_device_ctx and let avcodec handle its
frames pool. It is also possible to handle hw_frames_ctx ourself to get
more controls.
Note: Most of the code could be reused by other va modules if we decide
to a hw_device_ctx.
Fixes#25707
The future vaapi va module will create AVFrame from hwframes_ctx with a
frame->buf[0] set internally by avcodec. If this is the case, don't
override it and use opaque_ref (an user field) to keep the reference on
the VLC picture_t.
frame->buf[0] must be valid but doesn't have to contain data since the
data will be accessed via frame->data[] directly.
Furthermore, all va modules are only setting frame->data[3], therefore,
frame->data[0] was always NULL.
With Qt 5.0, a new syntax for signal/slot handling was introduced. This
patch updates the related function call that tests if the signal is
connected to its Qt 5 way of doing.
The event reporting must happen one event at a time and never trigger
behaviour not expected by the underlying application. It uses a custom
runloop mode to ensure only the VLC aware code can use the runloop (and
thus usually main thread) when reporting an event. It was ensured by
calling CFRunLoopRunInMode until the runloop is stopped.
But there were multiple undetected flaws in this:
- CFRunLoopRunInMode will terminate (with timeout or finish) whenever
one event have been processed, so it needs to be called in loop with
the correct invariant.
- CFRunLoopRunInMode with timeout=0 will exit even sooner if there are
not events available.
- CFRunLoopStop will interrupt CFRunLoopInMode only if it's actually
running so there's an asynchronous design flaw where we try to stop
the event loop from another thread without syncing with this event
loop.
This patch fixes those issues, though it adds some callback nightmares,
by adding a new level of dispatch to the main CFRunLoop, which will be
the one to call CFRunLoopStop on itself. Thus, the CFRunLoop must be in
a running state when CFRunLoopStop is called.
It also ensure that we don't leave the loop for another reason than
calling CFRunLoopStop, eg. Timeout or Finish result code.
Switch the event queue used to a dedicated event queue which will create
its own thread, instead of using QOS parallel queues, which prevents
mixing with non-VLC tasks and ensure tasks are ordered.
Benefits of *not* using designated initializers:
- we can't forget a callback
- it's the same in C and C++ (<20)
Benefits of using designated initializers:
- the order of callbacks may not be wrong
- we can read immediately which function is assigned to which callback
(especially if some are NULL)
- an optional callback may be added without modifying all the modules
- we can grep a callback name to find its assignments easily
- it is consistent with others xxx_operations in the codebase
av_init_packet is deprecated in new major version of ffmpeg.
Also use av_packet_free instead of unref.
Use av_packet_clone and AVPacket * in vlc_av_packet_t.