Commit Graph

89177 Commits

Author SHA1 Message Date
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
Philip Langdale 4c7b023d56 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.
2017-11-20 07:03:26 -08:00
Paul B Mahol 16d67fabb1 avfilter/avfiltergraph: pass correct audio/video flags
Previously video flags where set for audio option.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-20 13:58:50 +01:00
Paul B Mahol 5c7c0c5b58 avfilter/af_afftfilt: add missing error check
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-20 13:54:04 +01:00
Paul B Mahol 4073046089 avfilter/af_headphone: add missing error check
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-20 13:54:04 +01:00
Paul B Mahol d1b284119b avfilter/af_afir: add missing error check
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-20 13:54:04 +01:00
Paul B Mahol 200f497997 avfilter/af_surround: add missing error check
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-20 13:54:04 +01:00
Carl Eugen Hoyos 0f75d77a16 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
2017-11-20 13:48:28 +01:00
Paul B Mahol 185af4ccb1 avfilter/af_extrastereo: fix filtering when clipping is disabled
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-20 10:58:35 +01:00
Steven Liu 25aff9d820 avformat/hlsenc: use FFABS to instead of abs
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-11-20 10:51:57 +08:00
Steven Liu 462a14b1e9 avformat/swfenc: use FFABS to instead of abs
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-11-20 10:51:06 +08:00
Steven Liu cb259467d1 avformat/mxf: use FFABS to instead of abs
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-11-20 10:50:30 +08:00
Steven Liu a30085f570 avformat/mp3dec: use FFABS to instead of abs
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-11-20 10:49:42 +08:00
Vishwanath Dixit 218ce1f623 tests/fate: addition of test case for hls variant stream creation with master playlist
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
2017-11-20 10:05:33 +08:00
Vishwanath Dixit 77ab1d7bae avformat/hlsenc: creation of hls master playlist file
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
2017-11-20 10:04:34 +08:00
Vishwanath Dixit 92a32d0747 avformat/hlsenc: creation of hls variant streams in a single hlsenc instance
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
2017-11-20 10:02:11 +08:00
Dave Rice 8f4702a93f avformat/movenc: write clap atom for uncompressed yuv in mov
fixes 6145

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-20 02:40:45 +01:00