Commit Graph

89193 Commits

Author SHA1 Message Date
Mark Thompson a050f56c09 lavu: Add OpenCL hardware pixfmt 2017-11-22 23:01:29 +00:00
Jim DeLaHunt 152902f379 doc: Add FAQs about running in background (rev 2)
Add two FAQs about running FFmpeg in the background.
The first explains the use of the -nostdin option in
a straightforward way. Text revised based on review.

The second FAQ starts from a confusing error message,
and leads to the solution, use of the -nostdin option.
The purpose of the second FAQ is to attract web searches
from people having the problem, and offer them a solution.

Add an anchor to the Main Options section of the ffmpeg
documentation, so that the FAQs can link directly there.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-22 18:13:49 +01:00
Dale Curtis 6db511a783 avformat/mov: Increment stsd_count while processing stsd data; avoids leaks.
In the event of ff_mov_read_stsd_entries() failure, sc->stsd_count
is not updated, even if the function allocates extradata memory.
Instead update the sc->stsd_count as entries are parsed so that
mov_read_close() can do the right thing.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-22 13:06:50 +01:00
Michael Niedermayer 3d5822d9cf avcodec/jpeg2000: Dynamically allocate codeblock data
Fixes: OOM
Fixes: 3541/clusterfuzz-testcase-minimized-6469958596820992

Adds support for decoding codeblock data larger than 8kb
Reduces decoder memory consumption

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-22 13:06:50 +01:00
Karthick J e8e9306b4f avdevice/decklink_dec: autodetect the video input format
When -format_code is not specified autodetection will happen.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-11-22 00:08:35 +01:00
Karthick J aa7b0329ff avdevice/decklink: refactor ff_decklink_set_format function
This is done to enable input format autodetection in decklink_dec.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-11-21 22:55:49 +01:00
Michael Niedermayer 0e7865ce41 avcodec/mpeg4videodec: Check also for negative versions in the validity check
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-21 21:24:08 +01:00
Paul B Mahol 000836c2a9 avfilter/af_asetnsamples: add missing error check
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-21 18:29:39 +01:00
James Almer bea8eeaa2c checkasm/utvideodsp: zero initialize the entire buffer
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-21 11:24:38 -03:00
James Almer 9a05c873cf checkasm/utvideodsp: fix mixed declarations and code
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-21 11:13:24 -03:00
James Almer beb63baa69 x86/utvideodsp: reuse shared constants
Remove the broadcast instructions as well now that they are wide
enough.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-21 10:57:14 -03:00
James Almer ebf352116b x86/constants: make pb_80 32 byte wide
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-21 10:57:03 -03:00
Paul B Mahol afd2bf54c3 avfilter/avf_avectorscope: add swap and mirror options
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-21 12:27:03 +01:00
Martin Vignali 37810bee78 fate/hapdec : add test for hapqa decoding 2017-11-21 12:05:21 +01:00
Martin Vignali 2053832d1c avcodec/hapdec : add support for hapqa decoding 2017-11-21 12:05:16 +01:00
Martin Vignali fca8919961 avcodec/hapdec : indent after previous commit 2017-11-21 12:05:10 +01:00
Martin Vignali 518b9ee3d1 avcodec/hapdec : reorganize code before adding multi-texture decoding 2017-11-21 12:05:06 +01:00
Martin Vignali ba98f8463f avcodec/huffyuvdspenc : add diff_int16 AVX2 func 2017-11-21 09:42:08 +01:00
Martin Vignali d189a426fa avcodec/huffyuvdspenc : reorganize diff_int16 2017-11-21 09:42:03 +01:00
Martin Vignali e641c94190 avcodec/huffyuvdsp : add add_int16 AVX2 func 2017-11-21 09:41:58 +01:00
Martin Vignali 6955e8842e avcodec/huffyuvdsp : reorganize add_int16 asm 2017-11-21 09:41:52 +01:00
Martin Vignali 7f9b67bcb6 avcodec/huffyuvdsp(enc) : move duplicate macro to a template file 2017-11-21 09:41:46 +01:00
Martin Vignali 4a6aa6d1b2 checkasm : add test for huffyuvdsp add_int16 2017-11-21 09:41:42 +01:00
Martin Vignali caf51a573d avcodec/x86/utvideodsp.asm : cosmetic
better func separator
and add comment for the restore rgb planes10 declaration
2017-11-21 09:00:47 +01:00
Martin Vignali b5ebe38443 avcodec/utvideodsp : add avx2 version for the dsp 2017-11-21 09:00:42 +01:00
Martin Vignali 48b7c45b0c avcodec/x86/utvideodsp : make macro for func 2017-11-21 09:00:38 +01:00
Martin Vignali 6a7eb65e1b checkasm : add utvideodsp test 2017-11-21 09:00:27 +01:00
Jun Zhao a5870cb37f 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>
2017-11-21 03:13:03 +01:00
Karthick J d24e08e978 avformat/dashenc: Added configuration to override HTTP User-Agent
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-21 03:13:03 +01:00
Jacob Trimble 2d9cf3bf16 avformat/mov: Propagate errors in mov_switch_root.
Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-21 03:13:03 +01:00
Dale Curtis bce8fc0754 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>
2017-11-21 03:13:03 +01:00
Dale Curtis 7010dd98b5 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>
2017-11-21 03:13:03 +01:00
James Zern 753074721b libvpxenc: remove pre-1.4.0 checks
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Zern <jzern@google.com>
2017-11-20 16:02:55 -08:00
James Zern e60dbe421c libvpxdec: remove pre-1.4.0 checks
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Zern <jzern@google.com>
2017-11-20 16:02:50 -08:00
James Zern e54061ae6a libvpx: remove pre-1.4.0 checks
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Zern <jzern@google.com>
2017-11-20 16:02:44 -08:00
James Zern b765a04550 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>
2017-11-20 16:02:21 -08:00
James Almer aea0f06db7 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>
2017-11-20 18:33:58 -03:00
James Almer 501435e5e6 checkasm/jpeg2000dsp: add test for ict_float
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-20 18:33:57 -03:00
James Almer 20a93ea8d4 checkasm/jpeg2000dsp: refactor rct_int test
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-20 18:33:57 -03:00
Marton Balint ca940ed2d5 avformat/avio: remove must_flush from AVIOContext
It is unused.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-11-20 21:41:38 +01:00
Michael Niedermayer 7d88586e47 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>
2017-11-20 21:29:00 +01:00
Aman Gupta 259dc4e013 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>
2017-11-20 10:23:43 -08:00
Steven Liu 9302d77525 Revert "tests/fate: addition of test case for hls variant stream creation with master playlist"
This reverts commit 218ce1f623.
2017-11-21 00:22:25 +08:00
Mark Thompson 1dc483a6f2 compat/cuda: Pass a logging context to load functions
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-11-20 15:47:05 +00:00
Zhong Li f7d77b4112 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>
2017-11-20 15:47:05 +00:00
Zhong Li 81c615f0fe 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>
2017-11-20 15:47:05 +00:00
Zhong Li 0f0b2ece38 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>
2017-11-20 15:45:01 +00:00
Jun Zhao 3db5961727 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>
2017-11-20 15:42:50 +00:00
Philip Langdale 6b77a10e43 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.
2017-11-20 07:21:41 -08:00
Philip Langdale 8bca292c30 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.
2017-11-20 07:03:26 -08:00