Commit Graph

40436 Commits

Author SHA1 Message Date
Andrew Stone a8c104a511 AVOption: add support for dictionary types.
In order to support metadata being set as an option, it's necessary to be able
to set dictionaries as values.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:07:40 +00:00
Andrew Stone afbd4b7e09 lavf: add AVFormatContext/AVStream fields for signaling to the user when events happen.
The only flags, for now, indicate if metadata was updated and are set after each call to
av_read_frame(). This comes with the caveat that, on stream start, it might not be set properly
as packets might be buffered in AVFormatContext.packet_buffer before being given to the user
in av_read_frame().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:04:48 +00:00
Martin Storsjö 72199e1041 configure: Check for nanosleep in headers as well, not only in libs
On mingw64 with c++11 support, the link libraries do contain a
nanosleep function, while it isn't exposed via the headers. Using
check_func_headers instead of a plain check_func fixes this
misdetection.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-08-13 14:39:01 +03:00
Martin Storsjö 428b0578c6 w32threads: Use newer thread synchronization functions when targeting Vista
When explicitly targeting Vista or newer (which only happens if the
caller explicitly sets _WIN32_WINNT to a high enough value via the
extra cflags option - otherwise configure script sets
-D_WIN32_WINNT=0x0502), we already unconditionally link to the
ConditionVariable functions, since 4622f11f9.

Similarly use the newer -Ex versions of CreateEvent, CreateSemaphore,
InitializeCriticalSection and WaitForSingleObject, that all appeared
in Vista. When building Windows Store applications, the older versions
of these functions aren't available, only the -Ex functions. When
doing such a build, the user can set -D_WIN32_WINNT=0x0600 to
forcibly use the newer functions instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-08-13 14:38:18 +03:00
Martin Storsjö 8bf3bf69ad http: Stop reading after receiving the whole file for non-chunked transfers
Previously this logic was only used if the server didn't
respond with Connection: close, but use it even for that case,
if the server response is non-chunked.

Originally the http code has relied on Connection: close to close
the socket when the file/stream is received - the http protocol
code just kept reading from the socket until the socket was closed.
In f240ed18 we added a check for the file size, because some
http servers didn't respond with Connection: close (and wouldn't
close the socket) even though we requested it, which meant that the
http protocol blocked for a long time at the end of files, waiting
for a socket level timeout.

When reading over tls, trying to read at the end of the connection,
when the peer has closed the connection, can produce spurious (but
harmless) warnings. Therefore always voluntarily stop reading when
the specified file size has been received, if not using a chunked
transfer encoding. (For chunked transfers, we already return 0
as soon as we get the chunk header indicating end of stream.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-08-13 14:34:25 +03:00
Michael Niedermayer da7d839a0d ffv1dec: check that global parameters do not change in version 0/1
Such changes are neither allowed nor supported

Found-by: ami_stuff
Bug-Id: CVE-2013-7020
CC: libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-12 10:21:21 +00:00
Christophe Gisquet 3187fa14a3 hevc_mvs: avoid deriving tmvp in amvp
Reduces the number of calls to tmvp derivation from 933685 to 586271 on
a sequence.

Reviewed-by: Mickaël Raulet <mraulet@insa-rennes.fr>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-12 10:13:43 +00:00
Christophe Gisquet 14ca0aa69b hevc: wait proper position for tmvp
The position is either rounded or not checked, so delay the wait to
check the proper value.

Reviewed-by: Mickaël Raulet <mraulet@insa-rennes.fr>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-12 10:13:21 +00:00
Christophe Gisquet cf6090dc62 hevc: use intreadwrite
When dealing with MVs, both components may be processed at a time.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-12 10:03:20 +00:00
Christophe Gisquet ed53cc217f hevc: derive partial merge list
The merge list only needs to be derived up to the merge index.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-12 09:59:30 +00:00
Christophe Gisquet 3505b19652 hevc: derive partially amvp list
When the candidate has been found, no need to derive others.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-12 09:58:14 +00:00
Christophe Gisquet 09182b3224 hevc: simplify rounding
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-12 09:57:25 +00:00
Christophe Gisquet d1b1c3bb5e hevc: reorder loops
iterate over memory in a more continuous order

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-12 09:57:05 +00:00
Martin Storsjö 08b94f160a configure: Don't pass MSVC compiler options -M[TD] to armasm
The -MD option (for enabling a dynamically linked crt) gets interpreted
as a cpp option for generating dependency information (into a file named
'-.d', when preprocessing to a pipe). We shouldn't be passing
any and all C compiler flags to armasm (which is a plain assembler,
only with cpp bolted on via gas-preprocessor), but these are the
main conflicting ones.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-08-10 21:29:06 +03:00
Diego Biurrun cc1d8c54c1 avcodec: Postpone FF_IDCT_XVIDMMX removal until the next version bump 2014-08-10 10:41:55 -07:00
Anton Khirnov d63443b968 lavc: drop the av_fast_{re,m}alloc compatibility wrappers
They were only needed until the bump.
2014-08-10 15:40:38 +00:00
Nidhi Makhijani 8dca0877e3 mpegts: Return proper error code on invalid input data
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-10 07:24:30 -07:00
Reinhard Tartler 59cc081220 Prepare for 11_alpha2 Release 2014-08-10 10:07:55 -04:00
Martin Storsjö ab0742d2f3 configure: Suggest upgrading gas-preprocessor instead of just installing
Older versions don't support all the features we test for now.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-08-10 16:25:45 +03:00
Diego Biurrun 9f8cf50e3b configure: Enable gas-preprocessor on all OSes but only if available
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-08-10 16:25:45 +03:00
Martin Storsjö f4312352fc configure: Add probe identification of MS armasm
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-08-10 16:25:45 +03:00
Diego Elio Pettenò 2597a842a0 tiff: Improve grayscale support
Only use PAL8 if palette is present, else use GRAY8 for pixfmt.

Instead of simulating a grayscale palette, use real grayscale pixels, if no
palette is actually defined.

Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-08-10 15:21:44 +02:00
Luca Barbato fb1ddcdc8f avresample: Introduce AVFrame-based API 2014-08-10 14:26:37 +02:00
Luca Barbato 8c6f430291 mpeg: Suppress a compiler warning on callback type 2014-08-09 21:39:36 +02:00
Anton Khirnov 9325d88eba lavc: remove obsolete and disabled avpriv functions 2014-08-09 16:59:34 +00:00
Anton Khirnov 24c788f487 Remove obsolete FF_API_REFERENCE_DTS cruft. 2014-08-09 16:59:26 +00:00
Anton Khirnov 24e87f7f42 Remove obsolete FF_API_PROBE_MIME cruft. 2014-08-09 16:59:21 +00:00
Anton Khirnov 472f9ed312 Remove obsolete FF_API_AVFRAME_COLORSPACE cruft. 2014-08-09 16:59:13 +00:00
Anton Khirnov 1985c2e75c Bump major versions of all libraries. 2014-08-09 16:58:33 +00:00
Anton Khirnov f4c444e17d Postpone API-incompatible changes until the next bump. 2014-08-09 16:57:10 +00:00
Anton Khirnov 7acdd3a127 hevc_filter: avoid excessive calls to ff_hevc_get_ref_list()
1) each of the loops run within a single CTB, so the relevant reference
list is constant
2) when that CTB is, or lies on the same slice as, the current one, we
can use a simple access instead of a relatively expensive call to
ff_hevc_get_ref_list()
2014-08-09 16:15:51 +00:00
Anton Khirnov 52a2c17ec0 hevc_refs: drop the handling of negative coordinates in ff_hevc_get_ref_list()
It makes no sense and cannot happen in any place from which this
function is called.
2014-08-09 16:15:38 +00:00
Anton Khirnov a7a17e3f19 hevc_filter: move some conditions out of loops 2014-08-09 16:15:11 +00:00
Anton Khirnov 70211539a3 hevc: deobfuscate slice/tile boundary handling for DBF
Use named constants instead of magic numbers, avoid using variables with
inverse meaning from what their name implies.
2014-08-09 16:13:48 +00:00
Anton Khirnov 5501971578 hevc_filter: drop more redundant checks
The if() around those loops ensures this condition is always false.
2014-08-09 16:13:37 +00:00
Anton Khirnov 65b8b6c476 hevc_filter: drop redundant checks
ff_hevc_deblocking_boundary_strengths() is never called if the
deblocking filter is disabled for the slice.
2014-08-09 16:13:24 +00:00
Anton Khirnov 4d1ff2a489 hevc: calculate the dbf strength in hls_pcm_sample() only if dbf is enabled 2014-08-09 16:13:11 +00:00
Diego Biurrun d35b94fbab avcodec: Rename xvidmmx IDCT to xvid
The Xvid IDCT is not MMX-specific.
2014-08-08 11:13:30 -07:00
Diego Biurrun 84d173d3de xvididct: Ensure that the scantable permutation is always set correctly
This fixes cases where the scantable permuation would get overwritten by
the general idctdsp initialization.
2014-08-08 11:13:29 -07:00
Diego Biurrun 6f1960ab71 idct: cosmetics: Drop one unnecessary if-block level 2014-08-08 11:13:29 -07:00
Diego Biurrun 444c73583d configure: Only run gas checks on ARM and PowerPC
Standalone GNU assembly is not used on x86.
2014-08-08 05:30:32 -07:00
Diego Biurrun 0026e356d0 configure: Die if gas is unavailable under aarch64 as well as ARM 2014-08-08 05:30:32 -07:00
Luca Barbato e4c9e59a45 mpeg: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-08 05:22:09 -07:00
Diego Biurrun 454697603e mpegts: Use av_free() to free memory allocated by av_strdup() 2014-08-08 03:12:57 -07:00
Diego Biurrun 5b220e1e19 mpegts: Fix memory leaks and related crashes in mpegs_write_header() 2014-08-07 07:52:17 -07:00
Diego Biurrun f8ab9f2fe3 mpegts: Avoid unnecessary variable shadowing 2014-08-07 07:52:17 -07:00
Diego Biurrun 6d6bd3a3db mpegts: Drop some unnecessary parentheses 2014-08-07 07:52:17 -07:00
Diego Biurrun b7b1bf9166 mpegts: K&R formatting cosmetics 2014-08-07 07:48:54 -07:00
Diego Biurrun bb789016d4 swscale: Undeprecate sws_getContext()
sws_getCachedContext is not a full replacement for the function.
2014-08-07 04:03:00 -07:00
Diego Biurrun ad1ee5fa75 avcodec: Undeprecate reordered_opaque
It allows attaching other external, opaque data to the frame and passing it
through the reordering process, for cases when the caller wants other data
than just the plain packet pts.  There is no way to cleanly achieve this
without the field.
2014-08-07 04:03:00 -07:00