ffmpeg.git
2 years agoavfilter/avf_avectorscope: add swap and mirror options
Paul B Mahol [Tue, 21 Nov 2017 11:07:13 +0000 (12:07 +0100)]
avfilter/avf_avectorscope: add swap and mirror options

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agofate/hapdec : add test for hapqa decoding
Martin Vignali [Tue, 21 Nov 2017 11:01:00 +0000 (12:01 +0100)]
fate/hapdec : add test for hapqa decoding

2 years agoavcodec/hapdec : add support for hapqa decoding
Martin Vignali [Tue, 21 Nov 2017 10:59:02 +0000 (11:59 +0100)]
avcodec/hapdec : add support for hapqa decoding

2 years agoavcodec/hapdec : indent after previous commit
Martin Vignali [Tue, 21 Nov 2017 10:55:56 +0000 (11:55 +0100)]
avcodec/hapdec : indent after previous commit

2 years agoavcodec/hapdec : reorganize code before adding multi-texture decoding
Martin Vignali [Tue, 21 Nov 2017 10:55:37 +0000 (11:55 +0100)]
avcodec/hapdec : reorganize code before adding multi-texture decoding

2 years agoavcodec/huffyuvdspenc : add diff_int16 AVX2 func
Martin Vignali [Tue, 21 Nov 2017 08:17:44 +0000 (09:17 +0100)]
avcodec/huffyuvdspenc : add diff_int16 AVX2 func

2 years agoavcodec/huffyuvdspenc : reorganize diff_int16
Martin Vignali [Tue, 21 Nov 2017 08:16:18 +0000 (09:16 +0100)]
avcodec/huffyuvdspenc : reorganize diff_int16

2 years agoavcodec/huffyuvdsp : add add_int16 AVX2 func
Martin Vignali [Tue, 21 Nov 2017 08:14:35 +0000 (09:14 +0100)]
avcodec/huffyuvdsp : add add_int16 AVX2 func

2 years agoavcodec/huffyuvdsp : reorganize add_int16 asm
Martin Vignali [Tue, 21 Nov 2017 08:11:36 +0000 (09:11 +0100)]
avcodec/huffyuvdsp : reorganize add_int16 asm

2 years agoavcodec/huffyuvdsp(enc) : move duplicate macro to a template file
Martin Vignali [Tue, 21 Nov 2017 08:10:52 +0000 (09:10 +0100)]
avcodec/huffyuvdsp(enc) : move duplicate macro to a template file

2 years agocheckasm : add test for huffyuvdsp add_int16
Martin Vignali [Tue, 21 Nov 2017 08:09:42 +0000 (09:09 +0100)]
checkasm : add test for huffyuvdsp add_int16

2 years agoavcodec/x86/utvideodsp.asm : cosmetic
Martin Vignali [Tue, 21 Nov 2017 07:36:00 +0000 (08:36 +0100)]
avcodec/x86/utvideodsp.asm : cosmetic

better func separator
and add comment for the restore rgb planes10 declaration

2 years agoavcodec/utvideodsp : add avx2 version for the dsp
Martin Vignali [Tue, 21 Nov 2017 07:34:20 +0000 (08:34 +0100)]
avcodec/utvideodsp : add avx2 version for the dsp

2 years agoavcodec/x86/utvideodsp : make macro for func
Martin Vignali [Tue, 21 Nov 2017 07:32:01 +0000 (08:32 +0100)]
avcodec/x86/utvideodsp : make macro for func

2 years agocheckasm : add utvideodsp test
Martin Vignali [Tue, 21 Nov 2017 07:31:12 +0000 (08:31 +0100)]
checkasm : add utvideodsp test

2 years agoffmpeg: add return value check to supress the build warning.
Jun Zhao [Sat, 18 Nov 2017 05:24:24 +0000 (13:24 +0800)]
ffmpeg: add return value check to supress the build warning.

add return value check to supress the build warning message like
"warning: ignoring return value" when use attribute -Wunused-result.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: 刘歧 <lq@chinaffmpeg.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/dashenc: Added configuration to override HTTP User-Agent
Karthick J [Wed, 8 Nov 2017 09:22:54 +0000 (14:52 +0530)]
avformat/dashenc: Added configuration to override HTTP User-Agent

Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/mov: Propagate errors in mov_switch_root.
Jacob Trimble [Mon, 20 Nov 2017 20:05:02 +0000 (12:05 -0800)]
avformat/mov: Propagate errors in mov_switch_root.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoClose ogg stream upon error when using AV_EF_EXPLODE.
Dale Curtis [Mon, 20 Nov 2017 20:07:57 +0000 (12:07 -0800)]
Close ogg stream upon error when using AV_EF_EXPLODE.

Without this there can be multiple memory leaks for unrecognized
ogg streams.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoFix undefined shift on assumed 8-bit input.
Dale Curtis [Sat, 18 Nov 2017 00:05:30 +0000 (16:05 -0800)]
Fix undefined shift on assumed 8-bit input.

decode_user_data() attempts to create an integer |build|
value with 8 bits of spacing for 3 components. However
each component is an int32_t, so shifting each component
is undefined for values outside of the 8 bit range.

This patch simply clamps input to 8-bits per component
and prints out a warning that the values were clamped.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibvpxenc: remove pre-1.4.0 checks
James Zern [Sat, 18 Nov 2017 01:25:40 +0000 (17:25 -0800)]
libvpxenc: remove pre-1.4.0 checks

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Zern <jzern@google.com>
2 years agolibvpxdec: remove pre-1.4.0 checks
James Zern [Sat, 18 Nov 2017 01:25:59 +0000 (17:25 -0800)]
libvpxdec: remove pre-1.4.0 checks

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Zern <jzern@google.com>
2 years agolibvpx: remove pre-1.4.0 checks
James Zern [Sat, 18 Nov 2017 01:25:21 +0000 (17:25 -0800)]
libvpx: remove pre-1.4.0 checks

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Zern <jzern@google.com>
2 years agoconfigure: require libvpx-1.4.0 for vp[89] support
James Zern [Sat, 18 Nov 2017 01:24:07 +0000 (17:24 -0800)]
configure: require libvpx-1.4.0 for vp[89] support

this will simplify libvpxenc/dec.c and ensure more stable versions of
the codecs are present.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Zern <jzern@google.com>
2 years agox86/jpeg2000dsp: add ff_ict_float_{fma3,fma4}
James Almer [Sun, 19 Nov 2017 03:32:25 +0000 (00:32 -0300)]
x86/jpeg2000dsp: add ff_ict_float_{fma3,fma4}

jpeg2000_ict_float_c: 2296.0
jpeg2000_ict_float_sse: 628.0
jpeg2000_ict_float_avx: 317.0
jpeg2000_ict_float_fma3: 262.0

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agocheckasm/jpeg2000dsp: add test for ict_float
James Almer [Sun, 19 Nov 2017 03:32:24 +0000 (00:32 -0300)]
checkasm/jpeg2000dsp: add test for ict_float

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agocheckasm/jpeg2000dsp: refactor rct_int test
James Almer [Sun, 19 Nov 2017 03:32:23 +0000 (00:32 -0300)]
checkasm/jpeg2000dsp: refactor rct_int test

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/avio: remove must_flush from AVIOContext
Marton Balint [Wed, 15 Nov 2017 21:13:41 +0000 (22:13 +0100)]
avformat/avio: remove must_flush from AVIOContext

It is unused.

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavcodec/hevcdsp_template: Fix invalid shift in put_hevc_epel_bi_w_v()
Michael Niedermayer [Fri, 17 Nov 2017 21:01:29 +0000 (22:01 +0100)]
avcodec/hevcdsp_template: Fix invalid shift in put_hevc_epel_bi_w_v()

Fixes: runtime error: left shift of negative value -255
Fixes: 4037/clusterfuzz-testcase-minimized-5290998163832832

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibavcodec/videotoolbox: fix decoding of h264 streams with minor SPS changes
Aman Gupta [Wed, 15 Nov 2017 20:50:31 +0000 (12:50 -0800)]
libavcodec/videotoolbox: fix decoding of h264 streams with minor SPS changes

Previously the codec kept an entire copy of the SPS, and restarted the VT decoder
session whenever it changed. This fixed decoding errors in [1], as
described in 9519983c. On further inspection, that sample features an SPS change
from High/4.0 to High/3.2 while moving from one scene to another.

Yesterday I received [2], which contains minor SPS changes where the
profile and level do not change. These occur frequently and are not associated with
scene changes. After 9519983c, the VT decoder session is recreated unnecessarily when
these are encountered causing visual glitches.

This commit simplifies the state kept in the VTContext to include just the first three
bytes of the SPS, containing the profile and level details. This is populated initially
when the VT decoder session is created, and used to detect changes and force a restart.

This means minor SPS changes are fed directly into the existing decoder, whereas
profile/level changes force the decoder session to be recreated with the new parameters.

After this commit, both samples [1] and [2] playback as expected.

[1] https://s3.amazonaws.com/tmm1/videotoolbox/spschange.ts
[2] https://s3.amazonaws.com/tmm1/videotoolbox/spschange2.ts

Signed-off-by: Aman Gupta <aman@tmm1.net>
2 years agoRevert "tests/fate: addition of test case for hls variant stream creation with master...
Steven Liu [Mon, 20 Nov 2017 16:22:25 +0000 (00:22 +0800)]
Revert "tests/fate: addition of test case for hls variant stream creation with master playlist"

This reverts commit 218ce1f6237b39090015809468f8e933bb09d9b8.

2 years agocompat/cuda: Pass a logging context to load functions
Mark Thompson [Sat, 18 Nov 2017 17:16:14 +0000 (17:16 +0000)]
compat/cuda: Pass a logging context to load functions

Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
2 years agolavf/qsv_vpp: check the return value of ff_formats_ref()
Zhong Li [Mon, 20 Nov 2017 09:14:34 +0000 (04:14 -0500)]
lavf/qsv_vpp: check the return value of ff_formats_ref()

Fixes the build warning of "ignoring return value of ‘ff_formats_ref’,
declared with attribute warn_unused_result"

Signed-off-by: Zhong Li <zhong.li@intel.com>
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2 years agolavf/qsv_overlay: check the return value of ff_formats_ref()
Zhong Li [Mon, 20 Nov 2017 09:14:33 +0000 (04:14 -0500)]
lavf/qsv_overlay: check the return value of ff_formats_ref()

Fixes the build warning of "ignoring return value of ‘ff_formats_ref’,
declared with attribute warn_unused_result"

Signed-off-by: Zhong Li <zhong.li@intel.com>
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2 years agolavu/qsv: remove unused variable
Zhong Li [Mon, 20 Nov 2017 09:14:32 +0000 (04:14 -0500)]
lavu/qsv: remove unused variable

Fixes build warning of "variable 's' is declared but not used"

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2 years agohwcontext_vaapi: add the fourcc of I420 format map.
Jun Zhao [Mon, 20 Nov 2017 00:36:45 +0000 (08:36 +0800)]
hwcontext_vaapi: add the fourcc of I420 format map.

VA-API 2.0 have enable the I420, so enable this map.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2 years agoavcodec: Implement mpeg4 nvdec hwaccel
Philip Langdale [Thu, 16 Nov 2017 04:59:29 +0000 (20:59 -0800)]
avcodec: Implement mpeg4 nvdec hwaccel

This was predictably nightmarish, given how ridiculous mpeg4 is.
I had to stare at the cuvid parser output for a long time to work
out what each field was supposed to be, and even then, I still don't
fully understand some of them. Particularly:

vop_coded: If I'm reading the decoder correctly, this flag will always
           be 1 as the decoder will not pass the hwaccel any frame
           where it is not 1.
divx_flags: There's obviously no documentation on what the possible
            flags are. I simply observed that this is '0' for a
            normal bitstream and '5' for packed b-frames.
gmc_enabled: I had a number of guesses as to what this mapped to.
             I picked the condition I did based on when the cuvid
             parser was setting flag.

Also note that as with the vdpau hwaccel, the decoder needs to
consume the entire frame and not the slice.

2 years agoavcodec: Implement mpeg1 nvdec hwaccel
Philip Langdale [Thu, 16 Nov 2017 15:38:10 +0000 (07:38 -0800)]
avcodec: Implement mpeg1 nvdec hwaccel

Once I remembered that there's a separate decoder type for mpeg1,
even though params struct is shared with mpeg2, everything worked.

2 years agoavcodec: Refactor common nvdec hwaccel logic
Philip Langdale [Sun, 19 Nov 2017 04:29:15 +0000 (20:29 -0800)]
avcodec: Refactor common nvdec hwaccel logic

The 'simple' hwaccels (not h.264 and hevc) all use the same bitstream
management and reference lookup logic so let's refactor all that into
common functions.

I verified that casting a signed int -1 to unsigned char produces 255
according to the C language specification.

2 years agoavfilter/avfiltergraph: pass correct audio/video flags
Paul B Mahol [Sun, 19 Nov 2017 14:34:52 +0000 (15:34 +0100)]
avfilter/avfiltergraph: pass correct audio/video flags

Previously video flags where set for audio option.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter/af_afftfilt: add missing error check
Paul B Mahol [Mon, 20 Nov 2017 12:42:59 +0000 (13:42 +0100)]
avfilter/af_afftfilt: add missing error check

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter/af_headphone: add missing error check
Paul B Mahol [Mon, 20 Nov 2017 12:37:24 +0000 (13:37 +0100)]
avfilter/af_headphone: add missing error check

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter/af_afir: add missing error check
Paul B Mahol [Mon, 20 Nov 2017 12:25:39 +0000 (13:25 +0100)]
avfilter/af_afir: add missing error check

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter/af_surround: add missing error check
Paul B Mahol [Mon, 20 Nov 2017 12:23:07 +0000 (13:23 +0100)]
avfilter/af_surround: add missing error check

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agolavf/mov: Do not mix variable declaration and code.
Carl Eugen Hoyos [Mon, 20 Nov 2017 12:48:28 +0000 (13:48 +0100)]
lavf/mov: Do not mix variable declaration and code.

Fixes a warning:
libavformat/mov.c:1195:5: warning: ISO C90 forbids mixed declarations and code

2 years agoavfilter/af_extrastereo: fix filtering when clipping is disabled
Paul B Mahol [Mon, 20 Nov 2017 09:58:35 +0000 (10:58 +0100)]
avfilter/af_extrastereo: fix filtering when clipping is disabled

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavformat/hlsenc: use FFABS to instead of abs
Steven Liu [Mon, 20 Nov 2017 02:51:57 +0000 (10:51 +0800)]
avformat/hlsenc: use FFABS to instead of abs

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2 years agoavformat/swfenc: use FFABS to instead of abs
Steven Liu [Mon, 20 Nov 2017 02:51:06 +0000 (10:51 +0800)]
avformat/swfenc: use FFABS to instead of abs

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2 years agoavformat/mxf: use FFABS to instead of abs
Steven Liu [Mon, 20 Nov 2017 02:50:30 +0000 (10:50 +0800)]
avformat/mxf: use FFABS to instead of abs

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2 years agoavformat/mp3dec: use FFABS to instead of abs
Steven Liu [Mon, 20 Nov 2017 02:49:42 +0000 (10:49 +0800)]
avformat/mp3dec: use FFABS to instead of abs

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2 years agotests/fate: addition of test case for hls variant stream creation with master playlist
Vishwanath Dixit [Mon, 20 Nov 2017 02:05:33 +0000 (10:05 +0800)]
tests/fate: addition of test case for hls variant stream creation with master playlist

Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
2 years agoavformat/hlsenc: creation of hls master playlist file
Vishwanath Dixit [Mon, 20 Nov 2017 02:04:34 +0000 (10:04 +0800)]
avformat/hlsenc: creation of hls master playlist file

Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
2 years agoavformat/hlsenc: creation of hls variant streams in a single hlsenc instance
Vishwanath Dixit [Mon, 20 Nov 2017 02:02:11 +0000 (10:02 +0800)]
avformat/hlsenc: creation of hls variant streams in a single hlsenc instance

Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
2 years agoavformat/movenc: write clap atom for uncompressed yuv in mov
Dave Rice [Sun, 19 Nov 2017 02:19:23 +0000 (21:19 -0500)]
avformat/movenc: write clap atom for uncompressed yuv in mov

fixes 6145

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/movenc: correct ImageDescription for uncompressed ycbcr
Dave Rice [Sun, 19 Nov 2017 02:19:17 +0000 (21:19 -0500)]
avformat/movenc: correct ImageDescription for uncompressed ycbcr

Per
https://developer.apple.com/library/content/technotes/tn2162/_index.html

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoffmpeg: add ui64 type to SpecifierOpt
pkviet [Sat, 18 Nov 2017 21:19:46 +0000 (22:19 +0100)]
ffmpeg: add ui64 type to SpecifierOpt

 Adds ui64 (uint64_t) as a possible type for SpecifierOpt. This enables
 use of uint64_t options with SpecifierOpt such as channel_layout
 when expressed as a 64 bit channel mask.

Signed-off-by: pkviet <pkv.stream@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec: remove unnecessary AVPacketSideDataType enum offset
James Almer [Mon, 20 Nov 2017 00:03:09 +0000 (21:03 -0300)]
avcodec: remove unnecessary AVPacketSideDataType enum offset

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agodoc/codecs.texi: Remove documentation of removed codec flags.
Carl Eugen Hoyos [Mon, 20 Nov 2017 00:09:08 +0000 (01:09 +0100)]
doc/codecs.texi: Remove documentation of removed codec flags.

The flags were removed in b79a7da3

2 years agoMerge commit '3152058bf1dca318898550efacf0286f4836cae6'
James Almer [Sun, 19 Nov 2017 21:26:45 +0000 (18:26 -0300)]
Merge commit '3152058bf1dca318898550efacf0286f4836cae6'

* commit '3152058bf1dca318898550efacf0286f4836cae6':
  libavcodec: Don't use dllexport, only dllimport when building DLLs

Merged-by: James Almer <jamrial@gmail.com>
2 years agoconfigure: fix module dependencies on zlib
James Almer [Sun, 19 Nov 2017 18:23:02 +0000 (15:23 -0300)]
configure: fix module dependencies on zlib

select should not be used with external libraries. It's mean to soft
enable internal modules/features.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter/af_surround: add some more layouts
Paul B Mahol [Sun, 19 Nov 2017 19:20:55 +0000 (20:20 +0100)]
avfilter/af_surround: add some more layouts

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter: fix indentation
Paul B Mahol [Sun, 19 Nov 2017 20:18:00 +0000 (21:18 +0100)]
avfilter: fix indentation

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agolibavcodec: Don't use dllexport, only dllimport when building DLLs
Martin Storsjö [Thu, 14 Sep 2017 05:33:05 +0000 (08:33 +0300)]
libavcodec: Don't use dllexport, only dllimport when building DLLs

The only purpose of dllexport (which is set while building the library
that exports the symbols) is to have the linker automatically
export such symbols into a DLL without using a def file - it doesn't
affect the generated code.

For both MSVC and mingw builds, this isn't essential since we override
what symbols to export via an autogenerated def file instead.

Update a comment in configure to refer to the right concept.

With lld, this avoids warnings about duplicate export directives,
when some symbols are requested to be exported both via dllexport
attributes and via the autogenerated def file.

This also reduces the number of lines of code marginally.

Signed-off-by: Martin Storsjö <martin@martin.st>
2 years agoavformat/subfile: allow to extract till EOF
Gyan Doshi [Wed, 15 Nov 2017 12:06:19 +0000 (17:36 +0530)]
avformat/subfile: allow to extract till EOF

Users can set end offset as 0 to extract till end of file.
Tested locally and documented.

2 years agolavfi/af_pan: fix sign handling in channel coefficient parser
Michael Roitzsch [Sat, 18 Nov 2017 12:33:08 +0000 (13:33 +0100)]
lavfi/af_pan: fix sign handling in channel coefficient parser

When a channel formula ends with a subtraction, the next formula will
otherwise have its first coefficient negated.

2 years agoconfigure: add audio_frame_queue dependency for aptx codec
James Darnley [Sun, 19 Nov 2017 13:54:34 +0000 (14:54 +0100)]
configure: add audio_frame_queue dependency for aptx codec

2 years agoavfilter: add acontrast filter
Paul B Mahol [Sat, 18 Nov 2017 09:28:27 +0000 (10:28 +0100)]
avfilter: add acontrast filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavformat/dashenc: fix min_seg_duration option size
James Cowgill [Sat, 18 Nov 2017 15:11:45 +0000 (15:11 +0000)]
avformat/dashenc: fix min_seg_duration option size

In the DASHContext structure, min_seg_duration is declared as an int,
but the AVOption list claimed it was an INT64. Change the option list
to use the correct size, which should fix some initialization errors
seen on big-endian platforms.

Signed-off-by: James Cowgill <jcowgill@debian.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoffmpeg: Allow "-to" on input files in addition to "-t"
Vitaly _Vi Shukela [Sat, 18 Nov 2017 07:36:51 +0000 (10:36 +0300)]
ffmpeg: Allow "-to" on input files in addition to "-t"

For some strange reason "-t" option was only implemented
for input files while both "-t" and "-to" were available
for use for output files. This made extracting a range from
input file inconvenient.

This patch enables -to option for input so one can do

    ffmpeg -ss 1:23:20 -to 1:27:22.3 -i myinput.mkv ...

Signed-off-by: Vitaly _Vi Shukela <vi0oss@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoffmpeg_filter: use nb_threads=1 on unused filtergraph
DHE [Fri, 17 Nov 2017 01:09:37 +0000 (20:09 -0500)]
ffmpeg_filter: use nb_threads=1 on unused filtergraph

Signed-off-by: DHE <git@dehacked.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat: remove unnecessary AVStreamParseType enum offset
James Almer [Sat, 18 Nov 2017 17:55:29 +0000 (14:55 -0300)]
avformat: remove unnecessary AVStreamParseType enum offset

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agolavf/tcp: Fix the type of the optlen argument to getsockopt().
Carl Eugen Hoyos [Sun, 12 Nov 2017 14:23:14 +0000 (15:23 +0100)]
lavf/tcp: Fix the type of the optlen argument to getsockopt().

Fixes a warning on aix:
libavformat/tcp.c:283:58: warning: passing argument 5 of 'getsockopt' from incompatible pointer type

2 years agoavcodec: Implement mpeg2 nvdec hwaccel
Philip Langdale [Thu, 16 Nov 2017 15:35:17 +0000 (07:35 -0800)]
avcodec: Implement mpeg2 nvdec hwaccel

This is mostly straight-forward. The weird part is that it should
just work for mpeg1, but I see corruption in my test cases, so I'm
going to try and fix that separately.

2 years agoavcodec: Fix reference data type for nvdec vc1 hwaccel
Philip Langdale [Thu, 16 Nov 2017 15:31:58 +0000 (07:31 -0800)]
avcodec: Fix reference data type for nvdec vc1 hwaccel

I took the reference lookup code from the vp9 hwaccel where the
type is unsigned char, but for vc1, the type is signed int.

This is particularly important because the value used when there's
no reference is different (255 vs -1).

It didn't seem to break anything, but for mpeg1/2/4, this mistake
caused decode errors.

2 years agoIgnore libavcodec/tests/mpeg12framerate, a test program
Jim DeLaHunt [Fri, 17 Nov 2017 09:45:27 +0000 (01:45 -0800)]
Ignore libavcodec/tests/mpeg12framerate, a test program

Add to libavcodec/tests/.gitignore an entry for test
program libavcodec/tests/mpeg12framerate . Other
similar test programs, e.g. jpeg2000dwt and dct, are
ignored in a similar way.

On initially checking out master, and doing "./configure"
and "make clean", "git status" reports no untracked
files. After running "make fate", "git status" reports
untracked file "libavcodec/tests/mpeg12framerate".

mpeg12framerate is a unit test program. It was apparently
introduced in commit
278c308ceae6b8d7bac1dfc24518821aae603988, on
Tue Sep 12 22:11:56 2017 +0100. It added a new function
ff_mpeg12_find_best_frame_rate() to
libavcodec/mpeg12framerate.c , and the code in
libavcodec/tests/mpeg12framerate.c to exercise that
function. This commit also added the new program to
the FATE suite, but it omitted a .gitignore entry.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavf/mov: don't read outside frag_index bounds
John Stebbins [Fri, 17 Nov 2017 16:21:02 +0000 (08:21 -0800)]
lavf/mov: don't read outside frag_index bounds

Potentially fixes:
https://bugs.chromium.org/p/chromium/issues/detail?id=786269#c1

In theory, the crash can be triggered by an invalid stream that has
either tfdt or trun outside of the moof

Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoUse ff_thread_once for fixed, float table init.
Dale Curtis [Fri, 17 Nov 2017 22:51:09 +0000 (14:51 -0800)]
Use ff_thread_once for fixed, float table init.

These tables are static so they should only be initialized once
instead of on every call to ff_mpadsp_init().

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoFix leak of frame_duration_buffer in mov_fix_index().
Dale Curtis [Fri, 17 Nov 2017 22:53:25 +0000 (14:53 -0800)]
Fix leak of frame_duration_buffer in mov_fix_index().

Should be unconditionally freed at the end of mov_fix_index() in
case it hasn't been used during the fix up.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Sasi Inguva <isasi-at-google.com@ffmpeg.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/mlpdsp: Fix undefined shift ff_mlp_pack_output()
Michael Niedermayer [Wed, 15 Nov 2017 02:38:37 +0000 (03:38 +0100)]
avcodec/mlpdsp: Fix undefined shift ff_mlp_pack_output()

Fixes: runtime error: left shift of negative value -7862264
Fixes: 4074/clusterfuzz-testcase-minimized-4516104123711488

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/zmbv: Check that the buffer is large enough for mvec
Michael Niedermayer [Wed, 15 Nov 2017 16:11:12 +0000 (17:11 +0100)]
avcodec/zmbv: Check that the buffer is large enough for mvec

Fixes: Timeout
Fixes: 4143/clusterfuzz-testcase-4736864637419520

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/dirac_dwt: Fix integer overflow in COMPOSE_DD137iL0()
Michael Niedermayer [Tue, 14 Nov 2017 02:40:07 +0000 (03:40 +0100)]
avcodec/dirac_dwt: Fix integer overflow in COMPOSE_DD137iL0()

Fixes: 4035/clusterfuzz-testcase-minimized-6479308925173760
Fixes: runtime error: signed integer overflow: 9 * 402653183 cannot be represented in type 'int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/wmv2dec: Check end of bitstream in parse_mb_skip() and ff_wmv2_decode_mb()
Michael Niedermayer [Sat, 16 Sep 2017 23:28:07 +0000 (01:28 +0200)]
avcodec/wmv2dec: Check end of bitstream in parse_mb_skip() and ff_wmv2_decode_mb()

Fixes: Timeout
Fixes: 3200/clusterfuzz-testcase-5750022136135680

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavc/dnxhddata: Improve help output, mention yuv444p10 and gbrp10.
Carl Eugen Hoyos [Tue, 14 Nov 2017 17:01:03 +0000 (18:01 +0100)]
lavc/dnxhddata: Improve help output, mention yuv444p10 and gbrp10.

Fixes ticket #6836.

2 years agoavcodec/nvenc: check pop_context return value
Timo Rothenpieler [Wed, 15 Nov 2017 17:33:31 +0000 (18:33 +0100)]
avcodec/nvenc: check pop_context return value

2 years agoavcodec/nvenc: fix double defined GUID on cygwin
Timo Rothenpieler [Wed, 15 Nov 2017 18:15:23 +0000 (19:15 +0100)]
avcodec/nvenc: fix double defined GUID on cygwin

2 years agohwcontext_d3d11va: add missing stdint.h include
Timo Rothenpieler [Wed, 15 Nov 2017 18:22:42 +0000 (19:22 +0100)]
hwcontext_d3d11va: add missing stdint.h include

This caused checkheaders to fail on cygwin on this file.

2 years agolibavcodec/h264_sei: Don't log random user data. This prevents terminal junk.
Kieran Kunhya [Fri, 5 May 2017 21:29:59 +0000 (14:29 -0700)]
libavcodec/h264_sei: Don't log random user data. This prevents terminal junk.

2 years agolavc/libvpxenc: add tune-content option
James Zern [Mon, 13 Nov 2017 23:19:07 +0000 (15:19 -0800)]
lavc/libvpxenc: add tune-content option

this matches the vpxenc parameter

Signed-off-by: James Zern <jzern@google.com>
2 years agoavcodec/snowdec: Check for remaining bitstream in decode_blocks()
Michael Niedermayer [Wed, 15 Nov 2017 20:17:16 +0000 (21:17 +0100)]
avcodec/snowdec: Check for remaining bitstream in decode_blocks()

Fixes: Timeout
Fixes: 3142/clusterfuzz-testcase-5007853163118592

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/snowdec: Check intra block dc differences.
Michael Niedermayer [Wed, 15 Nov 2017 20:17:15 +0000 (21:17 +0100)]
avcodec/snowdec: Check intra block dc differences.

Fixes: Timeout
Fixes: 3142/clusterfuzz-testcase-5007853163118592

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter: add multiband compand filter
Paul B Mahol [Sat, 13 May 2017 09:57:42 +0000 (11:57 +0200)]
avfilter: add multiband compand filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavformat/tcp: add option to enable TCP_NODELAY
Aman Gupta [Mon, 13 Nov 2017 20:20:18 +0000 (12:20 -0800)]
avformat/tcp: add option to enable TCP_NODELAY

This can reduce latency and increase throughput, particularly on high
latency networks.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Jeyapal, Karthick <kjeyapal@akamai.com>
2 years agolavf/mxf: Support 60fps output.
Carl Eugen Hoyos [Mon, 30 Oct 2017 23:19:38 +0000 (00:19 +0100)]
lavf/mxf: Support 60fps output.

2 years agolibavcodec/als: fix address sanitization error in decoder
Umair Khan [Mon, 13 Nov 2017 05:37:42 +0000 (11:07 +0530)]
libavcodec/als: fix address sanitization error in decoder

Signed-off-by: Umair Khan <omerjerk@gmail.com>
2 years agolibavcodec/als: remove check for predictor order of a block
Umair Khan [Mon, 13 Nov 2017 05:36:30 +0000 (11:06 +0530)]
libavcodec/als: remove check for predictor order of a block

Reverts commit 18f94df8, fixes ticket #5297.

Signed-off-by: Umair Khan <omerjerk@gmail.com>
2 years agoavformat/mov: Check size of STSC allocation
Fredrik Hubinette [Thu, 16 Nov 2017 01:24:30 +0000 (17:24 -0800)]
avformat/mov: Check size of STSC allocation

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavf/movenc: allow writing avc3 sample entry type
John Stebbins [Wed, 15 Nov 2017 17:17:39 +0000 (09:17 -0800)]
lavf/movenc: allow writing avc3 sample entry type

The avc3 sample entry type is useful for adaptive streaming.  It permits
parameter sets to be written inline in the video stream.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoconfigure: call flatten_extralibs in a subshell
Timo Rothenpieler [Mon, 13 Nov 2017 22:43:51 +0000 (23:43 +0100)]
configure: call flatten_extralibs in a subshell

By putting the call in a subshell, the problem of it spilling
cleanup-decision from a previous library to other libraries is avoided.

For example, it could have already cleaned up cuda_extralibs in a
previous library that depended on cuda. Then when it gets to avutil, it
will never pick up the dependency of avutil to cuda, which depends on
libdl, which in turn results in a missing -ldl extralib, resulting in
link failures in certain configurations.

2 years agoMerge commit 'bad7ce1d82f0b7da55086b8c6124eff0d35a1b1a'
James Almer [Thu, 16 Nov 2017 16:12:59 +0000 (13:12 -0300)]
Merge commit 'bad7ce1d82f0b7da55086b8c6124eff0d35a1b1a'

* commit 'bad7ce1d82f0b7da55086b8c6124eff0d35a1b1a':
  makedef: Pass EXTERN_PREFIX from configure to makedef

Merged-by: James Almer <jamrial@gmail.com>
2 years agoMerge commit 'd070b9b703a542429a13db9623109ae20474c775'
James Almer [Thu, 16 Nov 2017 16:11:52 +0000 (13:11 -0300)]
Merge commit 'd070b9b703a542429a13db9623109ae20474c775'

* commit 'd070b9b703a542429a13db9623109ae20474c775':
  configure: Coalesce some arch configuration and PIC handling

Merged-by: James Almer <jamrial@gmail.com>