ffmpeg.git
4 years agoavcodec/ac3: use M_SQRT1_2, M_SQRT2
Ganesh Ajjanagadde [Wed, 11 Nov 2015 03:26:25 +0000 (22:26 -0500)]
avcodec/ac3: use M_SQRT1_2, M_SQRT2

This uses M_SQRT1_2, M_SQRT2 instead of the actual literals. This yields
greater precision in some places in avcodec/ac3, while fixed point
values remain unchanged.

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavfilter/vf_fspp: use M_SQRT1_2, M_SQRT2
Ganesh Ajjanagadde [Wed, 11 Nov 2015 03:26:25 +0000 (22:26 -0500)]
avfilter/vf_fspp: use M_SQRT1_2, M_SQRT2

This uses M_SQRT1_2, M_SQRT2 instead of the actual literals. Fixed point
values remain unchanged.
Patch tested with FATE on x86.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavformat/mov: use hypot()
Ganesh Ajjanagadde [Sun, 22 Nov 2015 16:15:39 +0000 (11:15 -0500)]
avformat/mov: use hypot()

This simplifies the code.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavcodec/dvdsubdec: Fix types for offset1/2 in ff_dlog()
Michael Niedermayer [Sun, 22 Nov 2015 18:15:19 +0000 (19:15 +0100)]
avcodec/dvdsubdec: Fix types for offset1/2 in ff_dlog()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoMerge commit '3edac01f79a08635d8d2c08e9410651d9a330d61'
Derek Buitenhuis [Sun, 22 Nov 2015 17:47:21 +0000 (17:47 +0000)]
Merge commit '3edac01f79a08635d8d2c08e9410651d9a330d61'

* commit '3edac01f79a08635d8d2c08e9410651d9a330d61':
  qsvenc: fix setting maxrate for VBR

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '4d8f536b535487063a08609636e712ad86d2ad54'
Derek Buitenhuis [Sun, 22 Nov 2015 17:46:57 +0000 (17:46 +0000)]
Merge commit '4d8f536b535487063a08609636e712ad86d2ad54'

* commit '4d8f536b535487063a08609636e712ad86d2ad54':
  qsvenc: print the actual video parameters used by MSDK

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit 'f6c94457b44f41d900cd0991857f54e1f0ccedd6'
Derek Buitenhuis [Sun, 22 Nov 2015 17:46:26 +0000 (17:46 +0000)]
Merge commit 'f6c94457b44f41d900cd0991857f54e1f0ccedd6'

* commit 'f6c94457b44f41d900cd0991857f54e1f0ccedd6':
  mpegvideo_enc: enable rtp_mode when multiple slices are used

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit 'd80f0a4ad634b3949b91b85f21fd608c0cddeef7'
Derek Buitenhuis [Sun, 22 Nov 2015 17:43:26 +0000 (17:43 +0000)]
Merge commit 'd80f0a4ad634b3949b91b85f21fd608c0cddeef7'

* commit 'd80f0a4ad634b3949b91b85f21fd608c0cddeef7':
  mpevideo_enc: disallow multiple slices for h261 and flv

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit 'ca489564ae150bc41764f175b88151d883e69ae0'
Derek Buitenhuis [Sun, 22 Nov 2015 17:41:51 +0000 (17:41 +0000)]
Merge commit 'ca489564ae150bc41764f175b88151d883e69ae0'

* commit 'ca489564ae150bc41764f175b88151d883e69ae0':
  movenc: add fallback audio track tref support

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '79ae1e630b476889c251fc905687a3831b43ab5e'
Derek Buitenhuis [Sun, 22 Nov 2015 17:41:27 +0000 (17:41 +0000)]
Merge commit '79ae1e630b476889c251fc905687a3831b43ab5e'

* commit '79ae1e630b476889c251fc905687a3831b43ab5e':
  avcodec: Define side data type for fallback track

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '7f4ec4364bc4a73036660c1c6a3c4801db524e9e'
Derek Buitenhuis [Sun, 22 Nov 2015 17:19:10 +0000 (17:19 +0000)]
Merge commit '7f4ec4364bc4a73036660c1c6a3c4801db524e9e'

* commit '7f4ec4364bc4a73036660c1c6a3c4801db524e9e':
  avformat: expose av_stream_new_side_data helper

  Conflicts:
      libavformat/internal.h

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '21ab6fd01b9107d7171fc1a77c2bfacff845a97a'
Derek Buitenhuis [Sun, 22 Nov 2015 17:16:13 +0000 (17:16 +0000)]
Merge commit '21ab6fd01b9107d7171fc1a77c2bfacff845a97a'

* commit '21ab6fd01b9107d7171fc1a77c2bfacff845a97a':
  lavf: document that passing valid timestamps to muxers is now mandatory

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '5c30ae1a09b66179e16694f6137658023ed1fef3'
Derek Buitenhuis [Sun, 22 Nov 2015 17:15:21 +0000 (17:15 +0000)]
Merge commit '5c30ae1a09b66179e16694f6137658023ed1fef3'

* commit '5c30ae1a09b66179e16694f6137658023ed1fef3':
  dvdsubdec: Validate the RLE offsets

  Conflicts:
      libavcodec/dvdsubdec.c

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit 'eda183287489b2c705843aa373a19c4e46fb2fec'
Derek Buitenhuis [Sun, 22 Nov 2015 17:12:24 +0000 (17:12 +0000)]
Merge commit 'eda183287489b2c705843aa373a19c4e46fb2fec'

* commit 'eda183287489b2c705843aa373a19c4e46fb2fec':
  travis: Enable OSX integration

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '79d89cf2f4b62eeb653fd8139041c87e75f7ca65'
Derek Buitenhuis [Sun, 22 Nov 2015 17:10:42 +0000 (17:10 +0000)]
Merge commit '79d89cf2f4b62eeb653fd8139041c87e75f7ca65'

* commit '79d89cf2f4b62eeb653fd8139041c87e75f7ca65':
  flacenc: Clamp user-supplied min/max prediction orders

  Conflicts:
      libavcodec/flacenc.c

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '4bb1070c154e49d35805fbcdac9c9e92f702ef96'
Derek Buitenhuis [Sun, 22 Nov 2015 16:55:56 +0000 (16:55 +0000)]
Merge commit '4bb1070c154e49d35805fbcdac9c9e92f702ef96'

* commit '4bb1070c154e49d35805fbcdac9c9e92f702ef96':
  ffv1: Explicitly name the coder type

  Conflicts:
      libavcodec/ffv1.h
      libavcodec/ffv1dec.c
      libavcodec/ffv1enc.c

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '9fd2bf09dbc630484d9e88a1d27f7e8508b70a2c'
Derek Buitenhuis [Sun, 22 Nov 2015 14:38:57 +0000 (14:38 +0000)]
Merge commit '9fd2bf09dbc630484d9e88a1d27f7e8508b70a2c'

These are all no-ops.

* commit '9fd2bf09dbc630484d9e88a1d27f7e8508b70a2c':
  hqx: correct type and size check of info_offset
  dds: disable palette flag for compressed images
  segafilm: Fix current_sample after seeking and avio_seek return type

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '62b4a6f1b9aa83d56701af226adda98faa5ede09'
Derek Buitenhuis [Sun, 22 Nov 2015 14:38:11 +0000 (14:38 +0000)]
Merge commit '62b4a6f1b9aa83d56701af226adda98faa5ede09'

* commit '62b4a6f1b9aa83d56701af226adda98faa5ede09':
  rtmpcrypt: Provide the xtea keys in little endian format for consistency

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '588b6215b4c74945994eb9636b0699028c069ed2'
Derek Buitenhuis [Sun, 22 Nov 2015 14:29:09 +0000 (14:29 +0000)]
Merge commit '588b6215b4c74945994eb9636b0699028c069ed2'

* commit '588b6215b4c74945994eb9636b0699028c069ed2':
  rtmpcrypt: Do the xtea decryption in little endian mode
  xtea: Add functions for little endian mode

  Conflicts:
      libavutil/xtea.c

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agolavc/opusdec: Fix a memleak when reading invalid files.
Carl Eugen Hoyos [Sun, 22 Nov 2015 00:49:18 +0000 (01:49 +0100)]
lavc/opusdec: Fix a memleak when reading invalid files.

Reviewed-by: James Almer
4 years agolavc/rscc: Fix colourspace for codec_tag RSCC.
Carl Eugen Hoyos [Sun, 22 Nov 2015 00:44:18 +0000 (01:44 +0100)]
lavc/rscc: Fix colourspace for codec_tag RSCC.

4 years agoavformat/vpk: check samples_per_block size
Paul B Mahol [Sat, 21 Nov 2015 20:58:24 +0000 (21:58 +0100)]
avformat/vpk: check samples_per_block size

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavformat: add FSB demuxer
Paul B Mahol [Mon, 19 Oct 2015 12:42:56 +0000 (14:42 +0200)]
avformat: add FSB demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavutil/eval: change sqrt to hypot
Ganesh Ajjanagadde [Sat, 14 Nov 2015 17:04:53 +0000 (12:04 -0500)]
avutil/eval: change sqrt to hypot

This improves the mathematical behavior of hypotenuse computation.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoconfigure+libm.h: add hypot emulation
Ganesh Ajjanagadde [Sat, 14 Nov 2015 16:57:28 +0000 (11:57 -0500)]
configure+libm.h: add hypot emulation

It is known that the naive sqrt(x*x + y*y) approach for computing the
hypotenuse suffers from overflow and accuracy issues, see e.g
http://www.johndcook.com/blog/2010/06/02/whats-so-hard-about-finding-a-hypotenuse/.
This adds hypot support to FFmpeg, a C99 function.

On platforms without hypot, this patch does a reaonable workaround, that
although not as accurate as GNU libm, is readable and does not suffer
from the overflow issue. Improvements can be made separately.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavutil/libm: correct isnan, isinf compat hacks
Ganesh Ajjanagadde [Sun, 15 Nov 2015 00:52:57 +0000 (19:52 -0500)]
avutil/libm: correct isnan, isinf compat hacks

isnan and isinf are actually macros as per the standard. In particular,
the existing implementation has incorrect signature. Furthermore, this
results in undefined behavior for e.g double values outside float range
as per the standard.

This patch corrects the undefined behavior for all usage within FFmpeg.

Note that long double is not handled as it is not used in FFmpeg.
Furthermore, even if at some point long double gets used, it is likely
not needed to modify the macro in practice for usage in FFmpeg. See
below for analysis.

Getting long double to work strictly per the spec is significantly harder
since a long double may be an IEEE 128 bit quad (very rare), 80 bit
extended precision value (on GCC/Clang), or simply double (on recent Microsoft).
On the other hand, any potential future usage of long double is likely
for precision (when a platform offers extra precision) and not for range, since
the range anyway varies and is not as portable as IEEE 754 single/double
precision. In such cases, the implicit cast to a double is well defined
and isinf and isnan should work as intended.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavcodec/amr: replace #define by typedef
Ganesh Ajjanagadde [Mon, 16 Nov 2015 22:01:18 +0000 (17:01 -0500)]
avcodec/amr: replace #define by typedef

See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c
for rationale.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavcodec/atrac1: fix decoder: QMF delay compensation should be 39 samples
Daniil Cherednik [Fri, 13 Nov 2015 22:57:25 +0000 (01:57 +0300)]
avcodec/atrac1: fix decoder: QMF delay compensation should be 39 samples

This also adds a new fate test

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/utils: Fix indentation
Timothy Gu [Sat, 21 Nov 2015 05:29:34 +0000 (21:29 -0800)]
avformat/utils: Fix indentation

4 years agoaacsbr: don't call sbr_dequant twice without intermediate read_sbr_data
Andreas Cadhalpun [Fri, 20 Nov 2015 19:15:21 +0000 (20:15 +0100)]
aacsbr: don't call sbr_dequant twice without intermediate read_sbr_data

Doing that doesn't make sense, because the only purpose of sbr_dequant
is to process the data from read_sbr_data.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoavformat/rsd: implement seeking
Paul B Mahol [Fri, 20 Nov 2015 19:51:22 +0000 (20:51 +0100)]
avformat/rsd: implement seeking

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavformat/ffmdec: Only return EAGAIN if a server is attached
Michael Niedermayer [Fri, 20 Nov 2015 02:10:11 +0000 (03:10 +0100)]
avformat/ffmdec: Only return EAGAIN if a server is attached

This should fix a infinite loop

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoffserver: Use AVOption API to access ffm demuxer instead of direct access depending...
Michael Niedermayer [Fri, 20 Nov 2015 02:09:28 +0000 (03:09 +0100)]
ffserver: Use AVOption API to access ffm demuxer instead of direct access depending on ABI

server_attached is newly added so the demuxer knows if there is an attached server
that can update the write index. This is needed to fix a infinite loop

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/ffmdec: Add cleaner API for ffserver to interface without depending on inter...
Michael Niedermayer [Fri, 20 Nov 2015 02:08:34 +0000 (03:08 +0100)]
avformat/ffmdec: Add cleaner API for ffserver to interface without depending on internal ABI

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoffmpeg: fix -copy_prior_start 0 with -copyts and input -ss
Rodger Combs [Mon, 2 Nov 2015 02:04:25 +0000 (20:04 -0600)]
ffmpeg: fix -copy_prior_start 0 with -copyts and input -ss

Also rearranged the relevant check to reduce code duplication

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/flvenc: Add aac_seq_header_detect and flvflags
Maksym Veremeyenko [Wed, 18 Nov 2015 21:44:08 +0000 (23:44 +0200)]
avformat/flvenc: Add aac_seq_header_detect and flvflags

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoffmpeg: preserve profile for audio stream copy
Maksym Veremeyenko [Wed, 18 Nov 2015 21:44:08 +0000 (23:44 +0200)]
ffmpeg: preserve profile for audio stream copy

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/assdec: allow ASS files starting with empty lines
Clément Bœsch [Fri, 20 Nov 2015 13:38:22 +0000 (14:38 +0100)]
avformat/assdec: allow ASS files starting with empty lines

See https://github.com/mpv-player/mpv/issues/2506

4 years agoavfilter/af_dynaudnorm: use M_PI
Ganesh Ajjanagadde [Wed, 11 Nov 2015 03:26:25 +0000 (22:26 -0500)]
avfilter/af_dynaudnorm: use M_PI

The ad-hoc pi constant has a ludicrous number of digits that offer no
value whatsoever. M_PI is more consistent and readable across the
codebase.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agotests/tiny_ssim: replace #define by typedef
Ganesh Ajjanagadde [Mon, 16 Nov 2015 22:07:58 +0000 (17:07 -0500)]
tests/tiny_ssim: replace #define by typedef

See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c
for rationale.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavcodec/faanidct: replace #define by typedef
Ganesh Ajjanagadde [Mon, 16 Nov 2015 22:10:43 +0000 (17:10 -0500)]
avcodec/faanidct: replace #define by typedef

See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c
for rationale.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavcodec/resample2: replace #define by typedef
Ganesh Ajjanagadde [Mon, 16 Nov 2015 22:14:22 +0000 (17:14 -0500)]
avcodec/resample2: replace #define by typedef

See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c
for rationale.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavcodec/lpc: replace #define by typedef
Ganesh Ajjanagadde [Mon, 16 Nov 2015 21:42:40 +0000 (16:42 -0500)]
avcodec/lpc: replace #define by typedef

See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c
for rationale.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavcodec/ac3: replace #define by typedef
Ganesh Ajjanagadde [Mon, 16 Nov 2015 21:54:48 +0000 (16:54 -0500)]
avcodec/ac3: replace #define by typedef

See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c
for rationale.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavcodec/h264, videotoolbox: do not return invalid frames on failure
wm4 [Fri, 20 Nov 2015 10:30:18 +0000 (11:30 +0100)]
avcodec/h264, videotoolbox: do not return invalid frames on failure

If videotoolbox_common_end_frame failed, then the AVFrame was returned
to the API user with the dummy buffer (in AVFrame.buf[0]) still set, and
the decode call indicating success.

These "half-set" AVFrames with dummy buffer are a videotoolbox specific
hack, because the decoder requires an allocated AVFrame for its internal
logic. Videotoolbox on the other hand allocates its frame itself
internally, and outputs it only on end_frame. At this point, the dummy
buffer is replaced with the real frame (unless decoding fails).

4 years agoqsvenc: fix setting maxrate for VBR
Anton Khirnov [Fri, 6 Nov 2015 12:29:34 +0000 (13:29 +0100)]
qsvenc: fix setting maxrate for VBR

4 years agoqsvenc: print the actual video parameters used by MSDK
Anton Khirnov [Fri, 6 Nov 2015 12:18:56 +0000 (13:18 +0100)]
qsvenc: print the actual video parameters used by MSDK

4 years agompegvideo_enc: enable rtp_mode when multiple slices are used
Anton Khirnov [Wed, 18 Nov 2015 09:37:16 +0000 (10:37 +0100)]
mpegvideo_enc: enable rtp_mode when multiple slices are used

Currently, multiple slices with just one thread produce corrupted
output.

Additionally, enable slice structured mode for h263(+)

Bug-Id: 912
CC: libav-stabl@libav.org
4 years agompevideo_enc: disallow multiple slices for h261 and flv
Anton Khirnov [Wed, 18 Nov 2015 09:32:34 +0000 (10:32 +0100)]
mpevideo_enc: disallow multiple slices for h261 and flv

They do not work and produce corrupted output.

CC: libav-stable@libav.org
4 years agoavcodec/aacsbr_fixed: Replace a noise_facs_q check by an av_assert0
Michael Niedermayer [Fri, 20 Nov 2015 02:36:10 +0000 (03:36 +0100)]
avcodec/aacsbr_fixed: Replace a noise_facs_q check by an av_assert0

The replaced check should have become redundant

Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/sbr: fix copy and paste error
Michael Niedermayer [Fri, 20 Nov 2015 02:34:22 +0000 (03:34 +0100)]
avcodec/sbr: fix copy and paste error

Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agohqx: correct type and size check of info_offset
Andreas Cadhalpun [Sun, 15 Nov 2015 09:33:40 +0000 (10:33 +0100)]
hqx: correct type and size check of info_offset

It is used as size argument of ff_canopus_parse_info_tag, which uses it
as size argument to bytestream2_init, which only supports sizes up to
INT_MAX.
Changing it's type to unsigned simplifies the check.

Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoavformat: add VPK demuxer
Paul B Mahol [Wed, 11 Nov 2015 09:49:30 +0000 (10:49 +0100)]
avformat: add VPK demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavformat/rsd: reindent after the last commit
James Almer [Thu, 19 Nov 2015 19:06:01 +0000 (16:06 -0300)]
avformat/rsd: reindent after the last commit

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/rsd: GADP files are adpcm_thp_le
James Almer [Thu, 19 Nov 2015 19:00:16 +0000 (16:00 -0300)]
avformat/rsd: GADP files are adpcm_thp_le

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoMerge commit '1fc94724f1fd52944bb5ae571475c621da4b77a0'
Derek Buitenhuis [Thu, 19 Nov 2015 14:14:20 +0000 (14:14 +0000)]
Merge commit '1fc94724f1fd52944bb5ae571475c621da4b77a0'

* commit '1fc94724f1fd52944bb5ae571475c621da4b77a0':
  xtea: Clarify that the current API works in big endian mode

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '7b2211bfc4b0c4568180a8db2478023c42d9ff51'
Derek Buitenhuis [Thu, 19 Nov 2015 14:13:29 +0000 (14:13 +0000)]
Merge commit '7b2211bfc4b0c4568180a8db2478023c42d9ff51'

These are all no-op merges.

* commit '7b2211bfc4b0c4568180a8db2478023c42d9ff51':
  dds: add missing newline to log messages
  dds: validate compressed source buffer size
  dds: validate source buffer size before copying

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit 'b5f963bfec1f452c37eee900c7b11f065d10dd60'
Derek Buitenhuis [Thu, 19 Nov 2015 14:11:45 +0000 (14:11 +0000)]
Merge commit 'b5f963bfec1f452c37eee900c7b11f065d10dd60'

* commit 'b5f963bfec1f452c37eee900c7b11f065d10dd60':
  mov: Drop dref when unable to parse

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '303f931938c618668f7f83c646a1850bef84641e'
Derek Buitenhuis [Thu, 19 Nov 2015 14:10:40 +0000 (14:10 +0000)]
Merge commit '303f931938c618668f7f83c646a1850bef84641e'

* commit '303f931938c618668f7f83c646a1850bef84641e':
  mov: Correctly store dref paths

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit 'e25cac50e05d29a15d7a52c01c394ba913c97aee'
Derek Buitenhuis [Thu, 19 Nov 2015 14:08:42 +0000 (14:08 +0000)]
Merge commit 'e25cac50e05d29a15d7a52c01c394ba913c97aee'

* commit 'e25cac50e05d29a15d7a52c01c394ba913c97aee':
  lavc: Add missing mem.h header to libxvid and screenpresso

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '73b03249133d6631520089798087cbd963eed9ca'
Derek Buitenhuis [Thu, 19 Nov 2015 14:07:23 +0000 (14:07 +0000)]
Merge commit '73b03249133d6631520089798087cbd963eed9ca'

* commit '73b03249133d6631520089798087cbd963eed9ca':
  aiff: Support demuxing G.722 streams

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoavcodec/aacsbr: Replace a noise_facs_q check by an av_assert0
Michael Niedermayer [Thu, 19 Nov 2015 12:32:40 +0000 (13:32 +0100)]
avcodec/aacsbr: Replace a noise_facs_q check by an av_assert0

The replaced check should have become redundant

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/aacsbr_template: Check values read in read_sbr_noise()
Michael Niedermayer [Thu, 19 Nov 2015 12:00:27 +0000 (13:00 +0100)]
avcodec/aacsbr_template: Check values read in read_sbr_noise()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/aacsbr: Split pre dequantization noise factors table
Michael Niedermayer [Thu, 19 Nov 2015 11:03:22 +0000 (12:03 +0100)]
avcodec/aacsbr: Split pre dequantization noise factors table

This allows removing a special case for the fixed point decoder and will
make error checks simpler

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/pthread_slice: remove dummy_ret hack
Michael Niedermayer [Wed, 18 Nov 2015 23:28:05 +0000 (00:28 +0100)]
avcodec/pthread_slice: remove dummy_ret hack

This should avoid some tsan warnings

Found-by: Chris Cunningham <chcunningham@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agomxfdec: check edit_rate also for physical_track
Andreas Cadhalpun [Sun, 15 Nov 2015 16:46:08 +0000 (17:46 +0100)]
mxfdec: check edit_rate also for physical_track

Previously only the edit_rate of material_track was checked.
If it's negative, it causes assertion failures in av_rescale_rnd.

Reviewed-by: Tim Nicholson <nichot20-at-yahoo.com@ffmpeg.org>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoavcodec/h264_slice: Clear top_borders on allocation
Michael Niedermayer [Wed, 18 Nov 2015 13:20:07 +0000 (14:20 +0100)]
avcodec/h264_slice: Clear top_borders on allocation

In case of bitstream errors the deblock filter and slices can access uninitialized
top_borders from previous slices which did not fill them as they stoped halfway due
to error or where entirely missing.

This also makes code using these tables deterministic in case of missing or damaged
slices

Found-by: Tyson Smith
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavutil/mem: Add av_fast_mallocz()
Michael Niedermayer [Wed, 18 Nov 2015 13:19:47 +0000 (14:19 +0100)]
avutil/mem: Add av_fast_mallocz()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoMerge commit '5f2c8315b3c1b28da0386fddb118ad6a0ed77a0c'
Derek Buitenhuis [Wed, 18 Nov 2015 16:46:57 +0000 (16:46 +0000)]
Merge commit '5f2c8315b3c1b28da0386fddb118ad6a0ed77a0c'

This is a no-op.

* commit '5f2c8315b3c1b28da0386fddb118ad6a0ed77a0c':
  thp: set duration for audio stream too

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '1d62ee38894afb696674db78cee8f8d89204a8fe'
Derek Buitenhuis [Wed, 18 Nov 2015 16:41:04 +0000 (16:41 +0000)]
Merge commit '1d62ee38894afb696674db78cee8f8d89204a8fe'

* commit '1d62ee38894afb696674db78cee8f8d89204a8fe':
  movenc: Add a unit test for signaling of the track start times

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit 'bef3b1f59f036aba4a5fe599b2480f6bd9e6b280'
Derek Buitenhuis [Wed, 18 Nov 2015 16:40:16 +0000 (16:40 +0000)]
Merge commit 'bef3b1f59f036aba4a5fe599b2480f6bd9e6b280'

* commit 'bef3b1f59f036aba4a5fe599b2480f6bd9e6b280':
  movenc: Allow setting start_dts/start_cts before writing actual packets

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agomovenc-test: Pad the packet data start with 0s
Derek Buitenhuis [Tue, 17 Nov 2015 15:58:51 +0000 (15:58 +0000)]
movenc-test: Pad the packet data start with 0s

This way, it never starts with 0xFFF0, and never trips the
ADTS "Detection" code in movenc.c.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoavformat/genh: Fix tools/probetest failure
Michael Niedermayer [Tue, 17 Nov 2015 16:01:58 +0000 (17:01 +0100)]
avformat/genh: Fix tools/probetest failure

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/dashenc: Add framerate to dash manifest
Bryan Huh [Wed, 18 Nov 2015 09:13:14 +0000 (01:13 -0800)]
avformat/dashenc: Add framerate to dash manifest

DASH manifest should have framerate specified as an attribute in the
AdaptationSet element and Representation elements. Though ISO/IEC
23009-1:2014 doesn't seem to define frameRate as a required attribute,
it is at least optional, and DASH-IF IOP 3.0 seems to require it. See
section 3.2.4 of http://dashif.org/w/2015/04/DASH-IF-IOP-v3.0.pdf

In the event that avg_frame_rate is not set in the muxer, we ignore the
frameRate tag altogther.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat: add IVR demuxer
Paul B Mahol [Wed, 11 Nov 2015 21:04:57 +0000 (22:04 +0100)]
avformat: add IVR demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agomovenc: add fallback audio track tref support
John Stebbins [Thu, 5 Nov 2015 17:49:04 +0000 (09:49 -0800)]
movenc: add fallback audio track tref support

This feature allows making associations between audio tracks
that apple players recognize.  E.g. when an ac3 track has a
tref that points to an aac track, devices that don't support
ac3 will automatically fall back to the aac track.

Apple used to *guess* these associations, but new products
(AppleTV 4) no longer guess and this association can only
be made explicitly now using the "fall" tref.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoavcodec: Define side data type for fallback track
John Stebbins [Fri, 6 Nov 2015 15:29:18 +0000 (07:29 -0800)]
avcodec: Define side data type for fallback track

This side data type is meant to be added to AVStream side data.
A fallback track indicates an alternate track to use when the
current track can not be decoded for some reason.  e.g. no
decoder available for codec.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoavformat: expose av_stream_new_side_data helper
John Stebbins [Thu, 5 Nov 2015 17:49:02 +0000 (09:49 -0800)]
avformat: expose av_stream_new_side_data helper

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agolavf: document that passing valid timestamps to muxers is now mandatory
Anton Khirnov [Sun, 8 Nov 2015 18:53:54 +0000 (19:53 +0100)]
lavf: document that passing valid timestamps to muxers is now mandatory

Also, extend the documentation about setting timestamps.

4 years agoavcodec/faandct: use typedef instead of #define
Ganesh Ajjanagadde [Fri, 13 Nov 2015 16:17:08 +0000 (11:17 -0500)]
avcodec/faandct: use typedef instead of #define

See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c
for rationale.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavformat/rtpdec_mpa_robust: change assignment to inequality test in conditional
Ganesh Ajjanagadde [Tue, 27 Oct 2015 23:54:07 +0000 (19:54 -0400)]
avformat/rtpdec_mpa_robust: change assignment to inequality test in conditional

In the spirit of commit 8199908fdf9b3797cceaea9d1e2fc09d02ef7309, likely
typo originally.

Found by enabling -Wparentheses on clang 3.7 and running a manual audit.
To the best of my knowledge, no such instances remain.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavformat/matroskadec: Check subtitle stream before dereferencing
Michael Niedermayer [Tue, 17 Nov 2015 17:19:01 +0000 (18:19 +0100)]
avformat/matroskadec: Check subtitle stream before dereferencing

Unrecognized streams are not allocated
Fixes: flicker-1.color1.vp91447030769.08.webm

Found-by: Chris Cunningham <chcunningham@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agodvdsubdec: Validate the RLE offsets
Luca Barbato [Wed, 11 Nov 2015 19:08:29 +0000 (20:08 +0100)]
dvdsubdec: Validate the RLE offsets

CC: libav-stable@libav.org
4 years agotravis: Enable OSX integration
Vittorio Giovara [Tue, 17 Nov 2015 12:23:08 +0000 (13:23 +0100)]
travis: Enable OSX integration

4 years agoMerge commit '3eeb7edfc2a1157b7b0e0ce21ac2cd44d55d405b'
Derek Buitenhuis [Tue, 17 Nov 2015 14:56:55 +0000 (14:56 +0000)]
Merge commit '3eeb7edfc2a1157b7b0e0ce21ac2cd44d55d405b'

* commit '3eeb7edfc2a1157b7b0e0ce21ac2cd44d55d405b':
  movenc: Add a unit test for frag_discont with edit lists

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoMerge commit '09e431b9e3674804172e7b0a0f865b65ec09739a'
Derek Buitenhuis [Tue, 17 Nov 2015 14:55:22 +0000 (14:55 +0000)]
Merge commit '09e431b9e3674804172e7b0a0f865b65ec09739a'

* commit '09e431b9e3674804172e7b0a0f865b65ec09739a':
  movenc: Assume streams starting at pts=0 for discontinuous fragments with editlists

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoavcodec/internal: Fix skiped typo
Michael Niedermayer [Mon, 16 Nov 2015 18:36:57 +0000 (19:36 +0100)]
avcodec/internal: Fix skiped typo

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agofate: update fate-source reference file
James Almer [Tue, 17 Nov 2015 00:12:01 +0000 (21:12 -0300)]
fate: update fate-source reference file

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/movenc-test: fix copyright header
James Almer [Mon, 16 Nov 2015 23:54:30 +0000 (20:54 -0300)]
avformat/movenc-test: fix copyright header

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec/pngdec: Replace assert by request for sample for unsupported TRNS cases
Michael Niedermayer [Mon, 16 Nov 2015 17:34:44 +0000 (18:34 +0100)]
avcodec/pngdec: Replace assert by request for sample for unsupported TRNS cases

Fixes assertion failure
Fixes: 7f646252a30ee28b583aac1f82e7985e/signal_sigabrt_7ffff6ae7cc9_7353_62fc077bf2f454d39e188c69807193a6.png

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agofate: fix concat demuxer extended test portability
Marton Balint [Mon, 16 Nov 2015 12:19:40 +0000 (13:19 +0100)]
fate: fix concat demuxer extended test portability

Sed \r is not portable, it does not work on freebsd, hopefully tr -d will.

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoMerge commit '59e8ec0aa8ab174701d01a3bfe96fedd0b7fcead'
Derek Buitenhuis [Mon, 16 Nov 2015 16:18:42 +0000 (16:18 +0000)]
Merge commit '59e8ec0aa8ab174701d01a3bfe96fedd0b7fcead'

All diferences in unit tests have been acounted for.

* commit '59e8ec0aa8ab174701d01a3bfe96fedd0b7fcead':
  movenc: Add an API unit test for fragmenting options/calls

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 years agoflacenc: Clamp user-supplied min/max prediction orders
Vittorio Giovara [Mon, 16 Nov 2015 15:05:54 +0000 (16:05 +0100)]
flacenc: Clamp user-supplied min/max prediction orders

This mimics what the code does internally for default order values.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agoavformat/mov: remove redundant assignment
Ganesh Ajjanagadde [Mon, 16 Nov 2015 01:58:46 +0000 (20:58 -0500)]
avformat/mov: remove redundant assignment

This is possibly undefined behavior based on sequence point rules, but I
have not studied the spec at that level of detail.

Fixes: CID 1338321.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoavformat/mov: fix memory leak
Ganesh Ajjanagadde [Mon, 16 Nov 2015 01:12:20 +0000 (20:12 -0500)]
avformat/mov: fix memory leak

Fixes: CID 1338328.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
4 years agoffv1: Explicitly name the coder type
Vittorio Giovara [Sun, 15 Nov 2015 22:26:07 +0000 (23:26 +0100)]
ffv1: Explicitly name the coder type

FFv1 uses two types of coders, golomb and range with two different
tables. This is exposed this in a rather convoluted way, for example
mentioning to set coder type 1 while initializing the variable 'ac' to 2,
because encoder does not use range coder with default table.

Appropriate internal coder type values have been added and used in any
check rather than using raw numbers.

Initialization of avctx.coder_type in ffv1dec is removed because this
field is encoder only. An unneeded validation check in the encoder
is dropped too.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agohqx: correct type and size check of info_offset
Andreas Cadhalpun [Sun, 15 Nov 2015 09:50:44 +0000 (10:50 +0100)]
hqx: correct type and size check of info_offset

It is used as size argument of ff_canopus_parse_info_tag, which uses it
as size argument to bytestream2_init, which only supports sizes up to
INT_MAX.
Changing it's type to unsigned simplifies the check.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoavformat/aviobuf: Simplify avio_read() and avio_seek()
Bryan Huh [Mon, 16 Nov 2015 02:02:11 +0000 (18:02 -0800)]
avformat/aviobuf: Simplify avio_read() and avio_seek()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/aviobuf: Improve readability of aviobuf (Add comments and docs)
Bryan Huh [Mon, 16 Nov 2015 02:02:11 +0000 (18:02 -0800)]
avformat/aviobuf: Improve readability of aviobuf (Add comments and docs)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agofate: fix concat demuxer extended tests on windows
Marton Balint [Mon, 16 Nov 2015 00:25:19 +0000 (01:25 +0100)]
fate: fix concat demuxer extended tests on windows

Line endings do matter to md5sum...

Signed-off-by: Marton Balint <cus@passwd.hu>