ffmpeg.git
4 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

4 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.

4 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.

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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.

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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.

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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.

4 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>
4 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>
4 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.

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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.

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 years agoavformat/hls: Update Cookies response with Setcookie
Lucas de Andrade [Fri, 25 Sep 2015 15:11:52 +0000 (12:11 -0300)]
avformat/hls: Update Cookies response with Setcookie

Context cookies must be updated when a playlist response return Setcookie header.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
4 years agoswscale: fix ticket #4877
Pedro Arthur [Fri, 25 Sep 2015 15:17:43 +0000 (12:17 -0300)]
swscale: fix ticket #4877

4 years agoavcodec/ffv1dec: Fix >8bps error concealment
Michael Niedermayer [Fri, 25 Sep 2015 14:44:46 +0000 (16:44 +0200)]
avcodec/ffv1dec: Fix >8bps error concealment

Fixes: 03_cave_girls_h264_slc24_slicecrc1_fuzzed.avi

Found-by: Dinah Handel <dinahrhandel@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/rangecoder: Check e
Michael Niedermayer [Fri, 25 Sep 2015 12:26:14 +0000 (14:26 +0200)]
avcodec/rangecoder: Check e

Fixes hang.nut

Found-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoAAC encoder: tweak PNS usage to be more aggressive
Claudio Freire [Fri, 25 Sep 2015 06:56:32 +0000 (03:56 -0300)]
AAC encoder: tweak PNS usage to be more aggressive

This patch tweaks search_for_pns to be both more
aggressive and more careful when applying PNS. On
the one side, it will again try to use PNS on zero
(or effectively zero) bands. For this, both zeroes
and band_type have to be checked (some ZERO bands
aren't marked in zeroes). On the other side, a more
accurate rate-distortion measure avoids using PNS
where it would cause audible distortion.

Also fixed a small bug in the computation of freq
that caused PNS usage on low-frequency bands during
8-short windows. This allows re-enabling PNS during
8-short.

4 years agoavcodec/ffv1: seperate slice_count from max_slice_count
Michael Niedermayer [Thu, 24 Sep 2015 21:49:30 +0000 (23:49 +0200)]
avcodec/ffv1: seperate slice_count from max_slice_count

Fix segfault with too large slice_count
Fixes Ticket4879

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoReturn EOF for ICO when the end is reached
Michael Bradshaw [Fri, 21 Aug 2015 14:46:16 +0000 (07:46 -0700)]
Return EOF for ICO when the end is reached

4 years agotests/checkasm/vp9dsp: Revert first hunk of bddcf758d3a68ac0bcc3bc4fc4aa7156e05245d4
Michael Niedermayer [Thu, 24 Sep 2015 16:33:11 +0000 (18:33 +0200)]
tests/checkasm/vp9dsp: Revert first hunk of bddcf758d3a68ac0bcc3bc4fc4aa7156e05245d4

The change was wrong, also add a comment explaining it

Found-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/generate_wave_table: clean up extra newlines
Kyle Swanson [Thu, 24 Sep 2015 14:34:42 +0000 (09:34 -0500)]
avfilter/generate_wave_table: clean up extra newlines

Signed-off-by: Kyle Swanson <k@ylo.ph>
4 years agodxv: Improve error message
Vittorio Giovara [Tue, 22 Sep 2015 11:58:00 +0000 (13:58 +0200)]
dxv: Improve error message

4 years agodxv: Support RAW intermediate compression
Vittorio Giovara [Tue, 22 Sep 2015 11:57:59 +0000 (13:57 +0200)]
dxv: Support RAW intermediate compression

Sample-Id: boombox64.mov
Reported-by: Aarni Koskela
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agodxv: Print texture information after header parsing
Vittorio Giovara [Tue, 22 Sep 2015 11:57:58 +0000 (13:57 +0200)]
dxv: Print texture information after header parsing

4 years agodxv: Support the original first version
Vittorio Giovara [Tue, 22 Sep 2015 11:57:57 +0000 (13:57 +0200)]
dxv: Support the original first version

DXV 1.0 provided DXT1 with LZF only.

Sample-Id: Orange-Strings-07_640_DXV.mov
Reported-by: Carl Eugen Hoyos
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agodxv: Parse ancillary encoder information
Vittorio Giovara [Tue, 22 Sep 2015 11:57:56 +0000 (13:57 +0200)]
dxv: Parse ancillary encoder information

Header does not contain the number of channels, but rather the encoder
version, so rename the variable, and read the additional byte.

4 years agommal: Fix AVBufferRef usage
wm4 [Thu, 24 Sep 2015 06:49:41 +0000 (08:49 +0200)]
mmal: Fix AVBufferRef usage

AVBufferRef.data and AVPacket.data don't need to have the same value.
AVPacket could point anywhere into the buffer. Likewise, the sizes
don't need to be the same.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agommal: Remove setting extradata on input format
wm4 [Thu, 24 Sep 2015 06:49:41 +0000 (08:49 +0200)]
mmal: Remove setting extradata on input format

This works only for extradata sizes up to 128 bytes. Additionally, I
could never actually see it doing anything. The new code using
MMAL_BUFFER_HEADER_FLAG_CONFIG now takes care of this.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agommal: drop the h264 BSF
wm4 [Thu, 24 Sep 2015 06:49:41 +0000 (08:49 +0200)]
mmal: drop the h264 BSF

We can send mp4-style data directly. But for some reason, this requires
sending the extradata as buffer with MMAL_BUFFER_HEADER_FLAG_CONFIG
set. Reuse the infrastructure for sending AVPackets to do this.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agoavfilter/af_tremolo: make it bit-exact with sox effect of same name
Paul B Mahol [Wed, 23 Sep 2015 21:03:35 +0000 (23:03 +0200)]
avfilter/af_tremolo: make it bit-exact with sox effect of same name

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavcodec/ac3enc: use long long after switch to 64 bit bitrate
Ganesh Ajjanagadde [Sat, 19 Sep 2015 13:57:56 +0000 (09:57 -0400)]
avcodec/ac3enc: use long long after switch to 64 bit bitrate

Commit 7404f3bdb switched bitrate to 64 bits.
This triggers -Wabsolute-value on clang, e.g
http://fate.ffmpeg.org/log.cgi?time=20150917122742&log=compile&slot=x86_64-darwin-clang-3.7-O3.
Therefore, usage of abs is changed to llabs, which is available on all of the platforms.
Unfortunately, LLONG_MAX is not always available, so INT64_MAX is used instead.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/x86/cavsdsp: silence -Wunused-variable on --disable-mmx
Ganesh Ajjanagadde [Sat, 19 Sep 2015 14:34:22 +0000 (10:34 -0400)]
avcodec/x86/cavsdsp: silence -Wunused-variable on --disable-mmx

This silences -Wunused-variable when compiled with --disable-mmx, e.g
http://fate.ffmpeg.org/log.cgi?time=20150919094617&log=compile&slot=x86_64-archlinux-gcc-disable-mmx.
The alternative of header guards will make it far too ugly.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agofate: add chroma position scale test
Christophe Gisquet [Wed, 23 Sep 2015 13:06:02 +0000 (15:06 +0200)]
fate: add chroma position scale test

The sample position is made weird and non-nominal to force catching
such issues as default values or specialized operations hiding
issues in corner cases.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agovf_scale: conditionally override chroma position
Christophe Gisquet [Wed, 23 Sep 2015 13:06:01 +0000 (15:06 +0200)]
vf_scale: conditionally override chroma position

For yuv420p, the chroma position is unilaterally overriden, even
if ffmpeg's command-line explicitly set it. To fix this, override
only if the value is the default one.

Regression since 1515bfb3.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/brstm: fix overflow
Paul B Mahol [Wed, 23 Sep 2015 17:07:48 +0000 (19:07 +0200)]
avformat/brstm: fix overflow

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavfilter/vf_chromakey: Add chromakey video filter
Timo Rothenpieler [Wed, 23 Sep 2015 16:06:46 +0000 (18:06 +0200)]
avfilter/vf_chromakey: Add chromakey video filter

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
4 years agoavcodec/aacenctab: Make aac_maxval_cb const
Michael Niedermayer [Wed, 23 Sep 2015 10:46:52 +0000 (12:46 +0200)]
avcodec/aacenctab: Make aac_maxval_cb const

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/libstagefright: fix Stagefright_decode_frame() failing to exit when the sourc...
zylthinking [Wed, 23 Sep 2015 05:01:44 +0000 (13:01 +0800)]
avcodec/libstagefright: fix Stagefright_decode_frame() failing to exit when the source is done

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agodoc/filters.texi: add rubberband documentation
Paul B Mahol [Wed, 23 Sep 2015 07:47:29 +0000 (09:47 +0200)]
doc/filters.texi: add rubberband documentation

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavfilter/af_rubberband: rename duplicate option name
Paul B Mahol [Wed, 23 Sep 2015 07:33:52 +0000 (09:33 +0200)]
avfilter/af_rubberband: rename duplicate option name

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoAAC encoder: tweak rate-distortion logic
Claudio Freire [Wed, 23 Sep 2015 05:13:56 +0000 (02:13 -0300)]
AAC encoder: tweak rate-distortion logic

This patch modifies the encode frame function to
retry encoding the frame when the resulting bit count
is too far off target, but only adjusting lambda
in small, incremental step. It also makes the logic
more conservative - otherwise it will contend with
bit reservoir-related variations in bit allocation,
and result in artifacts when frame have to be truncated
(usually at high bit rates transitioning from low
complexity to high complexity).

4 years agoAAC encoder: simplify and speed up find_min_book
Claudio Freire [Mon, 21 Sep 2015 06:41:26 +0000 (03:41 -0300)]
AAC encoder: simplify and speed up find_min_book

Trivial change to simplify the small but hot
find_min_book function. The new form is easier to
understand and faster.

4 years agoconfigure: Force mingw's ld to keep the reloc section
Alex Smith [Mon, 21 Sep 2015 04:41:36 +0000 (00:41 -0400)]
configure: Force mingw's ld to keep the reloc section

Binutils will always strip the relocation information from executable
files even if it needs it (dynamicbase/ASLR).  We can work around this
by using the pic-executable flag combined with setting the correct entry
point since apparently ld forgets what that should be.  This problem
affects both 32 and 64-bit mingw-w64.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/x86/mpegaudiodsp: silence -Wunused-variable on --disable-mmx
Ganesh Ajjanagadde [Sat, 19 Sep 2015 14:47:38 +0000 (10:47 -0400)]
avcodec/x86/mpegaudiodsp: silence -Wunused-variable on --disable-mmx

This silences -Wunused-variable when compiled with --disable-mmx, e.g
http://fate.ffmpeg.org/log.cgi?time=20150919094617&log=compile&slot=x86_64-archlinux-gcc-disable-mmx.
The alternative of header guards will make it far too ugly.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/x86/rv40dsp_init: silence -Wunused-variable on --disable-mmx
Ganesh Ajjanagadde [Sat, 19 Sep 2015 14:43:37 +0000 (10:43 -0400)]
avcodec/x86/rv40dsp_init: silence -Wunused-variable on --disable-mmx

This silences -Wunused-variable when compiled with --disable-mmx, e.g
http://fate.ffmpeg.org/log.cgi?time=20150919094617&log=compile&slot=x86_64-archlinux-gcc-disable-mmx.
The alternative of header guards will make it far too ugly.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/hermite: fix "libavfilter/hermite.h:19:15: error: no previous prototype...
Michael Niedermayer [Tue, 22 Sep 2015 21:41:44 +0000 (23:41 +0200)]
avfilter/hermite: fix "libavfilter/hermite.h:19:15: error: no previous prototype for hermite_interpolation"

Fix build

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter: add agate filter
Paul B Mahol [Thu, 17 Sep 2015 09:38:23 +0000 (09:38 +0000)]
avfilter: add agate filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavcodec/mpegvideo_enc: Avoid fine lambda steps in VBV retry code when RD is not in use
Michael Niedermayer [Tue, 22 Sep 2015 18:17:40 +0000 (20:17 +0200)]
avcodec/mpegvideo_enc: Avoid fine lambda steps in VBV retry code when RD is not in use

Reduces the number of times the vbv retry code is used and should have no
effect on quality

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agohls: only seek if there is an offset
Andreas Cadhalpun [Tue, 22 Sep 2015 11:40:20 +0000 (13:40 +0200)]
hls: only seek if there is an offset

If there is no #EXT-X-BYTERANGE specified, there is no need to seek.
Seeking fails anyway for rtmp, because this protocol does not support
url_seek.

This fixes CNN.m3u from trac ticket 4797 (i.e. Debian bug #798189).

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoavcodec/dvdsubdec: don't use a NULL log context
wm4 [Tue, 22 Sep 2015 15:40:06 +0000 (17:40 +0200)]
avcodec/dvdsubdec: don't use a NULL log context

4 years agoavcodec/dvdsubdec: reject some broken packets
wm4 [Mon, 21 Sep 2015 16:22:35 +0000 (18:22 +0200)]
avcodec/dvdsubdec: reject some broken packets

If cmd_pos is broken, this would just keep accumulating packets in the
reassembly buffer, until it fails and flushes the buffer on overflow.
Since packets are usually rather small, this will take a lot of subtitle
packets. The perceived effect is that subtitles are not displayed
anymore after the faulty packet was passed to the decoder.

I'm not terribly sure about this, but on the other hand this code is
active only when fragmented packets need to be reassembled.

Fixes sample file in trac issue #4872.

4 years agoavcodec/dvdsub: fix partial packet assembly
wm4 [Mon, 21 Sep 2015 16:16:35 +0000 (18:16 +0200)]
avcodec/dvdsub: fix partial packet assembly

Assuming the first and second packets are partial, this would append the
reassembly buffer (ctx->buf) to itself with the second
append_to_cached_buf() call, because buf is set to ctx->buf.

I do not know a valid sample file which triggers this, and do not know
if packets can be split into more than 2 sub-packets, but it triggered
with a (differently) broken sample file in trac issue #4872.

4 years agoavformat/hls: fix some cases of HLS streams which require cookies
wm4 [Mon, 21 Sep 2015 12:43:06 +0000 (14:43 +0200)]
avformat/hls: fix some cases of HLS streams which require cookies

Broken by commit ba12ba859aabfa7153ba397d869db13acdaba340. This only
happens with HLS streams which use encryption and require preserving
cookies sent by the server.

Fixes trac issue #4846.

4 years agoavfilter: add tremolo filter
Kyle Swanson [Mon, 21 Sep 2015 15:16:43 +0000 (10:16 -0500)]
avfilter: add tremolo filter

Signed-off-by: Kyle Swanson <k@ylo.ph>
4 years agoUpdate my email address
Jean Delvare [Tue, 22 Sep 2015 08:43:27 +0000 (10:43 +0200)]
Update my email address

My old address no longer works.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agohevc: fix wpp threading deadlock.
Ronald S. Bultje [Sun, 20 Sep 2015 10:39:14 +0000 (12:39 +0200)]
hevc: fix wpp threading deadlock.

Fixes ticket 4258.

4 years agovp9: fix loopfilter test code to address Hendrik's comments.
Ronald S. Bultje [Sun, 20 Sep 2015 10:20:39 +0000 (12:20 +0200)]
vp9: fix loopfilter test code to address Hendrik's comments.

(I forgot to actually merge them into the patch I just pushed.)