ffmpeg.git
4 years agohevc: Fix a53 caption extraction
Will Kelleher [Wed, 11 Nov 2015 21:37:29 +0000 (15:37 -0600)]
hevc: Fix a53 caption extraction

Just realized my previous patch doesn't work quite right.  I uploaded a better
sample file that actually has visible captions to /incoming/hevc_cc.ts.  I
tested with that file doing hevc->x264 and it works.

This is basically an exact copy of the existing h264 logic.

Signed-off-by: Will Kelleher <wkelleher@gogoair.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavutil/x86/intmath: Fix intrinsic header include when using newer gcc with older...
Matt Oliver [Thu, 12 Nov 2015 05:54:08 +0000 (16:54 +1100)]
avutil/x86/intmath: Fix intrinsic header include when using newer gcc with older icc.

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
4 years agoavutil/x86/bswap: Add msvc bswap instrinsics.
Matt Oliver [Mon, 9 Nov 2015 09:19:32 +0000 (20:19 +1100)]
avutil/x86/bswap: Add msvc bswap instrinsics.

This adds msvc optimisations as well as fixing an error in icl whereby it will generate invalid code otherwise.

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
4 years agodds: add missing newline to log messages
Andreas Cadhalpun [Tue, 10 Nov 2015 23:37:32 +0000 (00:37 +0100)]
dds: add missing newline to log messages

Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agodds: validate compressed source buffer size
Andreas Cadhalpun [Tue, 10 Nov 2015 23:20:18 +0000 (00:20 +0100)]
dds: validate compressed source buffer size

A too small buffer will cause segfaults somewhere below
decompress_texture_thread.

Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agodds: validate source buffer size before copying
Andreas Cadhalpun [Tue, 10 Nov 2015 23:05:02 +0000 (00:05 +0100)]
dds: validate source buffer size before copying

If it is too small av_image_copy_plane segfaults.

Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoaacsbr_fixed: check for envelope scalefactors overflowing
Andreas Cadhalpun [Mon, 9 Nov 2015 19:41:16 +0000 (20:41 +0100)]
aacsbr_fixed: check for envelope scalefactors overflowing

This prevents various values from getting an insanely huge exponent.
If someone knows a cleaner solution, thats welcome!

This is similar to commit 8978c74 for aacsbr.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoffserver: Replace one malloc(AVStream) by avformat_new_stream()
Michael Niedermayer [Wed, 11 Nov 2015 20:04:01 +0000 (21:04 +0100)]
ffserver: Replace one malloc(AVStream) by avformat_new_stream()

This fixes a null pointer dereference from the recently introduced
AVStream->internal

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoswresample/resample: increase precision for compensation
Michael Niedermayer [Wed, 11 Nov 2015 15:49:21 +0000 (16:49 +0100)]
swresample/resample: increase precision for compensation

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoffmpeg: Fix integer overflow with cur_dts being AV_NOPTS_VALUE
Michael Niedermayer [Wed, 11 Nov 2015 16:19:12 +0000 (17:19 +0100)]
ffmpeg: Fix integer overflow with cur_dts being AV_NOPTS_VALUE

Since de0e219a8aba72de201e85385c746cd1c04be1a2 cur_dts is sometimes invalid

4 years agoffserver: Do not add or rescale AV_NOPTS_VALUE from the demuxer
Michael Niedermayer [Sun, 1 Nov 2015 12:44:59 +0000 (13:44 +0100)]
ffserver: Do not add or rescale AV_NOPTS_VALUE from the demuxer

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoffmpeg: Print a warning if a pkt duration is already set before using the frame rate
Michael Niedermayer [Tue, 10 Nov 2015 21:53:30 +0000 (22:53 +0100)]
ffmpeg: Print a warning if a pkt duration is already set before using the frame rate

I didnt find any case that triggers this but if it gets triggered it needs to be
investigated

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoffmpeg: set muxer packet duration based on framerate only for CFR
Michael Niedermayer [Tue, 10 Nov 2015 21:53:29 +0000 (22:53 +0100)]
ffmpeg: set muxer packet duration based on framerate only for CFR

a set ost->frame_rate does not imply CFR in ffmpeg

The changed fate tests had all wrong packet durations
(like 1/1000 or 1/90000)

There might be more cases in which is_cfr could be set

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoMerge commit '8ad5124b7ecf7f727724e270a7b4bb8c7bcbf6a4'
Hendrik Leppkes [Wed, 11 Nov 2015 14:03:36 +0000 (15:03 +0100)]
Merge commit '8ad5124b7ecf7f727724e270a7b4bb8c7bcbf6a4'

* commit '8ad5124b7ecf7f727724e270a7b4bb8c7bcbf6a4':
  movenc: Automatically flush after writing the initial moov

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'db9b7321d5dfcbaf521d46beec44cf724776c70d'
Hendrik Leppkes [Wed, 11 Nov 2015 14:02:32 +0000 (15:02 +0100)]
Merge commit 'db9b7321d5dfcbaf521d46beec44cf724776c70d'

* commit 'db9b7321d5dfcbaf521d46beec44cf724776c70d':
  vsrc_color: implement frame rate

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '1339009c4924a20e872aa62897097bf5d071157c'
Hendrik Leppkes [Wed, 11 Nov 2015 14:01:15 +0000 (15:01 +0100)]
Merge commit '1339009c4924a20e872aa62897097bf5d071157c'

* commit '1339009c4924a20e872aa62897097bf5d071157c':
  vf_showinfo: show timebase & framerate too

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '11f87ca71e9c7b917f594194f827fd040d1df5ca'
Hendrik Leppkes [Wed, 11 Nov 2015 13:59:23 +0000 (14:59 +0100)]
Merge commit '11f87ca71e9c7b917f594194f827fd040d1df5ca'

* commit '11f87ca71e9c7b917f594194f827fd040d1df5ca':
  vf_frei0r: also set AVFilterLink.frame_rate

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '7d12cba95ca15198a930c05458dc414ac00c578b'
Hendrik Leppkes [Wed, 11 Nov 2015 13:58:33 +0000 (14:58 +0100)]
Merge commit '7d12cba95ca15198a930c05458dc414ac00c578b'

* commit '7d12cba95ca15198a930c05458dc414ac00c578b':
  vf_framepack: Check and update frame_rate

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '65e73bc60f98dc7b26c687e145dfb755d3f2ccfa'
Hendrik Leppkes [Wed, 11 Nov 2015 13:57:32 +0000 (14:57 +0100)]
Merge commit '65e73bc60f98dc7b26c687e145dfb755d3f2ccfa'

* commit '65e73bc60f98dc7b26c687e145dfb755d3f2ccfa':
  vf_interlace: implement frame rate

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '018bdaed37d2f1735dbecfc58309a1a164abadd5'
Hendrik Leppkes [Wed, 11 Nov 2015 13:56:32 +0000 (14:56 +0100)]
Merge commit '018bdaed37d2f1735dbecfc58309a1a164abadd5'

* commit '018bdaed37d2f1735dbecfc58309a1a164abadd5':
  setpts: add FRAME_RATE constant

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '5e91a5c5cf1db88f254b4c358eb1b06ff6ca274f'
Hendrik Leppkes [Wed, 11 Nov 2015 13:52:27 +0000 (14:52 +0100)]
Merge commit '5e91a5c5cf1db88f254b4c358eb1b06ff6ca274f'

* commit '5e91a5c5cf1db88f254b4c358eb1b06ff6ca274f':
  testsrc: set output framerate

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '9df477e03ef74068f3de130adc4dd34349a16ef2'
Hendrik Leppkes [Wed, 11 Nov 2015 13:50:33 +0000 (14:50 +0100)]
Merge commit '9df477e03ef74068f3de130adc4dd34349a16ef2'

* commit '9df477e03ef74068f3de130adc4dd34349a16ef2':
  yadif: update frame rate

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '1062880d69a4fdc8d8929dd5c22bb447182f1c41'
Hendrik Leppkes [Wed, 11 Nov 2015 13:49:30 +0000 (14:49 +0100)]
Merge commit '1062880d69a4fdc8d8929dd5c22bb447182f1c41'

* commit '1062880d69a4fdc8d8929dd5c22bb447182f1c41':
  vf_fps: set frame_rate.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '61fb67dcb2e71a268c422fc19d366040e59fb337'
Hendrik Leppkes [Wed, 11 Nov 2015 13:48:34 +0000 (14:48 +0100)]
Merge commit '61fb67dcb2e71a268c422fc19d366040e59fb337'

* commit '61fb67dcb2e71a268c422fc19d366040e59fb337':
  buffersrc: accept the frame rate as argument.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '48ff6683ba5d40b629428673b1028e8ec542a9fa'
Hendrik Leppkes [Wed, 11 Nov 2015 13:45:24 +0000 (14:45 +0100)]
Merge commit '48ff6683ba5d40b629428673b1028e8ec542a9fa'

* commit '48ff6683ba5d40b629428673b1028e8ec542a9fa':
  lavfi: add a frame_rate field to AVFilterLink.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '79f5347a983342e2711ca8ba19ec3d8d151183f0'
Hendrik Leppkes [Wed, 11 Nov 2015 13:41:49 +0000 (14:41 +0100)]
Merge commit '79f5347a983342e2711ca8ba19ec3d8d151183f0'

* commit '79f5347a983342e2711ca8ba19ec3d8d151183f0':
  avcodec: fix doxy placement

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '8de1ee9f725aa3c550f425bd3120bcd95d5b2ea8'
Hendrik Leppkes [Wed, 11 Nov 2015 13:37:48 +0000 (14:37 +0100)]
Merge commit '8de1ee9f725aa3c550f425bd3120bcd95d5b2ea8'

* commit '8de1ee9f725aa3c550f425bd3120bcd95d5b2ea8':
  lavf: deprecate compute_pkt_fields2

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoavformat/utils: re-factor freeing AVStreams
Hendrik Leppkes [Wed, 11 Nov 2015 13:31:10 +0000 (14:31 +0100)]
avformat/utils: re-factor freeing AVStreams

This matches the Libav signature and simplifies merging future changes.

4 years agoavformat/rsd: XMA2 is actually stored, not XMA1
Paul B Mahol [Tue, 10 Nov 2015 20:29:25 +0000 (21:29 +0100)]
avformat/rsd: XMA2 is actually stored, not XMA1

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoffmpeg_filter: remove redundant null ptr check
Michael Niedermayer [Wed, 11 Nov 2015 00:51:52 +0000 (01:51 +0100)]
ffmpeg_filter: remove redundant null ptr check

Fixes: CID1338331

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/avf_showcqt: Fix uninitialized return code
Michael Niedermayer [Wed, 11 Nov 2015 00:07:45 +0000 (01:07 +0100)]
avfilter/avf_showcqt: Fix uninitialized return code

Fixes CID1322329

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/webvttdec: Fix uninitialized use of variable "again"
Michael Niedermayer [Tue, 10 Nov 2015 23:28:28 +0000 (00:28 +0100)]
avcodec/webvttdec: Fix uninitialized use of variable "again"

Fixes CID1338336
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agodvdsubdec: validate offset2 similar to offset1
Andreas Cadhalpun [Tue, 10 Nov 2015 21:14:39 +0000 (22:14 +0100)]
dvdsubdec: validate offset2 similar to offset1

If it is negative, it causes segmentation faults in decode_rle.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoavutil/x86/intmath: Disable use of tzcnt on older intel compilers.
Matt Oliver [Tue, 10 Nov 2015 13:13:42 +0000 (00:13 +1100)]
avutil/x86/intmath: Disable use of tzcnt on older intel compilers.

ICC versions older than atleast 12.1.6 dont have the tzcnt intrinsics.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
4 years agoavformat/mov: Add option to ignore chapters during parsing
Bryan Huh [Tue, 10 Nov 2015 19:11:26 +0000 (11:11 -0800)]
avformat/mov: Add option to ignore chapters during parsing

Chapter-indexing can be expensive since chapters may be interspersed
throughout the entire file and may require many seeks - especially
costly when consuming a video over a remote protocol like http.
Furthermore it is often unnecessary, especially when only trying to get
video info (e.g. via ffprobe).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/mxfenc: Only store user comment related tags when needed
Michael Niedermayer [Mon, 9 Nov 2015 13:24:26 +0000 (14:24 +0100)]
avformat/mxfenc: Only store user comment related tags when needed

Also support disabling them as they seem to cause problems to some
Users. They are also not allowed in IRT D-10 thus the default for
mxf_d10 is not to write them

This also decreases the filesize when no user comment are stored

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/gifdec: skip the data lzw consumed
Ni Hui [Tue, 10 Nov 2015 14:03:36 +0000 (22:03 +0800)]
avcodec/gifdec: skip the data lzw consumed

this fixes the return code of avcodec_decode_video2 for gif decoding
and the gif frame data buffer is skipped properly

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/lzw: ff_lzw_decode_tail() now returns the consumed bytes in lzw decompress
Ni Hui [Tue, 10 Nov 2015 14:03:36 +0000 (22:03 +0800)]
avcodec/lzw: ff_lzw_decode_tail() now returns the consumed bytes in lzw decompress

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agobrstm: reject negative sample rate
Andreas Cadhalpun [Tue, 10 Nov 2015 19:10:23 +0000 (20:10 +0100)]
brstm: reject negative sample rate

A negative sample rate causes assertion failures in av_rescale_rnd.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoavcodec/wmaprodec: XMA1 actually have packet sequence numbers
Paul B Mahol [Tue, 10 Nov 2015 20:24:30 +0000 (21:24 +0100)]
avcodec/wmaprodec: XMA1 actually have packet sequence numbers

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agomovenc: Automatically flush after writing the initial moov
Martin Storsjö [Fri, 6 Nov 2015 23:18:05 +0000 (01:18 +0200)]
movenc: Automatically flush after writing the initial moov

In most other cases when writing fragmented mp4 files, the output
IO context is flushed after each fragment. Also flush it after
writing the initial moov, to have it behave in the same way.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agoaviflter/vf_waveform: speed up non-color filters
Paul B Mahol [Tue, 10 Nov 2015 18:39:23 +0000 (19:39 +0100)]
aviflter/vf_waveform: speed up non-color filters

Remove loops, output is also more interesting.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavformat/wavdec: allow data chunk to be before fmt/xma2 chunk
Paul B Mahol [Sun, 8 Nov 2015 11:27:42 +0000 (12:27 +0100)]
avformat/wavdec: allow data chunk to be before fmt/xma2 chunk

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavformat/wavdec: parse XMA2 tag
Paul B Mahol [Sat, 7 Nov 2015 16:32:19 +0000 (17:32 +0100)]
avformat/wavdec: parse XMA2 tag

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoMerge commit 'aeda1121c91395d1f0d434bc7f227423aa2ff97d'
Hendrik Leppkes [Tue, 10 Nov 2015 17:42:08 +0000 (18:42 +0100)]
Merge commit 'aeda1121c91395d1f0d434bc7f227423aa2ff97d'

* commit 'aeda1121c91395d1f0d434bc7f227423aa2ff97d':
  lavf: factor out freeing an AVStream

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4'
Hendrik Leppkes [Tue, 10 Nov 2015 17:25:51 +0000 (18:25 +0100)]
Merge commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4'

* commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4':
  avconv: set packet duration for CFR video streams

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'a0c71a575109f123978e345fa7eb4ac03cd4d3c3'
Hendrik Leppkes [Tue, 10 Nov 2015 17:23:22 +0000 (18:23 +0100)]
Merge commit 'a0c71a575109f123978e345fa7eb4ac03cd4d3c3'

* commit 'a0c71a575109f123978e345fa7eb4ac03cd4d3c3':
  lavf: initialize cur_dts to AV_NOPTS_VALUE for muxing

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'cc96018c79cd4dc823e0cef938da2131e4660fe5'
Hendrik Leppkes [Tue, 10 Nov 2015 17:19:15 +0000 (18:19 +0100)]
Merge commit 'cc96018c79cd4dc823e0cef938da2131e4660fe5'

* commit 'cc96018c79cd4dc823e0cef938da2131e4660fe5':
  libopenh264enc: Set AVOption data type

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'fcc49924db6c5530a3346c45a6999244d92eaf48'
Hendrik Leppkes [Tue, 10 Nov 2015 17:18:17 +0000 (18:18 +0100)]
Merge commit 'fcc49924db6c5530a3346c45a6999244d92eaf48'

* commit 'fcc49924db6c5530a3346c45a6999244d92eaf48':
  vdpau: Remove a spurious CONFIG_H263_VDPAU_HWACCEL

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '563e6d860391bac0511984e5c0842320b5c94d2d'
Hendrik Leppkes [Tue, 10 Nov 2015 17:18:05 +0000 (18:18 +0100)]
Merge commit '563e6d860391bac0511984e5c0842320b5c94d2d'

* commit '563e6d860391bac0511984e5c0842320b5c94d2d':
  segafilm: drop the "song and dance" for cinepak

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '1e791ee3aae63122afb10cbabe86a747aea58992'
Hendrik Leppkes [Tue, 10 Nov 2015 17:17:02 +0000 (18:17 +0100)]
Merge commit '1e791ee3aae63122afb10cbabe86a747aea58992'

* commit '1e791ee3aae63122afb10cbabe86a747aea58992':
  segafilm: set video and audio stream duration

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'c012c6f1a8b34828a7870dc1854422934f14b79a'
Hendrik Leppkes [Tue, 10 Nov 2015 17:16:11 +0000 (18:16 +0100)]
Merge commit 'c012c6f1a8b34828a7870dc1854422934f14b79a'

* commit 'c012c6f1a8b34828a7870dc1854422934f14b79a':
  segafilm: implement seeking

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '2ec112f71cd03ccab1b6f9a00d29199a57bcc7a5'
Hendrik Leppkes [Tue, 10 Nov 2015 17:13:46 +0000 (18:13 +0100)]
Merge commit '2ec112f71cd03ccab1b6f9a00d29199a57bcc7a5'

* commit '2ec112f71cd03ccab1b6f9a00d29199a57bcc7a5':
  vf_pad: fix x, y option expression evaluation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'e2854e731f843906d9a9a5b882bed872341999fd'
Hendrik Leppkes [Tue, 10 Nov 2015 17:07:41 +0000 (18:07 +0100)]
Merge commit 'e2854e731f843906d9a9a5b882bed872341999fd'

* commit 'e2854e731f843906d9a9a5b882bed872341999fd':
  avresample: Document avresample_open() a little better

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'f128b8e19ac7f702adae899ab91cc1e80f238761'
Hendrik Leppkes [Tue, 10 Nov 2015 17:01:36 +0000 (18:01 +0100)]
Merge commit 'f128b8e19ac7f702adae899ab91cc1e80f238761'

* commit 'f128b8e19ac7f702adae899ab91cc1e80f238761':
  mov: detect cover art pictures by content

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '50d2a3b5f34e6f99e5ffe17f2be5eb1815555960'
Hendrik Leppkes [Tue, 10 Nov 2015 17:00:51 +0000 (18:00 +0100)]
Merge commit '50d2a3b5f34e6f99e5ffe17f2be5eb1815555960'

* commit '50d2a3b5f34e6f99e5ffe17f2be5eb1815555960':
  flashsv: Initialize the block array

Not merged, blocks are already zeroed when appropriate.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'de41b555cdea2dcacbe98ee9edc83a8c15c73c4c'
Hendrik Leppkes [Tue, 10 Nov 2015 16:58:14 +0000 (17:58 +0100)]
Merge commit 'de41b555cdea2dcacbe98ee9edc83a8c15c73c4c'

* commit 'de41b555cdea2dcacbe98ee9edc83a8c15c73c4c':
  truemotion2: Fix the buffer check

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '4a326923381f2bc0fb7d960c8f8366a5456bc4ab'
Hendrik Leppkes [Tue, 10 Nov 2015 16:56:48 +0000 (17:56 +0100)]
Merge commit '4a326923381f2bc0fb7d960c8f8366a5456bc4ab'

* commit '4a326923381f2bc0fb7d960c8f8366a5456bc4ab':
  mimic: Always return on failure

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '452d659aa4a742106c70ffe9ef3df47ef5b81ea6'
Hendrik Leppkes [Tue, 10 Nov 2015 16:56:14 +0000 (17:56 +0100)]
Merge commit '452d659aa4a742106c70ffe9ef3df47ef5b81ea6'

* commit '452d659aa4a742106c70ffe9ef3df47ef5b81ea6':
  msnwc_tcp: Use the correct return values

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit 'f8d10511fef0bb3265f2d7bdfd38f90f60731d80'
Hendrik Leppkes [Tue, 10 Nov 2015 16:55:25 +0000 (17:55 +0100)]
Merge commit 'f8d10511fef0bb3265f2d7bdfd38f90f60731d80'

* commit 'f8d10511fef0bb3265f2d7bdfd38f90f60731d80':
  cosmetics: msnwc_tcp: Reformat

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '4dfbc7a7559ccab666a8fd39de4224eb4b02c768'
Hendrik Leppkes [Tue, 10 Nov 2015 16:54:06 +0000 (17:54 +0100)]
Merge commit '4dfbc7a7559ccab666a8fd39de4224eb4b02c768'

* commit '4dfbc7a7559ccab666a8fd39de4224eb4b02c768':
  msnwc_tcp: Correctly report failure

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '60f50374f1955442dc987abc4a6c61c2109620c2'
Hendrik Leppkes [Tue, 10 Nov 2015 16:50:12 +0000 (17:50 +0100)]
Merge commit '60f50374f1955442dc987abc4a6c61c2109620c2'

* commit '60f50374f1955442dc987abc4a6c61c2109620c2':
  rpza: Check the blocks left before processing one

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '0b699920f3c0b2e30969b38ce59226653f9d80ec'
Hendrik Leppkes [Tue, 10 Nov 2015 16:43:17 +0000 (17:43 +0100)]
Merge commit '0b699920f3c0b2e30969b38ce59226653f9d80ec'

* commit '0b699920f3c0b2e30969b38ce59226653f9d80ec':
  lagarith: Correctly compute hash_shift

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoMerge commit '1e7ff5ac6923996f7292c82f102c68384fbc9d97'
Hendrik Leppkes [Tue, 10 Nov 2015 16:38:09 +0000 (17:38 +0100)]
Merge commit '1e7ff5ac6923996f7292c82f102c68384fbc9d97'

* commit '1e7ff5ac6923996f7292c82f102c68384fbc9d97':
  nut: Use the correct codec_tag when multiple are available

Not merged since ffnutenc handles the codec_tag differently

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
4 years agoavutil/softfloat: use abort() instead of av_assert0(0)
James Almer [Tue, 10 Nov 2015 02:16:17 +0000 (23:16 -0300)]
avutil/softfloat: use abort() instead of av_assert0(0)

Fixes compilation of host tool aacps_fixed_tablegen.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec/g729postfilter: Avoid function calls in FFMAX() arguments
Michael Niedermayer [Tue, 10 Nov 2015 13:35:08 +0000 (14:35 +0100)]
avcodec/g729postfilter: Avoid function calls in FFMAX() arguments

This avoid double calling functions

Found-by: Muhammad Faiz <mfcc64@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agommaldec: send only a single EOS packet on flushing
wm4 [Tue, 10 Nov 2015 12:47:01 +0000 (13:47 +0100)]
mmaldec: send only a single EOS packet on flushing

Fixes apparent mmal_port_disable() freezes in ffmmal_stop_decoder() when
calling ffmmal_decode() with flush semantics a large number of times in
a row.

4 years agoavcodec/aacsbr_fixed: Try to initialize sum[0..1] differently to fix build with VS2012
Michael Niedermayer [Tue, 10 Nov 2015 12:33:38 +0000 (13:33 +0100)]
avcodec/aacsbr_fixed: Try to initialize sum[0..1] differently to fix build with VS2012

Found-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat: Add v210[x] demuxer
Timothy Gu [Sat, 7 Nov 2015 23:59:01 +0000 (15:59 -0800)]
avformat: Add v210[x] demuxer

Allows one to do:

    ffmpeg -s 1920x1080          -i blah.v210 ...
    ffmpeg -s 1920x1080 -f v210x -i blah.yuv10 ...

Fixes #1869.

Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
4 years agotests/fate/avformat: Fix fate-lavf
Michael Niedermayer [Tue, 10 Nov 2015 03:14:55 +0000 (04:14 +0100)]
tests/fate/avformat: Fix fate-lavf

The CMP variable seems to have been inherited from fate-api-seek which set it to null

the mxf reference needed a change due to c7e14a279fa7348db10ec824bb2d67858cb1c1ca

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoaacdec: don't return frames without data from aac_decode_er_frame
Andreas Cadhalpun [Mon, 9 Nov 2015 21:16:01 +0000 (22:16 +0100)]
aacdec: don't return frames without data from aac_decode_er_frame

This is similar to commit ec38a1b for aac_decode_frame_int.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoaacps: avoid division by zero in stereo_processing
Andreas Cadhalpun [Sun, 8 Nov 2015 21:04:08 +0000 (22:04 +0100)]
aacps: avoid division by zero in stereo_processing

This fixes a SIGFPE crash in the aac_fixed decoder.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
4 years agoffserver: fix incorrect strlcpy usage
Ganesh Ajjanagadde [Fri, 6 Nov 2015 20:47:37 +0000 (15:47 -0500)]
ffserver: fix incorrect strlcpy usage

Somewhat ironic that this "safe" interface is actually being used
unsafely here. This fixes the usage preventing potential null pointer
dereference, where the old code was doubly broken: ctime can return
NULL, and ctime can return an arbitrarily long buffer.

Reviewed-by: Mark Harris <mark.hsj@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoswresample/resample: speed up Blackman Nuttall filter
Ganesh Ajjanagadde [Mon, 9 Nov 2015 05:38:45 +0000 (00:38 -0500)]
swresample/resample: speed up Blackman Nuttall filter

This may be a slightly surprising optimization, but is actually based on
an understanding of how math libraries compute trigonometric functions.
Explanation is given here so that future development uses libm more effectively
across the codebase.

All libm's essentially compute transcendental functions via some kind of
polynomial approximation, be it Taylor-Maclaurin or Chebyshev.
Correction terms are added via polynomial correction factors when needed
to squeeze out the last bits of accuracy. Lookup tables are also
inserted strategically.

In the case of trigonometric functions, periodicity is exploited via
first doing a range reduction to an interval around zero, and then using
some polynomial approximation.

This range reduction is the most natural way of doing things - else one
would need polynomials for ranges in different periods which makes no
sense whatsoever.

To avoid the need for the range reduction, it is helpful to feed in
arguments as close to the origin as possible for the trigonometric
functions. In fact, this also makes sense from an accuracy point of view:
IEEE floating point has far more resolution for small numbers than big ones.

This patch does this for the Blackman-Nuttall filter, and yields a
non-negligible speedup.

Sample benchmark (x86-64, Haswell, GNU/Linux)
test: fate-swr-resample-dblp-2626-44100
old:
18893514 decicycles in build_filter (loop 1000),     256 runs,      0 skips
18599863 decicycles in build_filter (loop 1000),     512 runs,      0 skips
18445574 decicycles in build_filter (loop 1000),    1000 runs,     24 skips

new:
16290697 decicycles in build_filter (loop 1000),     256 runs,      0 skips
16267172 decicycles in build_filter (loop 1000),     512 runs,      0 skips
16251105 decicycles in build_filter (loop 1000),    1000 runs,     24 skips

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoswresample/resample: speed up upsampling by precomputing sines
Ganesh Ajjanagadde [Mon, 9 Nov 2015 02:39:32 +0000 (21:39 -0500)]
swresample/resample: speed up upsampling by precomputing sines

When upsampling, factor is set to 1 and sines need to be evaluated only
once for each phase, and the complexity should not depend on the number
of filter taps. This does the desired precomputation, yielding
significant speedups. Hard guarantees on the gain are not possible, but gains
themselves are obvious and are illustrated below.

Sample benchmark (x86-64, Haswell, GNU/Linux)
test: fate-swr-resample-dblp-2626-44100
old:
29161085 decicycles in build_filter (loop 1000),     256 runs,      0 skips
28821467 decicycles in build_filter (loop 1000),     512 runs,      0 skips
28668201 decicycles in build_filter (loop 1000),    1000 runs,     24 skips

new:
14351936 decicycles in build_filter (loop 1000),     256 runs,      0 skips
14306652 decicycles in build_filter (loop 1000),     512 runs,      0 skips
14299923 decicycles in build_filter (loop 1000),    1000 runs,     24 skips

Note that this does not statically allocate the sin lookup table. This
may be done for the default 1024 phases, yielding a 512*8 = 4kB array
which should be small enough.
This should yield a small improvement. Nevertheless, this is separate from
this patch, is more ambiguous due to the binary increase, and requires a
lut to be generated offline.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agodoc/ffmpeg: Clarify that the sdp_file option requires an rtp output.
Simon Thelen [Mon, 2 Nov 2015 14:57:50 +0000 (15:57 +0100)]
doc/ffmpeg: Clarify that the sdp_file option requires an rtp output.

Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoffmpeg: Don't try and write sdp info if none of the outputs had an rtp format.
Simon Thelen [Mon, 2 Nov 2015 15:36:16 +0000 (16:36 +0100)]
ffmpeg: Don't try and write sdp info if none of the outputs had an rtp format.

Fixes a segfault when trying to write nonexistent rtp information.

Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/cache: Avoid int-overflow in cache compare function
Bryan Huh [Mon, 9 Nov 2015 00:35:01 +0000 (16:35 -0800)]
avformat/cache: Avoid int-overflow in cache compare function

cache protocol indexes its cache using AVTreeNodes which require a cmp
function for inserting and searching new cache-entries. This cmp
function expects a 32-bit int return value (negative, zero, or positive)
but the cache cmp function returns an int64_t which can overflow the
int, giving negative numbers for when it should be positive, vice versa.
This manifests itself only for very large files (e.g. 4GB+)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/nvenc: update nvenc default parameters
Agatha Hu [Mon, 9 Nov 2015 12:05:02 +0000 (13:05 +0100)]
avcodec/nvenc: update nvenc default parameters

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
4 years agoavutil/x86/intmath: Correct intrinsic headers for older compilers.
Matt Oliver [Mon, 9 Nov 2015 10:40:33 +0000 (21:40 +1100)]
avutil/x86/intmath: Correct intrinsic headers for older compilers.

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
4 years agoavformat/rsd: add XMA support
Paul B Mahol [Mon, 9 Nov 2015 09:31:24 +0000 (10:31 +0100)]
avformat/rsd: add XMA support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agovsrc_color: implement frame rate
John Stebbins [Tue, 3 Nov 2015 17:57:28 +0000 (09:57 -0800)]
vsrc_color: implement frame rate

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agovf_showinfo: show timebase & framerate too
Michael Niedermayer [Tue, 3 Nov 2015 17:57:27 +0000 (09:57 -0800)]
vf_showinfo: show timebase & framerate too

(cherry picked from ffmpeg commit fdb93996811bacfa7b82995cdc0f93c46f3dc6cc)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agovf_frei0r: also set AVFilterLink.frame_rate
Michael Niedermayer [Tue, 3 Nov 2015 17:57:26 +0000 (09:57 -0800)]
vf_frei0r: also set AVFilterLink.frame_rate

(cherry picked from ffmpeg commit 353cf95f948ef7c6139c8ead79e9eeb9eb8d2e6e)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agovf_framepack: Check and update frame_rate
Michael Niedermayer [Tue, 3 Nov 2015 17:57:25 +0000 (09:57 -0800)]
vf_framepack: Check and update frame_rate

(cherry picked from ffmpeg commit a46a23d30fea9c8a5570e07ec4d9c9b4eaa6eb4f)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agovf_interlace: implement frame rate
Michael Niedermayer [Tue, 3 Nov 2015 17:57:24 +0000 (09:57 -0800)]
vf_interlace: implement frame rate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from ffmpeg commit 227b4458fb434875b127a0c2306fa3b899a770bf)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agosetpts: add FRAME_RATE constant
Stefano Sabatini [Tue, 3 Nov 2015 17:57:23 +0000 (09:57 -0800)]
setpts: add FRAME_RATE constant

Useful for dealing with constant frame-rate video.

(cherry picked from ffmpeg commit 722762f7e1212b4d02142778fabfdd73375722e0)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agotestsrc: set output framerate
Stefano Sabatini [Tue, 3 Nov 2015 17:57:22 +0000 (09:57 -0800)]
testsrc: set output framerate

(cherry picked from ffmpeg commit 7cd5fa35fecc2717223459d04822faed6bbd40fa)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoyadif: update frame rate
Michael Niedermayer [Tue, 3 Nov 2015 17:57:21 +0000 (09:57 -0800)]
yadif: update frame rate

(cherry picked from ffmpeg commit 31619584556466e4beab98e9b04ed4c5ba0db178)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agovf_fps: set frame_rate.
Nicolas George [Tue, 3 Nov 2015 17:57:20 +0000 (09:57 -0800)]
vf_fps: set frame_rate.

(cherry picked from ffmpeg commit 0d249316043fb69a3972029bff3a2969689ba8b6)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agobuffersrc: accept the frame rate as argument.
Nicolas George [Tue, 3 Nov 2015 17:57:19 +0000 (09:57 -0800)]
buffersrc: accept the frame rate as argument.

(cherry picked from ffmpeg commit 9ca440679dc535b31edd569393d8d3dda59db90e)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agolavfi: add a frame_rate field to AVFilterLink.
Nicolas George [Tue, 3 Nov 2015 17:57:17 +0000 (09:57 -0800)]
lavfi: add a frame_rate field to AVFilterLink.

(cherry picked from ffmpeg commit 7b42036b3b23c85f473bf9369e37fa8da22eaf93)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoavcodec: fix doxy placement
Anton Khirnov [Fri, 6 Nov 2015 11:27:16 +0000 (12:27 +0100)]
avcodec: fix doxy placement

4 years agolavf: deprecate compute_pkt_fields2
Anton Khirnov [Wed, 7 Oct 2015 13:51:11 +0000 (15:51 +0200)]
lavf: deprecate compute_pkt_fields2

All encoders set pts and dts properly now (and have been doing that for
a while), so there is no good reason to do any timestamp guessing in the
muxer.

The newly added AVStreamInternal will be later used for storing all the
private fields currently living in AVStream.

4 years agoswresample/resample: improve bessel function accuracy and speed
Ganesh Ajjanagadde [Mon, 2 Nov 2015 19:28:39 +0000 (14:28 -0500)]
swresample/resample: improve bessel function accuracy and speed

This improves accuracy for the bessel function at large arguments, and this in turn
should improve the quality of the Kaiser window. It also improves the
performance of the bessel function and hence build_filter by ~ 20%.
Details are given below.

Algorithm: taken from the Boost project, who have done a detailed
investigation of the accuracy of their method, as compared with e.g the
GNU Scientific Library (GSL):
http://www.boost.org/doc/libs/1_52_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/bessel/mbessel.html.
Boost source code (also cited and licensed in the code):
https://searchcode.com/codesearch/view/14918379/.

Accuracy: sample values may be obtained as follows. i0 denotes the old bessel code,
i0_boost the approach here, and i0_real an arbitrary precision result (truncated) from Wolfram Alpha:
type "bessel i0(6.0)" to reproduce. These are evaluation points that occur for
the default kaiser_beta = 9.

Some illustrations:
bessel(8.0)
i0      (8.000000) = 427.564115721804739678191254
i0_boost(8.000000) = 427.564115721804796521610115
i0_real (8.000000) = 427.564115721804785177396791

bessel(6.0)
i0      (6.000000) = 67.234406976477956163762428
i0_boost(6.000000) = 67.234406976477970374617144
i0_real (6.000000) = 67.234406976477975326188025

Reason for accuracy: Main accuracy benefits come at larger bessel arguments, where the
Taylor-Maclaurin method is not that good: 23+ iterations
(at large arguments, since the series is about 0) can cause
significant floating point error accumulation.

Benchmarks: Obtained on x86-64, Haswell, GNU/Linux via a loop calling
build_filter 1000 times:
test: fate-swr-resample-dblp-44100-2626

new:
995894468 decicycles in build_filter(loop 1000),     256 runs,      0 skips
1029719302 decicycles in build_filter(loop 1000),     512 runs,      0 skips
984101131 decicycles in build_filter(loop 1000),    1024 runs,      0 skips

old:
1250020763 decicycles in build_filter(loop 1000),     256 runs,      0 skips
1246353282 decicycles in build_filter(loop 1000),     512 runs,      0 skips
1220017565 decicycles in build_filter(loop 1000),    1024 runs,      0 skips

A further ~ 5% may be squeezed by enabling -ftree-vectorize. However,
this is a separate issue from this patch.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoswresample: allow double precision beta value for the Kaiser window
Ganesh Ajjanagadde [Sat, 7 Nov 2015 15:16:27 +0000 (10:16 -0500)]
swresample: allow double precision beta value for the Kaiser window

Kaiser windows inherently don't require beta to be an integer. This was
an arbitrary restriction. Moreover, soxr does not require it, and in
fact often estimates beta to a non-integral value.

Thus, this patch allows greater flexibility for swresample clients.
Micro version is updated.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agosoftfloat: handle INT_MIN correctly in av_int2sf
Andreas Cadhalpun [Sun, 8 Nov 2015 16:19:10 +0000 (17:19 +0100)]
softfloat: handle INT_MIN correctly in av_int2sf

Otherwise v=INT_MIN doesn't get normalized and thus triggers av_assert2
in other functions.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agosoftfloat: assert when the argument of av_sqrt_sf is negative
Andreas Cadhalpun [Sun, 8 Nov 2015 14:15:24 +0000 (15:15 +0100)]
softfloat: assert when the argument of av_sqrt_sf is negative

The correct result can't be expressed in SoftFloat.
Currently it returns a random value from an out of bounds read.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoavfilter: add anoisesrc
Kyle Swanson [Sun, 8 Nov 2015 11:39:37 +0000 (12:39 +0100)]
avfilter: add anoisesrc

Signed-off-by: Kyle Swanson <k@ylo.ph>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavutil/softfloat: Include negative numbers in cmp/gt tests
Michael Niedermayer [Sun, 8 Nov 2015 14:04:05 +0000 (15:04 +0100)]
avutil/softfloat: Include negative numbers in cmp/gt tests

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