Commit Graph

43719 Commits

Author SHA1 Message Date
Ronald S. Bultje
9790b44a89 vp9mc/x86: sse2 MC assembly.
Also a slight change to the ssse3 code, which prevents a theoretical
overflow in the sharp filter.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-08-03 11:04:51 +02:00
James Almer
67922b4ee4 vp9mc/x86: add AVX and AVX2 MC
Roughly 25% faster MC than ssse3 for blocksizes 32 and 64.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-08-03 11:00:08 +02:00
Clément Bœsch
3cda179f18 vp9mc/x86: rename ff_* to ff_vp9_*
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-08-03 10:57:55 +02:00
James Almer
8be8444d01 vp9mc/x86: rename ff_avg[48]_sse to ff_avg[48]_mmxext
pavgb is an sse integer instruction, so the mmxext flag is enough

Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-08-03 10:57:55 +02:00
Clément Bœsch
6ab642d69d vp9mc/x86: simplify a few inits.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-08-03 10:57:55 +02:00
Ronald S. Bultje
3a09494939 vp9mc/x86: add 16px functions (64bit only).
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-08-03 10:57:55 +02:00
Anton Khirnov
89466de4ae vp9/x86: rename vp9dsp to vp9mc
It only contains the MC SIMD, other SIMD will go into different files.
2016-08-03 10:57:50 +02:00
Anton Khirnov
89aebc5bcc lavc: align the linesize to 32 when AVX is enabled 2016-08-03 10:56:53 +02:00
James Almer
63ac8e2d93 lavu: add LOCAL_ALIGNED_32
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-08-03 10:56:52 +02:00
Christophe Gisquet
3c504bc359 x86: deduplicate some constants
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-08-03 10:56:52 +02:00
Anton Khirnov
d3e4d406b0 h264dec: reset nb_slice_ctx_queued for hwaccel decoding
Fixes hwaccel decoding of files with multiple slices.

Found-By: Mark Thompson <sw@jkqxz.net>
2016-08-03 10:56:52 +02:00
Michael Niedermayer
e5b019725f m4vdec: Check for non-startcode 00 00 00 sequences in probe
This makes the m4v detection less trigger-happy.

Bug-Id: 949
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-08-03 08:27:02 +02:00
Diego Biurrun
3ccec334b8 sbrdsp: Move a misplaced #endif directive to the right spot 2016-08-03 08:26:40 +02:00
Diego Biurrun
e723dce6f8 dvbsubdec: Use NULL instead of 0 as pointer value 2016-08-03 08:26:40 +02:00
Martin Storsjö
fc94a1acc2 Revert "libavutil: Use an intermediate variable in AV_COPY*U"
This reverts commit 014773b66b.

Since 230b1c070, the bytewise AV_W*() macros only expand their
argument once, i.e. doing exactly the same change as was done
in the AV_COPY*U macros, so this change is no longer necessary.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-08-02 21:18:18 +03:00
Martin Storsjö
9806b9ab5c Revert "Don't use expressions with side effects in macro parameters"
This reverts commit 25bacd0a0c.

Since 230b1c070, the bytewise AV_W*() macros only expand their
argument once, so revert to the more readable version of these.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-08-02 21:18:12 +03:00
Martin Storsjö
f79d847400 intreadwrite: Use the __unaligned keyword on MSVC for ARM and x86_64
AV_WN64 is meant for unaligned data, but the existing av_alias* unions
(without a definition for the av_alias attribute - we don't have one
for MSVC) indicate to the compiler that they would have sufficient
alignment for normal access, i.e. the compiler is free to assume
8 byte alignment.

On ARM, this makes sure that AV_WN64 (or two consecutive AV_WN32) is
done with two str instructions instead of one strd.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-08-02 11:33:23 +03:00
Martin Storsjö
230b1c070b intreadwrite: Add intermediate variables in the byteswise AV_W*() macros
This avoids issues with expanding the argument multiple times,
and makes sure that it is of the right type for the following shifts.

Even if the caller of a macro could be expected not to pass parameters
that have side effects if expanded multiple times, these fallback
codepaths are rarely, if ever, tested, so it is expected that such
issues can arise.

Thefore, for safety, make sure the fallback codepaths only expand
the arguments once.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-08-02 11:32:35 +03:00
Martin Storsjö
014773b66b libavutil: Use an intermediate variable in AV_COPY*U
If AV_RN and AV_WN are macros with multiple individual reads and
writes, the previous version of the AV_COPYU macro would fail if
the reads and writes overlap.

This should not be any less efficient in any case, given a
sensibly optimizing compiler.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-31 22:50:55 +03:00
Martin Storsjö
25bacd0a0c Don't use expressions with side effects in macro parameters
AV_WB32 can be implemented as a macro that expands its parameters
multiple times (in case AV_HAVE_FAST_UNALIGNED isn't set and the
compiler doesn't support GCC attributes); make sure not to read
multiple times from the source in this case.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-31 22:50:51 +03:00
Martin Storsjö
7ebdffc353 dxv: Check to make sure we don't overrun buffers on corrupt inputs
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-31 22:50:47 +03:00
Anton Khirnov
e328178da9 qsvdec: only access hwaccel_context is the pixel format is QSV
We do not strictly specify that hwaccel_context must be cleared if no
hwaccel is used.

Reported-By: wm4 <nfxjfg@googlemail.com>
2016-07-31 08:19:45 +02:00
Anton Khirnov
ed1cd81076 flac demuxer: improve probing
Extend the probe function to validate the STREAMINFO block that must
follow the fLaC ID tag.
2016-07-31 08:19:45 +02:00
Anton Khirnov
5ebef79abe Fix instances of broken indentation found by gcc 6 2016-07-31 08:19:27 +02:00
Diego Biurrun
5ed4644d6d x11grab: Rename internal component to "xcbgrab" 2016-07-29 19:03:10 +02:00
Diego Biurrun
4fef648d10 Remove the legacy X11 screen grabber
The XCB screen grabber is a drop-in replacement and not under GPL.
2016-07-29 19:03:10 +02:00
Luca Barbato
8495d84f01 ac3dec: Add some inline hints
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-07-29 18:46:48 +02:00
Luca Barbato
3db51bf671 ac3dec: Simplify skipping
skip_bits_long() can skip up to 32-bit ranges.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-07-29 18:46:48 +02:00
Luca Barbato
f0ccc65bc9 ac3dec: Split coupling-specific code from decode_audio_block()
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-07-29 18:46:48 +02:00
Luca Barbato
a5ebe5d121 ac3dec: Split spx-specific code from decode_audio_block()
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-07-29 18:46:48 +02:00
Luca Barbato
2ac00d2d1d mov: Validate the ID number
IDs in MOV start from 1.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-07-29 18:46:48 +02:00
Anton Khirnov
a115eb9e75 mimic: do not release the newly obsolete reference at the end of decoding
The reference frames are used in update_thread_context(), so modifying
them after finish_setup() is a race. The frame in question will be
released during the next decode call.

CC: libav-stable@libav.org
2016-07-29 15:59:48 +02:00
Diego Biurrun
ae90119c67 configure: Simplify license incompatibility check 2016-07-27 10:59:48 +02:00
Diego Biurrun
e46a6fb773 avconv: Check that muxing_queue exists before reading from it
This avoids a segfault on nonexisting codec names.
2016-07-27 10:59:48 +02:00
Martin Storsjö
100fb0ddfd configure: Allow detecting and using LLVM lld-link as linker for windows
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-26 09:29:49 +03:00
Martin Storsjö
79fb069299 configure: Move defines for controlling MSVCRT headers to the CRT detection section
This allows these flags to be automatically enabled for clang,
when using MSVCRT headers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-26 09:29:38 +03:00
Martin Storsjö
56af0bc10f configure: Check for strtoll and redirect to _strtoi64 in the msvcrt block
This allows doing this redirection, if building with clang against
old enough MSVC headers that lack strtoll (2012 and older).

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-26 09:29:24 +03:00
Diego Biurrun
48b80f8393 hpeldsp: Explain why put_no_rnd_pixels_tab is larger than necessary 2016-07-25 19:38:18 +02:00
Luca Barbato
40ad05bab2 checkasm: Cast unsigned to signed
Avoid a warning for passing an unsigned value to abs(), some compilers
might optimize away abs().
2016-07-23 08:27:32 +02:00
Luca Barbato
b183abfb5b vpx: Support color range
The range field has been introduced in version 1.6.0
2016-07-23 08:27:29 +02:00
Anton Khirnov
ad71d3276f lavfi: add a QSV deinterlacing filter 2016-07-22 19:08:13 +02:00
Anton Khirnov
8e07c22e50 qsvenc: print warnings from encode/init 2016-07-22 19:08:13 +02:00
Anton Khirnov
0956fd4606 qsvenc: do not re-execute encoding on all positive status codes
It should only be done for DEVICE_BUSY/IN_EXECUTION
2016-07-22 19:08:13 +02:00
Anton Khirnov
95414eb2dc qsv: print more complete error messages
Include the libmfx error code and its description
2016-07-22 19:08:13 +02:00
Anton Khirnov
d9ec3c6014 qsvenc: take only the allocated dimensions from the frames context
Other parameters, like the display size, should still be taken from the
codec context.
2016-07-22 19:08:13 +02:00
Anton Khirnov
37a9015ee8 qsvenc: add support for p010 2016-07-22 19:08:13 +02:00
Anton Khirnov
21962261c7 qsv: handle the semi-packed formats in map_fourcc as well
This will allow using this function for encoding as well, where the
input format is already the semi-packed version.
2016-07-22 19:08:13 +02:00
Anton Khirnov
f65285aba0 lavc: set sw_pix_fmt for hwaccel encoding 2016-07-22 19:08:13 +02:00
Anton Khirnov
d59641abfd lavc: initialize AVCodecContext.sw_pix_fmt properly
Currently it's memset to 0, which is YUV420P. It should be initialized
to none.
2016-07-22 19:08:13 +02:00
Anton Khirnov
8b7a9729aa avconv_qsv: use the actual pixel format provided by lavc
Do not hardcode NV12. This allows 10bit decoding with -hwaccel qsv.
2016-07-22 19:08:12 +02:00