ffmpeg.git
2 years agoavdevice/decklink_dec: properly initialize no_video variable
Marton Balint [Sat, 10 Dec 2016 12:20:31 +0000 (13:20 +0100)]
avdevice/decklink_dec: properly initialize no_video variable

Fixes Coverity CID 1396859.

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoffmpeg: Check avcodec_parameters_to_context() for failure
Michael Niedermayer [Mon, 26 Dec 2016 19:25:23 +0000 (20:25 +0100)]
ffmpeg: Check avcodec_parameters_to_context() for failure

Fixes CID1396241

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/ylc: thread safe initialization is possible with this codec
Paul B Mahol [Mon, 26 Dec 2016 19:28:40 +0000 (20:28 +0100)]
avcodec/ylc: thread safe initialization is possible with this codec

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/ylc: add frame threading support
Paul B Mahol [Mon, 26 Dec 2016 19:27:01 +0000 (20:27 +0100)]
avcodec/ylc: add frame threading support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/ylc: do not leak memory at uninit
Paul B Mahol [Mon, 26 Dec 2016 19:18:00 +0000 (20:18 +0100)]
avcodec/ylc: do not leak memory at uninit

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agodoc/examples/http_multiclient: Fix resource leak
Michael Niedermayer [Mon, 26 Dec 2016 16:41:38 +0000 (17:41 +0100)]
doc/examples/http_multiclient: Fix resource leak

Fixes CID1396269

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoflv demuxer supports live rtmp inputs but there is no any info about it in the docs.
Bela Bodecs [Fri, 23 Dec 2016 23:21:23 +0000 (00:21 +0100)]
flv demuxer supports live rtmp inputs but there is no any info about it in the docs.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/magicyuv: export colorspace and color_range for YUV
Paul B Mahol [Mon, 26 Dec 2016 16:34:57 +0000 (17:34 +0100)]
avcodec/magicyuv: export colorspace and color_range for YUV

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoNVENC: Update check for Lookahead
Ruta Gadkari [Mon, 26 Dec 2016 07:49:16 +0000 (13:19 +0530)]
NVENC: Update check for Lookahead

Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
2 years agoavcodec/lossless_videodsp: fix output of add_hfyu_left_pred_int16_c()
James Almer [Mon, 26 Dec 2016 02:16:58 +0000 (23:16 -0300)]
avcodec/lossless_videodsp: fix output of add_hfyu_left_pred_int16_c()

It is now bitexact with the ssse3 and sse4.1 versions of the function.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/hlsenc: detecting duplicated segment filenames
Bela Bodecs [Mon, 26 Dec 2016 10:14:40 +0000 (18:14 +0800)]
avformat/hlsenc: detecting duplicated segment filenames
  ffmpeg-devel

with use_localtime parameter hlsenc may produce identical filenames for
different but still existing segments. It happens when
hls_segment_filename contains
syntacticaly correct but inadequate format parameters. Currently there
is no any log message when such a situaton occurs but these cases should
be avoided in most times. This patch generate warning log messages in
these cases.

ticketID: #6043

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
2 years agoavcodec/error_resilience: Move variable initialization down, remove unneeded inits
Michael Niedermayer [Sun, 25 Dec 2016 20:21:31 +0000 (21:21 +0100)]
avcodec/error_resilience: Move variable initialization down, remove unneeded inits

This makes the code faster and easier to read

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoffplay: add startup volume option
Ganesh Ajjanagadde [Thu, 22 Dec 2016 17:51:31 +0000 (09:51 -0800)]
ffplay: add startup volume option

Fixes Ticket 5389.

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Ganesh Ajjanagadde <gajjanag@alum.mit.edu>
2 years agoavfilter/af_amerge: properly handle unknown input layouts
Marton Balint [Thu, 15 Dec 2016 02:28:20 +0000 (03:28 +0100)]
avfilter/af_amerge: properly handle unknown input layouts

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavcodec/error_resilience: Merge surrounding status checks
Michael Niedermayer [Sun, 25 Dec 2016 19:22:06 +0000 (20:22 +0100)]
avcodec/error_resilience: Merge surrounding status checks

Simplifies code and is also faster

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/error_resilience: Factor block parity check out
Michael Niedermayer [Sun, 25 Dec 2016 19:16:00 +0000 (20:16 +0100)]
avcodec/error_resilience: Factor block parity check out

This makes the code noticably faster when there are lots of blocks

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/vf_w3fdif: add >8 but <16 bit support
Paul B Mahol [Sun, 11 Sep 2016 10:11:00 +0000 (12:11 +0200)]
avfilter/vf_w3fdif: add >8 but <16 bit support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/pixlet: simplify lowpass_prediction() function
Paul B Mahol [Sat, 24 Dec 2016 15:42:00 +0000 (16:42 +0100)]
avcodec/pixlet: simplify lowpass_prediction() function

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavutil/random_seed: Reduce the time needed on systems with very low precission clock()
Michael Niedermayer [Sat, 24 Dec 2016 13:26:41 +0000 (14:26 +0100)]
avutil/random_seed: Reduce the time needed on systems with very low precission clock()

This should fix issues on BSD
CLOCKS_PER_SEC is 128 on BSD while SUSv2 requires it to be a million

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agotools/zmqsend: Do not truncate fgetc() return
Michael Niedermayer [Fri, 23 Dec 2016 23:07:16 +0000 (00:07 +0100)]
tools/zmqsend: Do not truncate fgetc() return

Fixes CID1396836

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavfi/buffersrc: push the frame deeper if requested.
Nicolas George [Fri, 23 Dec 2016 20:39:46 +0000 (21:39 +0100)]
lavfi/buffersrc: push the frame deeper if requested.

Reduce peak memory consumption with ffmpeg in certain cases.

2 years agolavf/framesync: detect EOF immediately.
Nicolas George [Sat, 24 Dec 2016 09:33:33 +0000 (10:33 +0100)]
lavf/framesync: detect EOF immediately.

Fix an infinite loop in forward_status_change().

2 years agoavcodec/utvideo: fix mistake using wrong arguments for left and lefttop pixel components
Paul B Mahol [Sat, 24 Dec 2016 09:59:26 +0000 (10:59 +0100)]
avcodec/utvideo: fix mistake using wrong arguments for left and lefttop pixel components

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/pixlet: make sure scaling factors are not zero
Paul B Mahol [Sat, 24 Dec 2016 09:31:43 +0000 (10:31 +0100)]
avcodec/pixlet: make sure scaling factors are not zero

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/pixlet: avoid some overflows
Paul B Mahol [Sat, 24 Dec 2016 09:26:27 +0000 (10:26 +0100)]
avcodec/pixlet: avoid some overflows

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/pixlet: fix undefined behaviour in postprocess_chroma
Paul B Mahol [Sat, 24 Dec 2016 09:22:39 +0000 (10:22 +0100)]
avcodec/pixlet: fix undefined behaviour in postprocess_chroma

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter/framequeue: add missing check for ASSERT_LEVEL
James Almer [Sat, 24 Dec 2016 04:56:24 +0000 (01:56 -0300)]
avfilter/framequeue: add missing check for ASSERT_LEVEL

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agotests/audio_fifo: fix buffer allocation for non planar formats
James Almer [Sat, 24 Dec 2016 00:47:03 +0000 (21:47 -0300)]
tests/audio_fifo: fix buffer allocation for non planar formats

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoswscale/swscale: Fix dereference of stride array before null check
Michael Niedermayer [Fri, 23 Dec 2016 20:14:59 +0000 (21:14 +0100)]
swscale/swscale: Fix dereference of stride array before null check

Fixes: CID1396263
Fixes: CID1396271

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/avidec: skip odml master index chunks in avi_sync
Tobias Rapp [Fri, 23 Dec 2016 13:50:16 +0000 (14:50 +0100)]
avformat/avidec: skip odml master index chunks in avi_sync

Fixes pts gaps when reading AVI files > 256GiB generated by FFmpeg.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavutil/tests/random_seed: eliminate goto
Michael Niedermayer [Fri, 23 Dec 2016 02:04:47 +0000 (03:04 +0100)]
avutil/tests/random_seed: eliminate goto

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/vf_deband: do not use uninitialized value
Paul B Mahol [Fri, 23 Dec 2016 17:53:20 +0000 (18:53 +0100)]
avfilter/vf_deband: do not use uninitialized value

Fixes coverity report.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/utvideodec: add SIMD support for median prediction for planar formats
Paul B Mahol [Fri, 23 Dec 2016 14:41:51 +0000 (15:41 +0100)]
avcodec/utvideodec: add SIMD support for median prediction for planar formats

~10% faster overall.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agolavfi: avfilter_graph_request_oldest: request a frame again before returning.
Nicolas George [Fri, 23 Dec 2016 10:18:09 +0000 (11:18 +0100)]
lavfi: avfilter_graph_request_oldest: request a frame again before returning.

With min_samples, if a frame arrives but is too small, it clears
frame_wanted_out. In most cases, the destination filter would be
activated again later because of frame_wanted_out on its own
outputs, but not sinks.
avfilter_graph_request_oldest() is doing the work of the sink
itself, and is therefore allowed to use frame_blocked_in.

2 years agoavcodec/asvdec: return correct value in case of error
Paul B Mahol [Fri, 23 Dec 2016 10:10:47 +0000 (11:10 +0100)]
avcodec/asvdec: return correct value in case of error

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/pixlet: check out of bounds pfx value
Paul B Mahol [Fri, 23 Dec 2016 08:41:06 +0000 (09:41 +0100)]
avcodec/pixlet: check out of bounds pfx value

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/pixlet: remove unnecessary double to float conversion
James Almer [Thu, 22 Dec 2016 23:45:32 +0000 (20:45 -0300)]
avcodec/pixlet: remove unnecessary double to float conversion

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter/af_amerge: detect EOF immediately
Nicolas George [Thu, 22 Dec 2016 11:04:12 +0000 (12:04 +0100)]
avfilter/af_amerge: detect EOF immediately

Fix an infinite loop in forward_status_change().

Signed-off-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavutil/tests: Improved code coverage for random_seed
Thomas Turner [Fri, 23 Dec 2016 00:12:36 +0000 (16:12 -0800)]
avutil/tests: Improved code coverage for random_seed

Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec: add Apple Pixlet decoder
Paul B Mahol [Fri, 2 Dec 2016 19:30:50 +0000 (20:30 +0100)]
avcodec: add Apple Pixlet decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter/vf_deband: add planes coupling mode
Paul B Mahol [Thu, 22 Dec 2016 20:45:24 +0000 (21:45 +0100)]
avfilter/vf_deband: add planes coupling mode

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agofate: Add test for ticket 6024, truncated decoding mode
Pavel Koshevoy [Sun, 18 Dec 2016 05:48:50 +0000 (22:48 -0700)]
fate: Add test for ticket 6024, truncated decoding mode

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoffserver_config: Check for failure to allocate FFServerIPAddressACL
Michael Niedermayer [Thu, 22 Dec 2016 18:04:55 +0000 (19:04 +0100)]
ffserver_config: Check for failure to allocate FFServerIPAddressACL

Fixes CID1396537

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agotests/avstring: free the pointer after calls to av_d2str()
James Almer [Thu, 22 Dec 2016 15:11:13 +0000 (12:11 -0300)]
tests/avstring: free the pointer after calls to av_d2str()

Fixes memleaks.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agodoc/general: mention recently added PCM codecs
Paul B Mahol [Thu, 22 Dec 2016 17:39:02 +0000 (18:39 +0100)]
doc/general: mention recently added PCM codecs

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavutil/random_seed: Improve get_generic_seed() with higher precission clock()
Michael Niedermayer [Thu, 22 Dec 2016 02:59:03 +0000 (03:59 +0100)]
avutil/random_seed: Improve get_generic_seed() with higher precission clock()

Tested-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agodoc/filters: Fix vsbmc option name.
Carl Eugen Hoyos [Thu, 22 Dec 2016 10:48:18 +0000 (11:48 +0100)]
doc/filters: Fix vsbmc option name.

Reported-by: Антон Приходько
2 years agolavfi: take_samples: free frames after taking all samples.
Nicolas George [Thu, 22 Dec 2016 09:26:03 +0000 (10:26 +0100)]
lavfi: take_samples: free frames after taking all samples.

2 years agoavformat/wavdec: add support for decoding 24.0 and 16.8 floating point pcm formats
Paul B Mahol [Mon, 19 Sep 2016 21:08:32 +0000 (23:08 +0200)]
avformat/wavdec: add support for decoding 24.0 and 16.8 floating point pcm formats

Fixes #5602 and #5603.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec: add pcm_f16le and pcm_f24le decoder
Paul B Mahol [Mon, 19 Sep 2016 20:26:39 +0000 (22:26 +0200)]
avcodec: add pcm_f16le and pcm_f24le decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/wmaprodec: cleanup extradata dumping
Paul B Mahol [Thu, 22 Dec 2016 08:45:40 +0000 (09:45 +0100)]
avcodec/wmaprodec: cleanup extradata dumping

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavformat/mpegenc: Check for av_mallocz() failure
Michael Niedermayer [Wed, 21 Dec 2016 22:41:49 +0000 (23:41 +0100)]
avformat/mpegenc: Check for av_mallocz() failure

Fixes CID1257787

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/img2dec: Remove dead code from psd_probe()
Michael Niedermayer [Wed, 21 Dec 2016 21:03:55 +0000 (22:03 +0100)]
avformat/img2dec: Remove dead code from psd_probe()

Fixes CID1397124

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/vf_psnr: add gray10 and gray12 support
Paul B Mahol [Wed, 21 Dec 2016 20:37:22 +0000 (21:37 +0100)]
avfilter/vf_psnr: add gray10 and gray12 support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavutil/random_seed: Use uint64 instead of uint8 for struct to avoid potential alignme...
Michael Niedermayer [Wed, 21 Dec 2016 02:11:44 +0000 (03:11 +0100)]
avutil/random_seed: Use uint64 instead of uint8 for struct to avoid potential alignment issues

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavutil: Added selftest for libavutil/audio_fifo.c
Thomas Turner [Wed, 21 Dec 2016 00:53:51 +0000 (16:53 -0800)]
avutil: Added selftest for libavutil/audio_fifo.c

Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoswscale: save ebx register when it is not available
Andreas Cadhalpun [Fri, 16 Dec 2016 01:29:56 +0000 (02:29 +0100)]
swscale: save ebx register when it is not available

Configure checks if the ebx register can be used for asm and it has to
be saved if and only if this is not the case.
Without this the build fails when configuring with --toolchain=hardened
--disable-pic on i386 using gcc 4.8:
error: PIC register clobbered by '%ebx' in 'asm'

In that case gcc 4.8 reserves the ebx register for the GOT needed for
PIE, so it can't be used in asm directly.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoavutil: Improved test coverage for avstring.c
Thomas Turner [Tue, 20 Dec 2016 02:44:42 +0000 (18:44 -0800)]
avutil: Improved test coverage for avstring.c

Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/magicyuv: add 10 bit support
Paul B Mahol [Mon, 19 Dec 2016 22:21:49 +0000 (23:21 +0100)]
avcodec/magicyuv: add 10 bit support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agolavfi/framequeue: avoid empty structs.
Nicolas George [Mon, 19 Dec 2016 07:55:30 +0000 (08:55 +0100)]
lavfi/framequeue: avoid empty structs.

Fix compilation on MSVC.

2 years agoavformat/mov.: Make the process of uuid-xmp atom faster.
Chen Meng [Fri, 11 Nov 2016 03:42:26 +0000 (11:42 +0800)]
avformat/mov.: Make the process of uuid-xmp atom faster.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavfi/atempo: avoid false triggering an assertion failure
Pavel Koshevoy [Sun, 18 Dec 2016 00:14:48 +0000 (17:14 -0700)]
lavfi/atempo: avoid false triggering an assertion failure

Steps to reproduce:
./ffmpeg_g -f s16be -i /dev/null -af atempo=0.5 -y /tmp/atempo.wav

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agodoc/examples/decoder_targeted: Limit max pixels for fuzzing
Michael Niedermayer [Sat, 17 Dec 2016 17:40:53 +0000 (18:40 +0100)]
doc/examples/decoder_targeted: Limit max pixels for fuzzing

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavfi: make filter_frame non-recursive.
Nicolas George [Sun, 3 Jan 2016 14:44:42 +0000 (15:44 +0100)]
lavfi: make filter_frame non-recursive.

A lot of changes happen at the same time:

- Add a framequeue fifo to AVFilterLink.

- split AVFilterLink.status into status_in and status_out: requires
  changes to the few filters and programs that use it directly
  (f_interleave, split, filtfmts).

- Add a field ready to AVFilterContext, marking when the filter is ready
  and its activation priority.

- Add flags to mark blocked links.

- Change ff_filter_frame() to enqueue the frame.

- Change all filtering functions to update the ready field and the
  blocked flags.

- Update ff_filter_graph_run_once() to use the ready field.

- buffersrc: always push the frame immediately.

2 years agolavfi: add FFFrameQueue API.
Nicolas George [Thu, 3 Dec 2015 19:05:14 +0000 (20:05 +0100)]
lavfi: add FFFrameQueue API.

2 years agoavcodec/get_bits: add av_assert2 to get_bits_long()
Paul B Mahol [Sun, 18 Dec 2016 09:06:29 +0000 (10:06 +0100)]
avcodec/get_bits: add av_assert2 to get_bits_long()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoopus: remove redundant ff_celt_window2 declaration
Rostislav Pehlivanov [Sun, 18 Dec 2016 07:10:48 +0000 (07:10 +0000)]
opus: remove redundant ff_celt_window2 declaration

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoavformat: Auto-detect mjpeg 2000 in mpeg-ts
Ståle Kristoffersen [Tue, 11 Oct 2016 13:36:40 +0000 (15:36 +0200)]
avformat: Auto-detect mjpeg 2000 in mpeg-ts

This makes it possible to decode motion jpeg 2000
encoded in a transport stream without a correct PMT/PAT.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/tls: add tls url_get_file_handle
Jay Ridgeway [Sun, 16 Oct 2016 14:28:21 +0000 (10:28 -0400)]
avformat/tls: add tls url_get_file_handle

Support url_get_file_handle on TLS streams.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavc: Fix ticket 6024, truncated mode decoding
Pavel Koshevoy [Thu, 15 Dec 2016 17:19:23 +0000 (10:19 -0700)]
lavc: Fix ticket 6024, truncated mode decoding

The assumption that avcodec_send_packet makes regarding decoders
consuming the entire packet is not true if the codec supports
truncated decoding mode and the truncated flag is turned on.

Steps to reproduce:
./ffmpeg_g -flags truncated \
-i "http://samples.ffmpeg.org/MPEG2/test-ebu-422.40000.pakets.ts" \
-c:v ffv1 -c:a copy -y /tmp/truncated.nut

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/mips: version 1 of vc1dsp optimizations for loongson mmi
Zhou Xiaoyong [Mon, 10 Oct 2016 08:11:37 +0000 (16:11 +0800)]
avcodec/mips: version 1 of vc1dsp optimizations for loongson mmi

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/vf_ssim: add >8 bit depth suppport
Paul B Mahol [Thu, 15 Dec 2016 21:33:42 +0000 (22:33 +0100)]
avfilter/vf_ssim: add >8 bit depth suppport

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavformat/wavdec: Eliminate goto for clang -O0 DCE
Mark Harris [Fri, 16 Dec 2016 00:44:57 +0000 (16:44 -0800)]
avformat/wavdec: Eliminate goto for clang -O0 DCE

Clang is not able to eliminate the reference to ff_spdif_probe() when
there is a goto target in the same block and optimization is disabled.

This fixes the following build failure on OS X:
  ./configure --disable-everything --disable-doc \
    --enable-decoder=pcm_s16le --enable-demuxer=wav \
    --enable-protocol=file --disable-optimizations --cc=clang
  make
  ...
  Undefined symbols for architecture x86_64:
    "_ff_spdif_probe", referenced from:
        _set_spdif in libavformat.a(wavdec.o)
  ld: symbol(s) not found for architecture x86_64

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavutil/imgutils: Clarify doxy for av_image_check_size2()
Michael Niedermayer [Sun, 11 Dec 2016 21:51:23 +0000 (22:51 +0100)]
avutil/imgutils: Clarify doxy for av_image_check_size2()

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agofate/psd: add tests for uncompress and rle samples
Martin Vignali [Thu, 24 Nov 2016 20:30:51 +0000 (21:30 +0100)]
fate/psd: add tests for uncompress and rle samples

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/h263dec: Return the correct error code in explode mode
Michael Niedermayer [Thu, 15 Dec 2016 19:31:23 +0000 (20:31 +0100)]
avcodec/h263dec: Return the correct error code in explode mode

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/smvjpegdec: return the packet size instead of 0
Michael Niedermayer [Thu, 15 Dec 2016 19:09:48 +0000 (20:09 +0100)]
avcodec/smvjpegdec: return the packet size instead of 0

Most decoders return the amount of data used.
This is more consistent

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/tdsc: return the packet size instead of 0
Michael Niedermayer [Thu, 15 Dec 2016 19:09:48 +0000 (20:09 +0100)]
avcodec/tdsc: return the packet size instead of 0

Most decoders return the amount of data used.
This is more consistent

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/screenpresso: return the packet size instead of 0
Michael Niedermayer [Thu, 15 Dec 2016 19:09:48 +0000 (20:09 +0100)]
avcodec/screenpresso: return the packet size instead of 0

Most decoders return the amount of data used.
This is more consistent

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/rscc: return the packet size instead of 0
Michael Niedermayer [Thu, 15 Dec 2016 19:09:48 +0000 (20:09 +0100)]
avcodec/rscc: return the packet size instead of 0

Most decoders return the amount of data used.
This is more consistent

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/vsrc_testsrc: draw_bar: make sure width is not negative
Paul B Mahol [Thu, 15 Dec 2016 14:52:48 +0000 (15:52 +0100)]
avfilter/vsrc_testsrc: draw_bar: make sure width is not negative

Reported-by: Josh de Kock
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavformat/mp3dec: fix msan warning when verifying mpa header
Chris Cunningham [Tue, 22 Nov 2016 21:54:50 +0000 (13:54 -0800)]
avformat/mp3dec: fix msan warning when verifying mpa header

MPEG Audio frame header must be 4 bytes. If we fail to read
4 bytes bail early to avoid Use-of-uninitialized-value msan error.
Reference https://crbug.com/666874.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agotiff: fix overflows when calling av_reduce
Andreas Cadhalpun [Mon, 12 Dec 2016 23:43:21 +0000 (00:43 +0100)]
tiff: fix overflows when calling av_reduce

The arguments of av_reduce are signed, so the cast to uint64_t is misleading.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agomov: prevent overflow during bit rate calculation
Andreas Cadhalpun [Wed, 14 Dec 2016 00:53:23 +0000 (01:53 +0100)]
mov: prevent overflow during bit rate calculation

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agocafdec: prevent overflow during bit rate calculation
Andreas Cadhalpun [Wed, 14 Dec 2016 00:53:19 +0000 (01:53 +0100)]
cafdec: prevent overflow during bit rate calculation

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years ago4xm: prevent overflow during bit rate calculation
Andreas Cadhalpun [Wed, 14 Dec 2016 00:53:14 +0000 (01:53 +0100)]
4xm: prevent overflow during bit rate calculation

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agodoc/filters: fix channel names in sofalizer example
Paul B Mahol [Wed, 14 Dec 2016 21:48:53 +0000 (22:48 +0100)]
doc/filters: fix channel names in sofalizer example

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter/af_sofalizer: warn if user gives unknown channel names
Paul B Mahol [Wed, 14 Dec 2016 21:47:38 +0000 (22:47 +0100)]
avfilter/af_sofalizer: warn if user gives unknown channel names

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agodoc/filters: drawtext: add example of printing texts on same baseline
Andrey Utkin [Wed, 14 Dec 2016 14:37:47 +0000 (14:37 +0000)]
doc/filters: drawtext: add example of printing texts on same baseline

Height of canvas produced by drawtext varies depending on symbols in
text, so add example for printing separate texts aligned horizontally.

Wording suggested by Lou Logan <lou@lrcd.com>

Signed-off-by: Andrey Utkin <andrey.utkin@pb.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
2 years agoAdd missing #includes for standalone spherical-information-related headers
Diego Biurrun [Thu, 8 Dec 2016 18:47:58 +0000 (19:47 +0100)]
Add missing #includes for standalone spherical-information-related headers

(cherry picked from commit f912fd767e55bbb5a1554bd99bacab007659609c)
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoBump for psd demuxer and decoder
Michael Niedermayer [Wed, 14 Dec 2016 10:36:26 +0000 (11:36 +0100)]
Bump for psd demuxer and decoder

Found-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibavformat : add Photoshop PSD demuxer.
Martin Vignali [Thu, 24 Nov 2016 20:26:56 +0000 (21:26 +0100)]
libavformat : add Photoshop PSD demuxer.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibavcodec : add decoder for Photoshop PSD image files
Martin Vignali [Thu, 24 Nov 2016 20:26:42 +0000 (21:26 +0100)]
libavcodec : add decoder for Photoshop PSD image files

Decode the Image Data Section (which contains merged pictures).
Support RGB/A and Grayscale/A in 8bits and 16 bits per channel.
Support uncompress and rle decompression in Image Data Section.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat: fix overflows during bit rate calculation
Andreas Cadhalpun [Mon, 12 Dec 2016 23:38:25 +0000 (00:38 +0100)]
avformat: fix overflows during bit rate calculation

The bit_rate field has type int64_t since commit
7404f3bdb90e6a5dcb59bc0a091e2c5c038e557d.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoswresample/resample: remove swri_resample function
Muhammad Faiz [Tue, 13 Dec 2016 17:51:18 +0000 (00:51 +0700)]
swresample/resample: remove swri_resample function

integrate it inside multiple_resample
allow some calculations to be performed outside loop

Suggested-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agolibvpxenc: Don't spam level errors for VP8 encodes
Alex Converse [Mon, 12 Dec 2016 20:07:05 +0000 (12:07 -0800)]
libvpxenc: Don't spam level errors for VP8 encodes

Fixes "Failed to set VP9E_GET_LEVEL codec control: Codec does not
implement requested capability" log messages on VP8 encodes.

2 years agoswresample/resample: do not allow negative dst_size return value
Muhammad Faiz [Tue, 13 Dec 2016 07:11:48 +0000 (14:11 +0700)]
swresample/resample: do not allow negative dst_size return value

This should fix Ticket6012

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavformat/utils: Print verbose error message if stream count exceeds max_streams
Michael Niedermayer [Sat, 10 Dec 2016 19:15:13 +0000 (20:15 +0100)]
avformat/utils: Print verbose error message if stream count exceeds max_streams

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/options_table: Set the default maximum number of streams to 1000
Michael Niedermayer [Sat, 10 Dec 2016 19:15:12 +0000 (20:15 +0100)]
avformat/options_table: Set the default maximum number of streams to 1000

Fixes CVE-2016-9561, Note the security relevance of this is disputed as
running out of memory can happen with valid files

Suggested-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/avfilter: fix filtering frames with unknown channel layouts for filters...
Marton Balint [Mon, 12 Dec 2016 21:42:27 +0000 (22:42 +0100)]
avfilter/avfilter: fix filtering frames with unknown channel layouts for filters needing writable frames

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>