]> git.sesse.net Git - ffmpeg/log
ffmpeg
7 years agoavformat/fifo: assert on disallowed message type and state combinations
Marton Balint [Wed, 8 Feb 2017 22:28:21 +0000 (23:28 +0100)]
avformat/fifo: assert on disallowed message type and state combinations

Fixes Coverity CID 1396277.

Signed-off-by: Marton Balint <cus@passwd.hu>
7 years agoavcodec/huffyuvencdsp: use an actual unsigned long constant
James Almer [Mon, 6 Feb 2017 22:57:53 +0000 (19:57 -0300)]
avcodec/huffyuvencdsp: use an actual unsigned long constant

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavcodec/huffyuvdsp: use an actual unsigned long constant
James Almer [Mon, 6 Feb 2017 22:57:30 +0000 (19:57 -0300)]
avcodec/huffyuvdsp: use an actual unsigned long constant

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavcodec/wavpacl: Fix runtime error: left shift of negative value -1
Michael Niedermayer [Sun, 19 Feb 2017 14:09:34 +0000 (15:09 +0100)]
avcodec/wavpacl: Fix runtime error: left shift of negative value -1

Fixes: 607/clusterfuzz-testcase-5108792465293312
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/flac: Fix several integer overflows
Michael Niedermayer [Sun, 19 Feb 2017 13:34:55 +0000 (14:34 +0100)]
avcodec/flac: Fix several integer overflows

Fixes: 686513-media
Found-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoFactor CHECKED out of DEBUG so it can be set seperatly
Michael Niedermayer [Sun, 19 Feb 2017 11:49:45 +0000 (12:49 +0100)]
Factor CHECKED out of DEBUG so it can be set seperatly

Suggested-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/pngdec: Store metadata directly into AVFrame
Michael Niedermayer [Thu, 2 Feb 2017 20:48:05 +0000 (21:48 +0100)]
avcodec/pngdec: Store metadata directly into AVFrame

Fixes memleak
Fixes: 500/clusterfuzz-testcase-6315221727576064
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavformat/utils: Also fill dts==RELATIVE_TS_BASE packets in update_initial_durations()
Michael Niedermayer [Sat, 18 Feb 2017 23:31:09 +0000 (00:31 +0100)]
avformat/utils: Also fill dts==RELATIVE_TS_BASE packets in update_initial_durations()

This dts value can end up in the list in the absence of durations and is in that
case semantically identical to AV_NOPTS_VALUE. We can alternatively prevent
storing RELATIVE_TS_BASE if there is no duration.

Fixes Ticket3640

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/mpeg12dec: Provide debug level log on skiped P/B frames
Michael Niedermayer [Sat, 18 Feb 2017 18:03:39 +0000 (19:03 +0100)]
avcodec/mpeg12dec: Provide debug level log on skiped P/B frames

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/h264: sse2, avx h luma mbaff deblock/loop filter
James Darnley [Fri, 10 Feb 2017 22:17:57 +0000 (23:17 +0100)]
avcodec/h264: sse2, avx h luma mbaff deblock/loop filter

x86-64 only

Yorkfield:
- sse2: ~2.17x (434 vs. 200 cycles)

Nehalem:
- sse2: ~2.94x (409 vs. 139 cycles)

Skylake:
- sse2: ~3.10x (370 vs. 119 cycles)
- avx:  ~3.29x (370 vs. 112 cycles)

7 years agox86util: import MOVHL macro
James Darnley [Sat, 11 Feb 2017 12:25:09 +0000 (13:25 +0100)]
x86util: import MOVHL macro

Originally committed to x264 in 1637239a by Henrik Gramner who has
agreed to re-license it as LGPL.  Original commit message follows.

    x86: Avoid some bypass delays and false dependencies

    A bypass delay of 1-3 clock cycles may occur on some CPUs when transitioning
    between int and float domains, so try to avoid that if possible.

7 years agoavcodec/h264: add named parameters to x86 function
James Darnley [Fri, 10 Feb 2017 19:13:50 +0000 (20:13 +0100)]
avcodec/h264: add named parameters to x86 function

7 years agoavcodec/x86: deduplicate PASS8ROWS macro
James Darnley [Thu, 9 Feb 2017 21:06:17 +0000 (22:06 +0100)]
avcodec/x86: deduplicate PASS8ROWS macro

7 years agotests/fate/hevc: remove vsync drop from where it is not needed anymore
Michael Niedermayer [Sat, 18 Feb 2017 15:29:14 +0000 (16:29 +0100)]
tests/fate/hevc: remove vsync drop from where it is not needed anymore

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/cuvid: add drop_second_field as input option
Miroslav Slugeň [Sun, 12 Feb 2017 20:22:46 +0000 (21:22 +0100)]
avcodec/cuvid: add drop_second_field as input option

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
7 years agoavcodec/cuvid: don't overwrite deinterlace at progressive input
Miroslav Slugeň [Sun, 12 Feb 2017 17:47:07 +0000 (18:47 +0100)]
avcodec/cuvid: don't overwrite deinterlace at progressive input

If there is progressive input it will disable deinterlacing in cuvid for
all future frames even those interlaced.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
7 years agoavformat/m4vdec: Detect raw mpeg4video with unidentified non mpeg headers with a...
Michael Niedermayer [Sat, 18 Feb 2017 02:31:14 +0000 (03:31 +0100)]
avformat/m4vdec: Detect raw mpeg4video with unidentified non mpeg headers with a very low score

Fixes Ticket 6018

This fixes a regression, and allows playback of files containing mpeg4video that are otherwise
not supported

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavformat/hlsenc: set default http method to PUT when method is null
Steven Liu [Sat, 18 Feb 2017 01:42:51 +0000 (09:42 +0800)]
avformat/hlsenc: set default http method to PUT when method is null

When the http method is not set, the method will use POST for ts,
PUT for m3u8, it is not unify, now set it unify.
This ticket id: #5315

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
7 years agoopusenc: initialize the emphasis coefficients on init
Rostislav Pehlivanov [Sat, 18 Feb 2017 01:11:58 +0000 (01:11 +0000)]
opusenc: initialize the emphasis coefficients on init

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
7 years agolavf/riff: Support decoding files with broken mediasubtype base guid.
Thierry Foucu [Thu, 16 Feb 2017 13:03:38 +0000 (14:03 +0100)]
lavf/riff: Support decoding files with broken mediasubtype base guid.

Fixes ticket #6100.

7 years agoavcodec/opus: Check count of ambisonic channels
Michael Niedermayer [Fri, 17 Feb 2017 10:18:30 +0000 (11:18 +0100)]
avcodec/opus: Check count of ambisonic channels

https://tools.ietf.org/html/draft-ietf-codec-ambisonics-01#section-3.1
specifies the maximum as 227

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolibopus: decode ambisonics with non-diegetic sources
Felicia [Mon, 6 Feb 2017 23:49:36 +0000 (15:49 -0800)]
libopus: decode ambisonics with non-diegetic sources

Channel mapping 2 additionally supports a non-diegetic stereo track
appended to the end of a full-order ambisonics signal, such that the
total channel count is either
  (n + 1) ^ 2, or
  (n + 1) ^ 2 + 2
where n is the ambisonics order

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/fmvc: fix decoding of odd size videos
Paul B Mahol [Fri, 17 Feb 2017 09:46:52 +0000 (10:46 +0100)]
avcodec/fmvc: fix decoding of odd size videos

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agolavc/avpacket: Initialize a variable in error path.
Carl Eugen Hoyos [Thu, 16 Feb 2017 23:46:14 +0000 (00:46 +0100)]
lavc/avpacket: Initialize a variable in error path.

Fixes ticket #6153.

Tested-by: Tyson Smith
7 years agowmaprodec: fix leaking fdsp on init failure
Andreas Cadhalpun [Wed, 15 Feb 2017 23:54:31 +0000 (00:54 +0100)]
wmaprodec: fix leaking fdsp on init failure

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
7 years agompegaudiodec_template: fix leaking fdsp for mp3on4float
Andreas Cadhalpun [Wed, 15 Feb 2017 23:37:51 +0000 (00:37 +0100)]
mpegaudiodec_template: fix leaking fdsp for mp3on4float

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
7 years agovaapi_vp8: Use VP8_MAX_QUANT instead of magic number
Mark Thompson [Thu, 16 Feb 2017 20:40:55 +0000 (20:40 +0000)]
vaapi_vp8: Use VP8_MAX_QUANT instead of magic number

7 years agodoc: correct order of options for channelmap filter
Mulvya [Thu, 16 Feb 2017 18:57:32 +0000 (00:27 +0530)]
doc: correct order of options for channelmap filter

Signed-off-by: Mulvya <mulvya@gmail.com>
7 years agoChangelog: add entry for the native Opus encoder
Rostislav Pehlivanov [Thu, 16 Feb 2017 16:28:10 +0000 (16:28 +0000)]
Changelog: add entry for the native Opus encoder

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
7 years agoavcodec/opusenc: Add () protecting macro arguments
Michael Niedermayer [Thu, 16 Feb 2017 12:24:11 +0000 (13:24 +0100)]
avcodec/opusenc: Add () protecting macro arguments

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/error_resilience: Fix "assignment from incompatible pointer type" warning
Michael Niedermayer [Thu, 16 Feb 2017 11:28:42 +0000 (12:28 +0100)]
avcodec/error_resilience: Fix "assignment from incompatible pointer type" warning

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolavc/vda_h264_dec.c Fix NULL pointer dereference
Pavel Koshevoy [Fri, 10 Feb 2017 03:20:14 +0000 (20:20 -0700)]
lavc/vda_h264_dec.c Fix NULL pointer dereference

ps.sps_list entries may be NULL, so check before dereferencing

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoswr/aarch64: add missing ret to ff_resample_common_apply_filter_x8_float_neon
Matthieu Bouron [Thu, 16 Feb 2017 10:50:58 +0000 (11:50 +0100)]
swr/aarch64: add missing ret to ff_resample_common_apply_filter_x8_float_neon

7 years agoconfigure: add missing mdct15 dependency
James Almer [Thu, 16 Feb 2017 04:17:06 +0000 (01:17 -0300)]
configure: add missing mdct15 dependency

7 years agoconfigure: remove unnecessary opus encoder dependency
James Almer [Thu, 16 Feb 2017 04:15:59 +0000 (01:15 -0300)]
configure: remove unnecessary opus encoder dependency

audiodsp is not used by the encoder.

7 years agoopusenc: fix coarse energy quantization with 2 bits left
Rostislav Pehlivanov [Wed, 15 Feb 2017 22:51:37 +0000 (22:51 +0000)]
opusenc: fix coarse energy quantization with 2 bits left

Fixes CID1400584

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
7 years agoopus_pvq: fix uninitialized variable usage
Rostislav Pehlivanov [Wed, 15 Feb 2017 21:11:41 +0000 (21:11 +0000)]
opus_pvq: fix uninitialized variable usage

Fixes CID1400586

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
7 years agodoc: correct table end for metadata filter
Mulvya [Wed, 15 Feb 2017 19:02:27 +0000 (00:32 +0530)]
doc: correct table end for metadata filter

Signed-off-by: Mulvya <mulvya@gmail.com>
7 years agoadpcm: fix clipping for yamaha
Paul B Mahol [Wed, 15 Feb 2017 11:36:24 +0000 (12:36 +0100)]
adpcm: fix clipping for yamaha

According to specification max value allowed is 0x6000.
Fixes #5862.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoavcodec/h264_sei: Check actual presence of SEI picture timing instead of implying it
Michael Niedermayer [Tue, 14 Feb 2017 22:45:01 +0000 (23:45 +0100)]
avcodec/h264_sei: Check actual presence of SEI picture timing instead of implying it

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavformat/dashenc: Only use temporary files when outputting to file protocol
Thomas Stephens [Tue, 7 Feb 2017 20:20:32 +0000 (14:20 -0600)]
avformat/dashenc: Only use temporary files when outputting to file protocol

Skips using temporary files when outputting to a protocol other than
"file", which enables dash to output content over network
protocols. The logic has been copied from the HLS format.

Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/hevc_parser: export framerate, remove one dependency on the decoder
Michael Niedermayer [Tue, 14 Feb 2017 15:33:53 +0000 (16:33 +0100)]
avcodec/hevc_parser: export framerate, remove one dependency on the decoder

Fixes Ticket6090

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoHTTP: improve performance by reducing forward seeks
Joel Cunningham [Mon, 30 Jan 2017 16:00:44 +0000 (10:00 -0600)]
HTTP: improve performance by reducing forward seeks

This commit optimizes HTTP performance by reducing forward seeks, instead
favoring a read-ahead and discard on the current connection (referred to
as a short seek) for seeks that are within a TCP window's worth of data.
This improves performance because with TCP flow control, a window's worth
of data will be in the local socket buffer already or in-flight from the
sender once congestion control on the sender is fully utilizing the window.

Note: this approach doesn't attempt to differentiate from a newly opened
connection which may not be fully utilizing the window due to congestion
control vs one that is. The receiver can't get at this information, so we
assume worst case; that full window is in use (we did advertise it after all)
and that data could be in-flight

The previous behavior of closing the connection, then opening a new
with a new HTTP range value results in a massive amounts of discarded
and re-sent data when large TCP windows are used.  This has been observed
on MacOS/iOS which starts with an initial window of 256KB and grows up to
1MB depending on the bandwidth-product delay.

When seeking within a window's worth of data and we close the connection,
then open a new one within the same window's worth of data, we discard
from the current offset till the end of the window.  Then on the new
connection the server ends up re-sending the previous data from new
offset till the end of old window.

Example (assumes full window utilization):

TCP window size: 64KB
Position: 32KB
Forward seek position: 40KB

      *                      (Next window)
32KB |--------------| 96KB |---------------| 160KB
        *
  40KB |---------------| 104KB

Re-sent amount: 96KB - 40KB = 56KB

For a real world test example, I have MP4 file of ~25MB, which ffplay
only reads ~16MB and performs 177 seeks. With current ffmpeg, this results
in 177 HTTP GETs and ~73MB worth of TCP data communication.  With this
patch, ffmpeg issues 4 HTTP GETs and 3 seeks for a total of ~22MB of TCP data
communication.

To support this feature, the short seek logic in avio_seek() has been
extended to call a function to get the short seek threshold value.  This
callback has been plumbed to the URLProtocol structure, which now has
infrastructure in HTTP and TCP to get the underlying receiver window size
via SO_RCVBUF.  If the underlying URL and protocol don't support returning
a short seek threshold, the default s->short_seek_threshold is used

This feature has been tested on Windows 7 and MacOS/iOS.  Windows support
is slightly complicated by the fact that when TCP window auto-tuning is
enabled, SO_RCVBUF doesn't report the real window size, but it does if
SO_RCVBUF was manually set (disabling auto-tuning). So we can only use
this optimization on Windows in the later case

Signed-off-by: Joel Cunningham <joel.cunningham@me.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/cuvid: add format mismatch debug logs
Timo Rothenpieler [Thu, 9 Feb 2017 21:19:59 +0000 (22:19 +0100)]
avcodec/cuvid: add format mismatch debug logs

7 years agoavcodec/cuvid: set width and height before calling get_format
Timo Rothenpieler [Tue, 14 Feb 2017 10:47:08 +0000 (11:47 +0100)]
avcodec/cuvid: set width and height before calling get_format

The external hw_frames_ctx is initialized in that callback, and needs
that information to be accurate.

7 years agoavcodec/cuvid: update hw_frames_ctx reference after get_format call
Timo Rothenpieler [Thu, 9 Feb 2017 21:29:47 +0000 (22:29 +0100)]
avcodec/cuvid: update hw_frames_ctx reference after get_format call

7 years agoavcodec/nvenc: push cuda context before encoding a frame
Timo Rothenpieler [Mon, 13 Feb 2017 21:59:46 +0000 (22:59 +0100)]
avcodec/nvenc: push cuda context before encoding a frame

Thanks to Miroslav Slugeň for figuring out what was going on here.

7 years agoMAINTAINERS: add myself as mdct/opus maintainer
Rostislav Pehlivanov [Sat, 11 Feb 2017 21:49:04 +0000 (21:49 +0000)]
MAINTAINERS: add myself as mdct/opus maintainer

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
7 years agodoc/encoders: add documentation for the Opus encoder
Rostislav Pehlivanov [Tue, 14 Feb 2017 06:14:15 +0000 (06:14 +0000)]
doc/encoders: add documentation for the Opus encoder

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
7 years agoopus: add a native Opus encoder
Rostislav Pehlivanov [Sat, 11 Feb 2017 00:25:08 +0000 (00:25 +0000)]
opus: add a native Opus encoder

This marks the first time anyone has written an Opus encoder without
using any libopus code. The aim of the encoder is to prove how far
the format can go by writing the craziest encoder for it.

Right now the encoder's basic, it only supports CBR encoding, however
internally every single feature the CELT layer has is implemented
(except the pitch pre-filter which needs to work well with the rest of
whatever gets implemented). Psychoacoustic and rate control systems are
under development.

The encoder takes in frames of 120 samples and depending on the value of
opus_delay the plan is to use the extra buffered frames as lookahead.
Right now the encoder will pick the nearest largest legal frame size and
won't use the lookahead, but that'll change once there's a
psychoacoustic system.

Even though its a pretty basic encoder its already outperforming
any other native encoder FFmpeg has by a huge amount.

The PVQ search algorithm is faster and more accurate than libopus's
algorithm so the encoder's performance is close to that of libopus
at zero complexity (libopus has more SIMD).
The algorithm might be ported to libopus or other codecs using PVQ in
the future.

The encoder still has a few minor bugs, like desyncs at ultra low
bitrates (below 9kbps with 20ms frames).

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
7 years agoopus_celt: rename structures to better names and reorganize them
Rostislav Pehlivanov [Sat, 11 Feb 2017 00:25:07 +0000 (00:25 +0000)]
opus_celt: rename structures to better names and reorganize them

This is meant to be applied on top of my previous patch which
split PVQ into celt_pvq.c and made opus_celt.h

Essentially nothing has been changed other than renaming CeltFrame
to CeltBlock (CeltFrame had absolutely nothing at all to do with
a frame) and CeltContext to CeltFrame.
3 variables have been put in CeltFrame as they make more sense
there rather than being passed around as arguments.
The coefficients have been moved to the CeltBlock structure
(why the hell were they in CeltContext and not in CeltFrame??).

Now the encoder would be able to use the exact context the decoder
uses (plus a couple of extra fields in there).

FATE passes, no slowdowns, etc.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
7 years agoopus_celt: move quantization and band decoding to opus_pvq.c
Rostislav Pehlivanov [Sat, 11 Feb 2017 00:25:06 +0000 (00:25 +0000)]
opus_celt: move quantization and band decoding to opus_pvq.c

A huge amount can be reused by the encoder, as the only thing
which needs to be done would be to add a 10 line celt_icwrsi,
a wrapper around it (celt_alg_quant) and templating the
ff_celt_decode_band to replace entropy decoding functions
with entropy encoding.

There is no performance loss but in fact a performance gain of
around 6% which is caused by the compiler being able to optimize
the decoding more efficiently.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
7 years agoimdct15: rename to mdct15 and add a forward transform
Rostislav Pehlivanov [Wed, 1 Feb 2017 03:13:06 +0000 (03:13 +0000)]
imdct15: rename to mdct15 and add a forward transform

Handles strides (needed for Opus transients), does pre-reindexing and folding
without needing a copy.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
7 years agoopus_rc: add entropy encoding functions
Rostislav Pehlivanov [Wed, 1 Feb 2017 03:13:05 +0000 (03:13 +0000)]
opus_rc: add entropy encoding functions

Mostly used the RFC document, the decoding functions and
the reference encoder's implmenentation as a reference.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
7 years agoavformat/http: Check for truncated buffers in http_connect()
Michael Niedermayer [Mon, 13 Feb 2017 11:47:49 +0000 (12:47 +0100)]
avformat/http: Check for truncated buffers in http_connect()

Reported-by: SleepProgger <security@gnutp.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agodoc/ffmpeg: document trailing "?" in map option
Lou Logan [Tue, 14 Feb 2017 00:26:43 +0000 (15:26 -0900)]
doc/ffmpeg: document trailing "?" in map option

This feature was added in 2375a85c36c4941042e6ee58a31d6560bde91d37.

Signed-off-by: Lou Logan <lou@lrcd.com>
7 years agolavc: Add device context field to AVCodecContext
Mark Thompson [Thu, 9 Feb 2017 00:23:36 +0000 (00:23 +0000)]
lavc: Add device context field to AVCodecContext

For use by codec implementations which can allocate frames internally.

7 years agoavfilter/vf_lut: make it possible to clip pixel values that are out of valid range
Paul B Mahol [Mon, 13 Feb 2017 21:49:41 +0000 (22:49 +0100)]
avfilter/vf_lut: make it possible to clip pixel values that are out of valid range

Previous behavior was not useful at all as such pixels where all mapped to 0.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoavfilter/vf_lut: do not always explicitly clip pixels
Paul B Mahol [Mon, 13 Feb 2017 20:52:51 +0000 (21:52 +0100)]
avfilter/vf_lut: do not always explicitly clip pixels

Old behaviour was not useful at all. New behaviour only emulate
old behaviour with default options.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agodoc/protocols: add option usage description
Lou Logan [Mon, 13 Feb 2017 21:23:03 +0000 (12:23 -0900)]
doc/protocols: add option usage description

Fixes ticket #6148.

Signed-off-by: Lou Logan <lou@lrcd.com>
7 years agoaac_latm: Align inband PCE to the start of the payload
Alex Converse [Thu, 9 Feb 2017 16:58:47 +0000 (08:58 -0800)]
aac_latm: Align inband PCE to the start of the payload

A strict reading of the spec seems to imply that it should be aligned to
the start of the element instance tag, but that would break all of the
samples with PCEs.

It seems like a well formed LATM stream should have its PCE in the ASC
rather than inband.

Fixes ticket 4544

7 years agoaacsbr: Associate SBR data with AAC elements on init
Alex Converse [Thu, 9 Feb 2017 16:28:30 +0000 (08:28 -0800)]
aacsbr: Associate SBR data with AAC elements on init

Quiets some log spam on pure upsampling mode.

Fixes ticket 5163.

7 years agoaac_latm: Copy whole AudioSpecificConfig when it is sized.
Alex Converse [Thu, 9 Feb 2017 16:57:33 +0000 (08:57 -0800)]
aac_latm: Copy whole AudioSpecificConfig when it is sized.

This preserves sync extensions.

7 years agoaac_latm: Allow unaligned AudioSpecificConfig
Alex Converse [Thu, 9 Feb 2017 16:22:20 +0000 (08:22 -0800)]
aac_latm: Allow unaligned AudioSpecificConfig

Fixes ticket 4730

7 years agoavcodec/nvenc: set frame buffer format for mapped frames
Timo Rothenpieler [Fri, 10 Feb 2017 14:00:21 +0000 (15:00 +0100)]
avcodec/nvenc: set frame buffer format for mapped frames

7 years agohwcontext_dxva2: support D3D9Ex
wm4 [Fri, 10 Feb 2017 11:17:24 +0000 (12:17 +0100)]
hwcontext_dxva2: support D3D9Ex

D3D9Ex uses different driver paths. This helps with "headless"
configurations when no user logs in. Plain D3D9 device creation will
fail if no user is logged in, while it works with D3D9Ex.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Merges Libav commit c2f97f0508708.

7 years agoAVFrame: add an opaque_ref field
wm4 [Thu, 2 Feb 2017 10:27:54 +0000 (11:27 +0100)]
AVFrame: add an opaque_ref field

This is an extended version of the AVFrame.opaque field, which can be
used to attach arbitrary user information to an AVFrame.

The usefulness of the opaque field is rather limited, because it can
store only up to 32 bits of information (or 64 bit on 64 bit systems).
It's not possible to set this field to a memory allocation, because
there is no way to deallocate it correctly.

The opaque_ref field circumvents this by letting the user set an
AVBuffer, which makes the user data refcounted.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Merges Libav commit 04f3bd349651.

7 years agoavformat/hlsenc: fix stream level metadata handling
Bela Bodecs [Sun, 12 Feb 2017 23:33:48 +0000 (07:33 +0800)]
avformat/hlsenc: fix stream level metadata handling

hls-encoder currenlty does not provide stream level metadata to mpegts
muxer. This patch fixes track #3848 bug.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
7 years agolavc/libzvbi: remove deprecated API usage
Josh de Kock [Sat, 11 Feb 2017 23:23:24 +0000 (23:23 +0000)]
lavc/libzvbi: remove deprecated API usage

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Josh de Kock <josh@itanimul.li>
7 years agodoc/muxers: Fix typo, causing warnings during build
Michael Niedermayer [Sun, 12 Feb 2017 19:40:47 +0000 (20:40 +0100)]
doc/muxers: Fix typo, causing warnings during build

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agomovenc: add support for track names in ISML manifests
Jan Ekström [Fri, 10 Feb 2017 23:21:14 +0000 (01:21 +0200)]
movenc: add support for track names in ISML manifests

This enables having multiple tracks of the same type which would
be treated as different things by the media server (as opposed to
different bit rate versions of the same track). According to the
smooth streaming specification, just setting the systemLanguage
tag is not enough to note that a track with the same attributes
differs from another one.

Reviewed-by: Martin
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolavf/mpegts: Make a pointer cast explicit.
Carl Eugen Hoyos [Sat, 11 Feb 2017 15:53:34 +0000 (16:53 +0100)]
lavf/mpegts: Make a pointer cast explicit.

Silences an "assignment discards ‘const’ qualifier" warning.

Reviewed-by: Marton Balint
7 years agoavcodec/iff: support for byterun1 ACBM compression
Paul B Mahol [Sun, 12 Feb 2017 12:26:28 +0000 (13:26 +0100)]
avcodec/iff: support for byterun1 ACBM compression

This is apparently same as no compression.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agodoc/general: mention Newtek SpeedHQ decoder
Paul B Mahol [Sat, 11 Feb 2017 21:25:04 +0000 (22:25 +0100)]
doc/general: mention Newtek SpeedHQ decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoavcodec: add FM Screen Capture Codec decoder
Paul B Mahol [Mon, 6 Feb 2017 08:17:29 +0000 (09:17 +0100)]
avcodec: add FM Screen Capture Codec decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoavformat/flic: fix handling of EOF case
Paul B Mahol [Sat, 11 Feb 2017 19:07:39 +0000 (20:07 +0100)]
avformat/flic: fix handling of EOF case

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoavcodec/flicvideo: add support for 24bit flic files
Paul B Mahol [Sat, 11 Feb 2017 18:56:42 +0000 (19:56 +0100)]
avcodec/flicvideo: add support for 24bit flic files

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoavcodec/flicvideo: fix some indentation issues
Paul B Mahol [Sat, 11 Feb 2017 17:31:05 +0000 (18:31 +0100)]
avcodec/flicvideo: fix some indentation issues

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agolavf/omadec: Fix packet duration for Atrac 3 lossless.
Carl Eugen Hoyos [Sat, 11 Feb 2017 17:53:18 +0000 (18:53 +0100)]
lavf/omadec: Fix packet duration for Atrac 3 lossless.

7 years agolavfi/minterpolate: Remove an unused variable.
Carl Eugen Hoyos [Sat, 11 Feb 2017 15:38:56 +0000 (16:38 +0100)]
lavfi/minterpolate: Remove an unused variable.

7 years agolavc/atrac3: Constify a pointer declaration.
Carl Eugen Hoyos [Sat, 11 Feb 2017 15:35:22 +0000 (16:35 +0100)]
lavc/atrac3: Constify a pointer declaration.

Silences an "assignment discards ‘const’ qualifier" warning.

7 years agolavf/rtpdec_mpeg4: Constify a function parameter.
Carl Eugen Hoyos [Sat, 11 Feb 2017 15:18:28 +0000 (16:18 +0100)]
lavf/rtpdec_mpeg4: Constify a function parameter.

Silences an "assignment discards ‘const’ qualifier" warning.

7 years agolavf/omadec: Remove an unsed variable.
Carl Eugen Hoyos [Sat, 11 Feb 2017 12:17:20 +0000 (13:17 +0100)]
lavf/omadec: Remove an unsed variable.

7 years agoavcodec: add ATRAC Advanced Lossless decoders
Paul B Mahol [Wed, 25 Jan 2017 12:33:52 +0000 (13:33 +0100)]
avcodec: add ATRAC Advanced Lossless decoders

Only lossy part is decoded for now.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoavformat/hlsenc: deprecate hls_wrap option
Steven Liu [Sat, 11 Feb 2017 04:32:31 +0000 (12:32 +0800)]
avformat/hlsenc: deprecate hls_wrap option

When user use the hls_wrap, there have many problem:
1. some platform refersh the old but usefull segment
2. CDN(Content Delivery Network) Deliver HLS not friendly

The hls_wrap is used to wrap segments for use little space,
now user can use hls_list_size and hls_flags delete_segments
instead it.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
7 years agofate: add WavPack muxer test
James Almer [Fri, 10 Feb 2017 22:47:54 +0000 (19:47 -0300)]
fate: add WavPack muxer test

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agodoc: Add muxers/demuxers list option
Mulvya [Fri, 10 Feb 2017 11:40:14 +0000 (17:10 +0530)]
doc: Add muxers/demuxers list option

Signed-off-by: Mulvya <mulvya@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavformat/apetag: bump micro version
James Almer [Sat, 11 Feb 2017 00:03:24 +0000 (21:03 -0300)]
avformat/apetag: bump micro version

In case parsers care about the version that started writing
correct flags.

Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavformat/apetag: reorder some code to improve readability
James Almer [Fri, 10 Feb 2017 19:01:37 +0000 (16:01 -0300)]
avformat/apetag: reorder some code to improve readability

This way it's clear the size field accounts for the footer length plus every
tag entry, but not the header.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavformat/apetag: account for header size if present when returning the start position
James Almer [Fri, 10 Feb 2017 04:24:27 +0000 (01:24 -0300)]
avformat/apetag: account for header size if present when returning the start position

The size field in the header/footer accounts for the entire APE tag
structure except the 32 bytes from header, for compatibility with
APEv1.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavformat/apetag: fix flag value to signal footer presence
James Almer [Fri, 10 Feb 2017 03:53:39 +0000 (00:53 -0300)]
avformat/apetag: fix flag value to signal footer presence

According to the spec[1], a value of 0 means the footer is present and a value
of 1 means it's absent, the exact opposite of header presence flag where 1
means present and 0 absent.
The reason for this is compatibility with APEv1 tags, where there's no header,
footer presence was mandatory for all files, and the flags field was a zeroed
reserved field.

[1] http://wiki.hydrogenaud.io/index.php?title=Ape_Tags_Flags

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavcodec/qdmc: silence gcc 6.2.0 warning
Paul B Mahol [Fri, 10 Feb 2017 16:02:56 +0000 (17:02 +0100)]
avcodec/qdmc: silence gcc 6.2.0 warning

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agolavf/movenc: Remove two unused variables.
Carl Eugen Hoyos [Fri, 10 Feb 2017 11:40:43 +0000 (12:40 +0100)]
lavf/movenc: Remove two unused variables.

7 years agolavc/mjpegenc_common: Remove an unused variable.
Carl Eugen Hoyos [Fri, 10 Feb 2017 11:34:36 +0000 (12:34 +0100)]
lavc/mjpegenc_common: Remove an unused variable.

7 years agolavf/mov.c: Avoid heap allocation wraps in mov_read_{senc,saiz}()
Matt Wolenetz [Wed, 14 Dec 2016 23:27:49 +0000 (15:27 -0800)]
lavf/mov.c: Avoid heap allocation wraps in mov_read_{senc,saiz}()

Core of patch is from paul@paulmehta.com
Reference https://crbug.com/643952 (senc,saiz portions)

Signed-off-by: Matt Wolenetz <wolenetz@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolavf/mov.c: Avoid OOB in mov_read_udta_string()
Matt Wolenetz [Wed, 8 Feb 2017 23:40:46 +0000 (15:40 -0800)]
lavf/mov.c: Avoid OOB in mov_read_udta_string()

Core of patch is from paul@paulmehta.com
Reference https://crbug.com/643952 (udta_string portion)

Signed-off-by: Matt Wolenetz <wolenetz@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/mjpegenc: Simplify by moving assert into ff_mjpeg_encode_huffman_close()
Michael Niedermayer [Thu, 9 Feb 2017 23:18:34 +0000 (00:18 +0100)]
avcodec/mjpegenc: Simplify by moving assert into ff_mjpeg_encode_huffman_close()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/mjpegenc: Bypass the 2 pass encoding when optimal tables are not requested
Michael Niedermayer [Thu, 9 Feb 2017 22:24:15 +0000 (23:24 +0100)]
avcodec/mjpegenc: Bypass the 2 pass encoding when optimal tables are not requested

This limits the bugs, speedloss and extra memory allocation to the case when
optimal tables are needed.
Fixes regressions with slice multi-threading

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/mjpegenc: Revert some differences in ff_mjpeg_encode_mb() relative to pre...
Michael Niedermayer [Thu, 9 Feb 2017 22:07:11 +0000 (23:07 +0100)]
avcodec/mjpegenc: Revert some differences in ff_mjpeg_encode_mb() relative to pre optimal huffman

The changes are not needed anymore and the return code was never used

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/mjpegenc_huffman: remove unneeded header include
Michael Niedermayer [Thu, 9 Feb 2017 22:03:57 +0000 (23:03 +0100)]
avcodec/mjpegenc_huffman: remove unneeded header include

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