Commit Graph

87409 Commits

Author SHA1 Message Date
Rodger Combs 5c9373385d Merge commit 'dce2929efa8e82b0832a828f7e8cb81ff8c20a4e'
* commit 'dce2929efa8e82b0832a828f7e8cb81ff8c20a4e':
  dashenc: copy language and role metadata from streams assigned to sets

Merged-by: Rodger Combs <rodger.combs@gmail.com>
2017-09-26 14:11:50 -03:00
Rodger Combs 3f7a8bb67b Merge commit 'ca9bc9de690258d4761a19b0df6e9c9113b80115'
* commit 'ca9bc9de690258d4761a19b0df6e9c9113b80115':
  dashenc: default to one AdaptationSet per stream

Merged-by: Rodger Combs <rodger.combs@gmail.com>
2017-09-26 14:11:25 -03:00
Rodger Combs c0fae3ff90 Merge commit 'efd2fc41b3f0749f9715d50b581f22bbaa8c5b99'
* commit 'efd2fc41b3f0749f9715d50b581f22bbaa8c5b99':
  dashenc: allow assigning all streams of a media type to an AdaptationSet

Merged-by: Rodger Combs <rodger.combs@gmail.com>
2017-09-26 14:11:02 -03:00
Rodger Combs 777d53c793 Merge commit '3d23a5f96ad72961c14ba3a0c2add8f2ab374b61'
* commit '3d23a5f96ad72961c14ba3a0c2add8f2ab374b61':
  dashenc: add support for assigning streams to AdaptationSets

Merged-by: Rodger Combs <rodger.combs@gmail.com>
2017-09-26 14:10:30 -03:00
Rodger Combs 3b9ef13588 Merge commit '9df9309d233f59d9706444a1e24ac24139f2640d'
* commit '9df9309d233f59d9706444a1e24ac24139f2640d':
  dashenc: calculate stream bitrate from first segment if not available

Merged-by: Rodger Combs <rodger.combs@gmail.com>
2017-09-26 14:02:44 -03:00
James Almer 52223ffe44 Revert "lavf/dashenc: update bitrates on dash_write_trailer"
This reverts commit 89c0fda5f4.

A different solution will be committed instead.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-26 13:59:56 -03:00
Moritz Barsnick 6bf48c4805 lavf/tls_gnutls: fix warnings from version check
The GnuTLS version is checked through the macro GNUTLS_VERSION_NUMBER,
but this wasn't introduced before 2.7.2. Building with older versions
of GnuTLS (using icc) warns:

src/libavformat/tls_gnutls.c(38): warning #193: zero used for undefined preprocessing identifier "GNUTLS_VERSION_NUMBER"
  #if HAVE_THREADS && GNUTLS_VERSION_NUMBER <= 0x020b00

This adds a fallback to the older, deprecated LIBGNUTLS_VERSION_NUMBER
macro.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
2017-09-26 15:05:32 +02:00
Moritz Barsnick 16c8a9feea lavf/tls_gnutls: fix compilation with GnuTLS 2.x
Commit 598e416840 added use of
GNUTLS_E_PREMATURE_TERMINATION, which wasn't introduced to GnuTLS
before 2.99.x / 3.x. This fixes compilation with older versions.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
2017-09-26 15:05:00 +02:00
Frédéric Devernay eec67f2522 avcodec/dnxhdenc: fix DNxHR 444 encoding crashes
Fixes #6649.
2017-09-26 10:00:51 +02:00
James Almer 89a2472ec5 avformat/img2enc: remove av_dup_packet() call
It's unnecessary after a call to av_packet_ref().

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-25 23:44:53 -03:00
James Almer c463b81d03 ffplay: replace use of av_copy_packet()
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-25 21:27:04 -03:00
James Almer a447b75de8 avformat: replace all uses of av_copy_packet()
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-25 21:26:38 -03:00
James Almer ecb9741ba2 avcodec/avpacket: deprecate av_copy_packet()
It does the same thing as av_packet_ref().

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-25 21:22:06 -03:00
Thomas Mundt d491d6a0cd avfilter/interlace: rename two variables for consistency
Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
2017-09-25 22:13:37 +02:00
Paul B Mahol 5d07275529 avfilter/af_headphone: increase max ir length
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-09-25 12:12:13 +02:00
Paras Chadha 4efb1658f5 fate/fits: add missing png & gif dependencies
Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-24 21:54:13 +02:00
Martin Vignali cab71e4e4e libavcodec/hapdec : add support HapAlphaOnly
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-24 21:54:13 +02:00
Martin Vignali 45c15b7490 libavformat : add mov dataformat tag for HapAlphaOnly and HapQAlpha
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-24 21:54:13 +02:00
Michael Niedermayer 5d31f03a02 avcodec/takdec: Fix integer overflow in decode_lpc()
Fixes: runtime error: signed integer overflow: 16748560 + 2143729712 cannot be represented in type 'int'
Fixes: 3202/clusterfuzz-testcase-minimized-4988291642294272

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-24 21:54:13 +02:00
Michael Niedermayer 4f5eaf0b59 avcodec/proresdec2: Check bits in DECODE_CODEWORD(), fixes invalid shift
Fixes: runtime error: shift exponent 42 is too large for 32-bit type 'unsigned int'
Fixes: 3410/clusterfuzz-testcase-minimized-5313377960198144

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-24 21:54:13 +02:00
Michael Niedermayer 3dabb9c69d avcodec/takdec: Fix integer overflows in decode_subframe()
Fixes: runtime error: signed integer overflow: -1562477869 + -691460395 cannot be represented in type 'int'
Fixes: 3196/clusterfuzz-testcase-minimized-4528307146063872

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-24 21:54:13 +02:00
Jörn Heusipp 3d2da6d585
avformat/libopenmpt: Query duration and metadata after selecting subsong
Duration depends on the selected subsong and thus must be queried after
selecting the subsong. There is no compelling reason to query other
metadata earlier either.

Tested with libopenmpt version: 0.2.8760-beta27
Libopenmpt configure options: --without-ogg --without-vorbis
--without-vorbisfile --without-portaudio --without-portaudiocpp
--without-mpg123 --without-pulseaudio --without-sndfile --without-flac

Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Josh de Kock <josh@itanimul.li>
2017-09-24 15:54:38 +01:00
Kaustubh Raste 16adbfe60c avcodec/mips: Improve avc chroma horiz mc msa functions
Replace generic with block size specific function.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-24 02:33:48 +02:00
Kaustubh Raste d6737539e7 avcodec/mips: Unrolled loops avc intra msa functions
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-24 02:33:48 +02:00
Kaustubh Raste 7f8417f226 avcodec/mips: Improve hevc uni-w copy mc msa functions
Load the specific destination bytes instead of MSA load and pack.
Pack the data to half word before clipping.
Use immediate unsigned saturation for clip to max saving one vector register.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-24 02:33:48 +02:00
Michael Niedermayer d8ef5a47bb avcodec/flacenc: Replace "return -1" by named constant
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-24 02:33:48 +02:00
Michael Niedermayer 9cec174247 avcodec/snowenc: Replace "return -1" by named constants
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-24 02:33:48 +02:00
Jaroslav Beran 00a1e1337f libavdevice/v4l2: fix invalid access to struct v4l2_buffer
In case we are short of queued buffers, at first v4l2_buffer was enqueued to kernel so it's not owned by
user-space anymore. After that it's timestamp field was read, but it might be overwritten by driver at
that moment. It resulted in invalid timestamp sometimes.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-24 02:33:48 +02:00
James Almer 5a9415533d ffplay: zero initialize copy avpacket
Prevents potential use of uninitialized stack.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-23 20:13:58 -03:00
James Almer 86be73c7c1 avformat/mpeg: zero initialize idx_pkt
Prevents use of uninitialized stack.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-23 19:37:21 -03:00
James Almer d1e7e4fbe2 avcodec/v4l2_m2m: add missing header inclusions
Should fix checkheaders on systems where v4l2_m2m is enabled.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-23 18:13:01 -03:00
James Almer ff7f859c25 avcodec/Makefile: skip v4l2_m2m headers if needed
Fixes checkheaders on systems where v4l2_m2m is unavailable.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-23 18:08:07 -03:00
James Almer 015f976aae avcodec/frame_thread_encoder: use av_packet_alloc()
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-23 17:52:32 -03:00
Thomas Mundt 40bfaa190c avfilter/interlace: add support for 10 and 12 bit
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-23 16:19:58 -03:00
Thomas Mundt 58ca446672 avfilter/tinterlace: use drawutils for pad mode
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-23 16:19:58 -03:00
Marton Balint 01911b9b3c avformat/mxfdec: use the common packet pts setter function for opatom files
Fixes ticket #6631.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-09-23 19:07:54 +02:00
Marton Balint 7f80b065a6 avformat/mxfdec: factorize packet pts setter function
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-09-23 19:07:54 +02:00
James Almer e4fd7b1fea avcodec/opusenc_psy: use av_clip_uintp2()
Fixes fate-source.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-23 13:23:27 -03:00
James Almer b8eaecbf39 avcodec/opusenc_utils: add missing preprocessor guards
Fixes fate-source.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-23 13:22:51 -03:00
Rostislav Pehlivanov 039ebaa5f3 lavfi: make window_func an inline function
Eliminate lavc->lavfi dependency. The function isn't big and doesn't
deserve its own file.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-09-23 14:35:06 +01:00
Rostislav Pehlivanov 2ad1768c7b opusenc: implement a psychoacoustic system
This commit implements a psychoacoustic system for the native Opus
encoder. Its unlike any other psychoacoustic system known since its
capable of using a lookahead to make better choices on how to treat the
current frame and how many bits to allocate for it (and future frames).

Also, whilst the main bulk of the analysis function has to run in a
single thread, the per-frame anaylsis functions does not modify the main
psychoacoustic context, so in the future it will be fairly trivial to
run those as slice threads.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-09-23 08:27:44 +01:00
Jorge Ramirez-Ortiz 1ef7752d64 libavcodec: v4l2: add support for v4l2 mem2mem codecs
This patchset enhances Alexis Ballier's original patch and validates
    it using Qualcomm's Venus hardware (driver recently landed upstream
    [1]).

    This has been tested on Qualcomm's DragonBoard 410c and 820c
    Configure/make scripts have been validated on Ubuntu 10.04 and
    16.04.

    Tested decoders:
           - h264
           - h263
           - mpeg4
           - vp8
           - vp9
           - hevc

    Tested encoders:
           - h264
           - h263
           - mpeg4

    Tested transcoding (concurrent encoding/decoding)

    Some of the changes introduced:
        - v4l2: code cleanup and abstractions added
        - v4l2: follow the new encode/decode api.
        - v4l2: fix display size for NV12 output pool.
        - v4l2: handle EOS (EPIPE and draining)
        - v4l2: vp8 and mpeg4 decoding and encoding.
        - v4l2: hevc and vp9 support.
        - v4l2: generate EOF on dequeue errors.
        - v4l2: h264_mp4toannexb filtering.
        - v4l2: fixed make install and fate issues.
        - v4l2: codecs enabled/disabled depending on pixfmt defined
        - v4l2: pass timebase/framerate to the context
        - v4l2: runtime decoder reconfiguration.
        - v4l2: add more frame information
        - v4l2: free hardware resources on last reference being released
        - v4l2: encoding: disable b-frames for upstreaming (patch required)

    [1] https://lwn.net/Articles/697956/

    System Level view:
        v42l_m2m_enc/dec --> v4l2_m2m --> v4l2_context --> v4l2_buffers

    Reviewed-by: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>
    Reviewed-by: Alexis Ballier <aballier@gentoo.org>
    Tested-by: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2017-09-23 08:47:52 +02:00
James Almer afe674734b avformat/gif: use av_packet_alloc()
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-23 02:18:47 -03:00
James Almer bb4b7624d9 avformat/apngenc: use av_packet_alloc()
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-23 02:18:36 -03:00
Michael Niedermayer 67da2685e0 avcodec/dirac_dwt: Fix integer overflow in COMPOSE_FIDELITYi*()
Fixes: runtime error: signed integer overflow: 161 * 13872281 cannot be represented in type 'int'

Fixes: 3295/clusterfuzz-testcase-minimized-4738998142500864

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-22 12:19:07 +02:00
Michael Niedermayer d00fc952b6 avcodec/ffv1dec: Fix integer overflow in read_quant_table()
Fixes: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 3361/clusterfuzz-testcase-minimized-5065842955911168

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-22 12:19:07 +02:00
Michael Niedermayer 2c933c5168 avcodec/svq3: Fix overflow in svq3_add_idct_c()
Fixes: runtime error: signed integer overflow: 2147392585 + 524288 cannot be represented in type 'int'
Fixes: 3348/clusterfuzz-testcase-minimized-4809500517203968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-22 12:19:07 +02:00
Kaustubh Raste f160a63bad avcodec/mips: Remove generic func use in hevc non-uni copy mc msa functions
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-22 12:12:59 +02:00
Kaustubh Raste 2b15626997 avcodec/mips: preload data in hevc sao edge 90 degree filter msa functions
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-22 12:12:59 +02:00
Yogender Gupta 21e077fcb3 avfilter/thumbnail_cuda: add cuda thumbnail filter
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-09-22 11:54:35 +02:00