ffmpeg.git
5 years agoavcodec/sanm: Reset sizes in destroy_buffers()
Michael Niedermayer [Mon, 13 Jul 2015 14:05:21 +0000 (16:05 +0200)]
avcodec/sanm: Reset sizes in destroy_buffers()

Fixes crash in 1288a2fe8e9ae6b00ca40e089d08ca65_signal_sigsegv_7ffff71426a7_354_accident.san with allocation limit 65536

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/alac: Clear pointers in allocate_buffers()
Michael Niedermayer [Mon, 13 Jul 2015 13:46:10 +0000 (15:46 +0200)]
avcodec/alac: Clear pointers in allocate_buffers()

Fixes: 06a4edb39ad8a9883175f9bd428334a2_signal_sigsegv_7ffff713351a_706_mov__alac__ALAC_6ch.mov

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/utils: Skip ff_configure_buffers_for_index() for local files
Michael Niedermayer [Mon, 13 Jul 2015 12:25:38 +0000 (14:25 +0200)]
avformat/utils: Skip ff_configure_buffers_for_index() for local files

Theres no known case where its use on local files improves performance
if you know of such a case, please contact us

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoconfigure: clean whitespace with [:space:]
Zhang Rui [Mon, 13 Jul 2015 08:22:40 +0000 (16:22 +0800)]
configure: clean whitespace with [:space:]

https://en.wikibooks.org/wiki/Regular_Expressions/POSIX_Basic_Regular_Expressions

Fixes NDKr10e on Cygwin,
CC_IDENT for it is defined as

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/mov: Use ff_configure_buffers_for_index()
Michael Niedermayer [Tue, 2 Jun 2015 16:31:05 +0000 (18:31 +0200)]
avformat/mov: Use ff_configure_buffers_for_index()

Fixes Ticket2513
Fixes Ticket4432

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat: Add ff_configure_buffers_for_index()
Michael Niedermayer [Tue, 2 Jun 2015 16:30:07 +0000 (18:30 +0200)]
avformat: Add ff_configure_buffers_for_index()

This allows configuring the io buffer in such way that few seeks are needed for playback

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/dxva2_hevc: unbreak compilation after recent sps/pps changes
James Almer [Mon, 13 Jul 2015 03:05:11 +0000 (00:05 -0300)]
avcodec/dxva2_hevc: unbreak compilation after recent sps/pps changes

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/vdpau_hevc: unbreak compilation after sps/pps changes
Philip Langdale [Mon, 13 Jul 2015 02:55:56 +0000 (19:55 -0700)]
avcodec/vdpau_hevc: unbreak compilation after sps/pps changes

There was some reorganisation in the HEVC headers so the sps and pps
now live in a different place.

5 years agoavcodec/utils: Check that the sample rate is not negative when opening an encoder
Michael Niedermayer [Mon, 13 Jul 2015 01:40:25 +0000 (03:40 +0200)]
avcodec/utils: Check that the sample rate is not negative when opening an encoder

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agotests/checkasm/x86/Makefile: Use ASMSTRIPFLAGS for asm
Michael Niedermayer [Mon, 13 Jul 2015 01:15:44 +0000 (03:15 +0200)]
tests/checkasm/x86/Makefile: Use ASMSTRIPFLAGS for asm

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoFactor duplicated ff_fast_malloc() out into mem_internal.h
Michael Niedermayer [Sat, 11 Jul 2015 21:58:39 +0000 (23:58 +0200)]
Factor duplicated ff_fast_malloc() out into mem_internal.h

internal.h is difficult to use due to circular dependancies
mem.h is a public header ff_* is not public
Alternative solutions probably are possible too

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agovf_ssim: remove another obscure double loop.
Ronald S. Bultje [Sat, 11 Jul 2015 23:56:00 +0000 (19:56 -0400)]
vf_ssim: remove another obscure double loop.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agossim: refactor a weird double loop.
Ronald S. Bultje [Sat, 11 Jul 2015 23:55:58 +0000 (19:55 -0400)]
ssim: refactor a weird double loop.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/hevc_parser: Reenable the old parser under ADVANCED_PARSER define
Michael Niedermayer [Mon, 13 Jul 2015 00:07:15 +0000 (02:07 +0200)]
avcodec/hevc_parser: Reenable the old parser under ADVANCED_PARSER define

Feel free to use either, they both work but the old one provides
more information but needs the hevc decoder

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit '650060dfb665552442ec11b456660e3e9a9d9016'
Michael Niedermayer [Sun, 12 Jul 2015 23:28:36 +0000 (01:28 +0200)]
Merge commit '650060dfb665552442ec11b456660e3e9a9d9016'

* commit '650060dfb665552442ec11b456660e3e9a9d9016':
  hevc_parser: parse and export some stream parameters

Conflicts:
configure
libavcodec/hevc_parser.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/hevc: Simplify skipped_bytes_pos code further
Michael Niedermayer [Sun, 12 Jul 2015 22:52:18 +0000 (00:52 +0200)]
avcodec/hevc: Simplify skipped_bytes_pos code further

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/hevc: Move skipped_bytes_pos_nal to HEVCNAL, simplify code
Michael Niedermayer [Sun, 12 Jul 2015 22:43:25 +0000 (00:43 +0200)]
avcodec/hevc: Move skipped_bytes_pos_nal to HEVCNAL, simplify code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/hevc: Move skipped_bytes_pos_size_nal into HAVCNAL
Michael Niedermayer [Sun, 12 Jul 2015 22:35:11 +0000 (00:35 +0200)]
avcodec/hevc: Move skipped_bytes_pos_size_nal into HAVCNAL

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/hevc: Remove skipped_bytes_nal, simplify code
Michael Niedermayer [Sun, 12 Jul 2015 22:03:45 +0000 (00:03 +0200)]
avcodec/hevc: Remove skipped_bytes_nal, simplify code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit '7f78155dc6b65be55efb5309b6dd2bb33925a8c4'
Michael Niedermayer [Sun, 12 Jul 2015 21:45:44 +0000 (23:45 +0200)]
Merge commit '7f78155dc6b65be55efb5309b6dd2bb33925a8c4'

* commit '7f78155dc6b65be55efb5309b6dd2bb33925a8c4':
  hevc: improve a comment

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit 'd82e1adc2019135a2fc45372e0ed0b5ef107cdd0'
Michael Niedermayer [Sun, 12 Jul 2015 21:31:12 +0000 (23:31 +0200)]
Merge commit 'd82e1adc2019135a2fc45372e0ed0b5ef107cdd0'

* commit 'd82e1adc2019135a2fc45372e0ed0b5ef107cdd0':
  hevc: move splitting the packet into NALUs into a separate function

Conflicts:
libavcodec/hevc.c
libavcodec/hevc.h
libavcodec/hevc_parse.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit 'ae05b4865514fd71b5e9431e93aa0d03d7ba7751'
Michael Niedermayer [Sun, 12 Jul 2015 20:55:47 +0000 (22:55 +0200)]
Merge commit 'ae05b4865514fd71b5e9431e93aa0d03d7ba7751'

* commit 'ae05b4865514fd71b5e9431e93aa0d03d7ba7751':
  hevc: eliminate the second call to hls_nal_unit()

Conflicts:
libavcodec/hevc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit 'd7bebe4805193783f0b6f292f9127a75709fb7d9'
Michael Niedermayer [Sun, 12 Jul 2015 20:45:58 +0000 (22:45 +0200)]
Merge commit 'd7bebe4805193783f0b6f292f9127a75709fb7d9'

* commit 'd7bebe4805193783f0b6f292f9127a75709fb7d9':
  hevc: skip invalid/ignored NALUs when splitting the packet

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit 'b11acd57326db6c2cc1475dd0bea2a06fbc85aa2'
Michael Niedermayer [Sun, 12 Jul 2015 20:06:21 +0000 (22:06 +0200)]
Merge commit 'b11acd57326db6c2cc1475dd0bea2a06fbc85aa2'

* commit 'b11acd57326db6c2cc1475dd0bea2a06fbc85aa2':
  hevc: remove HEVCContext usage from hevc_ps

Conflicts:
libavcodec/hevc.c
libavcodec/hevc_cabac.c
libavcodec/hevc_filter.c
libavcodec/hevc_mvs.c
libavcodec/hevc_ps.c
libavcodec/hevc_refs.c
libavcodec/hevcpred_template.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/vf_w3fdif: implement slice threading
Paul B Mahol [Fri, 10 Jul 2015 18:04:48 +0000 (18:04 +0000)]
avfilter/vf_w3fdif: implement slice threading

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavfilter/vf_stereo3d: implement slice threading for anaglyph output
Paul B Mahol [Thu, 9 Jul 2015 19:18:14 +0000 (19:18 +0000)]
avfilter/vf_stereo3d: implement slice threading for anaglyph output

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agofate: add tests for stereo3d anaglyph modes
Paul B Mahol [Sat, 11 Jul 2015 22:51:39 +0000 (22:51 +0000)]
fate: add tests for stereo3d anaglyph modes

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoMerge commit 'ab05ed4c322ed0488ac9b5d2ef5d4ffa55a946a7'
Michael Niedermayer [Sun, 12 Jul 2015 19:34:59 +0000 (21:34 +0200)]
Merge commit 'ab05ed4c322ed0488ac9b5d2ef5d4ffa55a946a7'

* commit 'ab05ed4c322ed0488ac9b5d2ef5d4ffa55a946a7':
  mpegvideo_parser: export pixel format and dimensions

Conflicts:
libavcodec/mpegvideo_parser.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit '9f4c7397a296e6d11b3c6c121a6896163577dc7c'
Michael Niedermayer [Sun, 12 Jul 2015 19:31:22 +0000 (21:31 +0200)]
Merge commit '9f4c7397a296e6d11b3c6c121a6896163577dc7c'

* commit '9f4c7397a296e6d11b3c6c121a6896163577dc7c':
  hevc: check slice address length

See: 05cc8c8e4b7008ff3be8ec477c901b2ceca4b16b
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit 'a9a2f3613040c4f90bf15cbd76f8671252ecc043'
Michael Niedermayer [Sun, 12 Jul 2015 19:23:16 +0000 (21:23 +0200)]
Merge commit 'a9a2f3613040c4f90bf15cbd76f8671252ecc043'

* commit 'a9a2f3613040c4f90bf15cbd76f8671252ecc043':
  doc: add a section about building with libmfx

Conflicts:
doc/general.texi

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit '86eee85daddb682fa072c2e2657c90a514b855e3'
Michael Niedermayer [Sun, 12 Jul 2015 19:12:42 +0000 (21:12 +0200)]
Merge commit '86eee85daddb682fa072c2e2657c90a514b855e3'

* commit '86eee85daddb682fa072c2e2657c90a514b855e3':
  bytestream2: set the reader to the end when reading more than available

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit '8bc67ec2c0d2b5444d51a1bed1d50f0e10d92717'
Michael Niedermayer [Sun, 12 Jul 2015 19:00:50 +0000 (21:00 +0200)]
Merge commit '8bc67ec2c0d2b5444d51a1bed1d50f0e10d92717'

* commit '8bc67ec2c0d2b5444d51a1bed1d50f0e10d92717':
  Checkasm: assembly testing and benchmarking tool

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/isom: utilize bitrate hints
Ganesh Ajjanagadde [Sun, 12 Jul 2015 14:33:37 +0000 (10:33 -0400)]
avformat/isom: utilize bitrate hints

Fixes Ticket4546

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agomovtextdec.c: Add support for highlight and hilightcolor box
Niklesh [Sun, 12 Jul 2015 07:14:48 +0000 (12:44 +0530)]
movtextdec.c: Add support for highlight and hilightcolor box

Signed-off-by: Niklesh <niklesh.lalwani@iitb.ac.in>
5 years agoavcodec/dcadec: silence request_channels deprecation warnings
James Almer [Sun, 12 Jul 2015 06:12:37 +0000 (03:12 -0300)]
avcodec/dcadec: silence request_channels deprecation warnings

This also prevents an eventual compilation failure once request_channels
is removed.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agohevc_parser: parse and export some stream parameters
Anton Khirnov [Thu, 9 Jul 2015 17:34:51 +0000 (19:34 +0200)]
hevc_parser: parse and export some stream parameters

Particularly those that will be needed by the QSV decoder.
More can be added later as necessary.

5 years agohevc: improve a comment
Anton Khirnov [Thu, 9 Jul 2015 16:36:16 +0000 (18:36 +0200)]
hevc: improve a comment

That loop does the actual full decoding, so 'parse' can be misleading.

5 years agohevc: move splitting the packet into NALUs into a separate function
Anton Khirnov [Thu, 9 Jul 2015 16:33:52 +0000 (18:33 +0200)]
hevc: move splitting the packet into NALUs into a separate function

This function is independent of the decoding context, so we'll be able
to use it in the parser.

5 years agohevc: eliminate the second call to hls_nal_unit()
Anton Khirnov [Thu, 9 Jul 2015 16:11:44 +0000 (18:11 +0200)]
hevc: eliminate the second call to hls_nal_unit()

Also, make hls_nal_unit() work only on the provided NAL unit, without
requiring a whole decoding context.

This will allow splitting this code for reuse by the parser.

5 years agohevc: skip invalid/ignored NALUs when splitting the packet
Anton Khirnov [Thu, 9 Jul 2015 16:01:08 +0000 (18:01 +0200)]
hevc: skip invalid/ignored NALUs when splitting the packet

There is no need to wait until actually decoding the NALU. This will
allow to get rid of the second hls_nal_unit() call later.

5 years agohevc: remove HEVCContext usage from hevc_ps
Anton Khirnov [Thu, 9 Jul 2015 12:22:43 +0000 (14:22 +0200)]
hevc: remove HEVCContext usage from hevc_ps

Factor out the parameter sets into a separate struct and use it instead.

This will allow us to reuse this code in the parser.

5 years agompegvideo_parser: export pixel format and dimensions
Anton Khirnov [Mon, 6 Jul 2015 19:53:13 +0000 (21:53 +0200)]
mpegvideo_parser: export pixel format and dimensions

5 years agohevc: check slice address length
Andreas Cadhalpun [Fri, 10 Jul 2015 17:41:43 +0000 (19:41 +0200)]
hevc: check slice address length

It is used as get_bits argument and reading 0 bits doesn't make sense.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agodoc: add a section about building with libmfx
Anton Khirnov [Fri, 10 Jul 2015 07:57:41 +0000 (09:57 +0200)]
doc: add a section about building with libmfx

5 years agobytestream2: set the reader to the end when reading more than available
Anton Khirnov [Fri, 10 Jul 2015 07:31:24 +0000 (09:31 +0200)]
bytestream2: set the reader to the end when reading more than available

This prevents possible infinite loops with the calling code along the
lines of while (bytestream2_get_bytes_left()) { ... }, where the reader
does not advance.

CC: libav-stable@libav.org
5 years agovf_ssim: fix s->coefs for yuv with non-4:2:0 subsampling.
Ronald S. Bultje [Sat, 11 Jul 2015 23:55:59 +0000 (19:55 -0400)]
vf_ssim: fix s->coefs for yuv with non-4:2:0 subsampling.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoCheckasm: assembly testing and benchmarking tool
Henrik Gramner [Sat, 11 Jul 2015 18:32:11 +0000 (20:32 +0200)]
Checkasm: assembly testing and benchmarking tool

It provides the following features:
 * verify correctness by comparing output to the C version.
 * detect failure to save and restore clobbered callee-saved registers.
 * detect 32-bit parameters being used as if they were 64-bit in x86-64
   (the upper halves are not guaranteed to be zero - but in practice
   they very often are, which makes those bugs hard to spot otherwise).
 * easy benchmarking.

Compile by running 'make checkasm'.
Execute by running 'tests/checkasm/checkasm'.

Optional arguments are '--bench' to run benchmarks for all functions,
'--bench=<pattern>' to run benchmarks for all functions that starts with
<pattern>, and '<integer>' to seed the PRNG for reproducible results.

Contains unit tests for most h264pred functions to get started, more tests
can be added afterwards using those as a reference.

Loosely based on code from x264. Currently only supports x86 and x86-64,
but additional architectures shouldn't be too much of an obstacle to add.

Note that functions with floating point parameters or floating point
return values are not supported. Some compiler-specific features or
preprocessor hacks would likely be required to add support for that.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
5 years agoMerge commit '796268654c7807c9a1cfb322c838383e2b900d60'
Michael Niedermayer [Sun, 12 Jul 2015 14:34:14 +0000 (16:34 +0200)]
Merge commit '796268654c7807c9a1cfb322c838383e2b900d60'

* commit '796268654c7807c9a1cfb322c838383e2b900d60':
  asfdec: always reset packet state after seeking

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/riffde: Fix integer overflow in bitrate
Michael Niedermayer [Sun, 12 Jul 2015 14:24:20 +0000 (16:24 +0200)]
avformat/riffde: Fix integer overflow in bitrate

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit 'f1bdc234370401c032cd85184e93c7c155eb6d62'
Michael Niedermayer [Sun, 12 Jul 2015 14:23:27 +0000 (16:23 +0200)]
Merge commit 'f1bdc234370401c032cd85184e93c7c155eb6d62'

* commit 'f1bdc234370401c032cd85184e93c7c155eb6d62':
  riff: Validate bitrate

Conflicts:
libavformat/riffdec.c

See: 189420cb561929e05f5cc4224cdca83740a24a32
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoriffdec: prevent negative bit rate
Andreas Cadhalpun [Fri, 10 Jul 2015 22:09:46 +0000 (00:09 +0200)]
riffdec: prevent negative bit rate

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit 'c1d647b15afa69fa70f999a9ddcb98346409fb4d'
Michael Niedermayer [Sun, 12 Jul 2015 13:55:17 +0000 (15:55 +0200)]
Merge commit 'c1d647b15afa69fa70f999a9ddcb98346409fb4d'

* commit 'c1d647b15afa69fa70f999a9ddcb98346409fb4d':
  mp3: Make the seek more robust

Conflicts:
libavformat/mp3dec.c

Mostly not merged

See: b6267901c466c482b2f1af3578b0a6d88265d144 and various later commits

The bug is also not reproducable in FFmpeg

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit 'd80811c94e068085aab797f9ba35790529126f85'
Michael Niedermayer [Sun, 12 Jul 2015 13:21:15 +0000 (15:21 +0200)]
Merge commit 'd80811c94e068085aab797f9ba35790529126f85'

* commit 'd80811c94e068085aab797f9ba35790529126f85':
  riff: Use the correct logging context

Conflicts:
libavformat/asfdec_o.c
libavformat/avidec.c
libavformat/dxa.c
libavformat/matroskadec.c
libavformat/mov.c
libavformat/riff.h
libavformat/riffdec.c
libavformat/wavdec.c
libavformat/wtvdec.c
libavformat/xwma.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit '355864ef7a9548ee6491a25de1e0650bd983a667'
Michael Niedermayer [Sun, 12 Jul 2015 13:08:27 +0000 (15:08 +0200)]
Merge commit '355864ef7a9548ee6491a25de1e0650bd983a667'

* commit '355864ef7a9548ee6491a25de1e0650bd983a667':
  g726: Do not crash on user mistake

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoivfenc: write duration at end-of-stream.
Ronald S. Bultje [Sun, 12 Jul 2015 10:47:20 +0000 (06:47 -0400)]
ivfenc: write duration at end-of-stream.

At the beginning, the value is not initialized.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoasfdec: always reset packet state after seeking
Hendrik Leppkes [Sun, 12 Jul 2015 10:34:13 +0000 (12:34 +0200)]
asfdec: always reset packet state after seeking

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agoavformat/brstm: Remove unused variable
Michael Niedermayer [Fri, 10 Jul 2015 14:35:44 +0000 (16:35 +0200)]
avformat/brstm: Remove unused variable

Fixes "libavformat/brstm.c:128:35: warning: variable info_size set but not used"

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/yuv4mpegdec: Use 64bit for file offset
Michael Niedermayer [Sat, 11 Jul 2015 22:00:21 +0000 (00:00 +0200)]
avformat/yuv4mpegdec: Use 64bit for file offset

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/utils: Assert that the pointer is set when size is in ff_fast_malloc()
Michael Niedermayer [Sat, 11 Jul 2015 21:35:16 +0000 (23:35 +0200)]
avcodec/utils: Assert that the pointer is set when size is in ff_fast_malloc()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/utils: Avoid undefined void casts in ff_fast_malloc()
Michael Niedermayer [Sat, 11 Jul 2015 21:08:08 +0000 (23:08 +0200)]
avcodec/utils: Avoid undefined void casts in ff_fast_malloc()

based on code from libavutil/mem.c

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavutil/mem: Fix potential overflow in overallocation code
Michael Niedermayer [Sat, 11 Jul 2015 20:47:09 +0000 (22:47 +0200)]
avutil/mem: Fix potential overflow in overallocation code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/utils: Fix potential overflow in overallocation code
Michael Niedermayer [Sat, 11 Jul 2015 20:46:44 +0000 (22:46 +0200)]
avcodec/utils: Fix potential overflow in overallocation code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agofate: add tests for w3fdif filter
Paul B Mahol [Fri, 10 Jul 2015 18:04:25 +0000 (18:04 +0000)]
fate: add tests for w3fdif filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavformat/yuv4mpegdec: remove unused variable
Paul B Mahol [Sat, 11 Jul 2015 19:31:04 +0000 (19:31 +0000)]
avformat/yuv4mpegdec: remove unused variable

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agovf_psnr: fix rgb channel order mixup in final log message.
Ronald S. Bultje [Sat, 11 Jul 2015 15:21:17 +0000 (11:21 -0400)]
vf_psnr: fix rgb channel order mixup in final log message.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agovf_psnr: always calculate MSE over full pixel range.
Ronald S. Bultje [Sat, 11 Jul 2015 11:22:47 +0000 (07:22 -0400)]
vf_psnr: always calculate MSE over full pixel range.

This makes the output compatible with that of pretty much any other
tool that calculates PSNR.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoriff: Validate bitrate
Andreas Cadhalpun [Sat, 11 Jul 2015 16:40:31 +0000 (18:40 +0200)]
riff: Validate bitrate

5 years agomp3: Make the seek more robust
Luca Barbato [Sat, 11 Jul 2015 15:38:26 +0000 (17:38 +0200)]
mp3: Make the seek more robust

Try to parse up to 4 packets to find the closest packet.

Reported-By: jan.schlueter@ofai.at
5 years agoriff: Use the correct logging context
Luca Barbato [Sat, 11 Jul 2015 10:41:42 +0000 (12:41 +0200)]
riff: Use the correct logging context

5 years agog726: Do not crash on user mistake
Luca Barbato [Sat, 11 Jul 2015 09:47:13 +0000 (11:47 +0200)]
g726: Do not crash on user mistake

Properly report the sample rate as invalid

CC: libav-stable@libav.org
5 years agoavformat/yuv4mpegdec: Remove unused variables
Michael Niedermayer [Sat, 11 Jul 2015 12:49:55 +0000 (14:49 +0200)]
avformat/yuv4mpegdec: Remove unused variables

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoyuv4mpeg: add rough duration estimate and seeking.
Ronald S. Bultje [Sat, 11 Jul 2015 01:15:35 +0000 (21:15 -0400)]
yuv4mpeg: add rough duration estimate and seeking.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agovF_psnr: move set_meta() calls out of loop.
Ronald S. Bultje [Sat, 11 Jul 2015 02:47:24 +0000 (22:47 -0400)]
vF_psnr: move set_meta() calls out of loop.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit '87f98a2b9d4c7218ad82bb45347a53b65e5244f3'
Michael Niedermayer [Sat, 11 Jul 2015 10:22:44 +0000 (12:22 +0200)]
Merge commit '87f98a2b9d4c7218ad82bb45347a53b65e5244f3'

* commit '87f98a2b9d4c7218ad82bb45347a53b65e5244f3':
  fbdev: Support the RGB565 colour space.

Conflicts:
libavdevice/fbdev_dec.c

See: 43d36599fe3330913c6be9da5519dee048263dc9
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agofbdev: Support the RGB565 colour space.
Dan Flett [Thu, 11 Jul 2013 16:16:07 +0000 (18:16 +0200)]
fbdev: Support the RGB565 colour space.

Tested on a Raspberry Pi.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agovf_psnr: add channel weighting based on chroma subsampling.
Ronald S. Bultje [Sat, 11 Jul 2015 01:42:26 +0000 (21:42 -0400)]
vf_psnr: add channel weighting based on chroma subsampling.

Also add per-channel psnr stream averages to final log message.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoMerge commit '1410eeb6ea6bc5784e40032430afcdf54a79aedb'
Michael Niedermayer [Fri, 10 Jul 2015 22:37:56 +0000 (00:37 +0200)]
Merge commit '1410eeb6ea6bc5784e40032430afcdf54a79aedb'

* commit '1410eeb6ea6bc5784e40032430afcdf54a79aedb':
  imc: Use correct position for flcoeffs2 calculation

See: 75fd5ce4c1c0b2d96d71c74b650cefaaef519d27
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mpeg4videodec: Check P cbpy
Michael Niedermayer [Fri, 10 Jul 2015 22:05:40 +0000 (00:05 +0200)]
avcodec/mpeg4videodec: Check P cbpy

Fixes undefined behavior
Fixes: signal_sigsegv_c3097a_991_xtrem_e2_m64q15_a32sxx.3gp

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoimc: use correct position for flcoeffs2 calculation
Andreas Cadhalpun [Fri, 10 Jul 2015 19:50:50 +0000 (21:50 +0200)]
imc: use correct position for flcoeffs2 calculation

flcoeffs2[pos] should be the log2 of flcoeffs1[pos].
flcoeffs1[0] can be 0 here, thus flcoeffs2[pos] gets set to -inf,
causing problems further down.

This seems to have been copied from imc_decode_level_coefficients in
commit 4eb4bb3 without updating the position.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
5 years agoavfilter/vf_ssim: Mark constant tables as const
Michael Niedermayer [Fri, 10 Jul 2015 21:34:53 +0000 (23:34 +0200)]
avfilter/vf_ssim: Mark constant tables as const

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/j2kenc: remove unused variable
Michael Niedermayer [Fri, 10 Jul 2015 21:17:42 +0000 (23:17 +0200)]
avcodec/j2kenc: remove unused variable

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoimc: Use correct position for flcoeffs2 calculation
Andreas Cadhalpun [Fri, 10 Jul 2015 19:59:32 +0000 (21:59 +0200)]
imc: Use correct position for flcoeffs2 calculation

flcoeffs2[pos] should be the log2 of flcoeffs1[pos].
flcoeffs1[0] can be 0 here, thus flcoeffs2[pos] gets set to -inf,
causing problems further down.

This seems to have been copied from imc_decode_level_coefficients in
commit 4eb4bb3 without updating the position.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agohevc: check slice address length
Andreas Cadhalpun [Fri, 10 Jul 2015 17:41:43 +0000 (19:41 +0200)]
hevc: check slice address length

It is used as get_bits argument and reading 0 bits isn't supported.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
5 years agoMerge commit '872fab4a3df48e7e6484333ee2228c684e319634'
Michael Niedermayer [Fri, 10 Jul 2015 18:47:42 +0000 (20:47 +0200)]
Merge commit '872fab4a3df48e7e6484333ee2228c684e319634'

* commit '872fab4a3df48e7e6484333ee2228c684e319634':
  asfdec: Fix reading from the pipe

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/utils: Document 32 min for h264 width
Michael Niedermayer [Fri, 10 Jul 2015 16:31:42 +0000 (18:31 +0200)]
avcodec/utils: Document 32 min for h264 width

Suggested-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/g2meet: Check R/G/B values in epic_decode_pixel_pred()
Michael Niedermayer [Fri, 10 Jul 2015 14:54:51 +0000 (16:54 +0200)]
avcodec/g2meet: Check R/G/B values in epic_decode_pixel_pred()

Fixes: asan_double-free_d34593_861_smp3.wmv

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agosnow: remove an obsolete av_assert2
Andreas Cadhalpun [Thu, 9 Jul 2015 17:50:34 +0000 (19:50 +0200)]
snow: remove an obsolete av_assert2

It asserts that the frame linesize is larger than 37, but it can be
smaller and decoding such frames works.

Before commit cc884a35 src_stride > 7*MB_SIZE was necessary, because the
blocks were interleaved in the tmp buffer and the last block was added
with an offset of 6*MB_SIZE.
It was changed for src_stride <= 7*MB_SIZE to write the blocks
sequentially, hence the larger tmp_step.
After that the assert was only necessary to make sure that the buffer
remained large enough.
Since commit bd2b6b33 s->scratchbuf is used as tmp buffer.
As part of commit 86e107a7 the minimal scratchbuf size was increased to
256*7*MB_SIZE, which is enough for any src_stride <= 7*MB_SIZE.

Also add a comment explaining the tmp_step calculation.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
5 years agoavcodec/utils: use a minimum 32pixel width in avcodec_align_dimensions2() for H.264
Michael Niedermayer [Fri, 10 Jul 2015 00:01:17 +0000 (02:01 +0200)]
avcodec/utils: use a minimum 32pixel width in  avcodec_align_dimensions2() for H.264

Fixes Assertion failure
Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/motion_est_template: Fix undefined behavior in small_diamond_search()
Michael Niedermayer [Fri, 10 Jul 2015 11:21:18 +0000 (13:21 +0200)]
avcodec/motion_est_template: Fix undefined behavior in small_diamond_search()

Fixes: asan_heap-oob_394322e_138_cov_4265020547_CVPCMNL1_SVA_C.264

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoasfdec: Fix reading from the pipe
Alexandra Hájková [Fri, 10 Jul 2015 10:39:58 +0000 (12:39 +0200)]
asfdec: Fix reading from the pipe

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agoavfilter/vf_removegrain: clip to uint16 instead to uint8
Paul B Mahol [Fri, 10 Jul 2015 10:45:51 +0000 (10:45 +0000)]
avfilter/vf_removegrain: clip to uint16 instead to uint8

This is how original filter behaves.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/libopenh264enc: Do not truncate frame rate
Michael Niedermayer [Fri, 10 Jul 2015 02:19:07 +0000 (04:19 +0200)]
avcodec/libopenh264enc: Do not truncate frame rate

Suggested-by: Gregory J Wolfe <gregory.wolfe@kodakalaris.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '67c884eb07c7e9f2cb72bb8d447d945e5ac8cac7'
Michael Niedermayer [Fri, 10 Jul 2015 00:30:41 +0000 (02:30 +0200)]
Merge commit '67c884eb07c7e9f2cb72bb8d447d945e5ac8cac7'

* commit '67c884eb07c7e9f2cb72bb8d447d945e5ac8cac7':
  libvpx: Add the library header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '461b45efd04859b2672238bc8a6ecab9e9a14948'
Michael Niedermayer [Fri, 10 Jul 2015 00:15:54 +0000 (02:15 +0200)]
Merge commit '461b45efd04859b2672238bc8a6ecab9e9a14948'

* commit '461b45efd04859b2672238bc8a6ecab9e9a14948':
  lavc: Add nvenc.h to the skipheader

Conflicts:
libavcodec/Makefile

No change as there is no nvenc.h in FFmpeg

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolibavcodec/qsvenc.c: improving handling for return codes of MFXVideoENCODE_EncodeFram...
Ivan Uskov [Thu, 9 Jul 2015 19:01:00 +0000 (22:01 +0300)]
libavcodec/qsvenc.c: improving handling for return codes of MFXVideoENCODE_EncodeFrameAsync

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/mpegvideo: Clear pointers in ff_mpv_common_init()
Michael Niedermayer [Thu, 9 Jul 2015 20:16:15 +0000 (22:16 +0200)]
avcodec/mpegvideo: Clear pointers in ff_mpv_common_init()

This ensures that no stale pointers leak through on any path

Fixes: signal_sigsegv_c3097a_991_xtrem_e2_m64q15_a32sxx.3gp

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolibvpx: Add the library header
Vittorio Giovara [Thu, 9 Jul 2015 19:36:19 +0000 (21:36 +0200)]
libvpx: Add the library header

Unbreak make checkheaders

5 years agolavc: Add nvenc.h to the skipheader
Luca Barbato [Thu, 9 Jul 2015 12:42:34 +0000 (14:42 +0200)]
lavc: Add nvenc.h to the skipheader

Unbreak make checkheaders

5 years agofate: add removegrain tests
Paul B Mahol [Thu, 9 Jul 2015 08:00:50 +0000 (08:00 +0000)]
fate: add removegrain tests

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agolavf/rtpenc_jpeg: Error out for non-standard Huffman tables.
Carl Eugen Hoyos [Thu, 9 Jul 2015 18:03:38 +0000 (20:03 +0200)]
lavf/rtpenc_jpeg: Error out for non-standard Huffman tables.

Related to ticket #3823.