1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

86529 Commits

Author SHA1 Message Date
James Almer
37388b119c checkasm: add a checkasm_checked_call function that doesn't issue emms
Meant for DSP functions returning a float or double, as they'd fail if emms
is called after every run on x86_32.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-14 19:18:56 -03:00
Michael Niedermayer
12245ab1f6 avcodec/mpeg4videodec: Check sprite delta upshift against overflowing.
Fixes: runtime error: signed integer overflow: -268386304 * 16 cannot be represented in type 'int'
Fixes: 2204/clusterfuzz-testcase-minimized-5616756909408256

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-15 00:16:20 +02:00
Michael Niedermayer
0a87be404a avcodec/mpeg4videodec: Fix integer overflow in num_sprite_warping_points=2 case
Fixes: runtime error: signed integer overflow: 131072 + 2147352576 cannot be represented in type 'int'
Fixes: 2192/clusterfuzz-testcase-minimized-5370387988742144

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-15 00:16:20 +02:00
Michael Niedermayer
900fe8ee5d avcodec/dnxhdenc: Assert that frame size is not assigned an error code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-15 00:16:20 +02:00
Mark Thompson
88a2e4504d hevc: Fix scaling list prediction delta for the 32x32 inter matrix
Fixes ticket #6356.
2017-06-14 23:08:26 +01:00
Mark Thompson
5de38188f8 doc: Document hwupload, hwdownload and hwmap filters
(cherry picked from commit 66aa9b94da)
2017-06-14 22:27:34 +01:00
Mark Thompson
d81be0a60a vf_hwmap: Add reverse mapping for hardware frames
This is something of a hack.  It allocates a new hwframe context for
the target format, then maps it back to the source link and overwrites
the input link hw_frames_ctx so that the previous filter will receive
the frames we want from ff_get_video_buffer().  It may fail if
the previous filter imposes any additional constraints on the frames
it wants to use as output.

(cherry picked from commit 81a4cb8e58)
2017-06-14 22:27:34 +01:00
Mark Thompson
b2ef1f42ba vf_hwmap: Add device derivation
Also refactor a little and improve error messages to make failure
cases easier to understand.

(cherry picked from commit 38cb05f1c8)
2017-06-14 22:27:34 +01:00
Mark Thompson
d59c6a3aeb hwcontext: Improve allocation in derived contexts
Use the flags argument of av_hwframe_ctx_create_derived() to pass the
mapping flags which will be used on allocation.  Also, set the format
and hardware context on the allocated frame automatically - the user
should not be required to do this themselves.

(cherry picked from commit c5714b51aa)
2017-06-14 22:27:32 +01:00
Mark Thompson
a97fb14418 hwcontext_qsv: Implement mapping frames to the child device type
(cherry picked from commit e1c5d56b18)
2017-06-14 22:27:07 +01:00
Mark Thompson
f82ace71c0 hwcontext_qsv: Implement mapping frames from the child device type
Factorises out existing surface initialisation code to reuse.

(cherry picked from commit eaa5e07104)
2017-06-14 22:27:07 +01:00
Mark Thompson
ec3dbeae81 hwcontext: Add frame context mapping for nontrivial contexts
Some frames contexts are not usable without additional format-specific
state in hwctx.  This change adds new functions frames_derive_from and
frames_derive_to to initialise this state appropriately when deriving
a frames context which will require it to be set.

(cherry picked from commit 27978155bc)
2017-06-14 22:27:07 +01:00
Mark Thompson
045ff8d30a hwcontext_qsv: Support derivation from child devices
(cherry picked from commit aa51bb3d27)
2017-06-14 22:27:07 +01:00
Mark Thompson
7ce47090ce ffmpeg: Support setting the hardware device to use when filtering
This only supports one device globally, but more can be used by
passing them with input streams in hw_frames_ctx or by deriving new
devices inside a filter graph with hwmap.

(cherry picked from commit e669db7610)
2017-06-14 22:27:07 +01:00
Mark Thompson
3882063174 vaapi: Add external control of allow-profile-mismatch
Uses the just-added ALLOW_PROFILE_MISMATCH flag.

(cherry picked from commit 7acb90333a)
2017-06-14 22:27:06 +01:00
Mark Thompson
49ae8a5e87 lavc: Add flag to allow profile mismatch with hardware decoding
(cherry picked from commit 64a5260c69)
2017-06-14 22:27:04 +01:00
Mark Thompson
b658b5399e vaapi_encode: Use gop_size consistently in RC parameters
The non-H.26[45] codecs already use this form.  Since we don't
currently generate I frames for codecs which support them separately
to IDR, the p_per_i variable is set to infinity by default so that it
doesn't interfere with any other calculation.  (All the code for I
frames still exists, and it works for H.264 if set manually.)

(cherry picked from commit 6af014f402)
2017-06-14 22:26:32 +01:00
Mark Thompson
28aedeed19 qsvenc: Allow use of hw_device_ctx to make the internal session
(cherry picked from commit 3d197514e6)
2017-06-14 22:26:32 +01:00
Mark Thompson
8aa3c2df1a qsvdec: Allow use of hw_device_ctx to make the internal session
(cherry picked from commit 8848ba0bd6)
2017-06-14 22:26:32 +01:00
Mark Thompson
91c3b50d74 qsv: Add ability to create a session from a device
(cherry picked from commit 4936a48b1e)
2017-06-14 22:26:32 +01:00
Mark Thompson
bff7bec1d7 vf_deinterlace_vaapi: Add support for field rate output
In order to work correctly with the i965 driver, this also fixes the
direction of forward/backward references - forward references are
intended to be those from the past to the current frame, not from the
current frame to the future.

(cherry picked from commit 9aa251c98c)
2017-06-14 22:26:32 +01:00
Mark Thompson
527a1e2131 ffmpeg: Document the -init_hw_device option
(cherry picked from commit 303fadf596)
2017-06-14 22:26:32 +01:00
Mark Thompson
e462ace84b ffmpeg: Enable generic hwaccel support for VDPAU
(cherry picked from commit aa6b2e081c)
2017-06-14 22:26:32 +01:00
Mark Thompson
be51073352 ffmpeg: Enable generic hwaccel support for VAAPI
(cherry picked from commit 62a1ef9f26)
2017-06-14 22:26:32 +01:00
Mark Thompson
06043cc0bc ffmpeg: Generic device setup
Not yet enabled for any hwaccels.

(cherry picked from commit d2e6dd32a4)
(cherry picked from commit 9203aac228)
2017-06-14 22:26:32 +01:00
Mark Thompson
0b1794a43e hwcontext: Make it easier to work with device types
Adds functions to convert to/from strings and a function to iterate
over all supported device types.  Also adds a new invalid type
AV_HWDEVICE_TYPE_NONE, which acts as a sentinel value.

(cherry picked from commit b7487f4f3c)
2017-06-14 22:26:29 +01:00
Mark Thompson
b22172f6f3 hwcontext: Add device derivation
Creates a new device context from another of a different type which
refers to the same underlying hardware.

(cherry picked from commit b266ad56fe)
2017-06-14 22:25:57 +01:00
Mark Thompson
92bd089745 vaapi_encode: Discard output buffer if picture submission fails
Previously this was leaking, though it actually hit an assert making
sure that the buffer had already been cleared when freeing the picture.

(cherry picked from commit 17aeee5832)
2017-06-14 22:23:43 +01:00
Mark Thompson
f2e4fb61af hwcontext_vaapi: Try to support the VDPAU wrapper
The driver is somewhat bitrotten (not updated for years) but is still
usable for decoding with this change.  To support it, this adds a new
driver quirk to indicate no support at all for surface attributes.

Based on a patch by wm4 <nfxjfg@googlemail.com>.

(cherry picked from commit e791b915c7)
2017-06-14 22:23:43 +01:00
Matthieu Bouron
204008354f lavc/aarch64/simple_idct: fix build with Xcode 7.2 2017-06-14 23:20:58 +02:00
Ronald S. Bultje
d35ff98e27 vp9: fix overwrite in ff_vp9_ipred_dr_16x16_16_avx2.
Fixes trac issue 6459.
2017-06-14 11:37:38 -04:00
Timo Rothenpieler
feb13aed79 avfilter/vf_signature: fix memory leaks in error cases
Fixes CIDs 1403234 and 1403235
2017-06-13 19:49:39 +02:00
Timo Rothenpieler
a5b5ce2658 avformat/pcmdec: fix memory leak
Fixes CID 1396267
2017-06-13 19:49:06 +02:00
Timo Rothenpieler
4b2a2969f3 avformat/librtmp: check return value of setsockopt
Fixes CID 1396837
2017-06-13 19:48:08 +02:00
Timo Rothenpieler
0fbc9bbbbb avfilter/vf_scale_npp: fix out-of-bounds reads
Fixes CIDs 1396414 and 1396415
2017-06-13 19:47:44 +02:00
Timo Rothenpieler
21583e936a avfilter/unsharp: fix uninitialized pointer read
Fixes CID 1396855
2017-06-13 19:47:19 +02:00
Matthieu Bouron
8aa60606fb lavc/aarch64/simple_idct: fix idct_col4_top coefficient
Fixes regression introduced by 5d0b8b1ae3.
2017-06-13 17:46:55 +02:00
Michael Niedermayer
4cc2a357f5 avcodec/aacsbr_fixed: Fix signed integer overflow in sbr_hf_inverse_filter()
Fixes: runtime error: signed integer overflow: 2147483584 + 128 cannot be represented in type 'int'
Fixes: 2164/clusterfuzz-testcase-minimized-4715936172998656

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-13 17:39:13 +02:00
Michael Niedermayer
d1992448d3 avcodec/aacsbr_fixed: Check shift in sbr_hf_assemble()
Fixes: runtime error: shift exponent -10 is negative

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-13 17:39:13 +02:00
Michael Niedermayer
d549f026d8 avcodec/sbrdsp_fixed: Return an error from sbr_hf_apply_noise() if operations are impossible
Fixes: 1775/clusterfuzz-testcase-minimized-5330288148217856

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-13 17:39:13 +02:00
Paul B Mahol
f85cad799b avfilter: properly set SAR for A->V filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-13 15:10:58 +02:00
Matthieu Bouron
3839580b71 lavc/mediacodecdec: switch to the new generic filtering mechanism 2017-06-13 14:33:54 +02:00
Michael Niedermayer
4f9e958b04 avcodec/put_bits: Implement put_bits32() in a single pass instead of 2 passes writing 16bits each
820 cpu cycles -> 660 cpu cycles for 100 put_bits32()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-13 04:17:13 +02:00
Michael Niedermayer
db93fd74e4 avcodec/golomb: Assert that the input is not too large in set_ue_golomb()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-13 04:17:13 +02:00
Paul B Mahol
6e09e12641 tools/sofa2wavs: add license header
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-12 22:14:30 +02:00
Ilia Valiakhmetov
81fc617c12 avcodec/vp9: ipred_dr_16x16_16 avx2 implementation
Signed-off-by: Ilia Valiakhmetov <zakne0ne@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-06-12 12:40:58 -04:00
Paul B Mahol
1a30bf60be tools: add sofa2wavs
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-12 18:08:52 +02:00
Paul B Mahol
d4d1fc823f avfilter: add native headphone spatialization filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-12 18:08:52 +02:00
Henrik Gramner
aad1b6786e x86inc: Add some additional cpuflag relations
Simplifies writing assembly code that depends on available instructions.

LZCNT implies SSE2
BMI1 implies AVX+LZCNT
AVX2 implies BMI2
2017-06-12 11:41:25 +02:00
Michael Niedermayer
f8593c2f49 avcodec/libvpxdec: Check that display dimensions fit in the storage dimensions
Fixes assertion failure
Fixes: 2112/clusterfuzz-testcase-minimized-4526878557732864

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-11 22:41:26 +02:00