Commit Graph

42021 Commits

Author SHA1 Message Date
Michael Niedermayer e4610300de x86: cavs: Remove an unneeded scratch buffer
Simplifies the code and makes it build on certain compilers
running out of registers on x86.

CC: libav-stable@libav.org
Reported-By: mudler
2015-05-28 18:40:40 +02:00
Anton Khirnov 1b1bb2c4ef rl: Add error checking to ff_rl_init(). 2015-05-28 15:38:43 +01:00
Anton Khirnov 324e50ee95 rl: Add a function for freeing dynamically allocated tables.
Such tables are not used anywhere currently, but that should change.
2015-05-28 15:38:43 +01:00
Anton Khirnov 6f57375d70 rl: Rename ff_*_rl() to ff_rl_*() 2015-05-28 15:38:43 +01:00
Anton Khirnov fa1923f182 mpegvideo: Move ff_*_rl functions to a separate file 2015-05-28 15:38:43 +01:00
Vittorio Giovara 419e3404d0 mpegvideo: Drop exchange_uv() function and use its code directly
Code is small enough that there is no advantage in a separate function.
2015-05-28 15:38:43 +01:00
Martin Storsjö d4d90504a6 tls_gnutls: Add missing includes for the gcrypt thread safety callbacks
This fixes building with gcrypt-backed gnutls versions, broken
in 57cde2b180.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-28 15:05:52 +03:00
Timothy Gu dd4d709be7 x86inc: Clear __SECT__
Silences warning(s) like:

    libavcodec/x86/fft.asm:93: warning: section flags ignored on
    section redeclaration

The cause of this warning is that because `struc` and `endstruc`
attempts to revert to the previous section state [1].

The section state is stored in the macro __SECT__, defined by
x86inc.asm to be `.note.GNU-stack ...`, through the `SECTION`
directive [2].

Thus, the `.note.GNU-stack` section is defined twice
(once in x86inc.asm, once during `endstruc`), causing the warning.

That is the first part of the commit: using the primitive `[section]` format
for .note.GNU-stack etc., which does not update `__SECT__` [2].

That fixes only half of the problem. Even without any `SECTION` directives,
`__SECT__` is predefined as `.text`, which conflicting with the later
`SECTION_TEXT` (which expands to `.text align=16`).

[1]: http://www.nasm.us/doc/nasmdoc6.html#section-6.4
[2]: http://www.nasm.us/doc/nasmdoc6.html#section-6.3

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-28 11:40:15 +02:00
wm4 57cde2b180 lavf: move TLS-related ifdeffery to library specific files
There is no need to have this mess in network.c.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-26 21:48:51 +03:00
wm4 d8ffb2055f lavf: split tls.c
Move the OpenSSL and GnuTLS implementations to their own files. Other
than the connection code (including options) and some boilerplate, no
code is actually shared.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-26 21:48:32 +03:00
Sebastian Ramacher cf1f3d837e doc: Fix spelling of 'Transmission'
Signed-off-by: Sebastian Ramacher <sramacher@debian.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-26 13:41:44 +02:00
Steve Lhomme d8039ef8d2 D3D11va: add a Direct3D11 video decoder similar to DXVA2
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-25 11:47:08 +02:00
Vittorio Giovara 4e17946f10 mpegvideo: Rework various functions not to use MpegEncContext directly 2015-05-22 15:34:39 +01:00
Vittorio Giovara a3f4c930ac mpegvideo: Have ff_mpeg_ref_picture use AVCodecContext directly 2015-05-22 15:34:39 +01:00
Vittorio Giovara d528045558 mpegvideo: Have ff_mpeg_unref_picture use AVCodecContext directly
This skips setting the memory to 0 but allows for reuse on different
contextes. Oracle did not report any unsual activity because of it.
2015-05-22 15:34:39 +01:00
Vittorio Giovara 6f54dc43ce mpegvideo: Drop stream_codec_tag
The field is unused.
2015-05-22 15:34:39 +01:00
Vittorio Giovara 9c1db92ad3 mpegvideo: Drop err_recognition
It is just a duplicate of an AVCodecContext member so use it instead.
2015-05-22 15:34:39 +01:00
Vittorio Giovara 848e86f74d mpegvideo: Drop flags and flags2
They are just duplicates of AVCodecContext members so use those instead.
2015-05-22 15:34:39 +01:00
James Almer 29216d7fd1 tls: fix compilation when both gnutls and openssl are enabled
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-22 12:21:38 +03:00
Martin Storsjö 94599a6de3 tls: Remove all the local polling loops
These aren't necessary any longer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-22 00:06:11 +03:00
Martin Storsjö d13b124eaf tls: Remove the nonblocking code
Since the underlying URLContext read functions are used,
they handle interruption, without having to handle it at
this level.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-22 00:05:01 +03:00
Martin Storsjö d15eec4d6b tls: Use custom IO to read from the URLContext
This avoids hijacking the fd, by reading using the normal
URLContext functions instead. This allowing reading data that has
been buffered in the underlying URLContext.

This avoids using the libraries own send functions that can
cause SIGPIPE.

The fd is still used for polling the lowlevel socket, for
waiting for retries.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-22 00:04:32 +03:00
wm4 3efe0393e4 hevc: make avcodec_decode_video2() fail if get_format() fails
Personally, I need the decoder to back out if get_format() returns no
usable pixel format. This didn't work because the error code was not
propagated down the call chain. This in turn happened because the
variable declaration removed in this patch shadowed the variable, whose
value is returned at the end of the function. Consequently, failures of
decode_nal_unit() were ignored in this place.

Reviewed-by:  Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 18:59:06 +01:00
Vittorio Giovara 7046bd9bc9 lavfi: Move avcodec header to the only filter needing it
af_ashowinfo, due to the enum AVAudioServiceType use.
2015-05-19 18:56:40 +01:00
Vittorio Giovara eafbc6716c vmnc: Delay pixel size check
Some clients incorrectly set 24 as bits_per_coded_sample, while
the actual value is preserved in one of the codec headers.
In order to work around this, delay the check until decode_frame().

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-19 18:55:30 +01:00
Timothy Gu 732dd65868 doc: Add $branch to FATE config template
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-16 17:06:35 +02:00
Stefano Pigozzi e7c5e17d4f vda: Make output CVPixelBuffer format configurable
This is useful for client programs to ask for nv12 surfaces instead of the
current default (uyvy), since those are more efficient to decode to.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-13 17:39:37 +02:00
Gopu Govindaswamy 3b5e5e6a29 libx265: Use the Multi-library Interface
Use the Multi-library interface to load at runtime x265 libraries
supporting alternative bit depths (e.g. 8bit and 16bit).

The linked library will try to load the library supporting the
pixel format if it is not supported by itself.

Fallback requesting the native library (passing 0 to x265_api_get) if
a library supporting the requested bit depth is not available.

Signed-off-by: Gopu Govindaswamy <gopu@multicorewareinc.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-13 17:14:50 +02:00
Shiina Hideaki 85ca012ba6 mjpegenc: Fix JFIF header byte ordering
The header had a wrong version description.

Bug-Id: 808
Signed-off-by: Shiina Hideaki <shiina@yndrd.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-12 16:30:48 +01:00
Vittorio Giovara d84429d41e dnxhd: Print unknown header when found 2015-05-12 16:30:48 +01:00
Vittorio Giovara 8fc11abe1f mkv: Print unsupported mov tags when found 2015-05-12 15:28:31 +01:00
Vittorio Giovara 0348e74c01 quickdraw: Skip the empty 512 byte header for images
Found-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
2015-05-12 15:28:31 +01:00
Carl Eugen Hoyos d0dce15da3 quickdraw: Make the palette opaque
Additional overflow fix by Michael Niedermayer <michaelni@gmx.at>.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-12 15:28:31 +01:00
Carl Eugen Hoyos da5c6a97bb riff: Add MultiScope II fourcc MSC2 as MJPEG
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-12 03:22:18 +02:00
foo86 0670acc4f1 dca_parser: Extend DTS core sync word and fix existing check
The previous version checked for 14-bit streams and did not properly
work across buffer boundaries.

Use the 64-bit parser state to make extended sync word detection work
across buffer boundary and check the extended sync word for 16-bit LE
and BE core streams to reduce probability of alias sync detection.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-12 03:20:25 +02:00
Martin Storsjö b8d2630c53 dashenc: Reduce the segment duration if cutting out parts with edit lists
This makes sure that the time + duration of the first segment
matches the start time of the next segment for e.g. AAC audio
with encoder delay.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-10 22:57:21 +03:00
James Almer ac1a1cb948 dashenc: replace attribute id with contentType for the AdaptationSet element
id should be an integer, not a string. It is also optional, so use
contentType instead which is the proper attribute for these values.

This fixes an MPD validation error.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-10 22:57:20 +03:00
Luca Barbato 2fb02ecfd1 fate: Reduce the number of frames used to test video filters
Use 5 frames for video filter tests and a single one for the
pixelformat tests.

Greatly reduces the test duration without reducing coverage.
2015-05-10 13:49:30 +02:00
wm4 379e5603f4 id3v2: Do not export empty APIC description
APIC tags always have a description. Tag writers obviously leave it
empty if there is no description. In this case, libavformat would export
"" as title. Do not set the title instead.
2015-05-09 15:55:50 +02:00
wm4 b9f7a67708 png: Set the color range as full range
The format uses full range for the gray formats.

CC: libav-stable@libav.org
2015-05-09 15:55:50 +02:00
Luca Barbato 254f3daba4 nut: Make sure to clean up on read_header failure
Based on Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> work.

CC: libav-stable@libav.org
2015-05-09 15:55:50 +02:00
Andreas Cadhalpun 4d0ee4962b avi: Validate sample_size
And either error out or set it to 0 if it is negative.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-09 15:51:31 +02:00
Andreas Cadhalpun b34257eefd nut: Check chapter creation in decode_info_header
This fixes a segmentation fault when accessing the metadata.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org
2015-05-08 11:10:51 +02:00
Andreas Cadhalpun 243e8443cd alac: Reject rice_limit 0 if compression is used
If in compression mode rice_limit = 0 leads to call
`show_bits(gb, k)` in `decode_scalar` with k = 0.

Request a sample in case it is valid and it should be accepted.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org
2015-05-08 11:10:51 +02:00
Andreas Cadhalpun 295e05a762 ape: Support _0000 files with nblock smaller than 64
The decode_array_0000 assumed that 64 is the minimal block size
while it is not.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-08 11:10:51 +02:00
Michael Niedermayer e0010bb91f mux: Do not leave stale side data pointers in ff_interleave_add_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-06 15:01:35 +01:00
Vittorio Giovara 6c8c7c2462 dump: Print AVAudioServiceType side data 2015-05-06 14:57:46 +01:00
Vittorio Giovara 04070dbca0 libx265: Fix 'braces around scalar initializer' warning
x265 Reordered the x265_picture fields in the commit

51b1518de2 (diff-945b5354d8767dfac13334f2d22cf58fR107)

Now the first field is an integer and not an array.
2015-05-06 14:53:29 +01:00
Vittorio Giovara d81fb63d87 fate: Add a PICT test
This stimulates the direct pixel mode in Quickdraw decoder.
2015-05-06 14:36:01 +01:00
Vittorio Giovara 7b734ee55d lavf: Open PICT images with Quickdraw
Update the pictor test to use the pictor codec, as both formats share
the .pic file extension.
2015-05-06 14:27:34 +01:00