ffmpeg.git
3 years agoMerge commit '5e1840622ce6e41c57d9c407604863d3f3dcc3ae'
Timothy Gu [Thu, 4 Aug 2016 04:28:13 +0000 (21:28 -0700)]
Merge commit '5e1840622ce6e41c57d9c407604863d3f3dcc3ae'

* commit '5e1840622ce6e41c57d9c407604863d3f3dcc3ae':
  avconv: fix handling attachments in init_output_stream

Conflicts:
avconv.c

This is functionally a no-op, as we don't have the bug this is trying to
fix. See 843be56ee18928ecf80bcb20d235c4f9cab5a8fd.

Merged-by: Timothy Gu <timothygu99@gmail.com>
3 years agoMerge commit '73c6ec6d659bab11ac424a4ba6ce3a56246295ee' into merge
Timothy Gu [Thu, 4 Aug 2016 03:53:03 +0000 (20:53 -0700)]
Merge commit '73c6ec6d659bab11ac424a4ba6ce3a56246295ee' into merge

* commit '73c6ec6d659bab11ac424a4ba6ce3a56246295ee':
  avconv: create simple filtergraphs earlier

Merged-by: Timothy Gu <timothygu99@gmail.com>
3 years agoMerge commit '49670e4218d34899a1c37abb7a11615efc16f757'
Timothy Gu [Thu, 4 Aug 2016 03:33:57 +0000 (20:33 -0700)]
Merge commit '49670e4218d34899a1c37abb7a11615efc16f757'

* commit '49670e4218d34899a1c37abb7a11615efc16f757':
  avconv: add a function for determining whether a filtergraph is simple

Conflicts:
avconv.c

Merged-by: Timothy Gu <timothygu99@gmail.com>
3 years agoMerge commit '58640fe89ec4f2a3d67c0a2585fca8de34440857'
Timothy Gu [Thu, 4 Aug 2016 03:07:21 +0000 (20:07 -0700)]
Merge commit '58640fe89ec4f2a3d67c0a2585fca8de34440857'

* commit '58640fe89ec4f2a3d67c0a2585fca8de34440857':
  h264: handle frame recovery in h264_field_start()

Conflicts:
libavcodec/h264dec.c

Merged-by: Timothy Gu <timothygu99@gmail.com>
3 years agoMerge commit 'e26c64148be8a20ace7512d96503172fb5e9753b'
Timothy Gu [Thu, 4 Aug 2016 02:46:06 +0000 (19:46 -0700)]
Merge commit 'e26c64148be8a20ace7512d96503172fb5e9753b'

* commit 'e26c64148be8a20ace7512d96503172fb5e9753b':
  h264: discard slices of redundant pictures right after parsing the slice header

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

TODO: fix indentation

Merged-by: Timothy Gu <timothygu99@gmail.com>
3 years agoMerge commit '6efc4638584e1e14d1a6152186ba28f5d48a80c0'
Timothy Gu [Thu, 4 Aug 2016 02:09:19 +0000 (19:09 -0700)]
Merge commit '6efc4638584e1e14d1a6152186ba28f5d48a80c0'

* commit '6efc4638584e1e14d1a6152186ba28f5d48a80c0':
  h264: always set redundant_pic_count during slice header parsing

Merged-by: Timothy Gu <timothygu99@gmail.com>
3 years agoMerge commit '606fb6c032fa44d9fa1efd4971308c228f2ebfff'
Timothy Gu [Thu, 4 Aug 2016 00:47:06 +0000 (17:47 -0700)]
Merge commit '606fb6c032fa44d9fa1efd4971308c228f2ebfff'

* commit '606fb6c032fa44d9fa1efd4971308c228f2ebfff':
  h264: call the hwaccel frame_start() from h264_field_start()

This commit is a noop, as it conflicts with 3e53211a578fc6b042ceff45b2702335294e0464.

Merged-by: Timothy Gu <timothygu99@gmail.com>
3 years agoRevert "Revert "Merge commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22'""
Timothy Gu [Thu, 4 Aug 2016 00:45:36 +0000 (17:45 -0700)]
Revert "Revert "Merge commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22'""

This reverts commit e4af9be0f45c8f2ca148fb971f1e0c6782530e8c and redoes
796027f22154c799e0063e2457b31e0cfd1dddae.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoRevert "Merge commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22'"
Timothy Gu [Thu, 4 Aug 2016 00:06:43 +0000 (17:06 -0700)]
Revert "Merge commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22'"

This reverts commit 796027f22154c799e0063e2457b31e0cfd1dddae, reversing
changes made to bca30ed2b67f095fd31e07319a622ac30ad22978.

Preemptive revert before further testing has been done.

3 years agoMerge commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22'
Timothy Gu [Wed, 3 Aug 2016 22:59:51 +0000 (15:59 -0700)]
Merge commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22'

* commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22':
  h264: fix the check for mixed IDR/non-IDR slices

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

Merged-by: Timothy Gu <timothygu99@gmail.com>
3 years agoMerge commit 'b13fc1e344011949929975a3451f78f226aa1de3'
Timothy Gu [Wed, 3 Aug 2016 22:41:59 +0000 (15:41 -0700)]
Merge commit 'b13fc1e344011949929975a3451f78f226aa1de3'

* commit 'b13fc1e344011949929975a3451f78f226aa1de3':
  h264: do not pass H264Context to h264_slice_header_parse()

Conflicts:
libavcodec/h264dec.h

Did not merge the h264_slice_header_parse() part. We use a few other
members of H264Context for error checking in that function.

Merged-by: Timothy Gu <timothygu99@gmail.com>
3 years agoavfilter/af_astats: extend bitdepth calculation
Paul B Mahol [Wed, 3 Aug 2016 18:27:28 +0000 (20:27 +0200)]
avfilter/af_astats: extend bitdepth calculation

3 years agoavformat/teeproto: Support parsing protocol options
Michael Niedermayer [Mon, 1 Aug 2016 00:34:23 +0000 (02:34 +0200)]
avformat/teeproto: Support parsing protocol options

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/oggdec: Fix integer overflow with invalid pts
Michael Niedermayer [Wed, 3 Aug 2016 11:34:40 +0000 (13:34 +0200)]
avformat/oggdec: Fix integer overflow with invalid pts

If negative pts are possible for some codecs in ogg then the code needs to be
changed to use signed values.

Found-by: Thomas Guilbert <tguilbert@google.com>
Fixes: clusterfuzz_usan-2016-08-02
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoffplay: Fix invalid array index
Michael Niedermayer [Wed, 3 Aug 2016 11:15:14 +0000 (13:15 +0200)]
ffplay: Fix invalid array index

Found-by: Thomas Guilbert <tguilbert@google.com>
Fixes: clusterfuzz_usan-2016-08-02
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agodoc/filters: Fix option ranges for the sab filter.
Carl Eugen Hoyos [Wed, 3 Aug 2016 13:20:38 +0000 (15:20 +0200)]
doc/filters: Fix option ranges for the sab filter.

Fixes ticket #5751.

3 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

3 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>
3 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

3 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

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

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

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

3 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

3 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>
3 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>
3 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>

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

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

3 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

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

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

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

3 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

3 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

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

3 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
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 years agoDoxygen: Re-enable JAVADOC_AUTOBRIEF
Timothy Gu [Mon, 1 Aug 2016 03:56:23 +0000 (20:56 -0700)]
Doxygen: Re-enable JAVADOC_AUTOBRIEF

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

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

3 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

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

3 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

3 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

3 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

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

3 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

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

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

3 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>
3 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>
3 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

3 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>
3 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

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

3 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

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

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

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

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

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

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

3 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>
3 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>