]> git.sesse.net Git - ffmpeg/log
ffmpeg
7 years agoavformat/matroskaenc: fix Voids with size < 10
Michael Bradshaw [Tue, 26 Jul 2016 17:18:43 +0000 (10:18 -0700)]
avformat/matroskaenc: fix Voids with size < 10

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoaf_hdcd: give cdt expired counter a value for never set
Burt P [Fri, 29 Jul 2016 17:36:17 +0000 (12:36 -0500)]
af_hdcd: give cdt expired counter a value for never set

The counter is now -1 if the code detect timer was never set,
and 0 if it was set but never expired.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoaf_hdcd: fix a minor cosmetic annoyance
Burt P [Fri, 29 Jul 2016 17:36:16 +0000 (12:36 -0500)]
af_hdcd: fix a minor cosmetic annoyance

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoDoxyfile: Reset unused options back to default
Timothy Gu [Sun, 31 Jul 2016 02:51:34 +0000 (19:51 -0700)]
Doxyfile: Reset unused options back to default

Silences a few warnings.

7 years agodoxygen: Remove outdated EXPAND_AS_DEFINED
Timothy Gu [Sat, 30 Jul 2016 18:27:41 +0000 (11:27 -0700)]
doxygen: Remove outdated EXPAND_AS_DEFINED

7 years agoavfilter/af_stereowiden: fix read/write past the end of buffer
Alexey Tourbin [Tue, 12 Jul 2016 05:07:54 +0000 (08:07 +0300)]
avfilter/af_stereowiden: fix read/write past the end of buffer

The stereowiden filter uses a buffer, s->buffer[], and a pointer
within the buffer, s->write, to implement inter-channel delays.
The loop which applies the delayed samples turns out to be faulty.

   109      for (n = 0; n < in->nb_samples; n++, src += 2, dst += 2) {
   110          const float left = src[0], right = src[1];
   111          float *read = s->write + 2;
   112
   113          if (read > s->buffer + s->length)
   114              read = s->buffer;
   115
   116          dst[0] = drymix * left - crossfeed * right - feedback * read[1];
   117          dst[1] = drymix * right - crossfeed * left - feedback * read[0];
   118
   119          s->write[0] = left;
   120          s->write[1] = right;
   121
   122          if (s->write == s->buffer + s->length)
   123              s->write = s->buffer;
   124          else
   125              s->write += 2;
   126      }

For one, the buffer gets written past its end in lines 119-120, before
the bound check is done in lines 122-123.  This can be easily confirmed
by valgrind.

==3544== Invalid read of size 4
==3544==    at 0x593B41: filter_frame (af_stereowiden.c:116)
==3544==  Address 0xb1b03c4 is 4 bytes after a block of size 7,680 alloc'd
==3544==
==3544== Invalid read of size 4
==3544==    at 0x593B66: filter_frame (af_stereowiden.c:117)
==3544==  Address 0xb1b03c0 is 0 bytes after a block of size 7,680 alloc'd
==3544==
==3544== Invalid write of size 4
==3544==    at 0x593B79: filter_frame (af_stereowiden.c:119)
==3544==  Address 0xb1b03c0 is 0 bytes after a block of size 7,680 alloc'd
==3544==
==3544== Invalid write of size 4
==3544==    at 0x593B7D: filter_frame (af_stereowiden.c:120)
==3544==  Address 0xb1b03c4 is 4 bytes after a block of size 7,680 alloc'd

Also, using two separate pointers, s->write and read = s->write + 2,
does not seem to be well thought out.  To apply the delay of s->buffer[],
it is enough to read the delayed samples at the current position within
the buffer, and then to store new samples at the same current position.
Thus the application of delayed samples can probably be best described
with a single pointer s->cur.

I also introduce a minor change to ensure that the size of s->buffer[]
is always a multiple of 2.  Since the delay parameter is a float, it is
otherwise possible to trick the code into allocating off-by-one buffer.

7 years agodoc/filters: mention HDMI output format for stereo3d filter
Paul B Mahol [Sat, 30 Jul 2016 13:17:21 +0000 (15:17 +0200)]
doc/filters: mention HDMI output format for stereo3d filter

7 years agodoxygen: Set tab size to 4
Timothy Gu [Sat, 30 Jul 2016 01:57:39 +0000 (18:57 -0700)]
doxygen: Set tab size to 4

7 years agodoxygen: Update Doxyfile for Doxygen 1.8.8
Timothy Gu [Sat, 30 Jul 2016 01:56:32 +0000 (18:56 -0700)]
doxygen: Update Doxyfile for Doxygen 1.8.8

7 years agodoxygen: Fix PREDEFINED syntax
Timothy Gu [Sat, 30 Jul 2016 00:38:33 +0000 (17:38 -0700)]
doxygen: Fix PREDEFINED syntax

7 years agodoxygen: Add a note on libavutil's modular nature
Timothy Gu [Sat, 30 Jul 2016 00:18:09 +0000 (17:18 -0700)]
doxygen: Add a note on libavutil's modular nature

7 years agolibavformat/matroskadec: Add test for seeking with codec delay.
Chris Cunningham [Thu, 28 Jul 2016 01:33:30 +0000 (18:33 -0700)]
libavformat/matroskadec: Add test for seeking with codec delay.

Also cleanup parens for the skip_to_timecode check.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavfilter: Add new format for PSNR stats log
Lucas Cooper [Mon, 25 Jul 2016 18:54:37 +0000 (11:54 -0700)]
avfilter: Add new format for PSNR stats log

Add an AVOption stats_version with a new header for V2 stats, which
specifies the stats log version and lists the fields that will be
present in the log (to ease parsing).

The primary motivation is to facilitate the addition of optional fields
to the log without breaking backwards compatibility, while making the
logs easier to parse.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavformat/rmdec: Clear extradata when extradata_size is cleared
Michael Niedermayer [Fri, 29 Jul 2016 00:45:16 +0000 (02:45 +0200)]
avformat/rmdec: Clear extradata when extradata_size is cleared

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoMerge commit '4e2f6212483ae1b2a4043cddf0a1cb001b476abc'
Clément Bœsch [Fri, 29 Jul 2016 09:20:55 +0000 (11:20 +0200)]
Merge commit '4e2f6212483ae1b2a4043cddf0a1cb001b476abc'

* commit '4e2f6212483ae1b2a4043cddf0a1cb001b476abc':
  svq3: stop using H264Picture

Merged-by: Clément Bœsch <u@pkh.me>
7 years agoMerge commit '251cbb44003caf179fb17afbb8a6c56643c2a646'
Clément Bœsch [Fri, 29 Jul 2016 09:13:44 +0000 (11:13 +0200)]
Merge commit '251cbb44003caf179fb17afbb8a6c56643c2a646'

* commit '251cbb44003caf179fb17afbb8a6c56643c2a646':
  h264: create a new header for common h264 definitions

Merged-by: Clément Bœsch <u@pkh.me>
7 years agoMerge commit '9df889a5f116c1ee78c2f239e0ba599c492431aa'
Clément Bœsch [Fri, 29 Jul 2016 09:01:36 +0000 (11:01 +0200)]
Merge commit '9df889a5f116c1ee78c2f239e0ba599c492431aa'

* commit '9df889a5f116c1ee78c2f239e0ba599c492431aa':
  h264: rename h264.[ch] to h264dec.[ch]

Merged-by: Clément Bœsch <u@pkh.me>
7 years agoMerge commit 'f651c6a259d4bc78f25db11d25df9256d5110bd3'
Clément Bœsch [Fri, 29 Jul 2016 08:39:57 +0000 (10:39 +0200)]
Merge commit 'f651c6a259d4bc78f25db11d25df9256d5110bd3'

* commit 'f651c6a259d4bc78f25db11d25df9256d5110bd3':
  h264: factor out setting frame properties / side data

Merged-by: Clément Bœsch <u@pkh.me>
7 years agoMerge commit '19446dc5fff6a2f5ccd1a73db66e266255a5d768'
Clément Bœsch [Fri, 29 Jul 2016 08:24:42 +0000 (10:24 +0200)]
Merge commit '19446dc5fff6a2f5ccd1a73db66e266255a5d768'

* commit '19446dc5fff6a2f5ccd1a73db66e266255a5d768':
  h264: drop unused NAL_FF_IGNORE

Merged-by: Clément Bœsch <u@pkh.me>
7 years agoMerge commit 'bcd91f1644b46dd142c5355c8b742b27d9028903'
Clément Bœsch [Fri, 29 Jul 2016 08:24:06 +0000 (10:24 +0200)]
Merge commit 'bcd91f1644b46dd142c5355c8b742b27d9028903'

* commit 'bcd91f1644b46dd142c5355c8b742b27d9028903':
  h264: move a per-field block from decode_slice_header() to field_start()

Merged-by: Clément Bœsch <u@pkh.me>
7 years agohapdec: remove unused memory.h include
Josh de Kock [Fri, 29 Jul 2016 01:09:03 +0000 (02:09 +0100)]
hapdec: remove unused memory.h include

Most systems have this, so it isn't really a problem to include it
even if it's not used, but some do not have memory.h as it is
non-standard. Since it's unused just remove it anyway.

7 years agoMerge commit '17e7c03e12d1e4490921e7bffaeaa6b46a7ada4e'
Clément Bœsch [Fri, 29 Jul 2016 07:58:39 +0000 (09:58 +0200)]
Merge commit '17e7c03e12d1e4490921e7bffaeaa6b46a7ada4e'

* commit '17e7c03e12d1e4490921e7bffaeaa6b46a7ada4e':
  h264: only allow ending a field/starting a new one before finish_setup()

This commit is a noop. According to Michael, after 8385e171 this commit
should not be necessary anymore.

Merged-by: Clément Bœsch <u@pkh.me>
7 years agolavf/mpegtsenc: add special case for handling timed ID3 packets
Stefano Sabatini [Tue, 19 Apr 2016 08:19:55 +0000 (10:19 +0200)]
lavf/mpegtsenc: add special case for handling timed ID3 packets

Set the stream_id to 0xbd (private_stream_id_1). Tools seem to assume
that value, and this is consistent with MPEG TS specification (ITU-T
H.222.0 section 2.12.3).

7 years agofate: add test for stereotools filter
Petru Rares Sincraian [Thu, 28 Jul 2016 18:01:40 +0000 (20:01 +0200)]
fate: add test for stereotools filter

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agofate: add test for silenceremove filter
Petru Rares Sincraian [Thu, 28 Jul 2016 17:31:55 +0000 (19:31 +0200)]
fate: add test for silenceremove filter

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoChangelog: add entry for MediaCodec hwaccel
Matthieu Bouron [Thu, 28 Jul 2016 14:10:30 +0000 (16:10 +0200)]
Changelog: add entry for MediaCodec hwaccel

7 years agoavutil/mem: fix memleak
Zhao Zhili [Mon, 18 Jul 2016 16:30:54 +0000 (00:30 +0800)]
avutil/mem: fix memleak

The original code assumes av_realloc() will free ptr if size is zero.
The assumes is incorrect now.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavfilter/f_drawgraph: add another slide mode
Paul B Mahol [Tue, 26 Jul 2016 11:10:27 +0000 (13:10 +0200)]
avfilter/f_drawgraph: add another slide mode

7 years agolavfi/hdcd: fix style
Clément Bœsch [Thu, 28 Jul 2016 07:29:45 +0000 (09:29 +0200)]
lavfi/hdcd: fix style

7 years agolavfi/hdcd: mark pe_str as static and const
Clément Bœsch [Thu, 28 Jul 2016 07:29:20 +0000 (09:29 +0200)]
lavfi/hdcd: mark pe_str as static and const

7 years agoaf_hdcd: Report PE as being intermittent or permanent
Burt P [Sun, 24 Jul 2016 02:26:51 +0000 (21:26 -0500)]
af_hdcd: Report PE as being intermittent or permanent

The Peak Extend feature could be enabled permanently or only
when needed. This is now reported.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavformat/matroskaenc: Write duration early during mkv_write_header (Rev #3)
softworkz [Sun, 17 Jul 2016 02:19:41 +0000 (04:19 +0200)]
avformat/matroskaenc: Write duration early during mkv_write_header (Rev #3)

Rev #2: Fixes doubled header writing, checked FATE running without errors
Rev #3: Fixed coding style

This commit addresses the following scenario:

we are using ffmpeg to transcode or remux mkv (or something else) to mkv. The result is being streamed on-the-fly to an HTML5 client (streaming starts while ffmpeg is still running). The problem here is that the client is unable to detect the duration because the duration is only written to the mkv at the end of the transcoding/remoxing process. In matroskaenc.c, the duration is only written during mkv_write_trailer but not during mkv_write_header.

The approach:

FFMPEG is currently putting quite some effort to estimate the durations of source streams, but in many cases the source stream durations are still left at 0 and these durations are nowhere mapped to or used for output streams. As much as I would have liked to deduct or estimate output durations based on input stream durations - I realized that this is a hard task (as Nicolas already mentioned in a previous conversation). It would involve changes to the duration calculation/estimation/deduction for input streams and propagating these durations to output streams or the output context in a correct way.
So I looked for a simple and small solution with better chances to get accepted. In webmdashenc.c I found that a duration is written during write_header and this duration is taken from the streams' metadata, so I decided for a similar approach.

And here's what it does:

At first it is checking the duration of the AVFormatContext. In typical cases this value is not set, but: It is set in cases where the user has specified a recording_time or an end_time via the -t or -to parameters.
Then it is looking for a DURATION metadata field in the metadata of the output context (AVFormatContext::metadata). This would only exist in case the user has explicitly specified a metadata DURATION value from the command line.
Then it is iterating all streams looking for a "DURATION" metadata (this works unless the option "-map_metadata -1" has been specified) and determines the maximum value.
The precendence is as follows: 1. Use duration of AVFormatContext - 2. Use explicitly specified metadata duration value - 3. Use maximum (mapped) metadata duration over all streams.

To test this:

1. With explicit recording time:
ffmpeg -i file:"src.mkv" -loglevel debug -t 01:38:36.000 -y "dest.mkv"

2. Take duration from metadata specified via command line parameters:
ffmpeg -i file:"src.mkv" -loglevel debug -map_metadata -1 -metadata Duration="01:14:33.00" -y "dest.mkv"

3. Take duration from mapped input metadata:
ffmpeg -i file:"src.mkv" -loglevel debug -y "dest.mkv"

Regression risk:

Very low IMO because it only affects the header while ffmpeg is still running. When ffmpeg completes the process, the duration is rewritten to the header with the usual value (same like without this commit).

Signed-off-by: SoftWorkz <softworkz@hotmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavformat/hls: Fix missing streams in some cases with MPEG TS
Anssi Hannula [Tue, 26 Jul 2016 08:33:38 +0000 (11:33 +0300)]
avformat/hls: Fix missing streams in some cases with MPEG TS

HLS demuxer calls the subdemuxer avformat_find_stream_info() while
overriding the subdemuxer AVFMTCTX_NOHEADER flag by clearing it.
However, this prevents some streams in some MPEG TS streams from being
detected properly.

Simply removing the clearing of the flag would cause the inner
avformat_find_stream_info() call to take longer in some cases, without
a way to control it.

To fix the issue, do not clear the flag but propagate it to HLS demuxer.
To avoid the above-mentioned mandatory delay, the call to
avformat_find_stream_info() is dropped except in the HLS ID3 timestamped
case. The HLS demuxer user should be calling avformat_find_stream_info()
on the HLS demuxer if it wants to find the stream info.

The main streams are now created dynamically after read_header time if
the subdemuxer uses AVFMTCTX_NOHEADER (mpegts).

Subdemuxer avformat_find_stream_info() is still called for the HLS ID3
timestamped case as the HLS demuxer needs to know the packet durations
to properly interleave ID3 timestamped streams with MPEG TS streams on
sub-segment level.

Fixes ticket #4930.

7 years agoavformat/hls: Move stream propagation to a separate function
Anssi Hannula [Wed, 27 Jul 2016 21:00:37 +0000 (00:00 +0300)]
avformat/hls: Move stream propagation to a separate function

Creation of main demuxer streams from subdemuxer streams is moved to
update_streams_from_subdemuxer() which can be called repeatedly.

There should be no functional changes.

7 years agoavformat/hls: Use an array instead of stream offset for stream mapping
Anssi Hannula [Wed, 27 Jul 2016 20:29:16 +0000 (23:29 +0300)]
avformat/hls: Use an array instead of stream offset for stream mapping

This will be useful when the amount of streams per subdemuxer is not
known at hls_read_header time in a following commit.

7 years agoavformat/hls: Sync starting segment across variants on live streams
Anssi Hannula [Wed, 27 Jul 2016 19:52:44 +0000 (22:52 +0300)]
avformat/hls: Sync starting segment across variants on live streams

This will avoid a large time difference between variants in the most
common case.

7 years agoavformat/hls: Fix regression with ranged media segments
Anssi Hannula [Tue, 26 Jul 2016 12:18:40 +0000 (15:18 +0300)]
avformat/hls: Fix regression with ranged media segments

Commit 81306fd4bdf ("hls: eliminate ffurl_* usage", merged in d0fc5de3a6)
changed the hls demuxer to use AVIOContext instead of URLContext for its
HTTP requests.

HLS demuxer uses the "offset" option of the http demuxer, requesting
the initial file offset for the I/O (http URLProtocol uses the "Range:"
HTTP header to try to accommodate that).

However, the code in libavformat/aviobuf.c seems to be doing its own
accounting for the current file offset (AVIOContext.pos), with the
assumption that the initial offset is always zero.

HLS demuxer does an explicit seek after open_url to account for cases
where the "offset" was not effective (due to the URL being a local file
or the HTTP server not obeying it), which should be a no-op in case the
file offset is already at that position.

However, since aviobuf.c code thinks the starting offset is 0, this
doesn't work properly.

This breaks retrieval of ranged media segments.

To fix the regression, just drop the seek call from the HLS demuxer when
the HTTP(S) protocol is used.

7 years agoavformat/utils: Fix find_stream_info not considering the extradata it found
Anssi Hannula [Tue, 26 Jul 2016 10:23:43 +0000 (13:23 +0300)]
avformat/utils: Fix find_stream_info not considering the extradata it found

Commit 9200514ad8717c6 ("lavf: replace AVStream.codec with
AVStream.codecpar") merged in commit 6f69f7a8bf6a0d01 changed
avformat_find_stream_info() to put the extradata it got from
st->parser->parser->split() to st->internal->avctx instead of st->codec
(extradata in st->internal->avctx will be later copied to st->codecpar).

However, in the same function, the "is stream ready?" check was changed
to check for extradata in st->codecpar instead of st->codec, even
though st->codecpar is not yet updated at that point.

Extradata retrieved from split() is therefore not considered anymore,
and avformat_find_stream_info() will therefore needlessly continue
probing in some cases.

Fix that by checking for the extradata at st->internal->avctx where it
is actually put.

7 years agoaf_hdcd: Add counter for cdt expirations
Burt P [Sun, 24 Jul 2016 16:15:22 +0000 (11:15 -0500)]
af_hdcd: Add counter for cdt expirations

Adds a counter for when the "code detect timer" expired without
finding a valid packet.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoaf_hdcd: more comments in state struct
Burt P [Sun, 24 Jul 2016 02:26:49 +0000 (21:26 -0500)]
af_hdcd: more comments in state struct

Add some comments describing the fields in hdcd_state_t.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoaf_hdcd: Improve HDCD detection
Burt P [Sun, 24 Jul 2016 02:26:48 +0000 (21:26 -0500)]
af_hdcd: Improve HDCD detection

HDCD is now only considered detected if a valid packet
is active in both channels simultaneously.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agofate: Add HDCD filter tests for false positive and error detection
Burt P [Thu, 14 Jul 2016 17:54:34 +0000 (12:54 -0500)]
fate: Add HDCD filter tests for false positive and error detection

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/h264_slice: Make setup_finished check cover more cases
Michael Niedermayer [Wed, 27 Jul 2016 16:22:41 +0000 (18:22 +0200)]
avcodec/h264_slice: Make setup_finished check cover more cases

7 years agoavformat/flvdec: parse keyframe before a\v stream was created add_keyframes_index...
Xinzheng Zhang [Wed, 27 Jul 2016 04:21:25 +0000 (12:21 +0800)]
avformat/flvdec: parse keyframe before a\v stream was created add_keyframes_index() when stream created or keyframe parsed

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavformat/flvdec: splitting add_keyframes_index() out from parse_keyframes_index()
Xinzheng Zhang [Wed, 27 Jul 2016 04:21:24 +0000 (12:21 +0800)]
avformat/flvdec: splitting add_keyframes_index() out from parse_keyframes_index()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoMerge commit 'debca90863e4ee53447efd02483c500f89766384'
Clément Bœsch [Wed, 27 Jul 2016 16:07:30 +0000 (18:07 +0200)]
Merge commit 'debca90863e4ee53447efd02483c500f89766384'

* commit 'debca90863e4ee53447efd02483c500f89766384':
  h264: store {curr,max}_pic_num in the per-slice context

Merged-by: Clément Bœsch <u@pkh.me>
7 years agoMerge commit 'f966498e433fead2f5e6b5b66fad2ac062146d22'
Clément Bœsch [Wed, 27 Jul 2016 15:28:00 +0000 (17:28 +0200)]
Merge commit 'f966498e433fead2f5e6b5b66fad2ac062146d22'

* commit 'f966498e433fead2f5e6b5b66fad2ac062146d22':
  h264: decode the poc values from the slice header into the per-slice context

Merged-by: Clément Bœsch <u@pkh.me>
7 years agolavc/h264_slice: adjust a few line breaks to reduce diff with Libav
Clément Bœsch [Wed, 27 Jul 2016 15:24:48 +0000 (17:24 +0200)]
lavc/h264_slice: adjust a few line breaks to reduce diff with Libav

7 years agoMerge commit '54dd9b1cdd9e54f1ee39ae25af0324f8aba2831b'
Clément Bœsch [Wed, 27 Jul 2016 14:11:02 +0000 (16:11 +0200)]
Merge commit '54dd9b1cdd9e54f1ee39ae25af0324f8aba2831b'

* commit '54dd9b1cdd9e54f1ee39ae25af0324f8aba2831b':
  h264: set mb_aff_frame in frame_start()
  h264: move the block starting a new field out of slice_header_parse()

Both commits are merged at the same time in order to prevent a
regression with Ticket #4440 (see 38660128).

Merged-by: Clément Bœsch <u@pkh.me>
7 years agolavc/ffjni: replace ff_jni_{attach,detach} with ff_jni_get_env
Matthieu Bouron [Fri, 1 Jul 2016 07:59:13 +0000 (09:59 +0200)]
lavc/ffjni: replace ff_jni_{attach,detach} with ff_jni_get_env

If a JNI environment is not already attached to the thread where the
MediaCodec calls are made the current implementation will attach /
detach an environment for each MediaCodec call wasting some CPU time.

ff_jni_get_env replaces ff_jni_{attach,detach} by permanently attaching
an environment (if it is not already the case) to the current thread.
The environment will be automatically detached at the thread destruction
using a pthread_key callback.

Saves around 5% of CPU time (out of 20%) while decoding a stream with
MediaCodec.

7 years agolibopenh264: Support building with the 1.6 release
Martin Storsjö [Fri, 8 Jul 2016 20:21:41 +0000 (23:21 +0300)]
libopenh264: Support building with the 1.6 release

This fixes trac issue #5417.

This is cherry-picked from libav commit
d825b1a5306576dcd0553b7d0d24a3a46ad92864.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoAdd an OpenH264 decoder wrapper
Martin Storsjö [Thu, 23 Jun 2016 21:58:17 +0000 (00:58 +0300)]
Add an OpenH264 decoder wrapper

This is cherrypicked from libav, from commits
82b7525173f20702a8cbc26ebedbf4b69b8fecec and
d0b1e6049b06eeeeca146ece4d2f199c5dba1565.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agocheckasm/vp9dsp: use declare_func_emms in check_loopfilter
James Almer [Wed, 27 Jul 2016 01:16:21 +0000 (22:16 -0300)]
checkasm/vp9dsp: use declare_func_emms in check_loopfilter

Fixes checkasm failures on mmxext functions

Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoffprobe.xsd: add missing timecode attribute to frameSideDataType
dericed [Tue, 7 Jun 2016 23:53:40 +0000 (19:53 -0400)]
ffprobe.xsd: add missing timecode attribute to frameSideDataType

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavdev/jack: remove duplicated dispatch macros
Josh de Kock [Fri, 22 Jul 2016 15:09:06 +0000 (16:09 +0100)]
avdev/jack: remove duplicated dispatch macros

The macros were moved to compat/dispatch_semaphore/semaphore.h after a libav merge, and were never removed from jack.c

7 years agovp9: add mxext versions of the single-block (w=8,npx=8) h/v loopfilters.
Ronald S. Bultje [Tue, 19 Jul 2016 19:37:46 +0000 (15:37 -0400)]
vp9: add mxext versions of the single-block (w=8,npx=8) h/v loopfilters.

Each takes about 0.1% of runtime in my profiles, and they didn't have
any SIMD yet so far (we only had simd for npx=16 double-block versions).

7 years agovp9: add mxext versions of the single-block (w=4,npx=8) h/v loopfilters.
Ronald S. Bultje [Tue, 19 Jul 2016 16:06:32 +0000 (12:06 -0400)]
vp9: add mxext versions of the single-block (w=4,npx=8) h/v loopfilters.

Each takes about 0.5% of runtime in my profiles, and they didn't have
any SIMD yet so far (we only had simd for npx=16 double-block versions).

7 years agovp9: add 32x32 idct AVX2 implementation.
Ronald S. Bultje [Wed, 13 Jul 2016 16:37:21 +0000 (12:37 -0400)]
vp9: add 32x32 idct AVX2 implementation.

About 1.8x speedup compared to AVX version for full IDCT. Other
sub-IDCT scenarios also see speedups. Full --bench output for
idct_32x32_add_{bpp}_${subidct}_${opt} (50k cycles):

nop: 16.5
vp9_inv_dct_dct_32x32_add_8_1_c: 2284.4
vp9_inv_dct_dct_32x32_add_8_1_sse2: 145.0
vp9_inv_dct_dct_32x32_add_8_1_ssse3: 137.4
vp9_inv_dct_dct_32x32_add_8_1_avx: 137.1
vp9_inv_dct_dct_32x32_add_8_1_avx2: 73.2
vp9_inv_dct_dct_32x32_add_8_2_c: 14680.8
vp9_inv_dct_dct_32x32_add_8_2_sse2: 2617.2
vp9_inv_dct_dct_32x32_add_8_2_ssse3: 982.9
vp9_inv_dct_dct_32x32_add_8_2_avx: 958.5
vp9_inv_dct_dct_32x32_add_8_2_avx2: 704.2
vp9_inv_dct_dct_32x32_add_8_4_c: 14443.1
vp9_inv_dct_dct_32x32_add_8_4_sse2: 2717.1
vp9_inv_dct_dct_32x32_add_8_4_ssse3: 965.7
vp9_inv_dct_dct_32x32_add_8_4_avx: 1000.7
vp9_inv_dct_dct_32x32_add_8_4_avx2: 717.1
vp9_inv_dct_dct_32x32_add_8_8_c: 14436.4
vp9_inv_dct_dct_32x32_add_8_8_sse2: 2671.8
vp9_inv_dct_dct_32x32_add_8_8_ssse3: 1038.5
vp9_inv_dct_dct_32x32_add_8_8_avx: 983.0
vp9_inv_dct_dct_32x32_add_8_8_avx2: 729.4
vp9_inv_dct_dct_32x32_add_8_16_c: 14614.7
vp9_inv_dct_dct_32x32_add_8_16_sse2: 2701.7
vp9_inv_dct_dct_32x32_add_8_16_ssse3: 1334.4
vp9_inv_dct_dct_32x32_add_8_16_avx: 1276.7
vp9_inv_dct_dct_32x32_add_8_16_avx2: 719.5
vp9_inv_dct_dct_32x32_add_8_32_c: 14363.6
vp9_inv_dct_dct_32x32_add_8_32_sse2: 2575.6
vp9_inv_dct_dct_32x32_add_8_32_ssse3: 2633.9
vp9_inv_dct_dct_32x32_add_8_32_avx: 2539.6
vp9_inv_dct_dct_32x32_add_8_32_avx2: 1395.0

7 years agolavfi/curves: fix meaningless const int returned value
Clément Bœsch [Tue, 26 Jul 2016 19:22:22 +0000 (21:22 +0200)]
lavfi/curves: fix meaningless const int returned value

Spotted-by: James Almer <jamrial@gmail.com>
7 years agolibrtmp: Avoid an infiniloop setting connection arguments
Luca Barbato [Wed, 22 Jun 2016 04:36:31 +0000 (06:36 +0200)]
librtmp: Avoid an infiniloop setting connection arguments

The exit condition was missing.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
7 years agoavformt/matroskaenc: undo an accidental revert by commit 5d48e4ea
James Almer [Tue, 26 Jul 2016 18:22:32 +0000 (15:22 -0300)]
avformt/matroskaenc: undo an accidental revert by commit 5d48e4ea

Commit 5d48e4eafa6c4559683892b8638d10508125f3cf accidentally reverted changes
made to matroskaenc by commit 989a614b707dcff8abdffe28dc24ec64a83b2837.

Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoffprobe: add missing PROGRAM_STREAM_TAGS case
Dmitry Vagin [Fri, 22 Jul 2016 05:52:00 +0000 (08:52 +0300)]
ffprobe: add missing PROGRAM_STREAM_TAGS case

ffprobe did not show tags with only '-show_entries programs'

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavutil/frame: access avframe fields directly in get_frame_defaults()
James Almer [Mon, 25 Jul 2016 18:04:42 +0000 (15:04 -0300)]
avutil/frame: access avframe fields directly in get_frame_defaults()

The accessors are needed only from outside libavutil.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years agolavd/libdc1394: distinguish between enumeration errors and no cameras found
Josh de Kock [Sun, 24 Jul 2016 18:49:40 +0000 (19:49 +0100)]
lavd/libdc1394: distinguish between enumeration errors and no cameras found

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolibavformat/rtpdec_asf: zero initialize the AVIOContext struct
Kacper Michajłow [Sat, 23 Jul 2016 21:47:39 +0000 (23:47 +0200)]
libavformat/rtpdec_asf: zero initialize the AVIOContext struct

This fixes crash in avformat_open_input() when accessing
protocol_whitelist field.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/dnxhddata: move avpriv_dnxhd_parse_header_prefix to a header
James Almer [Mon, 25 Jul 2016 15:09:22 +0000 (12:09 -0300)]
avcodec/dnxhddata: move avpriv_dnxhd_parse_header_prefix to a header

It's a small and simple function that can be inlined.

This removes one private symbol and should reduce object dependencies with the next
major bump

Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoRevert "lavc: always build dnxhddata"
James Almer [Mon, 25 Jul 2016 15:19:31 +0000 (12:19 -0300)]
Revert "lavc: always build dnxhddata"

This reverts commit 2adbea4e216ce38a8bf6c72de16267c9162c174d.

A better solution will follow in the next commit.

7 years agolavc/Makefile: Fix standalone compilation of the svq3 decoder.
Carl Eugen Hoyos [Sun, 24 Jul 2016 21:50:33 +0000 (23:50 +0200)]
lavc/Makefile: Fix standalone compilation of the svq3 decoder.

Regression since 0bf5fd2e

7 years agolavc: always build dnxhddata
Matthieu Bouron [Sun, 24 Jul 2016 20:26:47 +0000 (22:26 +0200)]
lavc: always build dnxhddata

lavc/movenc rely on avpriv_dnxhd_parse_header_prefix declared by
dnxhddata.h since e47981dab7fb7c9499b959cb0125b7281301969a.

Fixes a missing symbol error in lavc/movenc if the dnxhd encoder is not
enabled.

7 years agolavc/h264_ps: Be more verbose when truncating likely oversized PPS.
Carl Eugen Hoyos [Fri, 22 Jul 2016 17:24:15 +0000 (19:24 +0200)]
lavc/h264_ps: Be more verbose when truncating likely oversized PPS.

7 years agoRevert "Merge commit '3c53627ac17fc6bdea5029be57da1e03b32d265d'"
Ivan Uskov [Sun, 24 Jul 2016 13:59:42 +0000 (09:59 -0400)]
Revert "Merge commit '3c53627ac17fc6bdea5029be57da1e03b32d265d'"

This reverts commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e, reversing changes made to
acc155ac55baa95d1c16c0364b02244bc04d83a8. The commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e
provided irrelevant code complexity and decoding slowdown. But the main disadvantage of this
commit is a decoder crash. So it should be reverted.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolavfi/selectivecolor: add 16-bit support
Clément Bœsch [Thu, 14 Jul 2016 15:23:08 +0000 (17:23 +0200)]
lavfi/selectivecolor: add 16-bit support

7 years agolavfi/selectivecolor: fix picking black as neutral when alpha is present
Clément Bœsch [Sun, 24 Jul 2016 12:21:01 +0000 (14:21 +0200)]
lavfi/selectivecolor: fix picking black as neutral when alpha is present

7 years agotests/fate: add dnxhr encoding tests
Mark Reid [Sun, 24 Jul 2016 01:10:33 +0000 (18:10 -0700)]
tests/fate: add dnxhr encoding tests

added sws_flags flags and tested against x86_32

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolavfi: bump minor after recent curves filter additions
Clément Bœsch [Sun, 24 Jul 2016 10:22:41 +0000 (12:22 +0200)]
lavfi: bump minor after recent curves filter additions

7 years agolavfi/curves: prefix init and uninit function names
Clément Bœsch [Sun, 24 Jul 2016 10:17:01 +0000 (12:17 +0200)]
lavfi/curves: prefix init and uninit function names

7 years agolavfi/curves: pass log ctx as void* instead of AVFilterContext*
Clément Bœsch [Sun, 24 Jul 2016 10:13:46 +0000 (12:13 +0200)]
lavfi/curves: pass log ctx as void* instead of AVFilterContext*

7 years agolavfi/curves: reindent after previous commit
Clément Bœsch [Sun, 24 Jul 2016 10:11:30 +0000 (12:11 +0200)]
lavfi/curves: reindent after previous commit

7 years agolavfi/curves: add 16-bit support
Clément Bœsch [Sat, 23 Jul 2016 09:56:56 +0000 (11:56 +0200)]
lavfi/curves: add 16-bit support

7 years agolavfi/curves: move alloc and init of LUTs inside config_input()
Clément Bœsch [Sun, 24 Jul 2016 09:13:29 +0000 (11:13 +0200)]
lavfi/curves: move alloc and init of LUTs inside config_input()

This is needed in order to have different sizes of LUTs according to the
input.

7 years agolavfi/curves: dynamically allocate LUTs
Clément Bœsch [Fri, 22 Jul 2016 20:20:53 +0000 (22:20 +0200)]
lavfi/curves: dynamically allocate LUTs

This simplifies following commits.

7 years agolavfi/curves: add various const where it makes sense
Clément Bœsch [Fri, 22 Jul 2016 20:00:37 +0000 (22:00 +0200)]
lavfi/curves: add various const where it makes sense

7 years agolavfi/curves: remove pointless logging since the addition of plot option
Clément Bœsch [Fri, 22 Jul 2016 20:01:37 +0000 (22:01 +0200)]
lavfi/curves: remove pointless logging since the addition of plot option

7 years agolavfi/curves: add plot option
Clément Bœsch [Thu, 21 Jul 2016 23:17:44 +0000 (01:17 +0200)]
lavfi/curves: add plot option

7 years agolavfi/curves: do not automatically insert points at x=0 and x=1
Clément Bœsch [Sat, 16 Jul 2016 11:46:32 +0000 (13:46 +0200)]
lavfi/curves: do not automatically insert points at x=0 and x=1

There is actually a need for the origin and end point not to be defined.
We can not automatically insert them with the y value of the first and
last point as it will influence the curves in a wrong way.

Fixes #5397

7 years agotests/fate/filter-audio: fate-filter-chorus: Randomly change parameters to some value...
Michael Niedermayer [Sun, 24 Jul 2016 01:34:33 +0000 (03:34 +0200)]
tests/fate/filter-audio: fate-filter-chorus: Randomly change parameters to some values which pass on arm/mips/x86-32/64

If this still doesnt give the same results on all platforms then this should be
disabled

Found-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolibavutil/opt: Small bugfix in example.
Kacper Michajłow [Sat, 23 Jul 2016 19:43:06 +0000 (21:43 +0200)]
libavutil/opt: Small bugfix in example.

Fix const corectness and zero init the struct. This example code would actually crash when initializing string.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavformat/tee: Rescale ts using av_packet_rescale_ts
Jan Sebechlebsky [Sat, 16 Jul 2016 11:27:50 +0000 (13:27 +0200)]
avformat/tee: Rescale ts using av_packet_rescale_ts

This ensures that AV_NOPTS_VALUE value is handled
correctly.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
7 years agolibavcodec/dnxhdenc: add support for dnxhr encoding
Mark Reid [Sun, 17 Jul 2016 02:37:39 +0000 (19:37 -0700)]
libavcodec/dnxhdenc: add support for dnxhr encoding

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolibavcodec/dnxhdenc: add support for variable mircoblock counts
Mark Reid [Sun, 17 Jul 2016 02:37:38 +0000 (19:37 -0700)]
libavcodec/dnxhdenc: add support for variable mircoblock counts

dnxhr has variable resolution, 8160 is the mb num for 1920x1080

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agotests/fate/dnxhd: add dnxhr prefix tests
Mark Reid [Thu, 21 Jul 2016 01:15:38 +0000 (18:15 -0700)]
tests/fate/dnxhd: add dnxhr prefix tests

The data offset value in the prefix increases as the heights increases.
This test adds a tests for some common dnxhr heights.

can somebody add the following test footage to fate/dnxhd?
https://dl.dropboxusercontent.com/u/170952/fate/dnxhd/prefix-256x1536.dnxhr
https://dl.dropboxusercontent.com/u/170952/fate/dnxhd/prefix-256x1716.dnxhr
https://dl.dropboxusercontent.com/u/170952/fate/dnxhd/prefix-256x2048.dnxhr
https://dl.dropboxusercontent.com/u/170952/fate/dnxhd/prefix-256x2160.dnxhr
https://dl.dropboxusercontent.com/u/170952/fate/dnxhd/prefix-256x3212.dnxhr

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolibavformat/movenc: add dnxhr compatibility for apple players
Mark Reid [Fri, 22 Jul 2016 20:30:15 +0000 (13:30 -0700)]
libavformat/movenc: add dnxhr compatibility for apple players

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoMAINTAINERS: add myself to the project server
Nikolay Aleksandrov [Fri, 22 Jul 2016 14:15:20 +0000 (16:15 +0200)]
MAINTAINERS: add myself to the project server

I've been helping out with the project servers' maintenance and migration
to the new machine hosted in Telepoint's data center in Sofia, BG.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolibavformat/matroskadec: fix unsigned overflow to improve seeking
Chris Cunningham [Thu, 21 Jul 2016 19:01:45 +0000 (12:01 -0700)]
libavformat/matroskadec: fix unsigned overflow to improve seeking

When seeking a file where codec delay is greater than 0, the timecode
can become negative after offsetting by the codec delay. Failing to cast
to a signed int64 will cause the check against skip_to_timecode to evaluate
true for these negative values. This breaks the "skip_to" seek mechanism.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoffmpeg.c: copy video profile when using stream_copy
Mark Reid [Fri, 22 Jul 2016 20:30:14 +0000 (13:30 -0700)]
ffmpeg.c: copy video profile when using stream_copy

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolavc/intrax8: Use correct printf specifier for size_t on Windows.
Carl Eugen Hoyos [Fri, 22 Jul 2016 17:23:01 +0000 (19:23 +0200)]
lavc/intrax8: Use correct printf specifier for size_t on Windows.

7 years agoavcodec/mpeg4_unpack_bframes_bsf: Check av_packet_from_data() return value
Jan Sebechlebsky [Fri, 22 Jul 2016 15:59:30 +0000 (17:59 +0200)]
avcodec/mpeg4_unpack_bframes_bsf: Check av_packet_from_data() return value

Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavcodec/mpeg4_unpack_bframes_bsf: Copy packet props
Jan Sebechlebsky [Fri, 22 Jul 2016 15:59:29 +0000 (17:59 +0200)]
avcodec/mpeg4_unpack_bframes_bsf: Copy packet props

mpeg4_unpack_bframes_bsf bitstream filters constructs
resulting packet using av_packet_from_data() function.
This function however modifies only buffer (data) and leaves
other fields untouched, so the content of other fields
of the output packet is undefined.
It is working with old BSF API, since old API filters
just data and the packet fields are copied in
av_apply_bitstream_filters from input packet.

This change fixes the behaviour for the new BSF API.

Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agolibx264: Increase x264 opts character limit to 4096
Sasi Inguva [Fri, 22 Jul 2016 01:52:41 +0000 (18:52 -0700)]
libx264: Increase x264 opts character limit to 4096

Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agodoc/muxers: improve hlsenc description
Steven Liu [Mon, 18 Jul 2016 12:10:25 +0000 (20:10 +0800)]
doc/muxers: improve hlsenc description

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>