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

104593 Commits

Author SHA1 Message Date
Andreas Rheinhardt
19ed9236db avcodec/libx264: Remove always-false checks
Always false since this encoder was switched to encode2 and
ff_alloc_packet() in 06484d0b8a
and f2b20b7a8b.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-09 15:42:27 +01:00
Andreas Rheinhardt
6f1130be78 avcodec/libx264: Check for overflow if necessary
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-09 15:42:27 +01:00
Andreas Rheinhardt
e5199eebb4 avformat/apngenc: Use UINT16_MAX instead of USHRT_MAX
The latter needn't be 16 bits.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-09 15:40:36 +01:00
songyutong
8a969e1280 avcodec/videotoolboxenc: fix pixel buffer memory leak
In function vtenc_populate_extradata(), there is a manually created
pixel buffer that has not been released. So we should use CVPixelBufferRelease
to release this pixel buffer at the end, otherwise will cause a memory leak.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2021-11-09 07:14:39 -05:00
Paul B Mahol
a13646639f avfilter/vf_estdif: do some clip calculations only once in loop 2021-11-09 09:49:40 +01:00
Paul B Mahol
dcf83fd59d avfilter/vf_estdif: export distance cost as filter option 2021-11-09 09:49:39 +01:00
Paul B Mahol
45dc668aea avfilter/f_reverse: readjust frame timestamps for areverse 2021-11-07 20:47:21 +01:00
Paul B Mahol
0370c3e3d4 avfilter/af_adelay: use outlink where applicable 2021-11-07 20:47:21 +01:00
Andreas Rheinhardt
cd03a180cb avcodec/mjpegdec: Use AVCodecInternal.in_pkt for buffer packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:46:55 +01:00
Andreas Rheinhardt
7c5ee237be avcodec/libdav1d: Use av_memdup() where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:38:22 +01:00
Andreas Rheinhardt
31d0487ba2 avcodec/libdav1d: Use AVCodecInternal.in_pkt instead of stack packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:34:33 +01:00
Andreas Rheinhardt
776e9f9e2a avcodec/libdav1d: Don't leak side-data-only packets
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:32:52 +01:00
Andreas Rheinhardt
ba91b8b685 avcodec/cuviddec: Use AVCodecInternal.in_pkt instead of stack packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:27:13 +01:00
Andreas Rheinhardt
9b851c4b92 avcodec/crystalhd: Use AVCodecInternal.in_pkt instead of stack packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:26:41 +01:00
Andreas Rheinhardt
e353300622 avcodec/binkaudio: Use AVCodecInternal.in_pkt for buffer packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:26:09 +01:00
Andreas Rheinhardt
ffdda740fe avcodec/internal: Allow receive_frame codecs to use decode_simple pkt
Decoders implementing the receive_frame API currently mostly use
stack packets to temporarily hold the packet they receive from
ff_decode_get_packet(). This role directly parallels the role of
in_pkt, the spare packet used in decode_simple_internal for the
decoders implementing the traditional decoding API. Said packet
is unused by the generic code for the decoders implementing the
receive_frame API, so allow them to use it to fulfill the function
it already fulfills for the traditional API for both APIs.

There is only one caveat in this: The packet is automatically
unreferenced in avcodec_flush_buffers(). But this is actually
positive as it means the decoders don't have to do this themselves
(in case the packet is preserved between receive_frame calls).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 17:12:58 +01:00
Andreas Rheinhardt
9139dc6140 avformat/matroskadec: Don't unnecessarily reduce aspect ratio
Fixes ticket #9497.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07 15:38:03 +01:00
Alex Shumsky
1728127e8c avformat/mpegtsenc: do not include adaptation field in teletext TS packets
From ETSI EN 300 472 V1.3.1 (2003-05) Specification for conveying ITU-R System
B Teletext in DVB bitstreams:

4.1 Transport Stream (TS) packet format
The standard TS packet syntax and semantics are followed, noting the following
constraint:
- adaptation_field_control only the values "01" and "10" are permitted.

Some set top boxes (Motorola, Arris, Zyxel) refuse non-conforming packets.

Signed-off-by: Alex Shumsky <alexthreed@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-11-06 20:35:39 +01:00
Maksym Veremeyenko
a085418303 avformat/mpegtsenc: fix first_pcr initial update
Commit 6f36eb0da7 claim it fixes endless loop on
package generation if muxrate specified and copyts used. But actually it does
not work properly if -mpegts_copyts 1 is specified:

ffmpeg -y -copyts -i loewe.ts -c:v libx264 -x264opts nal-hrd=cbr:force-cfr=1 -b:v 3500k -minrate 3500k -maxrate 3500k -bufsize 1000k  -c:a mp2 -f mpegts -mpegts_copyts 1 -muxrate 4500k -vframes 1000 test.ts

ffmpeg generate huge file until it reach zero-based pcr value equal to first dts.

Attached patch fixes it.

Reviewed-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-11-06 20:35:19 +01:00
Brad Isbell
9d4989f2e1 avdevice/dshow: Fix missing PCM sample size option when it is used as the lone option for DirectShow audio capture
Signed-off-by: Brad Isbell <brad@audiopump.co>
Reviewed-by: Roger Pack <rogerdpack2@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-11-05 22:58:43 +01:00
Brad Isbell
d9a9b4c877 avdevice/dshow: Use WAVEFORMATEX from AM_MEDIA_TYPE for describing device capabilities. (Fixes #9420)
Signed-off-by: Brad Isbell <brad@audiopump.co>
Reviewed-by: Roger Pack <rogerdpack2@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-11-05 22:58:42 +01:00
Zhao Zhili
7370f1f4c9 doc/muxers: note on Apple's version LHLS for lhls option 2021-11-05 15:34:30 -03:00
Zhao Zhili
a0f9650046 avformat/dashenc: enabling streaming and hls_playlist for lhls
Try to make the feature easier to use, especially since the user
have enabled -strict experimental manually. The user shouldn't
be surprised that hls_playlist is enabled for lhls automatically,
so change the log level from warning to info for that.
2021-11-05 15:32:11 -03:00
Zhao Zhili
f6b90d5fef avformat/dashenc: enabling streaming automatically for ldash
There is a little chance that user specified contradicted options
like -streaming 0 -ldash 1, however, it's more likely that user
didn't know or forgot to enable streaming for ldash. So enabling
streaming automatically to make the feature easier to use, similar
like enable FF_MOV_FLAG_FRAGMENT/EMPTY_MOOV/DEFAULT_BASE_MOOF and
so on for FF_MOV_FLAG_CMAF.
2021-11-05 15:30:43 -03:00
Thilo Borgmann
c42d513ede lavf/mov: Change default to prefer TFDT time and allow for fallback to SIDX or TFDT 2021-11-05 16:22:04 +01:00
James Almer
f6ab103bb5 avcodec/libx264: fix sei payload leaks on error
Signed-off-by: James Almer <jamrial@gmail.com>
2021-11-04 22:59:55 -03:00
Mark Reid
d2379bd6a0 swscale/input: fix planar_rgb16_to_a for gbrap10be and gbrap12be formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-11-04 11:52:33 +01:00
Roman Arzumanyan
08a501946f avfilter/scale_npp: add scale2ref_npp filter
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-11-03 19:06:14 +01:00
Zhao Zhili
82e3251dd2 avformat/isom_tags: fix 'ipcm' with samplesize equal to 16
Use PCM_S16 so the codec_id will be updated later according to
bits_per_coded_sample.
2021-11-03 17:45:02 +01:00
Limin Wang
f05559554c avformat/dashenc: Fix comparing double with 0
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-11-03 21:38:37 +08:00
Limin Wang
8dc8c01d6c avutil/parseutils: add qhd(Quad HD) or wqhd(Wide Quad HD) for 1440p
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-11-03 21:38:37 +08:00
Limin Wang
6cab5206b0 avutil/hwcontext_videotoolbox: fix use of unknown builtin '__builtin_available'
OSX version: 10.11.6
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-11-03 21:20:47 +08:00
Paul B Mahol
bf9950446d avfilter/vf_chromanr: improve filtering results 2021-11-03 11:55:46 +01:00
Michael Niedermayer
2171f97cc8 avformat/aiffdec: "-1" -> AVERROR_INVALIDDATA
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-11-01 20:37:20 +01:00
Michael Niedermayer
905588df97 avformat/aiffdec: Use av_rescale() for bitrate
Fixes: integer overflow
Fixes: 40313/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-4814761406103552

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-11-01 20:37:20 +01:00
Michael Niedermayer
93f7776921 avformat/aiffdec: sanity check block_align
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-11-01 20:37:20 +01:00
Michael Niedermayer
1b04836dff avformat/aiffdec: Check sample_rate
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-11-01 20:37:20 +01:00
James Almer
28fac45bde avcodec/libaomdec: use intermediate arrays for plane pointers and strides
Fixes -Wstringop-overflow warnings with libaom >= 2.0.0, where the unused alpha
plane was removed from aom_image.

Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-11-01 14:58:36 -03:00
Matt Oliver
d92fdc7144 libaom: Dont use aom_codec_av1_dx_algo.
This fixes linking errors where variables cannot be correctly linked in from an external shared library such as with msvc (requires dllimport which is not used by libaom). Instead just call the function that returns the same variable.

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2021-10-30 13:37:45 +11:00
Paul B Mahol
4f8494fe5a doc/filters: fix typo for hsvkey/hsvhold 2021-10-29 23:32:08 +02:00
Paul B Mahol
8164fe1139 avfilter: add huesaturation filter 2021-10-29 23:18:27 +02:00
Brad Smith
dbfafe11ae configure: add initial RISC-V support
OpenBSD only supports riscv64 but this is an attempt at adding
some of the initial bits for RISC-V support.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-29 21:44:14 +02:00
James Almer
ba0ba5539a fate: update ref files after a recent change
Missed in 3925b826df.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-10-29 15:43:14 -03:00
Paul B Mahol
2b6d290fbf avfilter/vf_nlmeans: split wa struct
This will make x86 SIMD simpler and faster.
2021-10-29 18:42:29 +02:00
Paul B Mahol
eaca36d495 avfilter/vf_nlmeans: refactor line processing in preparation for x86 SIMD assembly 2021-10-29 18:42:29 +02:00
Paul B Mahol
38c86e7a02 avfilter/vf_nlmeans: avoid if () to help paralellization 2021-10-29 18:42:29 +02:00
Paul B Mahol
64d19411eb avfilter/vf_nlmeans: no need to print filter options at info level 2021-10-29 18:42:29 +02:00
Paul B Mahol
959ec353ce avfilter/vf_nlmeans: make access to pointer to lut faster 2021-10-29 18:42:29 +02:00
Paul B Mahol
81380d221c avfilter/vf_nlmeans: reduce scope of some variables 2021-10-29 18:42:29 +02:00
Alex Shumsky
3925b826df avformat/demux: preserve AV_PKT_FLAG_CORRUPT in parse_packet
If original packet is corrupted, then parsed packet is probably corrupted too.
Let the application decide what to do.

Signed-off-by: Alex Shumsky <alexthreed@gmail.com>
2021-10-29 13:37:20 -03:00