Commit Graph

39065 Commits

Author SHA1 Message Date
Michael Niedermayer
e1de9eab3a Bump minor versions for branching 3.4
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-11 01:23:47 +02:00
Kaustubh Raste
ff53f4dc2d avcodec/mips: Improve avc uni copy mc msa functions
Load the specific bytes instead of MSA load.

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-10-10 23:58:41 +02:00
Kaustubh Raste
eadb911643 avcodec/mips: Improve hevc uni-w horiz 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-10-10 23:58:41 +02:00
Kaustubh Raste
662234a9a2 avcodec/mips: Improve avc put mc 21, 23 and 02 msa functions
Remove loops and unroll as block sizes are known.

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-10-10 23:58:41 +02:00
Kaustubh Raste
b59323cb72 avcodec/mips: Improve avc chroma hv 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-10-10 23:58:41 +02:00
Kaustubh Raste
af9433b1d6 avcodec/mips: Improve avc bi-weighted 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-10-10 23:58:41 +02:00
Kaustubh Raste
56822b074b avcodec/mips: preload data in hevc sao edge 135 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-10-10 23:58:41 +02:00
Michael Niedermayer
c20f4fcb74 avcodec/ffv1dec: Fix out of array read in slice counting
Fixes: test-201710.mp4

Found-by: 连一汉 <lianyihan@360.cn> and Zhibin Hu
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-10 23:58:41 +02:00
Michael Niedermayer
bdee75a4e7 avcodec/dirac_dwt: Fix integer overflow in COMPOSE_53iL0()
Fixes: runtime error: signed integer overflow: 2147483646 + 2 cannot be represented in type 'int'
Fixes: 3485/clusterfuzz-testcase-minimized-4940429332054016

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-10 23:58:40 +02:00
Michael Niedermayer
127a362630 avcodec/mpeg_er: Clear mcsel in mpeg_er_decode_mb()
Fixes out of array read
Should fix: 3516/clusterfuzz-testcase-minimized-4608518562775040 (not reprodoceable)

Found-by: Insu Yun, Georgia Tech.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-10 23:58:40 +02:00
Michael Niedermayer
e38f280fec avcodec/mpeg4videodec: Use 64 bit intermediates for sprite delta
Fixes: runtime error: signed integer overflow: -104713 * 65536 cannot be represented in type 'int'
Fixes: 3453/clusterfuzz-testcase-minimized-5555554657239040
Fixes: 3528/clusterfuzz-testcase-minimized-6283628420005888

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-10 23:58:40 +02:00
Jun Zhao
217a723b4e lavc/vaapi_decode: fix profile search when profile mismatch is allowed
When profile mismatch is allowed, use the highest supported profile for
VAAPI decoding.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-10-09 23:08:49 +01:00
Jun Zhao
71e2ec017a lavc: enable hwaccel_flags option
Enable per-stream hwaccel_flags.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-10-09 23:05:12 +01:00
bnnm
1954e625b1 avcodec/wmaprodec: support multichannel XMA stream configurations
Signed-off-by: bnnm <bananaman255@gmail.com>

Now accepts any combination of 1/2ch streams, described in the RIFF chunks/extradata
2017-10-09 17:06:19 +02:00
foo86
73789b85a7 avcodec/dca_core: always limit frame size to data size
Silences pointless error message when decoding DTS-in-WAV stream with
excessive frame size stored in header.
2017-10-09 16:53:23 +03:00
foo86
23990950e3 avcodec/dca_parser: revert to conservative sync distance estimation
Fixes regression introduced by commit a0349ae27c
when parsing 14-bit streams with excessive frame size stored in header.

Fixes ticket #6723.
2017-10-09 16:12:19 +03:00
Mark Thompson
e339411691 vaapi: Always free parameter buffers after vaEndPicture() with libva2
This is an ABI change in libva2: previously the Intel driver had this
behaviour and it was implemented as a driver quirk, but now it is part
of the specification so all drivers must do it.
2017-10-09 00:11:53 +01:00
Mark Thompson
bd211bb866 vaapi: Remove H.264 baseline profile
This has been deprecated in libva2 because hardware does not and will not
support it.  Therefore never consider it for decode, and for encode assume
the user meant constrained baseline profile instead.
2017-10-09 00:11:53 +01:00
Michael Bradshaw
41d6d62702 lavc: add support for OpenJPEG 2.3.0
Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
2017-10-08 08:13:02 -07:00
Jorge Ramirez-Ortiz
2a31ad7d60 avcodec/v4l2: fix single plane decoding 2017-10-06 23:36:21 +01:00
Kaustubh Raste
51ebce7d7d avcodec/mips: Cleanup unused 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-10-06 02:42:49 +02:00
Mark Thompson
e01a270762 lavc/v4l2: Fix printf format for int64_t 2017-10-05 08:58:36 +01:00
James Almer
18279738f9 x86/blockdsp: use three operand form for an instruction
Fixes assembling with old yasm.
2017-10-04 23:51:44 -03:00
Michael Niedermayer
26ea142658 avcodec/x86/lossless_videoencdsp: Fix warning: signed dword value exceeds bounds
Add () to regsize define

Suggested-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-05 01:22:44 +02:00
Michael Niedermayer
df62b70de8 avcodec/x86/lossless_videoencdsp: Fix handling of small widths
Fixes out of array access
Fixes: crash-huf.avi

Regression since: 6b41b44149

This could also be fixed by adding checks in the C code that calls the dsp

Found-by: Zhibin Hu and 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-05 01:22:44 +02:00
Jorge Ramirez-Ortiz
44188993a1 avcodec/v4l2: set sizeimage param for non-raw buffers [fixes #6716]
Some V4L2 drivers fail to allocate buffers when sizeimage is not set
to a max value. This is indeed the case for s5p-mfc [1]

Most drivers should be able to calculate this value from the frame
dimensions and format - or at least have their own default.

However since this work around should not impact those drivers doing
the "right thing" this commit just provides such a default.

The calculations were extracted from the v4l2 driver used to develop
the ffmpeg v4l2_m2m support [2]. See venc.c and vdec.c

[1] linux.git/drivers/media/platform/s5p-mfc
[2] linux.git/drivers/media/platform/qcom/venus/
2017-10-04 23:14:37 +01:00
Mark Thompson
8da5af2584 lavc/v4l2: Mark static const tables as such 2017-10-04 23:14:37 +01:00
Mark Thompson
a0d076f3ef lavc/v4l2: Remove use of lfind()
This is not present in older bionic and therefore fails to build there,
and the code is much simpler without it anyway.
2017-10-04 23:14:37 +01:00
Michael Niedermayer
d662143f06 avcodec/dxv: Check for end of input in dxv_decompress_dxt5()
Fixes: Timeout
Fixes: 3291/clusterfuzz-testcase-4630024655208448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-04 02:16:11 +02:00
Michael Niedermayer
44874b4f5e avcodec/truemotion2: Fix integer overflows in tm2_high_chroma()
Fixes: runtime error: signed integer overflow: -1408475220 + -1408475220 cannot be represented in type 'int'
Fixes: 3336/clusterfuzz-testcase-minimized-5656839179993088

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-04 02:16:11 +02:00
Michael Niedermayer
dcf9bae4a9 avcodec/aacdec_template: Clear tns present flag on error
Fixes: 3444/clusterfuzz-testcase-minimized-6270352105668608

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-04 02:16:11 +02:00
Zhong Li
fd7cb86468 mpegdec: fix redundant dummy frames issue of interlaced clips
It is to fix https://trac.ffmpeg.org/ticket/6677. Actucally it is a
regression of commit 99e07a4453 which
always inserts a dummy frame when decode the first key field picture.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-04 02:16:11 +02:00
James Almer
5678b2a820 Merge commit '984736dd9e5b50987a5910e22495304e4a6d975c'
* commit '984736dd9e5b50987a5910e22495304e4a6d975c':
  lavc: make sure not to return EAGAIN from codecs

Merged-by: James Almer <jamrial@gmail.com>
2017-10-03 20:52:44 -03:00
James Almer
cb222d7322 Merge commit 'b2788fe9347c02b1355574f3d28d60bfe1250ea7'
* commit 'b2788fe9347c02b1355574f3d28d60bfe1250ea7':
  svq3: fix the slice size check

Merged-by: James Almer <jamrial@gmail.com>
2017-10-03 20:28:51 -03:00
James Almer
73c85d3af2 Merge commit '248dc5c1646dcdd96fe79761105c4ae889e711fd'
* commit '248dc5c1646dcdd96fe79761105c4ae889e711fd':
  h264dec: fix dropped initial SEI recovery point

Merged-by: James Almer <jamrial@gmail.com>
2017-10-03 20:09:46 -03:00
Martin Vignali
cbbec68847 libavcodec/blockdsp : add AVX version
Also modify the required alignment, to 32 instead of 16
for several codecs

Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-03 19:47:37 -03:00
Michael Niedermayer
4ee77cefae avcodec/proresdec2: Use LAST_SKIP_BITS where possible
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-03 20:34:35 +02:00
Michael Niedermayer
c37138e01a avcodec/proresdec2: SKIP_BITS() does not work with len=32
Fixes: invalid shift
Fixes: 3482/clusterfuzz-testcase-minimized-5446915875405824

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-03 20:34:35 +02:00
Michael Niedermayer
fbdab6eca7 avcodec/hevcdsp_template: Fix undefined shift
Fixes: runtime error: left shift of negative value -255
Fixes: 3373/clusterfuzz-testcase-minimized-5604083912146944

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-03 20:34:35 +02:00
James Almer
87e625c263 avcodec/encode: do proper cleanup on failure
Fixes the last remaining memleaks introduced by a22c6a4796.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-03 14:00:27 -03:00
James Almer
712ee85816 avcodec/encode: free non-referenced packets' side data in the old encode API functions
Fixes memleaks introduced by a22c6a4796.
2017-10-02 18:58:53 -03:00
James Almer
a22c6a4796 avcodec/encode: remove usage of av_dup_packet()
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-02 11:14:57 -03:00
James Almer
cf3d2d52b5 avcodec/avpacket: deprecate av_copy_packet_side_data()
It leaks memory and destroys the dst packet in case of failure, and it
ultimately duplicates functionality already existing in the saner
av_packet_copy_props().

Reviewed-by: wm4
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-01 19:19:22 -03:00
Martin Vignali
ac5908b13f libavcodec/exr : add x86 SIMD for predictor
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-01 17:35:30 -03:00
Michael Niedermayer
b81b8a76b5 avcodec/v4l2_context: Reduce spelling variations
Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-01 02:37:57 +02:00
Michael Niedermayer
4bb8013335 avcodec/v4l2_buffers: More clear return code documentation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-01 02:35:15 +02:00
Michael Niedermayer
64e034da95 avcodec/jpeg2000: Check that codsty->log2_prec_widths/heights has been initialized
Fixes: OOM
Fixes: 2225/clusterfuzz-testcase-minimized-5505632079708160

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-30 23:35:45 +02:00
Brian Matherly
876dada0b5 avcodec/hevc_sei: Support HEVC paired fields.
Correctly set the interlaced_frame and top_field_first fields when pic_struct
indicates paired fields.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-30 03:44:59 +02:00
Aman Gupta
3d4f8b9184 avcodec/videotoolbox: add hevc support
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-09-28 16:47:47 -07:00
Aman Gupta
c32077c0ee avcodec/hevc_ps: extract SPS fields required for hvcC construction
Signed-off-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-28 16:47:46 -07:00