1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

76431 Commits

Author SHA1 Message Date
Hendrik Leppkes
6b5d6c93dd Merge commit '00b62968d079e63bf22028f253ac297292436ebe'
* commit '00b62968d079e63bf22028f253ac297292436ebe':
  os_support: Don't try to return the service name as a string in getnameinfo

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-02 11:43:50 +01:00
Hendrik Leppkes
9dc9b7e682 Merge commit '567ca142952c5be57e52c149c815dfe5d6ac6d41'
* commit '567ca142952c5be57e52c149c815dfe5d6ac6d41':
  configure: Add -D_CRT_NONSTDC_NO_WARNINGS when building with msvc

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-02 11:42:26 +01:00
Paul B Mahol
85a5cdb4fa avformat/segafilm: set video stream duration
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-02 10:53:06 +01:00
Paul B Mahol
0cb09b0511 avformat/segafilm: set audio stream duration
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-02 10:53:05 +01:00
Paul B Mahol
e6cccf9daa avformat/segafilm: implement seeking
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-02 10:53:05 +01:00
Hendrik Leppkes
55abb94b7d avformat: unref packet after storing it in internal packet queue
Fixes a memory leak when using genpts
2015-11-02 09:03:56 +01:00
Hendrik Leppkes
b64fe49371 avformat: always unref the packet after parsing
This fixes a memory leak when side-data is present.
2015-11-02 09:03:56 +01:00
Paul B Mahol
83d20a6a7e avformat/ipmovie: add context to av_log()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-02 09:00:53 +01:00
Paul B Mahol
c293ef258c avformat/ipmovie: put video decoding_map_size into packet and use it in decoder
The size of decoding map can differ from one calculated
internally, producing artifacts while decoding video.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-02 08:44:05 +01:00
Timothy Gu
dee7440531 vf_boxblur: Templatize blur{8,16}
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-01 18:52:50 -08:00
Ganesh Ajjanagadde
c03044c86a avutil/eval: minor typo
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-01 19:35:01 -05:00
Timothy Gu
ee20354b29 pixblockdsp: Use AV_COPY128U for get_pixels_16_c
Before:
  15543 decicycles in get_pixels, 4193214 runs,   1090 skips
After:
   5713 decicycles in get_pixels, 8387564 runs,   1044 skips
2015-10-31 17:25:30 -07:00
Michael Niedermayer
507b01f899 avcodec/h264_slice: Disable slice threads if there are multiple access units in a packet
Fixes null pointer dereference
Fixes Ticket4977

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 22:56:48 +01:00
Michael Niedermayer
58346f6a29 avformat/icecast: Initialize .str based default for AV_OPT_TYPE_STRING types
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 22:37:53 +01:00
Michael Niedermayer
4d76e89c18 avformat/http: Initialize .str based default for AV_OPT_TYPE_STRING types
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 22:37:53 +01:00
Clément Bœsch
953d358462 avcodec/libopenh264enc: use AV_OPT_TYPE_BOOL for allow_skip_frames option 2015-10-31 17:33:22 +01:00
Matt Oliver
bff009697d avutil/x86/intmath: Add missing header.
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2015-11-01 02:11:29 +11:00
Agatha Hu
20abda6b62 avcodec/nvenc: fix potential profile error when encoding yuv444p
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2015-10-31 16:00:39 +01:00
Ganesh Ajjanagadde
8a5b60a6b1 avutil/opencl_internal: add av_warn_unused_result
clSetKernelArg can return an error due to lack of memory (for instance):
https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clSetKernelArg.html.
Thus this error must be propagated.

Currently should not trigger warnings, but adds robustness.
Untested.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-31 10:40:54 -04:00
Ganesh Ajjanagadde
7910a2c269 avfilter/vf_deshake: replace qsort with AV_QSORT
qsort is called indirectly in filter_frame, suggesting its performance
criticality. AV_QSORT is substantially faster due to the inlining of the
comparison callback. Thus, the increase in performance should be worth
the increase in binary size.

This optimization is just a low hanging fruit. The trac ticket 1430 is
a request for an improved deshake filter.

Sample benchmark (x86-64, Haswell, GNU/Linux):
File: original from https://trac.ffmpeg.org/ticket/1430
command: ffmpeg -stream_loop 8 -i file.webm -vf deshake=rx=64:ry=64 -f null -

Timer truncated at 1024 runs.
new:
28260 decicycles in qsort,       1 runs,      0 skips
35570 decicycles in qsort,       2 runs,      0 skips
39010 decicycles in qsort,       4 runs,      0 skips
46897 decicycles in qsort,       8 runs,      0 skips
40442 decicycles in qsort,      16 runs,      0 skips
41611 decicycles in qsort,      32 runs,      0 skips
40345 decicycles in qsort,      64 runs,      0 skips
38967 decicycles in qsort,     128 runs,      0 skips
38647 decicycles in qsort,     256 runs,      0 skips
40238 decicycles in qsort,     512 runs,      0 skips
39676 decicycles in qsort,    1024 runs,      0 skips

old:
1740280 decicycles in qsort,       1 runs,      0 skips
 923560 decicycles in qsort,       2 runs,      0 skips
 511330 decicycles in qsort,       4 runs,      0 skips
 309720 decicycles in qsort,       8 runs,      0 skips
 194900 decicycles in qsort,      16 runs,      0 skips
 142686 decicycles in qsort,      32 runs,      0 skips
 112516 decicycles in qsort,      64 runs,      0 skips
  98166 decicycles in qsort,     128 runs,      0 skips
  88147 decicycles in qsort,     256 runs,      0 skips
  88706 decicycles in qsort,     512 runs,      0 skips
  86783 decicycles in qsort,    1024 runs,      0 skips

Reviewed-by: Nicolas George <george@nsup.org>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-31 10:25:00 -04:00
Matt Oliver
6c6ac9cb17 avutil/x86/intmath: Use tzcnt in place of bsf.
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2015-10-31 23:11:32 +11:00
Matt Oliver
e82883aa88 gdigrab: grab right desktop size if DPI in use, based on patch from Alexander Brotzge
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2015-10-31 23:08:02 +11:00
Ganesh Ajjanagadde
8d9f86bd37 avutil/rational: use frexp rather than ad-hoc log to get floating point exponent
This simplifies and cleans up the code.
Furthermore, it is much faster due to absence of the slow log computation.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-30 23:18:43 -04:00
Michael Niedermayer
865f6f410f avdevice/caca: change AV_OPT_TYPE_STRING to set .str default
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 02:31:40 +01:00
Michael Niedermayer
81d3986d2d avcodec/libopenh264enc: AV_OPT_TYPE_STRING should use .str default
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 02:29:01 +01:00
Michael Niedermayer
9319e08380 avcodec/libopenh264enc: Fix project name
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 02:21:58 +01:00
Michael Niedermayer
a75bebfe9a avcodec/libopenh264enc: set .i64 for AV_OPT_TYPE_INT
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 02:20:53 +01:00
Michael Niedermayer
34f49bfacd avfilter/avf_showcqt: Replace all fmin* and fmax* by FFMIN/FFMAX
Should fix build on x86_32-msvc2012

The alternative of emulating fmin/fmax* turns out to be non trivial

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 00:29:51 +01:00
Muhammad Faiz
306808f10f avfilter/showcqt: fix dependency with avformat
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-30 22:45:46 +01:00
Marton Balint
d9611864c2 ffprobe: add support for printing packet strings metadata as packet tags
ffprobe.xsd already contains the tag element.

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2015-10-30 20:47:43 +01:00
Ganesh Ajjanagadde
47af5db721 all: fix enum definition for large values
ISO C restricts enumerator values to the range of int. Thus (for instance) 0x80000000
unfortunately does not work, and throws a warning with -Wpedantic on
clang 3.7.

This fixes it by using alternative expressions that result in identical
values but do not have this issue.

Tested with FATE.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-30 15:06:19 -04:00
Ganesh Ajjanagadde
191f611906 avutil/wchar_filename: add av_warn_unused_result
Current code is fine, this just adds robustness.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-30 13:47:28 -04:00
Ganesh Ajjanagadde
20a30077c3 avutil/mathematics: correct documentation for av_gcd
av_gcd is now always defined regardless of input. This documents this
change in the "documented API". Two benefits (closely related):
1. The function is robust, and there is no need to worry about INT64_MIN, etc.

2. Clients of av_gcd, like av_reduce, can now be made fully correct. Currently,
av_reduce can trigger undefined behavior if e.g num is INT64_MIN due to
integer overflow in the FFABS. Furthermore, this undefined behavior is
completely undocumented, and could be a fuzzer's paradise. The FFABS was needed in the past as
av_gcd was undefined for negative inputs. In order to make av_reduce
robust, it is essential to guarantee that av_gcd works for all int64_t.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-30 13:42:04 -04:00
Nicolas George
e8e7eb150f ffmpeg_filter: check encoder before using it to set frame size.
Fix a segfault when no encoder is found for a default codec
with a complex filter graph.
2015-10-30 10:55:10 +01:00
Martin Storsjö
00b62968d0 os_support: Don't try to return the service name as a string in getnameinfo
Some systems may be lacking getservbyport; the previous ifdef wasn't
quite enough since it still assumed that struct servent was defined,
as pointed out by Clément Gregoire.

Simply remove the possibility to return non-numeric services in
getnameinfo; no caller of getnameinfo within libavformat
currently try to use getnameinfo for retrieving the port number without
NI_NUMERICSERV, and falling back on getservbyport may be non-threadsafe.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-10-30 10:03:58 +02:00
Steven Robertson
b38e685c05 vf_lut: Add support for RGB48 and RGBA64.
Signed-off-by: Steven Robertson <steven@strobe.cc>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-30 03:55:12 +01:00
Michael Niedermayer
203dc14693 avformat/3dostr: Remove redundant ;
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-30 03:02:41 +01:00
Michael Niedermayer
a7af002b5f avformat/oggparseogm: Enable parser for mpeg4
Fixes regression with iJi.ogv

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-30 02:31:49 +01:00
Carl Eugen Hoyos
bd1d67efe8 lavc/proresdec2: Fix slice_count for very high resolutions.
QT ignores the value written in the frame header.
Issue reported by forum user Koracas.
2015-10-30 01:32:39 +01:00
Carl Eugen Hoyos
2f1d6d45af lavc/cdg: Add transparency support. 2015-10-30 01:24:50 +01:00
Ganesh Ajjanagadde
b7fb7c4542 avutil/mathematics: make av_gcd more robust
This ensures that no undefined behavior is invoked, while retaining
identical return values in all cases and at no loss of performance
(identical asm on clang and gcc).
Essentially, this patch exchanges undefined behavior with implementation
defined behavior, a strict improvement.

Rationale:
1. The ideal solution is to have the return type a uint64_t. This
unfortunately requires an API change.
2. The only pathological behavior happens if both arguments are
INT64_MIN, to the best of my knowledge. In such a case, the
implementation defined behavior is invoked in the sense that UINT64_MAX
is interpreted as INT64_MIN, which any reasonable implementation will
do. In any case, any usage where both arguments are INT64_MIN is a
fuzzer anyway.
3. Alternatives of checking, etc require branching and lose performance
for no concrete gain - no client cares about av_gcd's actual value when
both args are INT64_MIN. Even if it did, on sane platforms (e.g all the
ones FFmpeg cares about), it produces a correct gcd, namely INT64_MIN.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 19:13:55 -04:00
Ganesh Ajjanagadde
0fe5dcd660 avfilter/avf_showvolume: use log10 instead of log()/M_LN10
This is likely more precise and conveys the intent better.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 19:10:49 -04:00
Ganesh Ajjanagadde
b45daad2aa ffmpeg: use log10 instead of log()/log(10)
This is more concise and conveys the intent better.
Furthermore, it is likely more precise as well due to lack of floating
point division.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 19:05:29 -04:00
Ganesh Ajjanagadde
b8e1980807 avfilter/vf_ssim: use log10 instead of log()/log(10)
This is likely more precise and conveys the intent better.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 19:02:05 -04:00
Ganesh Ajjanagadde
ec66bcc0e7 avfilter/avf_showspectrum: use log10 instead of log()/...
This is likely more precise and conveys the intent better.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 18:55:10 -04:00
Ganesh Ajjanagadde
59d37f5a4e avfilter/vf_psnr: use log10 instead of log()/log(10)
This is likely more precise and conveys the intent better.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 18:53:11 -04:00
Andreas Cadhalpun
e8c3716064 swscale: rename sws_rgb2rgb_init to ff_sws_rgb2rgb_init
It is an internal swscale function and thus should not be exported.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-10-29 23:49:46 +01:00
Andreas Cadhalpun
8bfbc8c5e5 swscale: rename sws_context_class to ff_sws_context_class
It is an internal swscale symbol and thus should not be exported.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-10-29 23:49:10 +01:00
Andreas Cadhalpun
41455dca60 avformat: stop exporting ffurl_read_complete, ffurl_seek and ffurl_size
They are not in public headers and not used outside of libavformat.

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-10-29 23:48:13 +01:00
Ganesh Ajjanagadde
4d0d85c94a avfilter/af_volume: use log10 instead of log()/M_LN10
This is likely more precise and conveys the intent better.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 18:46:00 -04:00