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

98491 Commits

Author SHA1 Message Date
Paul B Mahol
d363afb30e avfilter/vf_tinterlace: fix mergex2, first frame is always considered odd 2020-07-17 13:53:55 +02:00
Paul B Mahol
24fea4d09b avfilter/vf_tinterlace: use frame counter from lavfi
Remove internal counter.
2020-07-17 13:53:55 +02:00
leozhang
fe591393cd avfilter/vf_bilateral: remove useless memcpy
Signed-off-by: leozhang <leozhang@qiyi.com>
2020-07-17 13:53:22 +02:00
Paul B Mahol
241cdded0f avfilter/vf_bilateral: stop using sigmaS as percent of width/height 2020-07-17 13:53:22 +02:00
James Almer
d11cc743c8 Revert "avcodec/cbs_av1: keep separate reference frame state for reading and writing"
This reverts commit 4e2bef6a82.
It's no longer needed now that all the bsfs use separate contexts
for reading and writing.
2020-07-16 21:49:27 -03:00
James Almer
2493944e31 avcodec/av1_frame_merge_bsf: Use separate contexts for reading/writing
Based on code from 235a5734e0

Signed-off-by: James Almer <jamrial@gmail.com>
2020-07-16 21:49:27 -03:00
James Almer
c91be9de4c avcodec/av1_metadata_bsf: Use separate contexts for reading/writing
Based on code from 235a5734e0

Signed-off-by: James Almer <jamrial@gmail.com>
2020-07-16 21:49:27 -03:00
Gautam Ramakrishnan
db7dfb4a79 libavcodec/jpeg2000 Fix RPCL Progression order check
The RPCL progression order check was incomplete. This
patch completes the check. Tested on p1_07.j2k.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-16 17:44:53 +02:00
Zhao Zhili
af7b1031e1 avformat/mov: fix atom type to string conversion
The conversion was endian-dependent, and it may contain non-printable
characters.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-16 17:44:53 +02:00
Michael Niedermayer
663f024415 swscale/tests/swscale: use 1 for indicating erros
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-16 17:44:53 +02:00
Andriy Gelman
a9fecb8ea1 avcodec/v4l2_m2m_dec: remove redundant packet and fix double free
v4l2_receive_frame() uses two packets s->buf_pkt and avpkt. If avpkt
cannot be enqueued, the packet is buffered in s->buf_pkt and enqueued in
the next call. Currently the ownership transfer between the two packets
is not properly handled. A double free occurs if
ff_v4l2_context_enqueue_packet() returns EAGAIN and v4l2_try_start
returns EINVAL.

In fact, having two AVPackets is not needed and everything can be
handled by s->buf_pkt.

This commit removes the local avpkt from v4l2_receive_frame(), meaning
that the ownership transfer doesn't need to be handled and the double
free is fixed.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2020-07-16 11:25:23 -04:00
Gautam Ramakrishnan
660386813d libavcodec/jpeg2000 Fix PCRL Progression Order check
The PCRL progression checks were incomplete. This patch
modifes completes the check. Tested on p1_05.j2k.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-16 10:13:22 +02:00
Gyan Doshi
1ec2b3de5a avformat/riffenc: indicate storage of flipped RGB bitmaps
Some legacy applications such as AVI2MVE expect raw RGB bitmaps
to be stored bottom-up, whereas our RIFF BITMAPINFOHEADER assumes
they are always stored top-down and thus write a negative value
for height. This can prevent reading of these files.

Option flipped_raw_rgb added to AVI and Matroska muxers
which will write positive value for height when enabled.

Note that the user has to flip the bitmaps beforehand using other
means such as the vflip filter.
2020-07-15 20:52:01 +05:30
Limin Wang
a54b367c78 avdevice/decklink_dec: export timecode with s12m side data
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-07-15 05:47:14 +08:00
Limin Wang
448a9aaa78 API: add AV_PKT_DATA_S12M_TIMECODE to AVPacketSideDataType
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-07-15 05:47:14 +08:00
Limin Wang
c24c6a1bee avutil/timecode: add description for SMPTE binary format
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-07-15 05:47:14 +08:00
Gautam Ramakrishnan
05f3d37dd5 libavcodec/jpeg2000dec : Prevent overriding SOP marker bit
Currently, the COC marker overrides the SOP marker bit.
However, only the COD marker may set this value. This
patch fixes this bug.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-14 22:05:02 +02:00
Michael Niedermayer
24c575e0aa swscale/tests/swscale: Initialize res to a non random error code
Regression since: 3adffab073

-1 is consistent what other error paths return

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-14 22:05:02 +02:00
Michael Niedermayer
ec27c1827c swscale/tests/swscale: Fix incorrect return code check
Regression since: 3adffab073

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-14 22:05:02 +02:00
James Almer
ba3e771a42 x86/yuv2rgb: fix crashes when storing data on unaligned buffers
Regression since fc6a5883d6 on SSSE3 enabled
CPUs.

Fixes ticket #8747

Signed-off-by: James Almer <jamrial@gmail.com>
2020-07-14 14:06:04 -03:00
Ruiling Song
7772666e5b mailmap: add entry for myself
Signed-off-by: Ruiling Song <ruiling.song83@gmail.com>
2020-07-13 11:24:04 +08:00
Philip Langdale
93febc4e15 avutil/hwcontext_vdpau: Correctly initialise pixfmts
The number of declared vdpau formats can vary depending on which
version of libvdpau we build against, so the number of pix fmts
can vary too. Let's make sure we keep those numbers in sync.
2020-07-12 08:33:40 -07:00
Moritz Barsnick
2dabee7c0f avformat/mov: fix missing line break in messages
One of them can be triggered by https://samples.ffmpeg.org/F4V/H263_NM_f.mp4.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
2020-07-12 20:40:54 +05:30
James Almer
55e1bc39cb checkasm/vf_blend: use the correct depth parameters to initialize the blend modes
This effectively enables the tests that until now were just running
the C version alone.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-07-12 11:30:23 -03:00
James Almer
320694ff84 x86/vf_blend: fix warnings about trailing empty parameters
Finishes fixing ticket #8771

Signed-off-by: James Almer <jamrial@gmail.com>
2020-07-12 11:30:23 -03:00
James Almer
2c844c9828 x86/h264_deblock: fix warning about trailing empty parameter
Fixes part of ticket #8771

Signed-off-by: James Almer <jamrial@gmail.com>
2020-07-12 11:30:23 -03:00
Henrik Gramner
0b2b03568f avutil/x86inc: fix warnings when assembling with Nasm 2.15
Some new warnings regarding use of empty macro parameters has
been added, so adjust some x86inc code to silence those.

Fixes part of ticket #8771

Signed-off-by: James Almer <jamrial@gmail.com>
2020-07-12 11:30:23 -03:00
Jun Zhao
3205ed31a7 lavf/udp: fix the comments for default UDP socket recvbuf size
15d160cc0b increased the UDP socket receiving buffer size
(64K ->384K), but missed to update this comments.

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-07-12 08:13:00 +08:00
Jun Zhao
04037e2966 lavfi/setpts: fix setpts/asetpts option dump error
fix the command ffmpeg -h filter=setpts/asetpts both dump the expr
option with "FVA" flags.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-07-12 08:11:42 +08:00
Ben Clayton
4dab04622a libavfilter/glslang: Remove unused header
The <glslang/Include/revision.h> include was not used, and revision.h has
been removed from glslang master.
See: https://github.com/KhronosGroup/glslang/pull/2277
2020-07-11 13:01:33 +01:00
Paul B Mahol
6f84e92172 avfilter/vf_chromanr: move thres calculation to filter_frame() 2020-07-10 23:09:19 +02:00
Andreas Rheinhardt
5d91b7718e avformat/sdp: Fix potential write beyond end of buffer
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-10 20:36:31 +02:00
Andreas Rheinhardt
ec59dc73f0 avformat/mm: Check for existence of audio stream
No audio stream is created unconditionally and if none has been created,
no packet with stream_index 1 may be returned. This fixes an assert in
ff_read_packet() in libavformat/utils reported in ticket #8782.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-10 20:36:31 +02:00
Michael Niedermayer
79e8d17024 avcodec/tiff: Check input space in dng_decode_jpeg()
Fixes: out of array read
Fixes: 24034/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5111884337119232

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-10 20:27:07 +02:00
Michael Niedermayer
dde6077297 avcodec/mjpeg_parser: Adjust size rejection threshold
Fixes: 86987846-429c8d80-c197-11ea-916b-bb4738e09687.jpg
Fixes: Regression since ec3d8a0e69

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-10 20:27:07 +02:00
Michael Niedermayer
4a10bc8f6f avcodec/cbs_jpeg: Fix uninitialized end index in cbs_jpeg_split_fragment()
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>
2020-07-10 20:27:07 +02:00
ManojGuptaBonda
ed5ee04722 avcodec/hevcdec: Add VDPAU to list of supported formats
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>
2020-07-09 20:54:11 -07:00
ManojGuptaBonda
3c821c4ad3 lavc/vdpau_hevc: add function to find exact vdp_profile for REXT
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>
2020-07-09 20:54:11 -07:00
Limin Wang
61880e1ad0 avcodec/mpeg12dec: add timecode metadata
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-07-09 22:18:42 +08:00
Limin Wang
10c7745ae9 avcodec/h264_slice: add timecode metadata
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>
2020-07-09 22:18:42 +08:00
Limin Wang
b531216e6a avcodec/h264_slice: replace cur->f with out for better readability
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-07-09 22:18:42 +08:00
Limin Wang
dcf9235a87 avcodec/hevcdec: add timecode metadata
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-07-09 22:18:42 +08:00
Lynne
3adffab073
swscale/tests: check return value of sws_scale 2020-07-09 10:33:19 +01:00
Lynne
3e098cca6e
aarch64/yuv2rgb_neon: fix return value
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.
2020-07-09 10:33:14 +01:00
Siyuan Huang
05feb7a26b libavformat/dashenc.c: Support mpd update period
According ISO 23009-1, in live cases, mpd refresh period should be configurable

Signed-off-by: Siyuan Huang <saber.huang@samsung.com>
2020-07-09 11:17:32 +05:30
Ting Fu
dbf66b9e0e tests/dnn/mathunary: fix the issue of NAN
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>
2020-07-09 09:34:44 +08:00
James Zern
d294716c22 avcodec/libaomenc: fix build w/libaom v1.0.0
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>
2020-07-08 10:12:27 -07:00
Limin Wang
f9277cd796 avfilter/vf_showinfo: add dump_s12m_timecode() helper function
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-07-08 23:14:04 +08:00
Limin Wang
3ede8acba6 avfilter/vf_showinfo: check sd->size before reference the sd->data
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>
2020-07-08 23:12:48 +08:00
Limin Wang
1dee8bf909 avformat/gifdec: -1 -> AV_BPRINT_SIZE_UNLIMITED
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-07-08 23:09:29 +08:00