]> git.sesse.net Git - ffmpeg/log
ffmpeg
7 years agodecklink: Remove unneeded spaces in initializers
Patrick Felt [Wed, 3 Aug 2016 05:46:28 +0000 (22:46 -0700)]
decklink: Remove unneeded spaces in initializers

7 years agoaf_hdcd: add flags to AVOption defs
Burt P [Mon, 1 Aug 2016 15:56:04 +0000 (10:56 -0500)]
af_hdcd: add flags to AVOption defs

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
7 years agomediacodec: Return ENOSYS on unsupported platforms
Timothy Gu [Wed, 3 Aug 2016 03:48:16 +0000 (20:48 -0700)]
mediacodec: Return ENOSYS on unsupported platforms

7 years agojni: Return ENOSYS on unsupported platforms
Timothy Gu [Wed, 3 Aug 2016 03:47:55 +0000 (20:47 -0700)]
jni: Return ENOSYS on unsupported platforms

7 years agodoxygen: Standardize root-level modules
Timothy Gu [Wed, 3 Aug 2016 05:05:27 +0000 (22:05 -0700)]
doxygen: Standardize root-level modules

7 years agomathematics: Extend and edit Doxygen
Timothy Gu [Sun, 31 Jul 2016 01:56:34 +0000 (18:56 -0700)]
mathematics: Extend and edit Doxygen

7 years agorational: Extend Doxygen
Timothy Gu [Sat, 30 Jul 2016 18:43:24 +0000 (11:43 -0700)]
rational: Extend Doxygen

7 years agoavutil/hash: Add more detailed Doxygen documentation
Timothy Gu [Tue, 2 Aug 2016 06:09:04 +0000 (23:09 -0700)]
avutil/hash: Add more detailed Doxygen documentation

7 years agoavcodec/h264dec: move ff_h264_ps_uninit prototype to h264_ps.h
James Almer [Wed, 3 Aug 2016 03:36:09 +0000 (00:36 -0300)]
avcodec/h264dec: move ff_h264_ps_uninit prototype to h264_ps.h

It's the proper place since 8c7932884d09bc580036640453fd6b7ad4dd77b4

Signed-off-by: James Almer <jamrial@gmail.com>
7 years agolibavcodec/dnxhd: Enable 12-bit DNxHR support.
Steven Robertson [Tue, 2 Aug 2016 06:26:12 +0000 (23:26 -0700)]
libavcodec/dnxhd: Enable 12-bit DNxHR support.

10- and 12-bit DNxHR use the same DC coefficient decoding process and
VLC table, just with a different shift value. From SMPTE 2019-1:2016,
8.2.4 DC Coefficient Decoding:

"For 8-bit video sampling, the maximum value of η=11 and for
10-/12-bit video sampling, the maximum value of η=13."

A sample file will be uploaded to show that with this patch, things
decode correctly:
dnxhr_hqx_12bit_1080p_smpte_colorbars_davinci_resolve.mov

Signed-off-by: Steven Robertson <steven@strobe.cc>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoDoxyfile: Set STRIP_FROM_INC_PATH to project root
Timothy Gu [Tue, 2 Aug 2016 22:10:41 +0000 (15:10 -0700)]
Doxyfile: Set STRIP_FROM_INC_PATH to project root

Show proper #include's on struct pages.

Before:

    #include <buffer.h>

After

    #include <libavutil/buffer.h>

7 years agomem: Order function prototypes semantically
Timothy Gu [Sat, 30 Jul 2016 04:46:06 +0000 (21:46 -0700)]
mem: Order function prototypes semantically

7 years agocosmetics: Correct comments in decklink_dec
Patrick Felt [Tue, 2 Aug 2016 19:39:22 +0000 (13:39 -0600)]
cosmetics: Correct comments in decklink_dec

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
7 years agox86/ttaenc: add ff_ttaenc_filter_process_{ssse3,sse4}
James Almer [Tue, 2 Aug 2016 17:54:06 +0000 (14:54 -0300)]
x86/ttaenc: add ff_ttaenc_filter_process_{ssse3,sse4}

Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavcodec/ttaenc: split off hybrid filter processing as ttaencdsp
James Almer [Tue, 2 Aug 2016 17:46:55 +0000 (14:46 -0300)]
avcodec/ttaenc: split off hybrid filter processing as ttaencdsp

Signed-off-by: James Almer <jamrial@gmail.com>
7 years agoavformat/tee: Factor parse_slave_options() out
Michael Niedermayer [Mon, 1 Aug 2016 00:51:56 +0000 (02:51 +0200)]
avformat/tee: Factor parse_slave_options() out

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoavfilter/af_dynaudnorm: improve pre-filling code
LoRd_MuldeR [Tue, 2 Aug 2016 17:50:26 +0000 (19:50 +0200)]
avfilter/af_dynaudnorm: improve pre-filling code

In order to avoid possible clipping at the very
beginning. Especially apparent when "alternative"
boundary mode is used.

Adopted from original commit by committer.

7 years agoavcodec/alacenc: allocate bigger packets
Paul B Mahol [Fri, 29 Jul 2016 13:05:52 +0000 (15:05 +0200)]
avcodec/alacenc: allocate bigger packets

7 years agomathematics: Make function prototypes identical to definitions
Timothy Gu [Sat, 30 Jul 2016 19:02:20 +0000 (12:02 -0700)]
mathematics: Make function prototypes identical to definitions

Doxygen gets confused by this.

7 years agolavu/hwcontext_vaapi: Fix compilation if VA_FOURCC_ABGR is not defined.
Carl Eugen Hoyos [Tue, 2 Aug 2016 15:07:41 +0000 (17:07 +0200)]
lavu/hwcontext_vaapi: Fix compilation if VA_FOURCC_ABGR is not defined.

Fixes ticket #5484.

7 years agomurmur3: Add Doxygen documentation
Timothy Gu [Tue, 2 Aug 2016 06:03:24 +0000 (23:03 -0700)]
murmur3: Add Doxygen documentation

The interface has been stable for some time now.

7 years agoavutil: Add detailed Doxygen description to a few hashes
Timothy Gu [Tue, 2 Aug 2016 02:53:50 +0000 (19:53 -0700)]
avutil: Add detailed Doxygen description to a few hashes

7 years agoavutil: Group hash functions separately in Doxygen
Timothy Gu [Tue, 2 Aug 2016 02:18:44 +0000 (19:18 -0700)]
avutil: Group hash functions separately in Doxygen

7 years agobuild: Make API documentation depend on config.mak
Timothy Gu [Sat, 30 Jul 2016 01:57:49 +0000 (18:57 -0700)]
build: Make API documentation depend on config.mak

The Doxygen command is generated from the list of installed headers,
which may change per configuration (e.g. `--enable-gpl` results in
libpostproc to be built and installed).

7 years agolavf/rmdec: Do not return EIO on EOF.
Carl Eugen Hoyos [Tue, 2 Aug 2016 14:16:31 +0000 (16:16 +0200)]
lavf/rmdec: Do not return EIO on EOF.

Reported-by: applemax82
7 years agodoc/filters: Add stats_version documentation to PSNR filter
Lucas Cooper [Mon, 1 Aug 2016 16:50:59 +0000 (09:50 -0700)]
doc/filters: Add stats_version documentation to PSNR filter

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agofate: add test for tremolo filter
Petru Rares Sincraian [Tue, 2 Aug 2016 07:38:17 +0000 (09:38 +0200)]
fate: add test for tremolo filter

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoMerge commit '996f13413b0415097e2a184d161462ffb3ceb647'
James Almer [Mon, 1 Aug 2016 22:11:08 +0000 (19:11 -0300)]
Merge commit '996f13413b0415097e2a184d161462ffb3ceb647'

* commit '996f13413b0415097e2a184d161462ffb3ceb647':
  h264: fix warnings in fill_filter_caches_inter()

Conflicts:
libavcodec/h264_slice.c

See ef8f6464a55db730cab8c48a1a51fa4e6ca12107

Merged-by: James Almer <jamrial@gmail.com>
7 years agoaf_hdcd: Warn if there is any resampling or format conversion in the link chain
Burt P [Fri, 29 Jul 2016 17:36:22 +0000 (12:36 -0500)]
af_hdcd: Warn if there is any resampling or format conversion in the link chain

HDCD is only encoded in s16@44100Hz. Scan the chain of AVFilterLinks
for any resampling or format conversion/truncation that might cause
problems for the filter and issue warnings.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoaf_hdcd: Process stereo channels together, fix #5727
Burt P [Mon, 1 Aug 2016 19:28:39 +0000 (14:28 -0500)]
af_hdcd: Process stereo channels together, fix #5727

Issue #5727: gain adjustment should only be applied if matching
gain value from a valid packet in both channels. The existing functions process
each channel separately, so it was not possible.

* New versions of hdcd_process(), hdcd_scan(), hdcd_integrate() named
  hdcd_*_stereo() that process both channels together.
* target_gain applied will be the last matching target_gain.
* The old single channel functions remain as an option. They can be
  used by: -af hdcd=process_stereo=0.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoMerge commit 'bc7f4268514624e1286ea76d27a89a56b4ee18e1'
James Almer [Mon, 1 Aug 2016 21:15:07 +0000 (18:15 -0300)]
Merge commit 'bc7f4268514624e1286ea76d27a89a56b4ee18e1'

* commit 'bc7f4268514624e1286ea76d27a89a56b4ee18e1':
  h264: drop tests whether the codec id is AV_CODEC_ID_H264

Conflicts:
libavcodec/h264dec.c

Merged-by: James Almer <jamrial@gmail.com>
7 years agoMerge commit '8281cd5cb80582d668ce0848e0e035b383f161f6'
James Almer [Mon, 1 Aug 2016 19:46:57 +0000 (16:46 -0300)]
Merge commit '8281cd5cb80582d668ce0848e0e035b383f161f6'

* commit '8281cd5cb80582d668ce0848e0e035b383f161f6':
  h264_cabac: drop an always true condition

Merged-by: James Almer <jamrial@gmail.com>
7 years agoMerge commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c'
James Almer [Mon, 1 Aug 2016 18:11:05 +0000 (15:11 -0300)]
Merge commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c'

* commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c':
  h264: add H264_ prefix to the NAL unit types

Conflicts:
libavcodec/h264_parse.c
libavcodec/h264_parser.c
libavcodec/h264_slice.c
libavcodec/h264dec.c

Merged-by: James Almer <jamrial@gmail.com>
7 years agoaf_hdcd: Move code detect/check into own function
Burt P [Fri, 29 Jul 2016 17:36:20 +0000 (12:36 -0500)]
af_hdcd: Move code detect/check into own function

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoaf_hdcd: add force_pe filter option
Burt P [Fri, 29 Jul 2016 17:36:19 +0000 (12:36 -0500)]
af_hdcd: add force_pe filter option

Used to attempt replication of some results from
http://www.audiomisc.co.uk/HFN/HDCD/Examined.html
May not be generally useful, defaults to off.

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoaf_hdcd: Improve error detection logging
Burt P [Fri, 29 Jul 2016 17:36:18 +0000 (12:36 -0500)]
af_hdcd: Improve error detection logging

* Moves the filter context member out of state and into HDCDContext
* More useful information when an error is detected
* Gives a location near where the error was detected

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoMAINTAINERS: Add myself for af_hdcd
Burt P [Sun, 31 Jul 2016 15:47:20 +0000 (10:47 -0500)]
MAINTAINERS: Add myself for af_hdcd

Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoMerge commit '1cf2f3d334f52849aae2be868bad1e5fa5f59aa0'
James Almer [Mon, 1 Aug 2016 16:04:30 +0000 (13:04 -0300)]
Merge commit '1cf2f3d334f52849aae2be868bad1e5fa5f59aa0'

* commit '1cf2f3d334f52849aae2be868bad1e5fa5f59aa0':
  h264_sei: drop an unnecessary h264dec.h include

Merged-by: James Almer <jamrial@gmail.com>
7 years agoMerge commit 'b24dafe10572254ff0decc18b0d7c3d3707d5a29'
James Almer [Mon, 1 Aug 2016 16:03:15 +0000 (13:03 -0300)]
Merge commit 'b24dafe10572254ff0decc18b0d7c3d3707d5a29'

* commit 'b24dafe10572254ff0decc18b0d7c3d3707d5a29':
  lavc: drop unnecessary h264dec.h includes

Merged-by: James Almer <jamrial@gmail.com>
7 years agoMerge commit '70b1dcef2d859ae6b3e21d61de928c3dd0cf1aa4'
James Almer [Mon, 1 Aug 2016 16:02:20 +0000 (13:02 -0300)]
Merge commit '70b1dcef2d859ae6b3e21d61de928c3dd0cf1aa4'

* commit '70b1dcef2d859ae6b3e21d61de928c3dd0cf1aa4':
  h264: tighten the valid range for ref_frame_count

Conflicts:
libavcodec/h264_ps.c

Merged-by: James Almer <jamrial@gmail.com>
7 years agoMerge commit 'f638b67e5790735f34620bf82025c9b9d6fc7216'
James Almer [Mon, 1 Aug 2016 15:58:09 +0000 (12:58 -0300)]
Merge commit 'f638b67e5790735f34620bf82025c9b9d6fc7216'

* commit 'f638b67e5790735f34620bf82025c9b9d6fc7216':
  h264: move the parameter set definitions to a new header file

Conflicts:
libavcodec/h264_parse.h
libavcodec/h264_ps.c
libavcodec/h264dec.h

Merged-by: James Almer <jamrial@gmail.com>
7 years agoavcodec/vp9_parser: Check the input frame sizes for being consistent
Michael Niedermayer [Mon, 1 Aug 2016 11:50:21 +0000 (13:50 +0200)]
avcodec/vp9_parser: Check the input frame sizes for being consistent

Suggested-by: BBB
Fixed-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years agoDoxygen: Re-enable JAVADOC_AUTOBRIEF
Timothy Gu [Mon, 1 Aug 2016 03:56:23 +0000 (20:56 -0700)]
Doxygen: Re-enable JAVADOC_AUTOBRIEF

7 years agodynarray: Change AV_ to FF_ for AV_DYNARRAY_ADD
Timothy Gu [Sat, 30 Jul 2016 05:05:39 +0000 (22:05 -0700)]
dynarray: Change AV_ to FF_ for AV_DYNARRAY_ADD

The header is not installed and the macro isn't used outside libavutil,
so it is obviously privat to libavutil. Make the name reflect that.

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