Limin Wang [Thu, 29 Aug 2019 08:44:01 +0000 (16:44 +0800)]
avformat/mxfenc: fix warning: unused function 'klv_ber_length' [-Wunused-function]
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Guo, Yejun [Mon, 2 Sep 2019 04:35:58 +0000 (12:35 +0800)]
libavfilter/dnn: add header into native model file
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
James Almer [Tue, 3 Sep 2019 21:45:04 +0000 (18:45 -0300)]
avformat/matroskadec: use av_fast_realloc to reallocate ebml list arrays
Speeds up the process considerably.
Fixes ticket #8109.
Suggested-by: nevcairiel
Suggested-by: cehoyos
Signed-off-by: James Almer <jamrial@gmail.com>
James Almer [Tue, 3 Sep 2019 21:52:51 +0000 (18:52 -0300)]
avformat/matroskadec: use proper types for some EbmlSyntax fields
Signed-off-by: James Almer <jamrial@gmail.com>
James Almer [Wed, 4 Sep 2019 02:54:19 +0000 (23:54 -0300)]
avcodec/nuv: prevent frame copying when outputting duplicate frames
Signed-off-by: James Almer <jamrial@gmail.com>
James Almer [Wed, 4 Sep 2019 02:53:46 +0000 (23:53 -0300)]
avcodec/wcmv: prevent frame copying when outputting duplicate frames
Signed-off-by: James Almer <jamrial@gmail.com>
James Almer [Wed, 4 Sep 2019 02:49:00 +0000 (23:49 -0300)]
Revert "avcodec/wcmv: Avoid copying frames if they are unchanged"
This reverts commit
976dae8b32f48d17cccfd6b19d2beb01770dfa7c.
An alternative approach to reduce frame copying will follow.
James Almer [Thu, 29 Aug 2019 22:24:10 +0000 (19:24 -0300)]
avcodec/wcmv: use ff_reget_buffer()
Signed-off-by: James Almer <jamrial@gmail.com>
James Almer [Fri, 30 Aug 2019 14:37:25 +0000 (11:37 -0300)]
avcodec/decode: add a flags parameter to ff_reget_buffer()
Some decoders may not need a writable buffer in some specific cases, but only
a reference to the existing buffer with updated frame properties instead, for
the purpose of returning duplicate frames. For this, the
FF_REGET_BUFFER_FLAG_READONLY flag is added, which will prevent potential
allocations and buffer copies when they are not needed.
Signed-off-by: James Almer <jamrial@gmail.com>
Anthony Delannoy [Tue, 3 Sep 2019 15:54:24 +0000 (17:54 +0200)]
avformat/mpegts: Check if ready on SCTE reception
On some DVB stream SCTE-35 data packet are available before the end of
MpegTSContext initialization. We have to check if it is the case to
avoid a SEGFAULT.
Signed-off-by: Marton Balint <cus@passwd.hu>
Aman Gupta [Mon, 2 Sep 2019 20:04:42 +0000 (21:04 +0100)]
configure: ensure --enable-omx-rpi uses rpi-specific IL headers
When compiling natively on an RPI where libomxil-bellagio-dev
was also installed, `check_headers OMX_Core.h` succeeded and
the -isystem compiler flag was never added to the build.
For non-native builds, the error message now mentions the
raspberrypi/firmware repository where the RPI specific
headers are available.
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Wed, 28 Aug 2019 19:27:20 +0000 (12:27 -0700)]
avcodec/v4l2_m2m: fix minor indentation issue
Aman Gupta [Fri, 23 Aug 2019 19:31:24 +0000 (12:31 -0700)]
avcodec/v4l2_m2m: use log_ctx variable consistently
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Thu, 22 Aug 2019 18:03:31 +0000 (11:03 -0700)]
avcodec/v4l2_m2m: log planar mode used by driver
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Wed, 28 Aug 2019 23:42:46 +0000 (16:42 -0700)]
avcodec/v4l2_context: use EAGAIN to signal when input buffers are unavailable
ENOMEM indicates an allocation failure, and there are no allocations
happening here. The buffers are pre-allocated and there are simply
none available at this time.
Signed-off-by: Aman Gupta <aman@tmm1.net>
Jorge Ramirez-Ortiz [Sun, 6 May 2018 17:56:30 +0000 (19:56 +0200)]
avcodec/v4l2m2m: fix error handling during buffer init
Signed-off-by: Jorge Ramirez-Ortiz <jramirez@baylibre.com>
Signed-off-by: Aman Gupta <aman@tmm1.net>
Lukas Rusak [Mon, 8 Jan 2018 23:27:37 +0000 (15:27 -0800)]
avcodec/v4l2_buffers: return int64_t in v4l2_get_pts
v4l2_pts is type int64_t we should return that instead of uint64_t
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Mon, 26 Aug 2019 22:17:43 +0000 (15:17 -0700)]
avcodec/v4l2_context: return {decoder,encoder}_cmd errors
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Fri, 23 Aug 2019 20:39:32 +0000 (13:39 -0700)]
avcodec/v4l2_m2m_enc: fix typo in log message
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Thu, 22 Aug 2019 23:00:37 +0000 (16:00 -0700)]
avcodec/v4l2_m2m_enc: log errno on v4l2_set_ext_ctrl failures
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Thu, 22 Aug 2019 19:42:34 +0000 (12:42 -0700)]
avcodec/v4l2_buffers: fix minor typos and whitespace
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Thu, 22 Aug 2019 19:20:56 +0000 (12:20 -0700)]
avcodec/v4l2_context: log VIDIOC_REQBUFS failures
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Thu, 22 Aug 2019 19:20:40 +0000 (12:20 -0700)]
avcodec/v4l2_m2m: remove trailing whitespace in output identifier
Signed-off-by: Aman Gupta <aman@tmm1.net>
Aman Gupta [Thu, 22 Aug 2019 19:06:24 +0000 (12:06 -0700)]
avcodec/v4l2_m2m: log requested pixel formats
Signed-off-by: Aman Gupta <aman@tmm1.net>
Andriy Gelman [Tue, 30 Jul 2019 18:39:32 +0000 (14:39 -0400)]
avformat: Add ZeroMQ as a protocol
When ffmpeg was streaming, multiple clients were only supported by using a
multicast destination address. An alternative was to stream to a server which
re-distributes the content. This commit adds ZeroMQ as a protocol, which allows
multiple clients to connect to a single ffmpeg instance.
Signed-off-by: Marton Balint <cus@passwd.hu>
Aman Gupta [Thu, 29 Aug 2019 23:00:50 +0000 (16:00 -0700)]
avcodec/omx: fix xFramerate calculation
Integer overflow in the Q16 framerate calculation was sending
invalid values to the OMX encoder.
On the RPI4, this manifested as bitrate controls being ignored
on video streams with 60000/1001 framerates. Video streams with
30000/1001 framerates were not affected.
Signed-off-by: Aman Gupta <aman@tmm1.net>
Marton Balint [Sun, 25 Aug 2019 23:05:40 +0000 (01:05 +0200)]
avformat/mpegtsenc: fix flushing of audio packets
7d097a0fc57f0fa8385962a539c657c2f40b5ed0 had the same purpose as
3700f655c55e2001b57215210b957b169d66b50f but the former is much simpler, so
let's remove the latter.
Unfortunately both checks were wrong, because in order to make sure DTS > PCR
we have to give us some headroom, so instead of using a dts_difference <
max_delay check let's use a dts_difference < max_delay/2 check.
Fixes DTS < PCR errors with this command line:
./ffmpeg -loglevel verbose -y -f lavfi -i \
"testsrc=s=64x64:d=20,split=2[out0][tmp1];[tmp1]vflip[out1];sine=d=20,asetnsamples=1000[out2]" \
-flags +bitexact -fflags +bitexact -sws_flags +accurate_rnd+bitexact \
-codec:v libx264 -codec:a mp2 -b:a 32k -pix_fmt yuv420p \
-map '0:v:0' \
-map '0:v:1' \
-map '0:a:0' \
-muxrate 800000 \
-program st=0:st=2 -program st=1:st=2 -program st=2 -program st=0 -f mpegts out1.ts
Signed-off-by: Marton Balint <cus@passwd.hu>
Marton Balint [Sun, 25 Aug 2019 21:47:52 +0000 (23:47 +0200)]
docs/formats: fix max_interleave_delta default
Signed-off-by: Marton Balint <cus@passwd.hu>
Michael Niedermayer [Sat, 17 Aug 2019 17:25:01 +0000 (19:25 +0200)]
avcodec/ralf: fix undefined shift in extend_code()
Fixes: left shift of negative value -3
Fixes: 16147/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-
5658392722407424
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sat, 17 Aug 2019 17:18:31 +0000 (19:18 +0200)]
avcodec/ralf: fix undefined shift
Fixes: left shift of negative value -2
Fixes: 16145/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-
5146671058518016
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sat, 17 Aug 2019 23:28:38 +0000 (01:28 +0200)]
avcodec/pngdec: Optimize has_trns code
add inner loop specialisations for 2 bpp and 4 bpp
These are all cases for which i found testsamples.
30M cycles -> 5M cycles
Testcase: fate-rgbapng-4816
Testcase: 16097/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-
5664690889293824
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sat, 17 Aug 2019 22:36:17 +0000 (00:36 +0200)]
vcodec/apedec: Fix integer overflow in filter_3800()
Fixes: signed integer overflow:
2021654528 +
2032575680 cannot be represented in type 'int'
Fixes: 16270/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-
5732438816325632
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sat, 17 Aug 2019 22:28:34 +0000 (00:28 +0200)]
avcodec/apedec: Fix integer overflow in filter_fast_3320()
Fixes: signed integer overflow: -
1094994793 * 2 cannot be represented in type 'int'
Fixes: 16139/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-
5663911036059648
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Pavel Koshevoy [Mon, 2 Sep 2019 06:34:35 +0000 (00:34 -0600)]
lavc/v4l2_m2m: don't close the file descriptor we don't own
ff_v4l2_m2m_create_context initialized V4L2m2mContext.fd to 0
which is a valid file descriptor value. Next ff_v4l2_m2m_codec_init
failed and v4l2_m2m_destroy_context closed file descriptor 0 even
though it didn't belong to V4L2m2mContext.
Signed-off-by: Pavel Koshevoy <pkoshevoy@gmail.com>
Andrey Semashev [Wed, 28 Aug 2019 20:16:35 +0000 (23:16 +0300)]
configure: Update libmysofa check with a new symbol.
The current code in libavfilter/af_sofalizer.c requires
mysofa_neighborhood_init_withstepdefine function, which only appeared
in libmysofa 0.7. Use this function in configure script to bail out
early if a too old libmysofa is found in the system instead of failing
at compile time.
Michael Niedermayer [Sun, 1 Sep 2019 20:31:45 +0000 (22:31 +0200)]
avcodec/bgmc: Check input space in ff_bgmc_decode_init()
Fixes: Infinite loop
Fixes: 16608/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-
5636229827133440
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sun, 1 Sep 2019 15:37:47 +0000 (17:37 +0200)]
avcodec/vp3: Check for end of input in 2 places of vp4_unpack_macroblocks()
Fixes: Timeout (82sec -> 1sec)
Fixes: 16411/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP3_fuzzer-
5166958151991296
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Paul B Mahol [Mon, 2 Sep 2019 14:45:55 +0000 (16:45 +0200)]
avfilter/vf_v360: remove not needed items from ThreadData
Paul B Mahol [Mon, 2 Sep 2019 14:12:01 +0000 (16:12 +0200)]
avfilter/vf_delogo: unbreak fate
It is not clear what was real intention of previous commit to this filter.
It was not working correctly, hopefully this is fixed now.
It never checked that new x/y/w/h are actually valid, hopeffully this is fixed now.
It uses named variables in expressions that are never set, still not fixed.
It does not set named variables that uses actual frame widht/height, making actual
expressions less usable for our users, still now fixed.
Paul B Mahol [Mon, 2 Sep 2019 08:47:29 +0000 (10:47 +0200)]
avfilter/vf_v360: set much smaller limit to w/h
Paul B Mahol [Mon, 2 Sep 2019 08:43:37 +0000 (10:43 +0200)]
avfilter/vf_v360: fix some small code style issues
Paul B Mahol [Mon, 2 Sep 2019 08:36:45 +0000 (10:36 +0200)]
avfilter/vf_v360: extend description of eac format
Paul B Mahol [Mon, 2 Sep 2019 08:35:25 +0000 (10:35 +0200)]
avfilter/vf_v360: rename fb format to barrel
Paul B Mahol [Sat, 31 Aug 2019 19:14:28 +0000 (21:14 +0200)]
avcodec/tiff: rewrite lut handling
Remove endianess hack.
Paul B Mahol [Sat, 31 Aug 2019 18:57:29 +0000 (20:57 +0200)]
avcodec/tiff: set color_trc, remove sRGB conversion
Nick Renieris [Thu, 29 Aug 2019 13:10:54 +0000 (16:10 +0300)]
lavc/tiff: Enable decoding of LinearRaw images
"LinearRaw" is a value that the PhotometricInterpretation tag can be set
to on DNG images that contain color information for all channels instead
of being bayer-encoded ("CFA" value).
The DNG decoder is complete enough that we can enable this now.
Sample:
- http://www.rawsamples.ch/raws/nikon/SCANNER_NIKON_LS5000.DNG
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Nick Renieris [Thu, 29 Aug 2019 13:10:53 +0000 (16:10 +0300)]
lavc/tiff: Default-initialize WhiteLevel DNG tag value
Initialized to `(2 ^ BitsPerSample) - 1` as per the DNG Specification.
Also make sure that `BlackLevel < WhiteLevel`.
This fixes decoding for "X7 CinemaDNG" samples here:
- https://www.dji.com/gr/zenmuse-x7/info#downloads
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Nick Renieris [Thu, 29 Aug 2019 13:10:52 +0000 (16:10 +0300)]
lavc/tiff: Support DNGs with striped (non-tiled) JPEGs images
DNG samples here can now be decoded:
- https://www.photographyblog.com/previews/pentax_k1_photos
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Nick Renieris [Thu, 29 Aug 2019 13:10:51 +0000 (16:10 +0300)]
lavc/mjpegdec: Skip unknown APPx marker on bayer images
Samples:
- Embedded JPEG images in the DNG images here:
https://www.photographyblog.com/previews/pentax_k1_photos
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Nick Renieris [Thu, 29 Aug 2019 13:10:50 +0000 (16:10 +0300)]
lavc/tiff: Decode 10-bit and 14-bit DNG images
10-bit sample: http://www.rawsamples.ch/raws/phones/RAW_ONEPLUS_ONE-A0001.DNG
14-bit sample: https://drive.google.com/open?id=0B4JyRT3Lth5HVndyOTVOdWktM3J4TFEydTk1MnY3RWlpSzVB
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Nick Renieris [Thu, 29 Aug 2019 13:10:49 +0000 (16:10 +0300)]
lavc/tiff: Support decoding of DNGs with single-component JPEGs
This enables decoding of DNG images generated by the 'DJI Zenmuse X7'
digital camera
Samples: https://www.dji.com/gr/zenmuse-x7/info#downloads
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Nick Renieris [Thu, 29 Aug 2019 13:10:48 +0000 (16:10 +0300)]
lavc/mjpegdec: Enable decoding of single-component bayer images
Also, ensure no false positives when determining DNG bayer images, by
setting them in tiff.c instead of relying on a heuristic. There's no
way to determine this just from the JPEG data, so we have to pass this
information from outside the MJPEG decoder.
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Nick Renieris [Thu, 29 Aug 2019 13:10:47 +0000 (16:10 +0300)]
lavc/tiff: Force DNG pixel data endianness on an edge case
This fixes "X7 RAW" and "X7 CinemaDNG" samples here:
- https://www.dji.com/gr/zenmuse-x7/info#downloads
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Nick Renieris [Thu, 29 Aug 2019 13:10:46 +0000 (16:10 +0300)]
lavc/tiff: Don't apply strips-related logic to tiled images
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Nick Renieris [Thu, 29 Aug 2019 13:10:45 +0000 (16:10 +0300)]
lavc/tiff: Fix edge case with full-length/width tiles
When the height is equal to the tile length (full-height tile)
after `height % tile_length` is applied with the current code,
it results in the operating tile_length to be 0. This commit
makes this leftover logic only applies if it's necessary.
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Nick Renieris [Thu, 29 Aug 2019 13:10:44 +0000 (16:10 +0300)]
lavc/jpegtables: Handle multiple mappings to the same value
Some JPEGs [1] have incorrect DHT entries that map 2 codes to
the same value.
The second (last) mapping does not ever actually appear in the
code stream, therefore ignoring any mappings after the first one
fixes this.
Without this, an "mjpeg_decode_dc: bad vlc: 0:0" error is thrown.
In all known files, the 2 codes are mapped to symbol 0 so only
that case is checked.
[1]: Embedded JPEGs in "X7 RAW" and "X7 CinemaDNG" samples here:
https://www.dji.com/gr/zenmuse-x7/info#downloads
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Nick Renieris [Thu, 29 Aug 2019 13:10:43 +0000 (16:10 +0300)]
lavc/tiff: Apply color scaling to uncompressed DNGs
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Nick Renieris [Thu, 29 Aug 2019 13:10:42 +0000 (16:10 +0300)]
lavc/tiff: Convert DNGs to sRGB color space
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Nick Renieris [Thu, 29 Aug 2019 13:10:41 +0000 (16:10 +0300)]
lavc/tiff: Decode embedded JPEGs in DNG images
Used a technique similar to lavc/tdsc.c for invoking the MJPEG decoder.
This commit adds support for:
- DNG tiles
- DNG tile huffman lossless JPEG decoding
- DNG 8-bpp ("packed" as dcraw calls it) decoding
- DNG color scaling [1]
- LinearizationTable tag
- BlackLevel tag
[1]: As specified in the DNG Specification - Chapter 5
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Nick Renieris [Thu, 29 Aug 2019 13:10:40 +0000 (16:10 +0300)]
lavc/mjpegdec: Decode Huffman-coded lossless JPEGs embedded in DNGs
Main image data in DNGs is usually comprised of tiles, each of which is a Huffman-encoded lossless JPEG.
Tested for ljpeg regressions with:
`ffmpeg -f lavfi -i testsrc=d=1 -vcodec ljpeg test.avi`
`ffmpeg test.avi out.avi`
The modified code in ljpeg_decode_rgb_scan runs without issues.
Signed-off-by: Nick Renieris <velocityra@gmail.com>
Steven Liu [Thu, 29 Aug 2019 09:33:34 +0000 (17:33 +0800)]
avformat/dashdec: start from the root uri when baseURL is start with '/'
fix ticket: 8097
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Steven Liu [Tue, 27 Aug 2019 21:39:32 +0000 (05:39 +0800)]
avfilter/vf_delogo: support expr in delogo filter
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Limin Wang [Fri, 30 Aug 2019 03:45:39 +0000 (11:45 +0800)]
lavf/hlsenc: refine the get_relative_url function to avoid extra malloc for relation path
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Raphaël Zumer [Sun, 11 Aug 2019 13:54:58 +0000 (09:54 -0400)]
avcodec: Support EBU Tech. 3213-E primaries values
Signed-off-by: Raphaël Zumer <rzumer@tebako.net>
Signed-off-by: James Almer <jamrial@gmail.com>
Raphaël Zumer [Sun, 11 Aug 2019 13:54:57 +0000 (09:54 -0400)]
avfilter: Support EBU Tech. 3213-E primaries values
Signed-off-by: Raphaël Zumer <rzumer@tebako.net>
Signed-off-by: James Almer <jamrial@gmail.com>
Raphaël Zumer [Sun, 11 Aug 2019 13:54:56 +0000 (09:54 -0400)]
avutil/pixfmt: Add EBU Tech. 3213-E AVColorPrimaries value
This is an alias for JEDEC P22.
The name associated with the value is also changed
from jedec-p22 to ebu3213 to match ITU-T H.273.
Signed-off-by: Raphaël Zumer <rzumer@tebako.net>
Signed-off-by: James Almer <jamrial@gmail.com>
Michael Niedermayer [Thu, 15 Aug 2019 21:22:50 +0000 (23:22 +0200)]
avcodec/truemotion2: Fix multiple integer overflows in tm2_null_res_block()
Fixes: signed integer overflow:
1795032576 +
598344192 cannot be represented in type 'int'
Fixes: 16196/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-
5636723419119616
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Thu, 15 Aug 2019 20:26:14 +0000 (22:26 +0200)]
tools/target_dec_fuzzer: adjust pixel threshold for TRUEMOTION2, as it allows coding gigantic images on tiny input
Fixes: Timeout (137sec -> 6sec)
Fixes: 16090/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-
5674245178261504
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Thu, 15 Aug 2019 18:15:20 +0000 (20:15 +0200)]
avcodec/vc1_block: Check the return code from vc1_decode_p_block()
Fixes: left shift of negative value -1
Fixes: 16424/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3_fuzzer-
5656579055026176
Fixes: 16358/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-
5714436358144000
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Thu, 15 Aug 2019 18:04:35 +0000 (20:04 +0200)]
avcodec/vc1dec: Require res_sprite for wmv3images
non res_sprite leads to decoder delay which leads to assertion failure
Fixes: Assertion failure
Fixes: 16402/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3IMAGE_fuzzer-
5704510034411520
Fixes: left shift of
1073741824 by 1 places cannot be represented in type 'int'
Fixes: 16425/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3IMAGE_fuzzer-
5692858838810624
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Thu, 15 Aug 2019 16:47:54 +0000 (18:47 +0200)]
avcodec/vc1_block: Check for double escapes
Fixes: out of array read
Fixes: 16331/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3IMAGE_fuzzer-
5672735195267072
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sat, 10 Aug 2019 19:09:03 +0000 (21:09 +0200)]
avutil/mathematics: Fix 2 overflows in av_add_stable()
Fixes: signed integer overflow:
9223372036854775807 + 1 cannot be represented in type 'long'
Fixes: 16022/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-
5759796759756800
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Marton Balint [Sat, 24 Aug 2019 20:00:12 +0000 (22:00 +0200)]
avformat/utils: return pending IO error on EOF in av_read_frame()
avio_feof() returns true both in case of actual EOF and in case of IO errors.
Some demuxers (matroska) have special handling to be able to return the proper
error for this exact reason, e.g.:
if (avio_feof(pb)) {
if (pb->error) {
return pb->error;
} else {
return AVERROR_EOF;
}
}
However, most of the demuxers do not, and they simply return AVERROR_EOF if
avio_feof() is true, so there is a real chance that IO errors are mistaken for
EOF.
We might just say that the API user should always check the IO context error
attribute on EOF to make sure no IO errors happened, but not even ffmpeg.c does
this. It should be more intuitive to the API user if we simply return the IO
error as the return value of av_read_frame() instead of AVERROR_EOF.
Signed-off-by: Marton Balint <cus@passwd.hu>
Marton Balint [Fri, 23 Aug 2019 23:39:33 +0000 (01:39 +0200)]
avformat/avidec: add support for recognizing HEVC fourcc when demuxing
Some security cams generate this, as well as some versions of VirtualDub and
VLC so support for _reading_ such files is justified.
Fixes ticket #7110.
See also this discussion: https://patchwork.ffmpeg.org/patch/8744/
Signed-off-by: Marton Balint <cus@passwd.hu>
Marton Balint [Fri, 23 Aug 2019 22:27:41 +0000 (00:27 +0200)]
avformat/mpegts: fix teletext PTS when selecting teletext streams only
After
a1b4f120c031e6697bac9fd8c725d9c37ee36d13 the teletext PTS values were set
to AV_NOPTS_VALUE if the stream of the PCR pid was discarded.
What actually matters is that if we parse the PCR of the PCR PID or not, so
let's use the cached discard value of the actual PCR PID instead of the stream
discard value, which may be different.
Also fixes ticket #7567, which was caused by the fact that teletext PTS values
were not touched if the PCR pid was discarded even before
a1b4f120c031e6697bac9fd8c725d9c37ee36d13.
Signed-off-by: Marton Balint <cus@passwd.hu>
Michael Niedermayer [Fri, 30 Aug 2019 22:03:57 +0000 (00:03 +0200)]
tools/target_dec_fuzzer: Init parsepkt
Fixes: memory corruption
Fixes: 16702/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PNG_fuzzer-
5768418552184832
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Paul B Mahol [Sat, 31 Aug 2019 12:52:32 +0000 (14:52 +0200)]
avfilter/vf_v360: add cubemap 1x6 layout
Michael Niedermayer [Sun, 7 Jul 2019 23:18:05 +0000 (01:18 +0200)]
avcodec/vorbisdec: Check get_vlc2() failure
Fixes: out of array read
Fixes: 16510/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VORBIS_fuzzer-
5754510382727168
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Paul B Mahol [Fri, 30 Aug 2019 20:35:51 +0000 (22:35 +0200)]
avfilter/vf_stereo3d: improve dubois anaglyphs
Michael Niedermayer [Wed, 28 Aug 2019 17:26:49 +0000 (19:26 +0200)]
avcodec/vaapi_encode: Simplify code with av_clip_int8()
Reviewed-by: "Li, Zhong" <zhong.li@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Guo, Yejun [Tue, 20 Aug 2019 08:50:34 +0000 (16:50 +0800)]
dnn: export operand info in python script and load in c code
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
Guo, Yejun [Thu, 29 Aug 2019 05:53:41 +0000 (13:53 +0800)]
dnn: change .model file format to put layer number at the end of file
currently, the layer number is at the beginning of the .model file,
so we have to scan twice in python script, the first scan to get the
layer number. Only one scan needed after put the layer number at the
end of .model file.
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
Guo, Yejun [Thu, 29 Aug 2019 05:53:33 +0000 (13:53 +0800)]
dnn: introduce dnn operand (in c code) to hold operand infos within network
the info can be saved in dnn operand object without regenerating again and again,
and it is also needed for layer split/merge, and for memory reuse.
to make things step by step, this patch just focuses on c code,
the change within python script will be added later.
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
Eugene Lyapustin [Sun, 18 Aug 2019 17:26:36 +0000 (20:26 +0300)]
avfilter/vf_v360: add facebook's format
Jun Zhao [Fri, 30 Aug 2019 01:09:16 +0000 (09:09 +0800)]
avutil/file: add more check befor destory the buffer
add more check befor destory the buffer
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Jun Zhao [Wed, 28 Aug 2019 16:15:52 +0000 (00:15 +0800)]
avutil/file: always set *size to zero if *bufptr is NULL
Always set *size to zero if *bufptr is NULL, it's more make sence.
fix #8095
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Paul B Mahol [Fri, 14 Sep 2018 09:14:15 +0000 (11:14 +0200)]
avcodec: add IMM5 decoder
Paul B Mahol [Thu, 29 Aug 2019 16:28:49 +0000 (18:28 +0200)]
avcodec/msrle: add a flush() callback
The reference frame isn't valid after seeking.
Aman Gupta [Thu, 29 Aug 2019 15:44:45 +0000 (08:44 -0700)]
configure: fix --enable-omx compile on raspberry pi
Many ffmpeg + rpi compilation guides on the internet recommend
using `./configure --enable-omx --enable-omx-rpi`. This fails
to find the IL OMX headers on device because the omx require_headers
check happens first before the add_cflags in omx_rpi.
A workaround is to use `./configure --enable-omx-rpi` only, since
omx_rpi already implies omx. But because many users expect to use
existing scripts and commands, we swap the order here so omx_rpi
special cases are applied first.
In the past this wasn't an issue because users noticed the OMX_Core.h
missing error and installed libomxil-bellagio-dev. But since
76c82843ccad1, the rpi specific headers from /opt/vc/include/IL
are required.
Signed-off-by: Aman Gupta <aman@tmm1.net>
Michael Niedermayer [Tue, 13 Aug 2019 23:28:09 +0000 (01:28 +0200)]
avcodec/ivi: Allocate bufs later
Fixes: Timeout (24sec->2sec)
Fixes: 15951/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-
5095433266790400
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Tue, 13 Aug 2019 21:42:09 +0000 (23:42 +0200)]
tools/target_dec_fuzzer: Adjust maxpixels for indeo4
Fixes: Timeout (131sec -> 4sec)
Fixes: 15581/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-
5651105515569152
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Tue, 13 Aug 2019 20:06:12 +0000 (22:06 +0200)]
tools/target_dec_fuzzer: Adjust GDV pixel threshold down by a factor of 2
Fixes: Timeout (7sec -> 1sec)
Fixes: 14709/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-
5704215281795072
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Mon, 12 Aug 2019 08:40:30 +0000 (10:40 +0200)]
tools/target_dec_fuzzer: adjust pixel threshold for SANM, as it allows coding gigantic images on tiny input
Fixes: Timeout (13sec ->1sec)
Fixes: 16122/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SANM_fuzzer-
5724944247291904
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sun, 11 Aug 2019 18:56:44 +0000 (20:56 +0200)]
avcodec/tta: Fix integer overflow in prediction
Fixes: signed integer overflow: -
395281576 + -
1827578048 cannot be represented in type 'int'
Fixes: 16038/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-
5646109705240576
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sun, 11 Aug 2019 22:21:49 +0000 (00:21 +0200)]
avcodec/vb: Check input packet size to be large enough to contain flags
Fixes: Timeout (->9sec)
Fixes: 16292/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VB_fuzzer-
5747063496638464
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sat, 10 Aug 2019 15:34:37 +0000 (17:34 +0200)]
avcodec/cavsdec: Limit the number of access units per packet to 2
Fixes: Timeout (122sec -> 13ms)
Fixes: 15978/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CAVS_fuzzer-
5148925004087296
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Tue, 30 Jul 2019 17:11:27 +0000 (19:11 +0200)]
avformat/mpsubdec: Remove floating point usage
This makes the code bitexact between platforms.
Intermediate timestamps between frames are preserved.
The timebase is simplified.
Rounding differs from doubles in cases where timestamps/durations
are "funny"
Suggested-by: jb
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Thierry Foucu [Mon, 26 Aug 2019 20:50:40 +0000 (13:50 -0700)]
lavc/cbs_h2645: Use av_realloc instead of av_malloc
Follow the description of av_realloc, the memory needs to be allocated
by av_realloc.
Limin Wang [Tue, 27 Aug 2019 14:34:54 +0000 (22:34 +0800)]
lavf/dump: dump the vbv_delay with N/A instead of
18446744073709551615
How to check it:
./ffmpeg -f lavfi -i testsrc -c:v mpeg2video -f null -
master:
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay:
18446744073709551615
patch applied:
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Paul B Mahol [Wed, 28 Aug 2019 15:30:55 +0000 (17:30 +0200)]
avcodec/dsd: use uint8_t instead of unsigned char