summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avcodec/cbs_jpeg: Fix uninitialized end index in cbs_jpeg_split_fragment()Michael Niedermayer2020-07-10
| | | | | | | | Fixes: Out of array read Fixes: 24043/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5084566275751936.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevcdec: Add VDPAU to list of supported formatsManojGuptaBonda2020-07-09
| | | | | | | | | | | | | | Added VDPAU to list of supported formats for HEVC10 and 12 bit formats also added 42010 bit to surface_parameters and new VDP chroma formats to VDPAUPixFmtMaps Add HEVC 420 10/12 Bit and 444 10/12 Bit support for VDPAU YUV444P10 is defined as the 444 surface with 10bit valid data in LSBs but H/w returns Data in MSBs Hence if we map output as YUV444p16 it is filtering out the LSB to convert to p10 format. Signed-off-by: Philip Langdale <philipl@overt.org>
* lavc/vdpau_hevc: add function to find exact vdp_profile for REXTManojGuptaBonda2020-07-09
| | | | | | | | | | | Add vdpau_parse_rext_profile and use profile constraint flags to determine the exact vdp_profile for HEVC_REXT. If profile mismatch is allowed, select Main profile by default. Add build object in Makefile for h265_profile_level dependency. Signed-off-by: Philip Langdale <philipl@overt.org>
* avcodec/mpeg12dec: add timecode metadataLimin Wang2020-07-09
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/h264_slice: add timecode metadataLimin Wang2020-07-09
| | | | | | | | Please test with below command: ./ffplay -vf drawtext="fontfile=/Library/Fonts/Arial.ttf:text=\\'%{metadata\\:timecode}\\'" \ ../fate-suite/h264/crew_cif_timecode-2.h264 Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/h264_slice: replace cur->f with out for better readabilityLimin Wang2020-07-09
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/hevcdec: add timecode metadataLimin Wang2020-07-09
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* swscale/tests: check return value of sws_scaleLynne2020-07-09
|
* aarch64/yuv2rgb_neon: fix return valueLynne2020-07-09
| | | | | | We return 0 for this particular architecture but should instead be returning the number of lines. Fixes users who check the return value matches what they expect.
* libavformat/dashenc.c: Support mpd update periodSiyuan Huang2020-07-09
| | | | | | According ISO 23009-1, in live cases, mpd refresh period should be configurable Signed-off-by: Siyuan Huang <saber.huang@samsung.com>
* tests/dnn/mathunary: fix the issue of NANTing Fu2020-07-09
| | | | | | | When one of output[i] & expected_output is NAN, the unit test will always pass. Signed-off-by: Ting Fu <ting.fu@intel.com> Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
* avcodec/libaomenc: fix build w/libaom v1.0.0James Zern2020-07-08
| | | | | | | | broken since: aa5c6f382b avcodec/libaomenc: Add command-line options to control the use of partition tools Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: James Zern <jzern@google.com>
* avfilter/vf_showinfo: add dump_s12m_timecode() helper functionLimin Wang2020-07-08
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_showinfo: check sd->size before reference the sd->dataLimin Wang2020-07-08
| | | | | | | Or it'll cause null pointer dereference if size < sizeof(uint32_t), also in case tc[0] > 3, the code will report error directly. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/gifdec: -1 -> AV_BPRINT_SIZE_UNLIMITEDLimin Wang2020-07-08
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/dvbsubdec: CosmeticsLimin Wang2020-07-08
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/dvbsubdec: prefer to use variable instead of type for sizeofLimin Wang2020-07-08
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/dvbsubdec: simplify code by using OFFSET() macroLimin Wang2020-07-08
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter: add chromanr video filterPaul B Mahol2020-07-08
|
* avformat/mov: Fix unaligned read of uint32_t and endian-dependance in ↵Zhao Zhili2020-07-07
| | | | | | | mov_read_default Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apedec: Fix undefined integer overflow with 24bitMichael Niedermayer2020-07-07
| | | | | | | | Fixes: signed integer overflow: 8683744 * 256 cannot be represented in type 'int' Fixes: 23527/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5679885932822528 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/loco: Fix integer overflow with large values from loco_get_rice()Michael Niedermayer2020-07-07
| | | | | | | | Fixes: signed integer overflow: 155 + 2147483647 cannot be represented in type 'int' Fixes: 23421/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LOCO_fuzzer-5652849097965568 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/smjpegdec: Check the existence of referred streamsMichael Niedermayer2020-07-07
| | | | | | | | Fixes: Assertion failure Fixes: 23758/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5160954605338624.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* pthread_frame: change the criterium for updating thread contextsAnton Khirnov2020-07-07
| | | | | | | | | | | Currently the next thread's context is updated from the previous one's if the codec descriptor is not marked as intra-only. That is not entirely correct, since that property does not necessarily imply anything about how a specific decoder implementation behaves. Instead, use the presence of the update_thread_context() callback to decide whether an update should be performed. Fixes races in CFHD, should cause no behaviour change in any other decoders.
* codec_desc: drop the INTRA_ONLY property from TAKAnton Khirnov2020-07-07
| | | | It has key frames and non-key frames, so it is not intra-only.
* tests/fate/hlsenc: add testcase of ac3 surround sound input in hlsencSteven Liu2020-07-07
| | | | | | | add probeaudiostream for get audio stream's codec_name,codec_time_base, sample_fmt,channels and channel_layout. Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hlsenc: check fragment size plus start_pos large than hls_segment_sizeSteven Liu2020-07-07
| | | | | | if vs->size + vs->start_pos > hls->max_seg_size, should split segment. Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avfilter/vf_edgedetect: properly implement double_threshold()Valery Kot2020-07-06
| | | | | | | | | | | | | | Important part of this algorithm is the double threshold step: pixels above "high" threshold being kept, pixels below "low" threshold dropped, pixels in between (weak edges) are kept if they are neighboring "high" pixels. The weak edge check uses a neighboring context and should not be applied on the plane's border. The condition was incorrect and has been fixed in the commit. Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com> Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com>
* avcodec/h26[45]_metadata_bsf: Use separate contexts for reading/writingAndreas Rheinhardt2020-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, both bsfs used the same CodedBitstreamContext for reading and writing; as a consequence, the state of the writer's context at the beginning of writing a fragment is exactly the state of the reader after having read the fragment; in particular, the writer might not have encountered one of its active parameter sets yet. This is not nice and may lead to invalid output even when the input is completely spec-compliant: Think of an access unit containing a primary coded picture referencing a PPS with id id (that is known from an earlier access unit/from extradata), then a new version of the PPS with id id and then a redundant coded picture that is also referencing the PPS with id id. This is spec-compliant, as the standard allows to overwrite a PPS with a different PPS in between coded pictures and not only at the beginning of an access unit. In this scenario, the reader would read the primary coded picture with the old PPS and the redundant coded picture with the new PPS (as it should); yet the writer would write both with the new PPS as extradata which might lead to errors or to invalid data being output without any error (e.g. if the two PPS differed in redundant_pic_cnt_present_flag). The above scenario does not directly translate to HEVC as long as one restricts oneself to input with nuh_layer_id == 0 only (as cbs_h265 does: it currently strips away any NAL unit with nuh_layer_id > 0 when decomposing); if one doesn't the same issue as above can happen. If one also allowed input packets to contain more than one access unit, issues like the above can happen even without redundant coded pictures/multiple layers. Therefore this commit uses separate contexts for reader and writer. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/cbs: Remove unused function parametersAndreas Rheinhardt2020-07-07
| | | | | | | | Several cbs-functions had an unused CodedBitstreamContext parameter. This commit removes these. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* Speedhq: Decode field 2 correctlyJean-Baptiste Kempf2020-07-06
| | | | This is similar to field 1 (effd2e72)
* avcodec/h264: support sps/pps AV_PKT_DATA_NEW_EXTRADATAOliver Woodman2020-07-06
| | | | | | | | | | | Commit 601c238854 added support for AV_PKT_DATA_NEW_EXTRADATA, but only for avcC extradata. This commit adds support for sps/pps extradata as well. This makes support consistent for passing new extradata consistent with the types of extradata that can be passed when initializing the decoder. Signed-off-by: Oliver Woodman <ollywoodman@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* dnn_backend_native: Add overflow check for length calculation.Reimar Döffinger2020-07-06
| | | | | | | | | We should not silently allocate an incorrect sized buffer. Fixes trac issue #8718. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
* libavformat/hlsenc: Remove duplicate close of the output stream.Andrey Semashev2020-07-06
| | | | | The result of the first close attempt is ignored and may be lost. By removing it we ensure the close result code is properly analyzed.
* dnn-layer-math-unary-test: add unit test for atanhTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn_backend_native_layer_mathunary: add atanh supportTing Fu2020-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can be tested with the model generated with below python script: import tensorflow as tf import numpy as np import imageio in_img = imageio.imread('input.jpeg') in_img = in_img.astype(np.float32)/255.0 in_data = in_img[np.newaxis, :] x = tf.placeholder(tf.float32, shape=[1, None, None, 3], name='dnn_in') please uncomment the part you want to test x_sinh_1 = tf.sinh(x) x_out = tf.divide(x_sinh_1, 1.176) # sinh(1.0) x_cosh_1 = tf.cosh(x) x_out = tf.divide(x_cosh_1, 1.55) # cosh(1.0) x_tanh_1 = tf.tanh(x) x__out = tf.divide(x_tanh_1, 0.77) # tanh(1.0) x_asinh_1 = tf.asinh(x) x_out = tf.divide(x_asinh_1, 0.89) # asinh(1.0/1.1) x_acosh_1 = tf.add(x, 1.1) x_acosh_2 = tf.acosh(x_acosh_1) # accept (1, inf) x_out = tf.divide(x_acosh_2, 1.4) # acosh(2.1) x_atanh_1 = tf.divide(x, 1.1) x_atanh_2 = tf.atanh(x_atanh_1) # accept (-1, 1) x_out = tf.divide(x_atanh_2, 1.55) # atanhh(1.0/1.1) y = tf.identity(x_out, name='dnn_out') #please only preserve the x_out you want to test sess=tf.Session() sess.run(tf.global_variables_initializer()) graph_def = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out']) tf.train.write_graph(graph_def, '.', 'image_process.pb', as_text=False) print("image_process.pb generated, please use \ path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn-layer-math-unary-test: add unit test for acoshTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn_backend_native_layer_mathunary: add acosh supportTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn-layer-math-unary-test: add unit test for asinhTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn_backend_native_layer_mathunary: add asinh supportTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn-layer-math-unary-test: add unit test for tanhTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn_backend_native_layer_mathunary: add tanh supportTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn-layer-math-unary-test: add unit test for coshTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn_backend_native_layer_mathunary: add cosh supportTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn-layer-math-unary-test: add unit test for sinhTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn_backend_native_layer_mathunary: add sinh supportTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* libavcodec/jpeg2000dec.c: Enable image offsetsGautam Ramakrishnan2020-07-06
| | | | | | This patch enables support for image offsets. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/jpeg2000dec: Enhance pix fmt selectionGautam Ramakrishnan2020-07-06
| | | | | | | This patch assigns default pix format values when a match does not take place. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tiff: Check frame parameters before blit for DNGMichael Niedermayer2020-07-05
| | | | | | | | Fixes: out of array access Fixes: 23888/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-6021365974171648.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegdec: Limit bayer to single plane outputting formatMichael Niedermayer2020-07-05
| | | | | | | This reduces the number of paths reachable with DNG and should improve security Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>