compilers doing DCE at -O0 do not necessarily understand "complex" boolean expressions
Build succeeds with this change, this was the only failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Most code between the 2 functions was duplicated which made keeping
both in sync difficult.
This also fixes some discovered issues with encoding (incorrect
TF switching buffers) and reduces stack usage (reuse the already
allocated CeltFrame->scratch buffer for the quantized coefficients).
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This patch aims to reduce the number of input/output surfaces
NVENC allocates per session. Previous default sets allocated surfaces to 32
(unless there is user specified param or lookahead involved). Having large
number of surfaces consumes extra video memory (esp for higher resolution
encoding). The patch changes the surfaces calculation for default, B-frames,
lookahead scenario respectively.
The other change involves surface selection. Previously, if a session
allocates x surfaces, only x-1 surfaces are used (due to combination
of output delay and lock toggle logic). To prevent unused surfaces,
changing surface rotation to using predefined fifo.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* commit '86157e6db2c7a9222f77fa7e7f50fb9aebc3aa81':
hevc: decouple calling get_format() from exporting the SPS parameters
See 786032cad8 (which has been reverted
and replaced with Anton's version to reduce diffs between the two
projects).
Merged-by: Clément Bœsch <u@pkh.me>
I tried doing this before, but it resulted in weird behaviour with
certain samples. I want to say I think I've got it sorted out now,
and the new autobsf stuff makes it trivial to turn on.
The native support for packed bframes is buggy and I think buggy
in ways beyond what I already try to account for, so this should be
a net improvements.
Previously, the pts value was initialised to AV_NOPTS_VALUE and so
it was not necessary to always set it. Now, with the new-new decode
API, this is no longer true. I'm not sure why I avoided setting the
pts when the decoder value was also AV_NOPTS_VALUE - it clearly
wouldn't have changed anything previously, but here we are.
Failing to do this, means the frame pts will be some random uninitalised
value.
The existing code will segfault if a closing tag shows up when there
was never an opening tag. This isn't a well formed style, but it's also
not a reason to crash.
Fixes: https://trac.ffmpeg.org/ticket/6303
There appears to be no need to treat interlaced videos differently,
also that code is flawed, as for at least one input cur_field would
be always 0.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
* commit '8fb4210ad8785c01fccf2fc59af6a6fa2892b6b2':
qsvdec_h2645: switch to the new generic filtering mechanism
Merged-by: James Almer <jamrial@gmail.com>
* commit '972c71e9cb63e24f57ee481e413199c7d88a8813':
lavc: add support for filtering packets before decoding
Merged-by: James Almer <jamrial@gmail.com>
Set BSF EOF flag only if pkt == NULL or both data and
side data are not present in packet.
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This reverts commit bfdca87ab5.
Packets with no data or side data will be valid EOF signal in an
upcoming merge.
Signed-off-by: James Almer <jamrial@gmail.com>
The new new decode API requires the decoder to ask for the next input
packet, and it cannot just return EAGAIN if that packet cannot be
processed yet. This means we must finally confront how we get this
decoder to block when the input buffer is full and no output frames
are ready yet.
In the end, that isn't too hard to achieve - the main trick seems to
be that you have to aggressively poll the hardware - it doesn't seem
to make any forward progress if you sleep.
Signed-off-by: James Almer <jamrial@gmail.com>
* commit '549d0bdca53af7a6e0c612ab4b03baecf3a5878f':
decode: be more explicit about storing the last packet properties
Also copy pkt->size in extract_packet_props(), as it's needed for
AVFrame.pkt_size
Merged-by: James Almer <jamrial@gmail.com>
ASC frames smaller than AAC_ADTS_HEADER_SIZE were being discarded.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
* commit '6aa4ba7131b6e8668e33430e18101a051fe492eb':
dxva2: Keep code shared between dxva2 and d3d11va under the correct #if
Merged-by: Clément Bœsch <u@pkh.me>
* commit 'fc85646ad495f3418042468da415af73a7a07334':
libopusdec: fix out-of-bounds read
libschroedingerdec: fix leaking of framewithpts
libschroedingerdec: don't produce empty frames
This commit is a noop, see
a86ebbf7f63c0328d58d8c8f543b81
Merged-by: James Almer <jamrial@gmail.com>