ffmpeg.git
5 years agoMerge commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d'
Hendrik Leppkes [Tue, 29 Sep 2015 13:14:59 +0000 (15:14 +0200)]
Merge commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d'

* commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d':
  lavc: Make AVPacket.duration int64, and deprecate convergence_duration

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoavcodec/apedec: fix undefined left shifts of negative numbers
Ganesh Ajjanagadde [Sun, 20 Sep 2015 02:18:54 +0000 (22:18 -0400)]
avcodec/apedec: fix undefined left shifts of negative numbers

This fixes -Wshift-negative-value reported with clang 3.7+, e.g
http://fate.ffmpeg.org/log.cgi?time=20150919172459&log=compile&slot=x86_64-darwin-clang-polly-notiling-3.7.
Note that the patch crucially depends on int >= 32 bits,
an assumption made in many places in the codebase.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit 'd00bb8addccb63fa3feacb06d2a310731dc0113b'
Hendrik Leppkes [Tue, 29 Sep 2015 12:35:07 +0000 (14:35 +0200)]
Merge commit 'd00bb8addccb63fa3feacb06d2a310731dc0113b'

* commit 'd00bb8addccb63fa3feacb06d2a310731dc0113b':
  mips: intreadwrite: Only execute that code for mips r1 or r2

Not merged, as FFmpeg has a separate condition to protect this code.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit '1016a75cf3170648dc9b59fdef170cbfc142f8ad'
Hendrik Leppkes [Tue, 29 Sep 2015 12:33:35 +0000 (14:33 +0200)]
Merge commit '1016a75cf3170648dc9b59fdef170cbfc142f8ad'

* commit '1016a75cf3170648dc9b59fdef170cbfc142f8ad':
  configure: mips: Support mips r6, r2 and r1

Not merge, as MIPS support in ffmpeg is handled
quite differently and I do not have an env to test.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agolavc: Make AVPacket.duration int64, and deprecate convergence_duration
wm4 [Sat, 26 Sep 2015 16:13:55 +0000 (18:13 +0200)]
lavc: Make AVPacket.duration int64, and deprecate convergence_duration

Note that convergence_duration had another meaning, one which was in
practice never used. The only real use for it was a 64 bit replacement
for the duration field. It's better just to make duration 64 bits, and
to get rid of it.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
5 years agoMerge commit '678f788fea3380e5cbbf75baac5cc0ce07a56a42'
Hendrik Leppkes [Tue, 29 Sep 2015 12:24:35 +0000 (14:24 +0200)]
Merge commit '678f788fea3380e5cbbf75baac5cc0ce07a56a42'

* commit '678f788fea3380e5cbbf75baac5cc0ce07a56a42':
  configure: Set the initial ldflags to match the cflags

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit '1a4c5fe56008c61b0362c75bea5d446dc5b256bc'
Hendrik Leppkes [Tue, 29 Sep 2015 12:23:45 +0000 (14:23 +0200)]
Merge commit '1a4c5fe56008c61b0362c75bea5d446dc5b256bc'

* commit '1a4c5fe56008c61b0362c75bea5d446dc5b256bc':
  libopenh264enc: Use av_log() to log messages

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit '8aecec84021a61b943718ff3d7c2c57fcd4af199'
Hendrik Leppkes [Tue, 29 Sep 2015 12:20:05 +0000 (14:20 +0200)]
Merge commit '8aecec84021a61b943718ff3d7c2c57fcd4af199'

* commit '8aecec84021a61b943718ff3d7c2c57fcd4af199':
  qsvdec: make ff_qsv_decode_init() static

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit '539e5ac2ecfec2e2f441222a43fb0583643ea607'
Hendrik Leppkes [Tue, 29 Sep 2015 12:17:29 +0000 (14:17 +0200)]
Merge commit '539e5ac2ecfec2e2f441222a43fb0583643ea607'

* commit '539e5ac2ecfec2e2f441222a43fb0583643ea607':
  examples/qsvdec: free the lavc decoder before closing MFX/VAAPI

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit '3ee462dca1038e63b8e8d5e751121736d5772a5d'
Hendrik Leppkes [Tue, 29 Sep 2015 12:17:23 +0000 (14:17 +0200)]
Merge commit '3ee462dca1038e63b8e8d5e751121736d5772a5d'

* commit '3ee462dca1038e63b8e8d5e751121736d5772a5d':
  examples/qsvdec: do not free the surfaces in the frame_free() callback

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit '2c32eace5ec4d1d7ca4e0220856cd2815ccc71b2'
Hendrik Leppkes [Tue, 29 Sep 2015 12:17:09 +0000 (14:17 +0200)]
Merge commit '2c32eace5ec4d1d7ca4e0220856cd2815ccc71b2'

* commit '2c32eace5ec4d1d7ca4e0220856cd2815ccc71b2':
  qsvdec: close the MFX decoder on uninit

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit 'd0c8c380ecf3d9bb16621a4fb59ebbcde301002a'
Hendrik Leppkes [Tue, 29 Sep 2015 12:14:10 +0000 (14:14 +0200)]
Merge commit 'd0c8c380ecf3d9bb16621a4fb59ebbcde301002a'

* commit 'd0c8c380ecf3d9bb16621a4fb59ebbcde301002a':
  qsv: document AVQSVContext members

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit '5d2daebf3cc8de4cee1973db6a2229beaad3b7cd'
Hendrik Leppkes [Tue, 29 Sep 2015 12:12:47 +0000 (14:12 +0200)]
Merge commit '5d2daebf3cc8de4cee1973db6a2229beaad3b7cd'

* commit '5d2daebf3cc8de4cee1973db6a2229beaad3b7cd':
  qsvenc: mark the encoders as INIT_CLEANUP

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit '83847cc8fa97e0fc637a0962bafb837acdb6eacc'
Hendrik Leppkes [Tue, 29 Sep 2015 12:10:25 +0000 (14:10 +0200)]
Merge commit '83847cc8fa97e0fc637a0962bafb837acdb6eacc'

* commit '83847cc8fa97e0fc637a0962bafb837acdb6eacc':
  qsvenc: do not try to close the encoder if the session is NULL

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit '741b352b16dad74b87c4a39bade8902633a2b0e6'
Hendrik Leppkes [Tue, 29 Sep 2015 11:53:42 +0000 (13:53 +0200)]
Merge commit '741b352b16dad74b87c4a39bade8902633a2b0e6'

* commit '741b352b16dad74b87c4a39bade8902633a2b0e6':
  qsvdec: list supported pixel formats

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit 'ae25413daf42a06f078ed81bb545ec23a8e0b482'
Hendrik Leppkes [Tue, 29 Sep 2015 11:48:58 +0000 (13:48 +0200)]
Merge commit 'ae25413daf42a06f078ed81bb545ec23a8e0b482'

* commit 'ae25413daf42a06f078ed81bb545ec23a8e0b482':
  lavfi: do not exclude hwaccel formats from ff_all_formats()

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit 'cc285521000020ab237d183dc3a26f99fce3030f'
Hendrik Leppkes [Tue, 29 Sep 2015 11:48:24 +0000 (13:48 +0200)]
Merge commit 'cc285521000020ab237d183dc3a26f99fce3030f'

* commit 'cc285521000020ab237d183dc3a26f99fce3030f':
  checkasm/x86: Correctly handle variadic functions

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit '5405584b7b54ca889c341743de1d58792449830d'
Hendrik Leppkes [Tue, 29 Sep 2015 11:48:05 +0000 (13:48 +0200)]
Merge commit '5405584b7b54ca889c341743de1d58792449830d'

* commit '5405584b7b54ca889c341743de1d58792449830d':
  checkasm: Use a self-balancing tree

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit 'a41e5e192ed8f79f6607f978dee3205580ba5039'
Hendrik Leppkes [Tue, 29 Sep 2015 11:45:38 +0000 (13:45 +0200)]
Merge commit 'a41e5e192ed8f79f6607f978dee3205580ba5039'

* commit 'a41e5e192ed8f79f6607f978dee3205580ba5039':
  vdpau: fix constrained baseline fallback

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit 'cc8db760616a7ec3bd39b22ca45888c01326db13'
Hendrik Leppkes [Tue, 29 Sep 2015 11:45:23 +0000 (13:45 +0200)]
Merge commit 'cc8db760616a7ec3bd39b22ca45888c01326db13'

* commit 'cc8db760616a7ec3bd39b22ca45888c01326db13':
  mpegts: use avcodec_get_type() to set codec_type

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit 'a5d58fea68b9212e0065a71939e921505504a9bb'
Hendrik Leppkes [Tue, 29 Sep 2015 11:45:19 +0000 (13:45 +0200)]
Merge commit 'a5d58fea68b9212e0065a71939e921505504a9bb'

* commit 'a5d58fea68b9212e0065a71939e921505504a9bb':
  lavc: reimplement avcodec_get_type() using codec descriptors

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit 'b10b6ac7a902f28e09e37a29c392e2f0c19e9526'
Hendrik Leppkes [Tue, 29 Sep 2015 11:44:59 +0000 (13:44 +0200)]
Merge commit 'b10b6ac7a902f28e09e37a29c392e2f0c19e9526'

* commit 'b10b6ac7a902f28e09e37a29c392e2f0c19e9526':
  vdpau: deprecate av_vdpau_get_profile()

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoavcodec/x86/sbrdsp: Fix using uninitialized upper 32bit of noise
Michael Niedermayer [Tue, 29 Sep 2015 11:08:48 +0000 (13:08 +0200)]
avcodec/x86/sbrdsp: Fix using uninitialized upper 32bit of noise

Fixes crash
Fixes: flicker-1.scout3d21443372922.28.m4a

Found-by: Dale Curtis <dalecurtis@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agomips: intreadwrite: Only execute that code for mips r1 or r2
Vicente Olivert Riera [Fri, 25 Sep 2015 06:56:25 +0000 (08:56 +0200)]
mips: intreadwrite: Only execute that code for mips r1 or r2

MIPS R6 supports unaligned memory access and does not have
the load/store-left/right family of instructions.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera at imgtec.com>
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agoconfigure: mips: Support mips r6, r2 and r1
Luca Barbato [Fri, 25 Sep 2015 06:56:25 +0000 (08:56 +0200)]
configure: mips: Support mips r6, r2 and r1

Detect the different MIPS architecture variants.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agoconfigure: Set the initial ldflags to match the cflags
Luca Barbato [Fri, 25 Sep 2015 06:56:25 +0000 (08:56 +0200)]
configure: Set the initial ldflags to match the cflags

Some gcc-based toolchain would fail to link if the abi set by the
cpuflags does not match the default.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agolibopenh264enc: Use av_log() to log messages
Gregory J. Wolfe [Wed, 9 Sep 2015 19:32:42 +0000 (15:32 -0400)]
libopenh264enc: Use av_log() to log messages

File libopenh264enc.c has been modified so that the encoder uses av_log()
to log messages (error, warning, info, etc.) instead of logging them
directly to stderr.  At the time the encoder is created, the current
libav log level is mapped to an equivalent libopenh264 log level.  This
log level, and a message logging function that invokes av_log() to
actually log messages, are then set on the encoder.

This contains further changes and simplifications by Michael Niedermayer
and Martin Storsjö.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoavcodec/videotoolbox: fix -Wunused-but-set-variable
Ganesh Ajjanagadde [Sat, 19 Sep 2015 21:41:30 +0000 (17:41 -0400)]
avcodec/videotoolbox: fix -Wunused-but-set-variable

pix_fmt was declared presumably to shorten the argument passed to the function.
However, it is currently not being used for such a purpose.
This patch simply removes it instead.
This fixes -Wunused-but-set-variable reported at e.g:
http://fate.ffmpeg.org/log.cgi?time=20150919194249&log=compile&slot=x86_64-darwin-gcc-4.9.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolibavformat/flvdec.c: free always the packet after a resync.
Thierry Foucu [Mon, 28 Sep 2015 21:34:45 +0000 (14:34 -0700)]
libavformat/flvdec.c: free always the packet after a resync.

In case of resync, always free the packet, but retry only if the resync
did not get to the end of the file. Otherwise, there is a memory leak when the
last packet in the file is corrupted.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/pngdec: reset has_trns after every decode_frame_png()
Paul B Mahol [Mon, 28 Sep 2015 18:53:01 +0000 (20:53 +0200)]
avcodec/pngdec: reset has_trns after every decode_frame_png()

Fixes #4887.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agocheckasm/vp9dsp: Fix iszero() to read the correct data
Henrik Gramner [Mon, 28 Sep 2015 16:50:13 +0000 (18:50 +0200)]
checkasm/vp9dsp: Fix iszero() to read the correct data

5 years agocheckasm: add vp9dsp.itxfm_add tests.
Ronald S. Bultje [Tue, 22 Sep 2015 18:24:27 +0000 (14:24 -0400)]
checkasm: add vp9dsp.itxfm_add tests.

5 years agocheckasm: Fix the function name sorting algorithm
Henrik Gramner [Sat, 26 Sep 2015 18:15:35 +0000 (20:15 +0200)]
checkasm: Fix the function name sorting algorithm

The previous implementation was behaving incorrectly in some corner cases.

5 years agoqsvdec: make ff_qsv_decode_init() static
Anton Khirnov [Wed, 5 Aug 2015 12:30:37 +0000 (14:30 +0200)]
qsvdec: make ff_qsv_decode_init() static

It is not used outside of qsvdec.c anymore.

5 years agoexamples/qsvdec: free the lavc decoder before closing MFX/VAAPI
Anton Khirnov [Tue, 11 Aug 2015 13:00:24 +0000 (15:00 +0200)]
examples/qsvdec: free the lavc decoder before closing MFX/VAAPI

lavc expects MFX to still be in a usable state on close.

5 years agoexamples/qsvdec: do not free the surfaces in the frame_free() callback
Anton Khirnov [Tue, 11 Aug 2015 12:57:07 +0000 (14:57 +0200)]
examples/qsvdec: do not free the surfaces in the frame_free() callback

Even though libmfx might not need them anymore, avcodec might still
access the surfaces. So free them separately at the end.

5 years agoqsvdec: close the MFX decoder on uninit
Anton Khirnov [Tue, 11 Aug 2015 12:52:31 +0000 (14:52 +0200)]
qsvdec: close the MFX decoder on uninit

5 years agoqsv: document AVQSVContext members
Anton Khirnov [Mon, 20 Jul 2015 12:30:07 +0000 (14:30 +0200)]
qsv: document AVQSVContext members

5 years agoqsvenc: mark the encoders as INIT_CLEANUP
Anton Khirnov [Wed, 5 Aug 2015 11:42:08 +0000 (13:42 +0200)]
qsvenc: mark the encoders as INIT_CLEANUP

Should fix some leaks on init failure.

5 years agoqsvenc: do not try to close the encoder if the session is NULL
Anton Khirnov [Wed, 5 Aug 2015 11:40:03 +0000 (13:40 +0200)]
qsvenc: do not try to close the encoder if the session is NULL

5 years agoqsvdec: list supported pixel formats
Anton Khirnov [Tue, 21 Jul 2015 07:45:05 +0000 (09:45 +0200)]
qsvdec: list supported pixel formats

This is useful for detecting QSV-enabled decoders.

5 years agolavfi: do not exclude hwaccel formats from ff_all_formats()
Anton Khirnov [Mon, 20 Jul 2015 08:07:25 +0000 (10:07 +0200)]
lavfi: do not exclude hwaccel formats from ff_all_formats()

It should be possible to pass hwaccel frames through lavfi.

5 years agocheckasm/x86: Correctly handle variadic functions
Henrik Gramner [Wed, 23 Sep 2015 15:22:38 +0000 (17:22 +0200)]
checkasm/x86: Correctly handle variadic functions

The System V ABI on x86-64 specifies that the al register contains an upper
bound of the number of arguments passed in vector registers when calling
variadic functions, so we aren't allowed to clobber it.

checkasm_fail_func() is a variadic function so also zero al before calling it.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agoavfilter/delogo: Fix show option when band is small
Jean Delvare [Mon, 28 Sep 2015 08:18:06 +0000 (10:18 +0200)]
avfilter/delogo: Fix show option when band is small

The code assumed that the outermost interpolated pixels were always in
the fuzzy area defined by the band option. However if the band value
is small, there may be no fuzzy area on a given plane. In that case,
option show did not work, no rectangle was drawn (or only on the luma
plane, depending on the band value and chroma plane subsampling
factors.)

Fix the problem by not making any assumption on where the outermost
interpolated pixels will be.

The new code was verified to produce the same result as the original
code when the band value is not small.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodnxhddec: add my contributions
Christophe Gisquet [Sun, 27 Sep 2015 08:09:08 +0000 (10:09 +0200)]
dnxhddec: add my contributions

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodnxhddec: reindent/cosmetics
Christophe Gisquet [Sun, 27 Sep 2015 08:09:06 +0000 (10:09 +0200)]
dnxhddec: reindent/cosmetics

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agocheckasm: Use a self-balancing tree
Henrik Gramner [Fri, 25 Sep 2015 19:35:35 +0000 (21:35 +0200)]
checkasm: Use a self-balancing tree

Tested functions are internally kept in a binary search tree for efficient
lookups. The downside of the current implementation is that the tree quickly
becomes unbalanced which causes an unneccessary amount of comparisons between
nodes. Improve this by changing the tree into a self-balancing left-leaning
red-black tree with a worst case lookup/insertion time complexity of O(log n).

Significantly reduces the recursion depth and makes the tests run around 10%
faster overall. The relative performance improvement compared to the existing
non-balanced tree will also most likely increase as more tests are added.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agovdpau: fix constrained baseline fallback
wm4 [Sat, 26 Sep 2015 13:17:23 +0000 (15:17 +0200)]
vdpau: fix constrained baseline fallback

It appears vdpau drivers can return constrained baseline as unsupported,
even if libvdpau knows about the symbol, and the main profile is
supported.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agompegts: use avcodec_get_type() to set codec_type
wm4 [Sat, 26 Sep 2015 16:42:51 +0000 (18:42 +0200)]
mpegts: use avcodec_get_type() to set codec_type

Note that this slightly changes behavior: it sets AVMEDIA_TYPE_UNKNOWN
if the codec type is unknown. This should be ok.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agolavc: reimplement avcodec_get_type() using codec descriptors
wm4 [Sat, 26 Sep 2015 16:42:50 +0000 (18:42 +0200)]
lavc: reimplement avcodec_get_type() using codec descriptors

Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agoconfigure: Support for HEASLR on mingw targets
Alex Smith [Sat, 26 Sep 2015 06:43:23 +0000 (02:43 -0400)]
configure: Support for HEASLR on mingw targets

The appropriate flag for HEASLR (--high-entropy-va) was added in
binutils 2.25.

Also set the image base >4GB so higher entropy gets applied to image
base randomization when used with HEASLR (8 -> 17 bits of
randomization).  Windows does this for compatibility because of "latent
pointer truncation issues".

Signed-off-by: Alex Smith <alex.smith@warpsharp.info>
5 years agovdpau: deprecate av_vdpau_get_profile()
Rémi Denis-Courmont [Sun, 27 Sep 2015 10:49:09 +0000 (13:49 +0300)]
vdpau: deprecate av_vdpau_get_profile()

This function can intrinsically not deal with codec profile fallback
(for H.264 Constrained Baseline especially), and was made redundant
by av_vdpau_bind_context().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agodoc/filters: move mcdeint above mergeplanes
Paul B Mahol [Sat, 26 Sep 2015 20:52:06 +0000 (22:52 +0200)]
doc/filters: move mcdeint above mergeplanes

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavfilter: add maskedmerge filter
Paul B Mahol [Fri, 25 Sep 2015 20:46:38 +0000 (22:46 +0200)]
avfilter: add maskedmerge filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agodnxhddec: use unsafe bitstream reader
Christophe Gisquet [Sun, 27 Sep 2015 08:09:05 +0000 (10:09 +0200)]
dnxhddec: use unsafe bitstream reader

Each line is padded by the format, and errors are now reported and
stop the decoding. Around 5% speedup.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodoc/ffplay, ffplay: add information regarding volume control
Ganesh Ajjanagadde [Sun, 27 Sep 2015 16:38:34 +0000 (12:38 -0400)]
doc/ffplay, ffplay: add information regarding volume control

ffplay now supports dynamic volume control. This documents the supported
behavior.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoffplay: add support for interactive volume control
Ganesh Ajjanagadde [Sun, 27 Sep 2015 14:41:37 +0000 (10:41 -0400)]
ffplay: add support for interactive volume control

This is a feature heavily inspired by the mpv player. At the moment, methods
for adjusting volume in ffplay are rather clumsy: either one needs to set it
system-wide, or one needs to set it via the volume filter.

This patch adds key bindings identical to the mpv defaults for muting/unmuting
and increasing/decreasing the volume interactively without any introduction of
external dependencies.

TODO: doc update, possible mouse button bindings (mpv has this).

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoh264: Fix ticket #3147 H264 - Wrong field order
Thomas Mundt [Sun, 27 Sep 2015 21:11:47 +0000 (22:11 +0100)]
h264: Fix ticket #3147 H264 - Wrong field order

Default field order to top field first when interlaced frame is detected and pic_struct_present_flag is not set.
Since bottom field first comes from the old NTSC standard and is not used with HD anymore I think it´s straight forward to favor the majority.

Signed-off-by: Thomas Mundt <loudmax@yahoo.de>
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodnxhddec: check and report bitstream errors
Christophe Gisquet [Sun, 27 Sep 2015 08:09:04 +0000 (10:09 +0200)]
dnxhddec: check and report bitstream errors

This only occur when an overrun in coefficient decoding is
detected.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agocheckasm/x86: Correctly handle variadic functions
Henrik Gramner [Wed, 23 Sep 2015 14:06:02 +0000 (16:06 +0200)]
checkasm/x86: Correctly handle variadic functions

The System V ABI on x86-64 specifies that the al register contains an upper
bound of the number of arguments passed in vector registers when calling
variadic functions, so we aren't allowed to clobber it.

checkasm_fail_func() is a variadic function so also zero al before calling it.

5 years agoconfigure: Disable automatic image base calculation
Alex Smith [Mon, 21 Sep 2015 04:41:38 +0000 (00:41 -0400)]
configure: Disable automatic image base calculation

There's no reason for it.  ASLR will rebase it regardless so "preventing
collisions" isn't really relevant.  This also brings it in line with
what a msvc produced dll will have (an image base of 0x10000000).

Signed-off-by: Alex Smith <alex.smith@warpsharp.info>
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoswresample/dither_template: Add missing license header
Michael Niedermayer [Sun, 27 Sep 2015 11:09:10 +0000 (13:09 +0200)]
swresample/dither_template: Add missing license header

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/d3d11va: Fix project name
Michael Niedermayer [Sun, 27 Sep 2015 11:08:49 +0000 (13:08 +0200)]
avcodec/d3d11va: Fix project name

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/vf_yadif: add missing "This file is part of FFmpeg"
Michael Niedermayer [Sun, 27 Sep 2015 11:07:12 +0000 (13:07 +0200)]
avfilter/vf_yadif: add missing "This file is part of FFmpeg"

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/vf_mcdeint: add missing "This file is part of FFmpeg"
Michael Niedermayer [Sun, 27 Sep 2015 11:07:12 +0000 (13:07 +0200)]
avfilter/vf_mcdeint: add missing "This file is part of FFmpeg"

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodnxhddec: simplify block parsing calls
Christophe Gisquet [Sun, 27 Sep 2015 08:09:03 +0000 (10:09 +0200)]
dnxhddec: simplify block parsing calls

Fewer arguments, less duplicated code.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodnxhddec: remove unused qscale parameter
Christophe Gisquet [Sun, 27 Sep 2015 08:09:02 +0000 (10:09 +0200)]
dnxhddec: remove unused qscale parameter

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoffplay: dynamically allocate filename buffer
Ganesh Ajjanagadde [Sat, 26 Sep 2015 21:09:52 +0000 (17:09 -0400)]
ffplay: dynamically allocate filename buffer

filename was set to an arbitrary 1024 characters. ffplay would thus be unable to
play files whose name exceeds that arbitrary threshold.

This patch dynamically allocates and frees the filename buffer to remove such
limitations.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agodnxhddec: implement slice multithreading
Christophe Gisquet [Fri, 25 Sep 2015 06:56:43 +0000 (08:56 +0200)]
dnxhddec: implement slice multithreading

Around 3x speedup with 4 threads. Maybe more mb lines should be
batched per thread, but that's good enough for a first try.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoffplay: introduce key repeats
Ganesh Ajjanagadde [Sat, 26 Sep 2015 15:37:03 +0000 (11:37 -0400)]
ffplay: introduce key repeats

Key repeats have been introduced simply because they improve usability in my
experience for volume, brightness, and other such controls by speeding up the
time taken to go from 0 to max intensity. As a side benefit, this enables rapid
seeking through a file via left/right keys.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoconfigure: Combine dynamicbase and nxcompat checks
Alex Smith [Sat, 26 Sep 2015 06:15:24 +0000 (02:15 -0400)]
configure: Combine dynamicbase and nxcompat checks

They were added to binutils in the same version so it's safe to combine.

Signed-off-by: Alex Smith <theryuu@warpsharp.info>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavutil/avstring: Inline some tiny functions
Henrik Gramner [Sat, 26 Sep 2015 16:04:11 +0000 (18:04 +0200)]
avutil/avstring: Inline some tiny functions

They're short enough that inlining them actually reduces code size due to
all the overhead associated with making a function call.

5 years agocheckasm/vp9dsp: add const to suppress "discards const qualifier" warnings
James Almer [Sat, 26 Sep 2015 19:08:51 +0000 (16:08 -0300)]
checkasm/vp9dsp: add const to suppress "discards const qualifier" warnings

Reviewed-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agocheckasm/Makefile: add missing testclean target
James Almer [Sat, 26 Sep 2015 19:08:04 +0000 (16:08 -0300)]
checkasm/Makefile: add missing testclean target

Reviewed-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavutil/opencl: Fix volatile pointer
Timo Rothenpieler [Thu, 24 Sep 2015 14:58:30 +0000 (16:58 +0200)]
avutil/opencl: Fix volatile pointer

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
5 years agoavformat/hls: remove unused function
Ganesh Ajjanagadde [Thu, 17 Sep 2015 00:26:42 +0000 (20:26 -0400)]
avformat/hls: remove unused function

Fixes -Wunused-function from
http://fate.ffmpeg.org/report.cgi?time=20150820031140&slot=arm64-darwin-clang-apple-5.1

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
5 years agodnxhddec: parse and print adaptive color transform
Christophe Gisquet [Fri, 25 Sep 2015 15:07:38 +0000 (17:07 +0200)]
dnxhddec: parse and print adaptive color transform

Indicates a YCbCr->RGB transform at the block level. Although nothing
explicitly states it, this would assume the actual content is planar
RGB.

Currently unsupported, but the one sequence I found using it flagged
every mb that way, actually meaning the content was YCbCr, and thus
best left to the output format to decide what to do of it.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodnxhddec: proper rule for interlaced mb flag
Christophe Gisquet [Sat, 26 Sep 2015 12:31:55 +0000 (14:31 +0200)]
dnxhddec: proper rule for interlaced mb flag

It currently only applies to CID 1260, but this flag is dependent on
a higher-level flag located in the header.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/vf_blend: add addition128 mode
Paul B Mahol [Sat, 26 Sep 2015 13:31:36 +0000 (15:31 +0200)]
avfilter/vf_blend: add addition128 mode

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agocheckasm: Use a self-balancing tree
Henrik Gramner [Fri, 25 Sep 2015 16:56:00 +0000 (18:56 +0200)]
checkasm: Use a self-balancing tree

Tested functions are internally kept in a binary search tree for efficient
lookups. The downside of the current implementation is that the tree quickly
becomes unbalanced which causes an unneccessary amount of comparisons between
nodes. Improve this by changing the tree into a self-balancing left-leaning
red-black tree with a worst case lookup/insertion time complexity of O(log n).

Significantly reduces the recursion depth and makes the tests run around 10%
faster overall. The relative performance improvement compared to the existing
non-balanced tree will also most likely increase as more tests are added.

5 years agoavcodec/ffv1dec: Fix off by 1 error in quant_table_count check
Michael Niedermayer [Sat, 26 Sep 2015 11:20:59 +0000 (13:20 +0200)]
avcodec/ffv1dec: Fix off by 1 error in quant_table_count check

Fixes: invalid_read.nut
Found-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/ffv1dec: Explicitly check read_quant_table() return value
Michael Niedermayer [Sat, 26 Sep 2015 11:09:59 +0000 (13:09 +0200)]
avcodec/ffv1dec: Explicitly check read_quant_table() return value

Forwards the error code, avoids potential integer overflow

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agocheckasm: clip vp9 loopfilter test pixels inside allowed bitdepth range.
Ronald S. Bultje [Wed, 23 Sep 2015 00:48:15 +0000 (20:48 -0400)]
checkasm: clip vp9 loopfilter test pixels inside allowed bitdepth range.

5 years agoMerge commit 'b2417ee6d1ee0c5e9b170a642d73bdf68908966f'
Hendrik Leppkes [Sat, 26 Sep 2015 09:14:31 +0000 (11:14 +0200)]
Merge commit 'b2417ee6d1ee0c5e9b170a642d73bdf68908966f'

* commit 'b2417ee6d1ee0c5e9b170a642d73bdf68908966f':
  dxv: Improve error message

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit '1bcd4a476ba45a7fdf59d1701b8f0e274418cc32'
Hendrik Leppkes [Sat, 26 Sep 2015 09:14:25 +0000 (11:14 +0200)]
Merge commit '1bcd4a476ba45a7fdf59d1701b8f0e274418cc32'

* commit '1bcd4a476ba45a7fdf59d1701b8f0e274418cc32':
  dxv: Support RAW intermediate compression

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit 'bbf71d46db3417b43bcbd745cbf235e8e2ff69ae'
Hendrik Leppkes [Sat, 26 Sep 2015 09:14:01 +0000 (11:14 +0200)]
Merge commit 'bbf71d46db3417b43bcbd745cbf235e8e2ff69ae'

* commit 'bbf71d46db3417b43bcbd745cbf235e8e2ff69ae':
  dxv: Print texture information after header parsing

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit 'fb2889691cb7720d2680e188eb6036a35afa2392'
Hendrik Leppkes [Sat, 26 Sep 2015 09:13:48 +0000 (11:13 +0200)]
Merge commit 'fb2889691cb7720d2680e188eb6036a35afa2392'

* commit 'fb2889691cb7720d2680e188eb6036a35afa2392':
  dxv: Support the original first version

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit '588a5619da0d041e55b365f63d0fa9c72bdbd4d3'
Hendrik Leppkes [Sat, 26 Sep 2015 09:11:06 +0000 (11:11 +0200)]
Merge commit '588a5619da0d041e55b365f63d0fa9c72bdbd4d3'

* commit '588a5619da0d041e55b365f63d0fa9c72bdbd4d3':
  dxv: Parse ancillary encoder information

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit 'a9b8c638cfe2f82191db65e3e3a39f3b35df81f5'
Hendrik Leppkes [Sat, 26 Sep 2015 09:07:54 +0000 (11:07 +0200)]
Merge commit 'a9b8c638cfe2f82191db65e3e3a39f3b35df81f5'

* commit 'a9b8c638cfe2f82191db65e3e3a39f3b35df81f5':
  mmal: Fix AVBufferRef usage

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit '49623f531972be5dc2dd8c1b4b8748cad7c424ff'
Hendrik Leppkes [Sat, 26 Sep 2015 09:07:44 +0000 (11:07 +0200)]
Merge commit '49623f531972be5dc2dd8c1b4b8748cad7c424ff'

* commit '49623f531972be5dc2dd8c1b4b8748cad7c424ff':
  mmal: Remove setting extradata on input format

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit 'f290e48d86e10f34b5ddc519127636bcebec7c43'
Hendrik Leppkes [Sat, 26 Sep 2015 09:07:33 +0000 (11:07 +0200)]
Merge commit 'f290e48d86e10f34b5ddc519127636bcebec7c43'

* commit 'f290e48d86e10f34b5ddc519127636bcebec7c43':
  mmal: drop the h264 BSF

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoAAC encoder: fix OOB access in search_for_pns
Claudio Freire [Sat, 26 Sep 2015 07:49:16 +0000 (04:49 -0300)]
AAC encoder: fix OOB access in search_for_pns

Fix out of bounds access caused by wrongful usage
of swb_offset constants when computing scalefactor
positions.

5 years agotests/checkasm: make randomize_buffers a function for easier debugging
Rodger Combs [Mon, 21 Sep 2015 02:55:33 +0000 (21:55 -0500)]
tests/checkasm: make randomize_buffers a function for easier debugging

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoffserver: drop unneeded branching
Reynaldo H. Verdejo Pinochet [Fri, 25 Sep 2015 18:04:25 +0000 (11:04 -0700)]
ffserver: drop unneeded branching

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
5 years agoffserver: drop error counting when parsing ACL row
Reynaldo H. Verdejo Pinochet [Fri, 25 Sep 2015 18:02:12 +0000 (11:02 -0700)]
ffserver: drop error counting when parsing ACL row

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
5 years agoffserver: rm whitespace c&p leftovers from macro
Reynaldo H. Verdejo Pinochet [Thu, 24 Sep 2015 21:12:08 +0000 (14:12 -0700)]
ffserver: rm whitespace c&p leftovers from macro

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
5 years agodnxhddec: indicate colorspace
Christophe Gisquet [Fri, 25 Sep 2015 21:25:07 +0000 (23:25 +0200)]
dnxhddec: indicate colorspace

It is supposed to only old BT.709 colorspaces.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/iff: check for possible overflow in 2nd argument of av_new_packet
Paul B Mahol [Fri, 25 Sep 2015 19:21:24 +0000 (21:21 +0200)]
avformat/iff: check for possible overflow in 2nd argument of av_new_packet

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agodnxhddata: correct weight tables
Jeremy James [Fri, 25 Sep 2015 16:57:18 +0000 (18:57 +0200)]
dnxhddata: correct weight tables

CID 1260 (as evidenced by incorrect decoding of a sample from ticket
4876) seems to use incorrect weight tables. It appears those tables
were not zigzag-scanned.

Apply zigzag on weight tables for new CIDs 1258, 1259, and 1260, and
fix an incorrect chroma table for CID 1256.

Fixes last issue from ticket #4876.

Found-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodnxhddec: decode and use interlace mb flag
Christophe Gisquet [Fri, 25 Sep 2015 16:57:17 +0000 (18:57 +0200)]
dnxhddec: decode and use interlace mb flag

This bit is 1 in some samples, and seems to coincide with interlaced
mbs and CID1260. 2008 specs do not know about it, and maintain qscale
is 11 bits. This looks oversized, but may help larger bitdepths.

Currently, it leads to an obviously incorrect qscale value, meaning
its syntax is shifted by 1. However, reading 11 bits also leads to
obviously incorrect decoding: qscale seems to be 10 bits.

However, as most profiles still have 11bits qscale, the feature is
restricted to the CID1260 profile.

The encoder writes 12 bits of syntax, last and first bits always 0,
which is now somewhat inconsistent with the decoder, but ends up with
the same effect (progressive + reserved bit).

Partially fixes ticket #4876.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>