Fixes: asan_double-free_d34593_861_smp3.wmv
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
It asserts that the frame linesize is larger than 37, but it can be
smaller and decoding such frames works.
Before commit cc884a35 src_stride > 7*MB_SIZE was necessary, because the
blocks were interleaved in the tmp buffer and the last block was added
with an offset of 6*MB_SIZE.
It was changed for src_stride <= 7*MB_SIZE to write the blocks
sequentially, hence the larger tmp_step.
After that the assert was only necessary to make sure that the buffer
remained large enough.
Since commit bd2b6b33 s->scratchbuf is used as tmp buffer.
As part of commit 86e107a7 the minimal scratchbuf size was increased to
256*7*MB_SIZE, which is enough for any src_stride <= 7*MB_SIZE.
Also add a comment explaining the tmp_step calculation.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Fixes: asan_heap-oob_394322e_138_cov_4265020547_CVPCMNL1_SVA_C.264
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* commit '461b45efd04859b2672238bc8a6ecab9e9a14948':
lavc: Add nvenc.h to the skipheader
Conflicts:
libavcodec/Makefile
No change as there is no nvenc.h in FFmpeg
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This ensures that no stale pointers leak through on any path
Fixes: signal_sigsegv_c3097a_991_xtrem_e2_m64q15_a32sxx.3gp
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Build system modified
There are several warnings occurring during build after this patch is
applied. The cause of most of these warnings is in that some definitions
needed here are logical part of sbr module and are added in later patches.
When this patches are applied these warnings stop occurring.
The only warning that is added here and is not fixed with later patches
is warning that warns that type mismatch for table ff_aac_eld_window_480.
The reason for this warning is in that ER AAC ELD 480 is not integrated in
to the fixed point implementation at this moment and there is no fixed point
version of this table.
Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Add fixed point implementation of functions for generating tables
Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Move existing code to the new template files
Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '84b223cc6d6ed4cc8bd295457a90f7c94a9dd784':
configure: Make the new qsv encoder depend on libmfx
Conflicts:
configure
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '40af330adf7fde8073271cf2b41ff9adc4c2bba9':
avconv: vda: Unlock the pixel buffer once it is accessed
See: c06fdacc3d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '8fcd121b823caeadbe7597c9ae9229f6f164f949':
doc: Use the succinct syntax for the channelmap example
Conflicts:
doc/filters.texi
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '69ab9f53f901eac6a649e22d28cf093357870627':
hevc: split bitstream unescaping to a separate file
Conflicts:
libavcodec/Makefile
libavcodec/hevc.c
See: afa93d198a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'fd124d8357b1becfde3ac8d5e3320127cf97a5b7':
hevc_ps: split the code for parsing the SPS and exporting it into the context
Conflicts:
libavcodec/hevc.c
libavcodec/hevc_ps.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '0e7c0ec344f542e68e3cc9680e8d41dffeffdb4e':
lavf/hevc: pad the RBSP buffer as required by the bistream reader
Merged-by: Michael Niedermayer <michaelni@gmx.at>
If init_get_bits fails the GetBitContext is invalid and must not be
used. Check the return value in dirac_header and propogate the error.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
For example, the encoder may return MFX_WRN_INCOMPATIBLE_VIDEO_PARAM warning
i.e. ret==5 old loop implementation will repeat several times until output buffer
overflow. New implementation explicitly uses loop only for device busy case.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '02b7c630875c0bc63cee5ec597aa33baf9bf4e20':
h261: Signal freeze picture release for intra frames
Conflicts:
tests/ref/vsynth/vsynth1-h261
tests/ref/vsynth/vsynth2-h261
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Improves the accuracy of measurements, especially in short sections.
To quote the Intel 64 and IA-32 Architectures Software Developer's Manual:
"The RDTSC instruction is not a serializing instruction. It does not necessarily
wait until all previous instructions have been executed before reading the counter.
Similarly, subsequent instructions may begin execution before the read operation
is performed. If software requires RDTSC to be executed only after all previous
instructions have completed locally, it can either use RDTSCP (if the processor
supports that instruction) or execute the sequence LFENCE;RDTSC."
SSE2 is a requirement for lfence so only use it on SSE2-capable systems.
Prefer lfence;rdtsc over rdtscp since rdtscp is supported on fewer systems.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>