ffmpeg.git
3 years agoavutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPAT
Derek Buitenhuis [Wed, 27 Jan 2016 15:19:38 +0000 (15:19 +0000)]
avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPAT

Libav, for some reason, merged this as a public API function. This will
aid in future merges.

A define is left for backwards compat, just in case some person
used it, since it is in a public header.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
3 years agoavcodec/jpeg2000dec: More completely check cdef
Michael Niedermayer [Wed, 27 Jan 2016 16:13:10 +0000 (17:13 +0100)]
avcodec/jpeg2000dec: More completely check cdef

Fixes out of array read
Fixes: j2k-poc.bin

Found-by: Lucas Leong <wmliang.tw@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/dvaudiodec: support cases when codec_tag is not set but block_align is
Paul B Mahol [Wed, 27 Jan 2016 12:58:25 +0000 (13:58 +0100)]
avcodec/dvaudiodec: support cases when codec_tag is not set but block_align is

Support packets larger than block size, return single block size.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavcodec/dvaudiodec: set channel layout
Paul B Mahol [Wed, 27 Jan 2016 10:19:58 +0000 (11:19 +0100)]
avcodec/dvaudiodec: set channel layout

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/af_afade: do not duplicate curve option
Paul B Mahol [Tue, 26 Jan 2016 22:27:04 +0000 (23:27 +0100)]
avfilter/af_afade: do not duplicate curve option

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agolavc/mjpegdec: Set SAR even if no resolution is available.
Carl Eugen Hoyos [Wed, 27 Jan 2016 09:23:37 +0000 (10:23 +0100)]
lavc/mjpegdec: Set SAR even if no resolution is available.

Fixes ticket #4479.

3 years agolavc/h264: Show "Increasing reorder buffer" message with loglevel info.
Carl Eugen Hoyos [Wed, 27 Jan 2016 09:11:46 +0000 (10:11 +0100)]
lavc/h264: Show "Increasing reorder buffer" message with loglevel info.

See ticket #5138 for a sample.

3 years agoavformat/mux: Fix error when writing uncoded frames.
Matt Oliver [Wed, 27 Jan 2016 06:16:43 +0000 (17:16 +1100)]
avformat/mux: Fix error when writing uncoded frames.

commit "avpacket: Deprecate av_dup_packet" broke the use
av_interleaved_write_uncoded_frame as any input uncoded frame has an
invalid packet size that will crash when av_packet_ref tries to allocate
'size' new memory. Since the packet is a temporary created within mux.c
itself it can be used directly without needing a new ref.

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
3 years agosvq1enc: fix out of bounds reads
Andreas Cadhalpun [Thu, 21 Jan 2016 21:36:36 +0000 (22:36 +0100)]
svq1enc: fix out of bounds reads

level can be 5, but there are only four codebooks.

Fixes ubsan runtime error: index 5 out of bounds for type 'int8_t
[4][96]'

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3 years agoavcodec/dvaudiodec: only stereo makes sense
Paul B Mahol [Tue, 26 Jan 2016 22:33:55 +0000 (23:33 +0100)]
avcodec/dvaudiodec: only stereo makes sense

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavcodec: add Ulead DV audio decoder
Paul B Mahol [Mon, 25 Jan 2016 20:54:17 +0000 (21:54 +0100)]
avcodec: add Ulead DV audio decoder

Fixes #1564.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/vf_zscale: make it possible to override input frame parameters
Paul B Mahol [Tue, 26 Jan 2016 22:07:07 +0000 (23:07 +0100)]
avfilter/vf_zscale: make it possible to override input frame parameters

Mostly useful when there is no such parameters present at all.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavformat/flvenc: copyts in FLV muxer
Ivan [Mon, 25 Jan 2016 12:43:40 +0000 (14:43 +0200)]
avformat/flvenc: copyts in FLV muxer

The purpose of this patch is to preserve timestamps when using ffmpeg for publishing RTMP streams, e.g. ffmpeg -i rtmp://source/stream -f flv rtmp://target/stream.
There is a setting "copyts" for that purpose. Unfortunately it doesn't work with FLV muxer because it has its own timestamp correction which makes global setting "copyts" ineffective.

This patch removes timestamp correction in FLV muxer. This means FLV will rely on ffmpeg timestamp correction which makes it possible to use copyts.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoffmpeg_opt: Allow -metadata option to set metadata on programs.
Vittorio Gambaletta (VittGam) [Tue, 26 Jan 2016 14:13:09 +0000 (15:13 +0100)]
ffmpeg_opt: Allow -metadata option to set metadata on programs.

Signed-off-by: Vittorio Gambaletta <ffmpeg-dev@vittgam.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoffmpeg_opt: Move the 'process manually set programs' block above 'process manually...
Vittorio Gambaletta (VittGam) [Tue, 26 Jan 2016 14:13:08 +0000 (15:13 +0100)]
ffmpeg_opt: Move the 'process manually set programs' block above 'process manually set metadata' in open_output_file().

Signed-off-by: Vittorio Gambaletta <ffmpeg-dev@vittgam.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavutil/opt: check for and handle errors in av_opt_set_dict2()
Michael Niedermayer [Sun, 24 Jan 2016 02:42:46 +0000 (03:42 +0100)]
avutil/opt: check for and handle errors in av_opt_set_dict2()

Previously errors could result in random entries to be lost.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoswscale: add P010 input support
Hendrik Leppkes [Tue, 8 Dec 2015 10:53:54 +0000 (11:53 +0100)]
swscale: add P010 input support

3 years agoavutil: add P010 pixel format
Hendrik Leppkes [Tue, 8 Dec 2015 10:17:01 +0000 (11:17 +0100)]
avutil: add P010 pixel format

P010 is the 10-bit variant of NV12 (planar luma, packed chroma), using two
bytes per component to store 10-bit data plus 6-bit zeroes in the LSBs.

3 years agovf_libopencv: add support for opencv 3
Andreas Cadhalpun [Thu, 21 Jan 2016 22:17:47 +0000 (23:17 +0100)]
vf_libopencv: add support for opencv 3

It dropped the old headers, but the replacements are already available
with opencv 2.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3 years agolavc/libzvbi-teletextdec: add support for setting background opacity
Marton Balint [Thu, 21 Jan 2016 22:57:50 +0000 (23:57 +0100)]
lavc/libzvbi-teletextdec: add support for setting background opacity

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agolavc/libzvbi-teletextdec: remove cmax variable
Marton Balint [Thu, 21 Jan 2016 21:50:46 +0000 (22:50 +0100)]
lavc/libzvbi-teletextdec: remove cmax variable

Use VBI_NB_COLORS instead.

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agolavc/libzvbi-teletextdec: use the built-in transparent color for transparent background
Marton Balint [Thu, 21 Jan 2016 21:49:12 +0000 (22:49 +0100)]
lavc/libzvbi-teletextdec: use the built-in transparent color for transparent background

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agobuild: use a link instead of changing current directory when compiling
Andreas Cadhalpun [Mon, 25 Jan 2016 00:42:23 +0000 (01:42 +0100)]
build: use a link instead of changing current directory when compiling

If links don't work, fall back to using the full source path as was
previously done.

This should fix build failures with MSVC.

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3 years agoavformat/mpegtsenc: Fix multi program so that it supports adding the same stream...
Vittorio Gambaletta (VittGam) [Sun, 24 Jan 2016 05:06:36 +0000 (06:06 +0100)]
avformat/mpegtsenc: Fix multi program so that it supports adding the same stream to multiple programs.

Signed-off-by: Vittorio Gambaletta <ffmpeg-dev@vittgam.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolavc/rawdec: Use 16-byte line alignment for AV_PIX_FMT_MONOWHITE
Mats Peterson [Mon, 25 Jan 2016 17:09:18 +0000 (18:09 +0100)]
lavc/rawdec: Use 16-byte line alignment for AV_PIX_FMT_MONOWHITE

The line alignment for 1 bpp raw AV_PIX_FMT_MONOWHITE video (currently
used for AVI) was previously 4 bytes, which generated alignment warning
messages, not only for odd-width files. The alignment is now 16 bytes.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/synth_filter: split off remaining code from dcadec files
James Almer [Mon, 25 Jan 2016 02:52:19 +0000 (23:52 -0300)]
avcodec/synth_filter: split off remaining code from dcadec files

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/dcaenc: do not change user requested bitrate
Paul B Mahol [Mon, 25 Jan 2016 15:54:53 +0000 (16:54 +0100)]
avcodec/dcaenc: do not change user requested bitrate

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavcodec/dcaenc: return correct number of bytes in output packet
Paul B Mahol [Mon, 25 Jan 2016 15:03:17 +0000 (16:03 +0100)]
avcodec/dcaenc: return correct number of bytes in output packet

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavcodec/utils: run ff_frame_thread_encoder_init() only for encoders
Michael Niedermayer [Mon, 25 Jan 2016 15:06:03 +0000 (16:06 +0100)]
avcodec/utils: run ff_frame_thread_encoder_init() only for encoders

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/rawdec: Check height and packet size
Michael Niedermayer [Mon, 25 Jan 2016 02:42:45 +0000 (03:42 +0100)]
avcodec/rawdec: Check height and packet size

Avoids potential division by 0

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolavc/rawdec: Use 16-byte line alignment for 1, 2, 4 and 8 bpp
Mats Peterson [Mon, 25 Jan 2016 02:59:49 +0000 (03:59 +0100)]
lavc/rawdec: Use 16-byte line alignment for 1, 2, 4 and 8 bpp

This patch aligns the lines of 1 bpp depth for QuickTime, and 2, 4 and 8
bpp depths for AVI and QuickTime, on 16-byte boundaries. At the same
time, the packet row stride is properly catered for.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/rawdec: initialize palette for mono
Mats Peterson [Tue, 19 Jan 2016 17:48:06 +0000 (18:48 +0100)]
avcodec/rawdec: initialize palette for mono

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/webp: fix decoder dependencies
James Almer [Sun, 24 Jan 2016 23:30:33 +0000 (20:30 -0300)]
avcodec/webp: fix decoder dependencies

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavformat/hls: Check that filename is not "" in probe before checking its extension
Michael Niedermayer [Sun, 24 Jan 2016 19:07:48 +0000 (20:07 +0100)]
avformat/hls: Check that filename is not "" in probe before checking its extension

Possibly the check as a whole causes more problems than it helps, if so dont
hesitate to remove it

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/flacenc: fix calculation of bits required in case of custom sample rate
Paul B Mahol [Sun, 24 Jan 2016 19:47:49 +0000 (20:47 +0100)]
avcodec/flacenc: fix calculation of bits required in case of custom sample rate

Sample rate of 11025 takes 16 bits but previous code would pick only 8.
Fixes assertion failure.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoRevert "decklink: Header cleanup"
Timothy Gu [Sun, 24 Jan 2016 20:42:39 +0000 (12:42 -0800)]
Revert "decklink: Header cleanup"

This reverts commit 61fb70c3866b19dccf473ad4e5ede79d117e8e1c.

Reported in #5183 to break the build. Further investigation needed.

3 years agoavfilter/vf_zoompan: fix pts handling
Paul B Mahol [Sun, 24 Jan 2016 18:57:56 +0000 (19:57 +0100)]
avfilter/vf_zoompan: fix pts handling

Now output pts have some sense.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/vf_zoompan: unbreak filtering with video input
Paul B Mahol [Sun, 24 Jan 2016 18:12:33 +0000 (19:12 +0100)]
avfilter/vf_zoompan: unbreak filtering with video input

Inserting fifo appears to be working solution to not get
filter_frame request we do not want.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoChangelog: Add entry on libquvi being removed
Timothy Gu [Sun, 24 Jan 2016 17:45:11 +0000 (09:45 -0800)]
Changelog: Add entry on libquvi being removed

3 years agoconfigure: Maintain alphabetical order of components
Timothy Gu [Sun, 24 Jan 2016 17:28:55 +0000 (09:28 -0800)]
configure: Maintain alphabetical order of components

This is not "pure" alphabetical order since some components are
intentionally kept together.

3 years agoavfilter/vf_zoompan: rewrite so it doesn't cache all output frames
Paul B Mahol [Sun, 24 Jan 2016 10:38:15 +0000 (11:38 +0100)]
avfilter/vf_zoompan: rewrite so it doesn't cache all output frames

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agolavfi: recognize GBR9-14P as RGB in ff_fill_rgba_map().
Ronald S. Bultje [Thu, 21 Jan 2016 14:28:30 +0000 (09:28 -0500)]
lavfi: recognize GBR9-14P as RGB in ff_fill_rgba_map().

3 years agoavformat: Remove support for libquvi
Kieran Kunhya [Sun, 24 Jan 2016 15:54:00 +0000 (15:54 +0000)]
avformat: Remove support for libquvi

libquvi has not been updated since 2013.
It also has a number of security issues.

3 years agoPrint the whitelists if entities are not found on them
Michael Niedermayer [Sun, 24 Jan 2016 15:15:24 +0000 (16:15 +0100)]
Print the whitelists if entities are not found on them

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat: Document urls a bit
Michael Niedermayer [Fri, 22 Jan 2016 23:35:46 +0000 (00:35 +0100)]
avformat: Document urls a bit

Spell-checked-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agodecklink: Header cleanup
Timothy Gu [Wed, 2 Dec 2015 04:58:51 +0000 (20:58 -0800)]
decklink: Header cleanup

This commit cleans up the decklink files' header usage so that they pass
checkheaders.

3 years agocommon.mak: Use CCFLAGS for assembly generation as well
Timothy Gu [Wed, 2 Dec 2015 04:55:37 +0000 (20:55 -0800)]
common.mak: Use CCFLAGS for assembly generation as well

CCFLAGS is equivalent to CPPFLAGS + CFLAGS, and it is already being used
by other make rules like %.i and %.o. Simplifies common.mak.

3 years agoavdevice: Mark decklink_common.h as unconditional SKIPHEADER
Timothy Gu [Wed, 2 Dec 2015 05:44:50 +0000 (21:44 -0800)]
avdevice: Mark decklink_common.h as unconditional SKIPHEADER

It is a C++ file, incompatible with the checkheaders infrastructure.

3 years agolavfi/pthread: fix perameters/parameters typo
Clément Bœsch [Sun, 24 Jan 2016 13:41:00 +0000 (14:41 +0100)]
lavfi/pthread: fix perameters/parameters typo

3 years agoavfilter: update some comments
Paul B Mahol [Sun, 24 Jan 2016 12:14:26 +0000 (13:14 +0100)]
avfilter: update some comments

start_frame is no more, samplesref argument is now frame argument.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agobuild: fix msvc build
Charlie Arnold [Sat, 23 Jan 2016 21:11:59 +0000 (13:11 -0800)]
build: fix msvc build

Fix configure to set DST_PATH to the Windows style path when building with MSVC

Fixes ticket #5180.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3 years agobuild: fix make checkheaders in out-of-tree builds
Andreas Cadhalpun [Sat, 23 Jan 2016 10:55:54 +0000 (11:55 +0100)]
build: fix make checkheaders in out-of-tree builds

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3 years agofate/cabac: replace uninitialized bytes by random bytes
Michael Niedermayer [Sat, 23 Jan 2016 19:30:02 +0000 (20:30 +0100)]
fate/cabac: replace uninitialized bytes by random bytes

Fixes valgrind warning

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/vf_convolution: Use av_clip_uint8()
Michael Niedermayer [Sat, 23 Jan 2016 17:29:48 +0000 (18:29 +0100)]
avfilter/vf_convolution: Use av_clip_uint8()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agofate/ffmpeg: Fix colorkey test failure without samples
Michael Niedermayer [Sat, 23 Jan 2016 17:28:47 +0000 (18:28 +0100)]
fate/ffmpeg: Fix colorkey test failure without samples

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agodxva2_h264: fix reference field marking in long slice struct
Hendrik Leppkes [Fri, 22 Jan 2016 12:50:42 +0000 (13:50 +0100)]
dxva2_h264: fix reference field marking in long slice struct

Fixes artifacts in interlaced decoding on old Intel GPUs.

3 years agoavcodec/mpeg4videoenc: Use 64bit for time variables
Michael Niedermayer [Sat, 23 Jan 2016 00:49:21 +0000 (01:49 +0100)]
avcodec/mpeg4videoenc: Use 64bit for time variables

Fixes assertion failure and integer overflow
Fixes: fc677bbea2c6f901763eb637b61fa5e2/signal_sigabrt_7ffff6ae7cb7_9556_dfd95f040a69f725d1b2f861bd491725.ivf

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/libquvi: Set default demuxer and protocol limitations
Michael Niedermayer [Wed, 20 Jan 2016 14:25:32 +0000 (15:25 +0100)]
avformat/libquvi: Set default demuxer and protocol limitations

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/concat: Check protocol prefix
Michael Niedermayer [Wed, 20 Jan 2016 10:10:27 +0000 (11:10 +0100)]
avformat/concat: Check protocol prefix

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agodoc/demuxers: Document enable_drefs and use_absolute_path
Michael Niedermayer [Wed, 20 Jan 2016 15:49:43 +0000 (16:49 +0100)]
doc/demuxers: Document enable_drefs and use_absolute_path

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/af_ladspa: accepts ' ' as command separator too
Paul B Mahol [Fri, 22 Jan 2016 20:41:11 +0000 (21:41 +0100)]
avfilter/af_ladspa: accepts ' ' as command separator too

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agodiracdec: fix full range videos
Rostislav Pehlivanov [Fri, 22 Jan 2016 17:07:16 +0000 (17:07 +0000)]
diracdec: fix full range videos

Full range video had been broken by the introduction of the < 2U check
at the following line. The bitstream format kind of implies that the full
and limited ranges use different pix_fmts but that's incorrect since we
have the avctx->color_range flag. So adjust the pixel range index to
be mapped to the same pix_fmts as limited range index.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
3 years agoavfilter/vf_convolution: add timeline support
Paul B Mahol [Fri, 22 Jan 2016 16:54:44 +0000 (17:54 +0100)]
avfilter/vf_convolution: add timeline support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agofate: Add a small number of rawvideo in mov tests
Michael Niedermayer [Fri, 22 Jan 2016 14:59:31 +0000 (15:59 +0100)]
fate: Add a small number of rawvideo in mov tests

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolibavformat/tcp.c : add send_buffer_size and recv_buffer_size options
Perette Barella [Tue, 19 Jan 2016 18:22:13 +0000 (13:22 -0500)]
libavformat/tcp.c : add send_buffer_size and recv_buffer_size options

adds two new options that may be set via the dictionary:

- send_buffer_size
- recv_buffer_size

When present, setsockopt() is used with SO_SNDBUF and SO_RCVBUF to set
socket buffer sizes.  I chose to make send and receive independent
because buffering requirements are often asymmetric.

Errors in setting the buffer size mean the socket will use its
default, so they are ignored.

There is no sanity checking on values, as the kernel/socket layers
already impose reasonable limits if asked for something crazy.

Rationale for enlarging receive buffers is to reduce susceptibility
to intermittent network delays/congestion.  I added setting the send
buffer for symmetry.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolavc/wmadec: replace pow by faster functions
Ganesh Ajjanagadde [Fri, 15 Jan 2016 18:51:03 +0000 (13:51 -0500)]
lavc/wmadec: replace pow by faster functions

Further speedups possible by getting rid of exp2f...

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/opus_celt: replace pow(2,x) by exp2f(x)
Ganesh Ajjanagadde [Fri, 15 Jan 2016 18:45:30 +0000 (13:45 -0500)]
lavc/opus_celt: replace pow(2,x) by exp2f(x)

Faster methods possible; since exponent is always a multiple of 1/8.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/atrac3plusdsp: change pow(2,x) to exp2f(x)
Ganesh Ajjanagadde [Fri, 15 Jan 2016 18:38:43 +0000 (13:38 -0500)]
lavc/atrac3plusdsp: change pow(2,x) to exp2f(x)

Much faster generation possible; but array is small so don't want to bloat
the binary.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/wma: add av_warn_unused_result to ff_wma_init
Ganesh Ajjanagadde [Thu, 21 Jan 2016 02:52:40 +0000 (08:22 +0530)]
lavc/wma: add av_warn_unused_result to ff_wma_init

May help to prevent incidents like 19e456d48c90a1e3ceeb9e6241383384cc73dfdf.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agofate: add 1 and 15BPP rawvideo in avi tests
Michael Niedermayer [Fri, 22 Jan 2016 12:06:46 +0000 (13:06 +0100)]
fate: add 1 and 15BPP rawvideo in avi tests

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter: add convolution filter
Paul B Mahol [Fri, 22 Jan 2016 10:52:58 +0000 (11:52 +0100)]
avfilter: add convolution filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/avf_showwaves: add logarithmic amplitude scaler
Paul B Mahol [Thu, 21 Jan 2016 19:07:12 +0000 (20:07 +0100)]
avfilter/avf_showwaves: add logarithmic amplitude scaler

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agocabac_functions: Allow more functions to be overridden
John Cox [Wed, 20 Jan 2016 17:59:30 +0000 (17:59 +0000)]
cabac_functions: Allow more functions to be overridden

Allow more of the cabac functions to be overridden and avoid generating any
code for unwanted refill functions.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agocabac_functions: Count zeros with ctz if it is fast
John Cox [Wed, 20 Jan 2016 17:56:30 +0000 (17:56 +0000)]
cabac_functions: Count zeros with ctz if it is fast

When refilling the low bit buffer after get_cabac count the bits with ctz
if the processor has a fast version.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agocabac: Ensure 2-byte cabac loads are on 2-byte boundry
John Cox [Wed, 20 Jan 2016 17:48:30 +0000 (17:48 +0000)]
cabac: Ensure 2-byte cabac loads are on 2-byte boundry

Ensure that cabac init sets the bitstream pointer to an even value.
It is often faster to load from an aligned boundry

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoAdd missing conversions from side data enum to name
Neil Birkbeck [Thu, 21 Jan 2016 18:34:29 +0000 (10:34 -0800)]
Add missing conversions from side data enum to name

Add names for recently added enums to av_frame_side_data_name.

Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agobuild: make out-of-tree builds bit-identical to in-tree builds
Andreas Cadhalpun [Mon, 28 Dec 2015 21:00:39 +0000 (22:00 +0100)]
build: make out-of-tree builds bit-identical to in-tree builds

Previously the full source path was embedded inconsistently in the debug
information between in-tree/out-of-tree builds.

The 'vpath %.inc' becomes necessary for finding
libavfilter/all_channel_layouts.inc in out-of-tree builds.

The full source path is still embedded in the debug information, but
it's now independent of whether building in-tree or out-of-tree.

The biggest improvement of this patch is that gdb now always searches
for the path relative to the source directory. It still also searches
for the full path.
Previously it searched only for the full path in out-of-tree builds,
making the debug information generated by Debian's buildds rather hard
to use.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3 years agoavcodec/mjpegdec: Check for end for both bytes in unescaping
Michael Niedermayer [Thu, 21 Jan 2016 20:01:47 +0000 (21:01 +0100)]
avcodec/mjpegdec: Check for end for both bytes in unescaping

Fixes assertion failure
Fixes: c40c779601b77dc6e19aaea0b04b9751/signal_sigabrt_7ffff6ae7cb7_5769_b94f6ec70caecb2d3d76b4771b109ac1.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agox86inc: Add debug symbols indicating sizes of compiled functions
Geza Lore [Mon, 12 Oct 2015 12:13:00 +0000 (13:13 +0100)]
x86inc: Add debug symbols indicating sizes of compiled functions

Some debuggers/profilers use this metadata to determine which function a
given instruction is in; without it they get can confused by local labels
(if you haven't stripped those). On the other hand, some tools are still
confused even with this metadata. e.g. this fixes `gdb`, but not `perf`.

Currently only implemented for ELF.

3 years agox86inc: Avoid creating unnecessary local labels
Henrik Gramner [Fri, 16 Oct 2015 19:28:49 +0000 (21:28 +0200)]
x86inc: Avoid creating unnecessary local labels

The REP_RET workaround is only needed on old AMD cpus, and the labels clutter
up the symbol table and confuse debugging/profiling tools, so use EQU to
create SHN_ABS symbols instead of creating local labels. Furthermore, skip
the workaround completely in functions that definitely won't run on such cpus.

Note that EQU is just creating a local label when using nasm instead of yasm.
This is probably a bug, but at least it doesn't break anything.

3 years agox86inc: Simplify AUTO_REP_RET
Henrik Gramner [Thu, 15 Oct 2015 15:42:49 +0000 (17:42 +0200)]
x86inc: Simplify AUTO_REP_RET

cpuflags is never undefined any more, it's set to 0 instead.

Also fix an incorrect comment.

3 years agox86inc: Use more consistent indentation
Henrik Gramner [Mon, 12 Oct 2015 19:55:11 +0000 (21:55 +0200)]
x86inc: Use more consistent indentation

3 years agox86inc: Preserve arguments when allocating stack space
Henrik Gramner [Mon, 12 Oct 2015 18:15:18 +0000 (20:15 +0200)]
x86inc: Preserve arguments when allocating stack space

When allocating stack space with a larger alignment than the known stack
alignment a temporary register is used for storing the stack pointer.
Ensure that this isn't one of the registers used for passing arguments.

3 years agox86inc: Improve FMA instruction handling
Henrik Gramner [Sat, 16 Jan 2016 23:25:47 +0000 (00:25 +0100)]
x86inc: Improve FMA instruction handling

 * Correctly handle FMA instructions with memory operands.
 * Print a warning if FMA instructions are used without the correct cpuflag.
 * Simplify the instantiation code.
 * Clarify documentation.

Only the last operand in FMA3 instructions can be a memory operand. When
converting FMA4 instructions to FMA3 instructions we can utilize the fact
that multiply is a commutative operation and reorder operands if necessary
to ensure that a memory operand is used only as the last operand.

3 years agox86inc: Be more verbose in assertion failures
Henrik Gramner [Sun, 11 Oct 2015 20:31:53 +0000 (22:31 +0200)]
x86inc: Be more verbose in assertion failures

3 years agox86/intmath: disable sse av_clip functions when using ICC
James Almer [Thu, 21 Jan 2016 03:02:09 +0000 (00:02 -0300)]
x86/intmath: disable sse av_clip functions when using ICC

It seems to miscompile them

Should fix fate-ra-288 and fate-twinvq

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/avf_showwaves: color support
Paul B Mahol [Tue, 19 Jan 2016 21:09:55 +0000 (22:09 +0100)]
avfilter/avf_showwaves: color support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agofate: Add test for colorkey
Michael Niedermayer [Thu, 21 Jan 2016 16:11:47 +0000 (17:11 +0100)]
fate: Add test for colorkey

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agodiracdec: fix original Dirac Low Delay profile
Rostislav Pehlivanov [Thu, 21 Jan 2016 16:46:41 +0000 (16:46 +0000)]
diracdec: fix original Dirac Low Delay profile

The version structure in the main decoder context was not (and
apparently has never been) populated since it was added.
Still, having VC-2 break the existing Dirac Low Delay mode was odd and
easily avoidable had the specifications authors noticed/cared.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
3 years agodirac: add more parse codes from the specifications
Rostislav Pehlivanov [Thu, 21 Jan 2016 16:43:58 +0000 (16:43 +0000)]
dirac: add more parse codes from the specifications

The specs define some more overlapping and some rarely used parse codes
which were missing.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
3 years agoavcodec/diracdsp: use av_clip_uintp2
James Almer [Thu, 21 Jan 2016 16:13:54 +0000 (13:13 -0300)]
avcodec/diracdsp: use av_clip_uintp2

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agodirac_parser: add exceptions for Dirac inter parse codes
Rostislav Pehlivanov [Thu, 21 Jan 2016 15:29:28 +0000 (15:29 +0000)]
dirac_parser: add exceptions for Dirac inter parse codes

Forgotten from previous commit.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
3 years agocheckasm: add videodsp emulated_edge_mc test.
Ronald S. Bultje [Sun, 17 Jan 2016 21:22:26 +0000 (16:22 -0500)]
checkasm: add videodsp emulated_edge_mc test.

3 years agodirac_parser: Improve parsing and silence pointless warnings
Rostislav Pehlivanov [Thu, 21 Jan 2016 15:14:10 +0000 (15:14 +0000)]
dirac_parser: Improve parsing and silence pointless warnings

The parser scans for "BBCD" to appear in the bitstream which indicate a
parse info header and once that happens, checks if the parse offsets are
sane. Since random BBCD strings might appear in the bitstream the parser
will emit a pointless warning if that happens.

This commit improves parsing by checking for a valid parse code as well
as keeping the original checks for valid parse offsets. The warnings
were removed as they serve no real purpose.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
3 years agoavcodec/mpegvideo_enc: Check for integer overflow in ff_mpv_reallocate_putbitbuffer()
Michael Niedermayer [Thu, 21 Jan 2016 14:39:43 +0000 (15:39 +0100)]
avcodec/mpegvideo_enc: Check for integer overflow in ff_mpv_reallocate_putbitbuffer()

Fixes assertion failure
Fixes: 6568d187979ce17878b6fe5fbbb89142/signal_sigabrt_7ffff6ae7cb7_7176_564bbc6741bdcf907f5c4e685c9a77a2.mpg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agodiracdec: add support for 12 bit videos
Rostislav Pehlivanov [Thu, 21 Jan 2016 14:44:42 +0000 (14:44 +0000)]
diracdec: add support for 12 bit videos

The DSP lacked a function needed to convert signed to unsigned. This was
ignored when originally adding support and templating for bit depths
greater than 8. The 10 bit function was used for 12 bit pictures and
resulted in an improper conversion.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
3 years agodoc/filters: fix afftfilt example
Paul B Mahol [Thu, 21 Jan 2016 13:42:09 +0000 (14:42 +0100)]
doc/filters: fix afftfilt example

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter: add afftfilter
Paul B Mahol [Sat, 16 Jan 2016 14:09:25 +0000 (15:09 +0100)]
avfilter: add afftfilter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavformat/nutenc: implement deinit()
Michael Niedermayer [Thu, 21 Jan 2016 12:07:07 +0000 (13:07 +0100)]
avformat/nutenc: implement deinit()

Should prevent some leaks if header writing fails

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoAAC encoder: check for NaNs/inf in TNS gain
Claudio Freire [Thu, 21 Jan 2016 06:32:49 +0000 (03:32 -0300)]
AAC encoder: check for NaNs/inf in TNS gain

Can happen in cases where's there's zero autocorrelation (pulses),
and it also implies NaN/inf coeffs