Commit Graph

44864 Commits

Author SHA1 Message Date
Martin Storsjö
44aa9105c5 makedef: Fold as much text transformations as possible into the initial dump
This avoids redoing them for each expression in the list.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-08-31 14:22:15 +03:00
Martin Storsjö
abf1c058d1 msvc: Properly specify dllexport for data symbols shared across dll boundaries
We currently only have exported data symbols within libavcodec, but
the concept is easy to extend to other libraries if necessary.
The attribute declaration needs to be in a private header though,
since we can't use CONFIG_SHARED in public installed headers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-08-31 14:22:06 +03:00
Martin Storsjö
e41daa6246 Remove support for building for mingw32ce (Windows CE)
The toolchain for this target is unmaintained since many years.

While it has been continuously build tested on fate, it hasn't
actually been tested at runtime since many, many years (and back
then, only a few codecs in libavcodec were tested).

So far, keeping support for it has been mostly effortless, but
the compiler does seem to have issues with dllimported data symbols,
ending up as internal compiler errors in some cases. Instead of
jumping through further hoops to work around that, just remove the
target.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-08-31 14:21:08 +03:00
wm4
173b56218f lavf: make avio_read_partial() public
Main use-case is proxying avio through a foreign I/O layer and a custom
AVIO context, without losing latency and performance characteristics.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-08-30 14:29:14 +02:00
Derek Buitenhuis
5e3f6dc701 swscale: Do not expand a macro with 'defined' in it
Fixes:

    libswscale/utils.c:1632:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
    #if USE_MMAP
        ^
    libswscale/utils.c:1577:49: note: expanded from macro 'USE_MMAP'
    #define USE_MMAP (HAVE_MMAP && HAVE_MPROTECT && defined MAP_ANONYMOUS)
                                                    ^
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-08-28 10:26:14 +02:00
Martin Storsjö
29ba1e6076 configure: Include d3d11va_extralibs in libavutil
This fixes shared WinRT/UWP builds with d3d11va enabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-08-25 09:22:42 +03:00
Michael Niedermayer
feed239021 yadif: Account for the buffer alignment while processing the frame edges
Avoid out of bound reads.

Bug-Id: 1031
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-08-22 22:31:19 +02:00
Martin Storsjö
7b7760ad6e aarch64: Fix negative movrel offsets for windows
On windows, the offset for the relocation doesn't get stored in
the relocation itself, but as an unsigned immediate in the opcode.
Therefore, negative offsets has to be handled via a separate sub
instruction, just as on MachO.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-08-22 13:41:08 +03:00
Luca Barbato
0c99b900d8 png: Support RGBA64 pixel format 2017-08-21 09:23:44 +02:00
Luca Barbato
9f5b77c16f png: Report more details regarding unsupported pixel formats 2017-08-21 09:23:44 +02:00
Mark Thompson
4c0588b456 mpeg2enc: Don't mark all streams as component video
Since there is no information about the source format, "unspecified"
is the correct value to write here.

All tests using the MPEG-2 encoder are updated, as this changes the
header on all outputs.
2017-08-20 15:14:37 +01:00
Mark Thompson
b78c30d7ec lavc: Add mpeg2_metadata bitstream filter 2017-08-20 15:14:33 +01:00
Mark Thompson
2bc9ba8d3c lavc: Add coded bitstream read/write support for MPEG-2
Also enable MPEG-2 support in the trace_headers filter.
2017-08-20 13:59:17 +01:00
Mark Thompson
768eb9182e cbs_h2645: Return error if writing fails 2017-08-20 13:59:17 +01:00
Anton Khirnov
f70f71d60c h264dec: use a large enough field for reference list modification values
pic_num can be at most 17-bit, so uint8_t is not sufficient.

Found-By: Bradley Sepos <bradley@bradleysepos.com>
CC: libav-stable@libav.org
2017-08-18 14:55:31 +02:00
Piotr Bandurski
a05c6e8c11 xwddec: support 8bpp grayscale
(cherry picked from commit b9c94e826e)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-08-13 19:58:40 +02:00
Diego Biurrun
d34a133b78 dfa: Disallow odd width/height and add proper bounds check for DDS1 chunks
DDS1 chunks are decoded in 2x2 blocks, odd chunk width or height is not
allowed in that case. Also ensure that the decode buffer is big enough
for all blocks being processed.

Bug-Id: CVE-2017-9992
CC: libav-stable@libav.org
2017-08-13 19:58:40 +02:00
Mark Thompson
a14a12ca13 vaapi_h265: Reduce the amount of padding in the stream
It is not necessary to pad to the CTU size.  The CB size of 8x8 should be
sufficient, but due to constraints in the Intel driver (the one usable
implementation of this) it has to be padded to 16x16 like in H.264.
2017-08-13 17:55:02 +01:00
Mark Thompson
e3e8eab359 vaapi_h265: Add support for AUD NAL units
Matching the H.264 encoder.
2017-08-13 17:55:02 +01:00
Mark Thompson
ac12486714 vaapi_h265: Convert to use coded bitstream infrastructure
Also improves the metadata and generally makes the configuration
a bit cleaner.
2017-08-13 17:55:02 +01:00
Mark Thompson
a49ee60d5f vaapi_h264: Add support for SEI recovery points
Included by default with non-IDR intra frames.
2017-08-13 17:55:02 +01:00
Mark Thompson
820a4483af vaapi_h264: Add support for AUD NAL units
Adds a new private option to enable them (off by default).
2017-08-13 17:55:02 +01:00
Mark Thompson
7a4fac5e91 vaapi_h264: Convert to use coded bitstream infrastructure 2017-08-13 17:55:02 +01:00
Mark Thompson
b31a9eae02 lavc: Add hevc_metadata bitstream filter
This is able to modify some header metadata found in the VPS/SPS/VUI,
and can also add/remove AUDs.
2017-08-13 17:55:02 +01:00
Mark Thompson
e6874bc3af lavc: Add h264_redundant_pps bitstream filter
This applies a specific fixup to some Bluray streams which contain
redundant PPSs modifying irrelevant parameters of the stream which
confuse other transformations which require correct extradata.

A new single global PPS is created, and all of the redundant PPSs
within the stream are removed.
2017-08-13 17:54:59 +01:00
Mark Thompson
9e93001b61 lavc: Add h264_metadata bitstream filter
This is able to modify some header metadata found in the SPS/VUI,
and can also add/remove AUDs and insert user data in SEI NAL units.
2017-08-13 17:48:49 +01:00
Mark Thompson
f11d8a5e8b lavc: Add trace_headers bitstream filter
Supports all streams that the coded bitstream infrastructure does
(currently H.264 and H.265).
2017-08-12 22:17:20 +01:00
Mark Thompson
867381b8b5 lavc: Add coded bitstream read/write support for H.265 2017-08-12 22:17:20 +01:00
Mark Thompson
acf06f4544 lavc: Add coded bitstream read/write support for H.264 2017-08-12 22:17:20 +01:00
Mark Thompson
18f1706f33 lavc: Add coded bitstream read/write API 2017-08-12 22:17:20 +01:00
Vittorio Giovara
538e508751 pixfmt: Support chroma-derived and ictcp color matrices
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-08-10 15:36:04 +02:00
Vittorio Giovara
ebf3b9e8a8 h264: Add support for alternative transfer characterics SEI
The use of this SEI is for backward compatibility in HLG HDR systems:
older devices that cannot interpret the "arib-std-b67" transfer will
get the compatible transfer (usually bt709 or bt2020) from the VUI,
while newer devices that can interpret HDR will read the SEI and use
its value instead.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-08-10 15:32:59 +02:00
Mark Thompson
19388a7200 vaapi_encode: Move quality option to common code
Use AVCodecContext.compression_level rather than a private option,
replacing the H.264-specific quality option (which stays only for
compatibility).

This now works with the H.265 encoder in the i965 driver, as well as
the existing cases with the H.264 encoder.
2017-08-06 14:42:04 +01:00
Mark Thompson
1329c08ad6 hevc: Validate the number of long term reference pictures
This would overflow if the stream contained a value greater than the
maximum allowed by the standard (32).
2017-08-05 23:54:35 +01:00
Mark Thompson
b88da98b34 hevc: Improve stream constraint values in common header
Add comments to describe the sources of the constraint values expressed here,
and add some more related values which will be used in following patches.

Fix the incorrect values for SPS and PPS count (they are not the same as those
used for H.264), and remove HEVC_MAX_CU_SIZE because it is not used anywhere.
2017-08-05 23:54:35 +01:00
Mark Thompson
aaf4414650 h264: Add stream constraint values to the common header
With comments describing the derivation of each value.
2017-08-05 23:54:35 +01:00
Sean McGovern
defe307fb2 mov: move stsd finalization to an appropriate place
mov_finalize_stsd_codec() parses stream information from the ALAC extradata,
so run it after the extradata processing is completed in mov_read_stsd().

Fixes playback of 96kHz ALAC streams muxed by qaac or the reference alac encoder.

Adapted from an FFmpeg patch by Hendrik Leppkes <h.leppkes@gmail.com>

Bug-Id: 1072
2017-07-31 17:41:01 -04:00
Sean McGovern
3050dabaa9 mov: Do not set stsd_count if mov_read_stsd() fails
Based on an FFmpeg patch by Michael Niedermayer <michael@niedermayer.cc>
2017-07-31 17:41:01 -04:00
Sean McGovern
d7bdab1ad7 mov: log and return early on non-positive stsd entry counts
Based on an FFmpeg patch by Michael Niedermayer <michael@niedermayer.cc>
2017-07-30 10:51:12 -04:00
Anton Khirnov
b90fdb2c71 hevcdec: add a CUVID hwaccel 2017-07-28 14:12:56 +02:00
Anton Khirnov
770cf1dbc2 fate/hevc: specify output pixel format explicitly
This allows running those tests with hwaccel.
2017-07-28 14:12:36 +02:00
Anton Khirnov
00fd914d49 hevcdec: set the active SPS before calling get_format()
This way the SPS is available to the hwaccel init code.
2017-07-28 14:12:30 +02:00
Peter Große
a58873b111 avconv: when using -loop option bail out if seek to start fails
Fixes an infinite loop when a demuxer fails to seek to the start of the input.

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2017-07-28 13:13:44 +02:00
Anton Khirnov
004ea63714 cuvid: add cuvid.h to SKIPHEADERS 2017-07-27 12:46:13 +02:00
Anton Khirnov
b9129ec466 h264dec: add a CUVID hwaccel
Some parts of the code are based on a patch by
Timo Rothenpieler <timo@rothenpieler.org>
2017-07-26 23:24:34 +02:00
Anton Khirnov
704311b294 decode: add a per-frame private data for hwaccel use
This will be useful in the CUVID hwaccel. It should also eventually
replace current decoder-specific mechanisms used by various other
hwaccels.
2017-07-26 23:24:14 +02:00
Anton Khirnov
badf0951f5 decode: add a mechanism for performing delayed processing on the decoded frames
This will be useful in the CUVID hwaccel.
2017-07-26 23:24:07 +02:00
Anton Khirnov
359a8a3e2d decode: add a method for attaching lavc-internal data to frames
Use the AVFrame.opaque_ref field. The original user's opaque_ref is
wrapped in the lavc struct and then unwrapped before the frame is
returned to the caller.

This new struct will be useful in the following commits.
2017-07-26 23:23:58 +02:00
Anton Khirnov
de77671438 decode: avoid leaks on failure in ff_get_buffer()
If the get_buffer() call fails, the frame might have some side data
already set. Make sure it gets freed.

CC: libav-stable@libav.org
2017-07-26 23:23:47 +02:00
Anton Mitrofanov
70946e6059 h264dec: Fix mix of lossless and lossy MBs decoding
CC: libav-stable@libav.org

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2017-07-26 23:23:19 +02:00