Zhao Zhili [Fri, 24 Jun 2022 14:42:01 +0000 (22:42 +0800)]
avcodec/cuviddec: fix null pointer dereference
It can happened on error path of cuvid_decode_init().
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Zhao Zhili [Fri, 24 Jun 2022 04:04:04 +0000 (12:04 +0800)]
avcodec/cuviddec: fix AV1 decoding error
cuvidParseVideoData only supports pure OBUs, it reports an unknown
error with AV1CodecConfigurationRecord. Check whether extradata
is AV1CodecConfigurationRecord and skip the first 4 bytes to fix
the issue.
The bug is revealed in ffmpeg cmd since
45e3b6a68 and
ffd1316e.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Jack Bruienne [Sun, 26 Jun 2022 15:04:42 +0000 (17:04 +0200)]
avcodec: fix time reporting for DFPWM streams
This adds the exact bits per sample for DFPWM to
av_get_exact_bits_per_sample.
Previously, the DTS and PTS were set to 0 because the codec never
reported them, but adding this allows libavformat to automatically
set DTS and PTS from the byte position of the stream.
Signed-off-by: Jack Bruienne <jackbruienne@gmail.com>
Andreas Rheinhardt [Fri, 24 Jun 2022 17:29:37 +0000 (19:29 +0200)]
avcodec/x86/h264_qpel: Remove unused functions
Forgotten in
4011a76494a5ff6844312813bc753aae8e54c2f0.
The reason for this is that these functtions are marked
as av_always_inline and GCC does not emit warnings
if such functions are unused, so this went unnoticed.
Yet Clang does, so this commit removes them.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Sun, 26 Jun 2022 04:12:32 +0000 (06:12 +0200)]
avformat/matroskaenc: Fix use of uninitialized value
Regression since
67eea6cf026a70940ea402d54685d67c660b49cd.
Affects only WebVTT when muxing WebM. (This is covered
by the webm-webvtt-remux FATE test which fails for several
FATE boxes on fate-ffmpeg.org.)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Michael Niedermayer [Fri, 1 Apr 2022 10:46:08 +0000 (12:46 +0200)]
avformat/matroskadec: avoid integer overflows in SAR computation
This ignores >64bit
Alternatively we could support that if it occurs in reality
Fixes: negation of -
9223372036854775808
Fixes: integer overflows
Fixes: 46072/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-
5029840966778880
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Leo Izen [Tue, 3 May 2022 15:38:43 +0000 (11:38 -0400)]
avcodec/libjxlenc: properly read input colorspace
Whether an ICC profile is present or not, the libjxl
encoder wrapper should now properly read colorspace tags
and forward them to libjxl appropriately, rather than just
assume sRGB as before. It will also print warnings when
colorimetric assumptions are made about the input data.
Reviewed-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Leo Izen <leo.izen@gmail.com>
Leo Izen [Tue, 3 May 2022 15:37:27 +0000 (11:37 -0400)]
avcodec/libjxldec: properly tag output colorspace
Whether an ICC profile is present or not, the decoder
should now properly tag the colorspace of pixel data
received by the decoder.
Reviewed-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Leo Izen <leo.izen@gmail.com>
Gyan Doshi [Sat, 25 Jun 2022 06:02:45 +0000 (11:32 +0530)]
avfilter/Makefile: always make colorspace.o
Unbreaks libavfilter builds when configured with a subset of filters.
drawutils added ff_draw_init2 in
6c3a82f043 which calls functions defined in
colorspace.c. So the latter needs to be built alongside the former.
Brad Smith [Thu, 3 Mar 2022 01:34:53 +0000 (20:34 -0500)]
avutil/ppc/cpu: Use proper header for OpenBSD PPC CPU detection
Use the proper header for PPC CPU detection code. sys/param.h includes
sys/types, but sys/types.h is the more appropriate header to be used
here.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
James Almer [Sat, 25 Jun 2022 01:59:03 +0000 (22:59 -0300)]
avformat/http: include version.h
This is needed to get LIBAVFORMAT_VERSION, used as part of the user agent.
Fixes a recent regression.
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
ManojGuptaBonda [Mon, 16 May 2022 13:15:58 +0000 (18:45 +0530)]
AV1 VDPAU hwaccel Decode support
Support for VDPAU accelerated AV1 decoding was added with libvdpau-1.5.
Support for the same in ffmpeg is added with this patch. Profiles
related to VDPAU AV1 can be found in latest vdpau.h present in
libvdpau-1.5.
Add AV1 VDPAU to list of hwaccels and supported formats
Added file vdpau_av1.c and Modified configure to add VDPAU AV1 support.
Mapped AV1 profiles to VDPAU AV1 profiles. Populated the codec specific
params that need to be passed to VDPAU.
Signed-off-by: Philip Langdale <philipl@overt.org>
Andreas Rheinhardt [Wed, 15 Jun 2022 11:15:42 +0000 (13:15 +0200)]
avformat/matroskaenc: Reuse dynamic buffer
Avoids some allocations.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Tue, 21 Jun 2022 02:15:20 +0000 (04:15 +0200)]
avformat/matroskaenc: Fix outdated comment
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 17 Jun 2022 05:22:31 +0000 (07:22 +0200)]
avformat/matroskaenc: Improve handling of AV1 extradata
Up until now, only the first four bytes (the ones preceding
the OBU) were written because not enough space has been reserved
for the complete CodecPrivate. This commit changes this
by increasing the space reserved for the CodecPrivate (it is big
enough for every sane sequence header plus something extra);
the code falls back to writing four bytes in case the increased
space turns out to be insufficient.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Thu, 16 Jun 2022 23:54:22 +0000 (01:54 +0200)]
avcodec/av1: Add upper bound for the size of a sane sequence header
It will be used by the Matroska muxer to reserve a certain number
of bytes for the CodecPrivate in case no extradata is initially
available (as it is for the libaom-av1 encoder).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 17 Jun 2022 03:49:06 +0000 (05:49 +0200)]
avformat/matroskaenc: Split updating CodecPrivate from writing it
Up until now, updating extradata was very ad-hoc: The amount of
space reserved for extradata was not recorded when writing the
header; instead the AAC code simply presumed that it was enough.
This commit changes this by recording how much space is available.
This brings with it that the code for writing of and reserving space
for the CodecPrivate and for updating it diverges. They are therefore
split; this allows to put other common tasks like seeking to
right offset as well as writing padding (in case the new extradata did
not fill the whole reserved space) to this common function.
The code for filling up the reserved space is smarter than the code
it replaces; therefore it is no longer necessary to reserve more
than necessary just to be sure that one can add an EBML Void element
(whose minimum size is two) lateron. This is the reason for the change
to the aac-autobsf-adtstoasc test.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 17 Jun 2022 03:12:47 +0000 (05:12 +0200)]
avformat/matroskaenc: Avoid swapping codecpar->extradata temporarily
Instead pass extradata and extradata_size explicitly.
(It is not perfect, as ff_put_(wav|bmp)_header() still uses
the extradata embedded in codecpar, but this is not an issue
as long as their CodecPrivate isn't updated.)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Thu, 16 Jun 2022 12:42:26 +0000 (14:42 +0200)]
avformat/matroskaenc: Split assembling CodecPrivate from writing it
This is in preparation for splitting writing and updating
extradata more thoroughly later.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Wed, 22 Jun 2022 09:33:32 +0000 (11:33 +0200)]
avcodec/hevc_sei: Fix check for SEI end
The intention behind the current check seems to be to check for
the rbsp_trailing_bits() syntax structure which is always 0x80
for valid SEI messages. Yet this is wrong: These trailing bits
are not part of the GetBitContext -- they have already been
stripped in ff_h2645_packet_split(). And it is harmful, as
0x80 is a legal SEI message payload type (namely for
Structure of pictures information SEI messages). We ignore this
type of SEI, but because of this bug we also ignored every
SEI message in the same NALU following it.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Wed, 22 Jun 2022 07:19:01 +0000 (09:19 +0200)]
avcodec/h2645_parse: Only trim RBSP trailing padding if it exists
It does not exist for NALUs for which the SODB is empty;
it also does not exist for NALUs for which not even
the complete header is present. The former category contains
end of sequence and end of bitstream units. The latter category
consists of one-byte HEVC units (the ordinary H.264 header is only
one byte long).
This commit therefore stops stripping RBSP trailing padding
from the former type of unit and discards the latter type of unit
altogether.
This also fixes an assertion failure: Before this commit, a one-byte
HEVC NALU from an ISOBMFF packet could pass all the checks in
hevc_parse_nal_header() (because the first byte of the size field
of the next unit is mistaken as containing the temporal_id);
yet because the trailing padding bits were stripped, its actually
had a size of less than eight bits; because h2645_parse.c uses
the checked bitstream reader, the get_bits_count() of the GetBitContext
is not 16 in this case; it is not even a multiple of eight
and this can trigger an assert in ff_hevc_decode_nal_sei().
Fixes: Assertion failure
Fixes: 46662/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-
4947860854013952
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Tue, 21 Jun 2022 07:13:29 +0000 (09:13 +0200)]
avcodec/hevc_ps: Don't use show_bits_long() unnecessarily
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Tue, 21 Jun 2022 05:47:00 +0000 (07:47 +0200)]
avcodec/hcadec: Move transient GetBitContext to stack
This avoids keeping pointers to no longer valid data
in the context.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Tue, 21 Jun 2022 04:49:37 +0000 (06:49 +0200)]
avcodec/hcadec: Don't use GetBit-API for byte-aligned reads
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Zhao Zhili [Fri, 24 Jun 2022 07:49:41 +0000 (15:49 +0800)]
avcodec/proresdec2: fix description of known fourcc
'acpo' should be 'apco', and add missing 'ap4x'.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Zhao Zhili [Fri, 24 Jun 2022 07:49:11 +0000 (15:49 +0800)]
avcodec/libuavs3d: fix potential index out of range
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Zhao Zhili [Mon, 13 Jun 2022 03:36:36 +0000 (11:36 +0800)]
avcodec/libdavs2: use frame rate code table
It's more natural than the floating to fraction conversion.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Zhao Zhili [Mon, 13 Jun 2022 03:36:35 +0000 (11:36 +0800)]
configure: select avs2 parser for libdavs2 decoder
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Zhao Zhili [Mon, 13 Jun 2022 03:36:34 +0000 (11:36 +0800)]
avcodec/avs2_parser: parse more info
Including video resolution, framerate and picture type, etc.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Zhao Zhili [Mon, 13 Jun 2022 03:36:33 +0000 (11:36 +0800)]
avcodec/avs2_parser: split data into frames
Before the patch, the parser split data into units, not frames.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Zhao Zhili [Mon, 13 Jun 2022 03:36:32 +0000 (11:36 +0800)]
avcodec/avs2: add AVS2 related definitions
Replace magic numbers by enum values.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Zhao Zhili [Fri, 24 Jun 2022 07:05:18 +0000 (15:05 +0800)]
avformat/movenc: enable compressorname for mp4 mode
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Steven Liu [Fri, 24 Jun 2022 05:55:41 +0000 (13:55 +0800)]
avcodec/audiotoolboxenc: return external error if encode failed
because the AudioConverterFillComplexBuffer can return 0 or 1 if
success.
so set the ret to 0 it AudioConverterFillComplexBuffer success and
return ret value for success or return AVERROR_EXTERNAL when
AudioConverterFillComplexBuffer failed.
BTW change the error message log level from warning to error.
Reviewed-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Xu Guangxin [Fri, 10 Jun 2022 12:47:47 +0000 (20:47 +0800)]
lavc/vaapi_hevc: fill rext luma/chroma offset in the right way
For range extension, the luma/chroma offset is larger than 8 bits, we
need fill the 16 bits version.
Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Michael Niedermayer [Thu, 9 Jun 2022 19:13:59 +0000 (21:13 +0200)]
avcodec/jpeglsdec: fix end check for xfrm
Fixes: out of array access
Fixes: 47871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMV_fuzzer-
5646305956855808
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, 9 Jun 2022 20:36:00 +0000 (22:36 +0200)]
avcodec/cdgraphics: limit scrolling to the line
Fixes: out of array access
Fixes: 47877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDGRAPHICS_fuzzer-
5690504626438144
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, 16 Jun 2022 21:02:11 +0000 (23:02 +0200)]
avformat/hls: Limit start_seq_no to one bit less
This avoids overflow checks on additions with 32bit numbers
Fixes: signed integer overflow:
9223372036854775806 + 2 cannot be represented in type 'long'
Fixes: 44012/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-
4747770734444544
Fixes: 48065/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-
5372410355908608
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Wan-Teh Chang [Thu, 16 Jun 2022 16:24:22 +0000 (09:24 -0700)]
avcodec/libaomenc: Get number of operating points
Use the new codec control AV1E_GET_NUM_OPERATING_POINTS to get the
number of operating points. This is the size of the output arrays of
AV1E_GET_SEQ_LEVEL_IDX and AV1E_GET_TARGET_SEQ_LEVEL_IDX.
Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: James Zern <jzern@google.com>
Paul B Mahol [Thu, 23 Jun 2022 12:47:29 +0000 (14:47 +0200)]
avfilter/vf_gblur: properly round output
Andreas Rheinhardt [Mon, 20 Jun 2022 05:31:42 +0000 (07:31 +0200)]
avcodec/x86/lossless_videodsp: Remove obsolete MMX(EXT) functions
The only systems which benefit from these are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 20 Jun 2022 05:20:40 +0000 (07:20 +0200)]
avcodec/x86/lossless_videoencdsp: Remove obsolete MMX function
The only systems which benefit from ff_diff_bytes_mmx are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 20 Jun 2022 05:14:47 +0000 (07:14 +0200)]
avcodec/x86/huffyuvencdsp: Remove obsolete MMX function
The only systems which benefit from ff_diff_int16_mmx are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 20 Jun 2022 05:08:31 +0000 (07:08 +0200)]
avcodec/x86/dirac_dwt: Remove obsolete MMX functions
The only systems which benefit from these are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 20 Jun 2022 04:41:42 +0000 (06:41 +0200)]
avcodec/x86/huffyuvdsp: Remove obsolete MMX functions
The only systems which benefit from these are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 20 Jun 2022 03:55:04 +0000 (05:55 +0200)]
avcodec/x86/vp8dsp: Remove obsolete MMX(EXT) functions
The only systems which benefit from these are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 20 Jun 2022 01:07:41 +0000 (03:07 +0200)]
avcodec/x86/dcadsp: Remove obsolete SSE function
The only systems which benefit from ff_lfe_fir0_float_sse are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Tue, 14 Jun 2022 18:34:24 +0000 (20:34 +0200)]
avcodec/x86/rv34dsp: Remove obsolete MMX function
The only systems which benefit from ff_rv34_idct_dc_add_mmx are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Tue, 14 Jun 2022 18:31:03 +0000 (20:31 +0200)]
avcodec/x86/synth_filter: Remove obsolete SSE function
The only systems which benefit from synth_filter_sse are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Tue, 14 Jun 2022 18:26:16 +0000 (20:26 +0200)]
avcodec/x86/dct32: Remove obsolete SSE function
The only systems which benefit from ff_dct32_float_sse are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Tue, 14 Jun 2022 18:21:03 +0000 (20:21 +0200)]
avcodec/x86/mpegaudiodsp: Remove obsolete SSE function
The only systems which benefit from imdct36_blocks_sse are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 13 Jun 2022 15:02:42 +0000 (17:02 +0200)]
avcodec/x86/vp6dsp: Remove obsolete MMX ff_vp6_filter_diag4_mmx
The only systems which benefit from it are truely ancient
32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 13 Jun 2022 14:57:39 +0000 (16:57 +0200)]
avcodec/x86/vp3dsp: Remove obsolete MMX functions
The only system which benefit from these are truely ancient
32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 13 Jun 2022 06:42:46 +0000 (08:42 +0200)]
avfilter/x86/vf_bwdif: Remove obsolete MMXEXT functions
The only system which benefit from these are truely ancient
32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 13 Jun 2022 06:39:57 +0000 (08:39 +0200)]
avfilter/x86/vf_idet: Remove obsolete MMX(EXT) functions
The only system which benefit from these are truely ancient
32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 13 Jun 2022 06:34:13 +0000 (08:34 +0200)]
avfilter/x86/vf_yadif: Remove obsolete MMXEXT functions
The only system which benefit from these are truely ancient
32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Sun, 12 Jun 2022 00:13:39 +0000 (02:13 +0200)]
avcodec/x86/videodsp: Remove obsolete MMX, 3dnow, SSE functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT, SSE and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2). So given that the only systems which benefit
from these functions are truely ancient 32bit x86s they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Sat, 11 Jun 2022 22:40:09 +0000 (00:40 +0200)]
avutil/x86/float_dsp: Remove obsolete 3dnowext function
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT, SSE and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2). So given that the only systems which benefit
from ff_vector_fmul_window_3dnowext are truely ancient 32bit
AMD x86s it is removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Sat, 11 Jun 2022 01:31:25 +0000 (03:31 +0200)]
avcodec/x86/vorbisdsp: Remove obsolete 3dnow functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT, SSE and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2). So given that the only systems which benefit
from the 3dnow implementations are truely ancient 32bit AMD x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Sat, 11 Jun 2022 00:45:08 +0000 (02:45 +0200)]
avcodec/x86/fft: Remove obsolete 3dnow functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT, SSE and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2). So given that the only systems which benefit
from the 3dnow implementations are truely ancient 32bit AMD x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Thu, 9 Jun 2022 15:50:53 +0000 (17:50 +0200)]
avutil/x86/pixelutils: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT, SSE and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2). So given that the only systems which benefit
from the 8x8 MMX (overridden by MMXEXT) or the 16x16 MMXEXT
(overridden by SSE2) are truely ancient 32bit x86s they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 23:37:50 +0000 (01:37 +0200)]
avfilter/x86/vf_eq_init: Remove obsolete MMXEXT function
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from process_mmxext are truely ancient 32bit x86s
it is removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Sat, 11 Jun 2022 16:50:44 +0000 (18:50 +0200)]
swscale/x86/swscale: Simplify macro
This is possible now that it is no longer used by MMX.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Thu, 9 Jun 2022 14:57:34 +0000 (16:57 +0200)]
swscale/x86/swscale: Remove obsolete and harmful MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT, SSE and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2). So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Moreover, some of the removed code was buggy/not bitexact
and lead to failures involving the f32le and f32be versions of
gray, gbrp and gbrap on x86-32 when SSE2 was not disabled.
See e.g.
https://fate.ffmpeg.org/report.cgi?time=
20220609221253&slot=x86_32-debian-kfreebsd-gcc-4.4-cpuflags-mmx
Notice that yuv2yuvX_mmx is not removed, because it is used
by SSE3 and AVX2 as fallback in case of unaligned data and
also for tail processing. I don't know why yuv2yuvX_mmxext
isn't being used for this; an earlier version [1] of
554c2bc7086f49ef5a6a989ad6bc4bc11807eb6f used it, but
the version that was eventually applied does not.
[1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2020-November/272124.html
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 23:13:22 +0000 (01:13 +0200)]
swscale/x86/yuv2rgb: Remove obsolete MMX functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 23:07:57 +0000 (01:07 +0200)]
swscale/x86/rgb2rgb: Remove obsolete MMX, 3dnow functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 22:16:31 +0000 (00:16 +0200)]
avcodec/x86/h264chroma: Remove obsolete 3dnow functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Thu, 9 Jun 2022 01:32:03 +0000 (03:32 +0200)]
avcodec/x86/h264_qpel: Remove obsolete MMXEXT functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 20:42:01 +0000 (22:42 +0200)]
avcodec/x86/hpeldsp: Remove obsolete MMX/3dnow functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 19:18:52 +0000 (21:18 +0200)]
avcodec/x86/hpeldsp_vp3: Remove obsolete 3dnow functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 19:00:55 +0000 (21:00 +0200)]
avcodec/x86/fmtconvert: Remove obsolete SSE functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 18:58:35 +0000 (20:58 +0200)]
avcodec/x86/svq1enc: Remove obsolete MMXEXT function
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from ff_ssd_int8_vs_int16_mmx are truely ancient
32bit x86s it is removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 18:54:45 +0000 (20:54 +0200)]
avcodec/x86/lossless_audiodsp: Remove obsolete MMXEXT function
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from ff_scalarproduct_and_madd_int16_mmxext are truely
ancient 32bit x86s it is removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 18:51:41 +0000 (20:51 +0200)]
avcodec/x86/pixblockdsp: Remove obsolete MMX functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 18:49:50 +0000 (20:49 +0200)]
avcodec/x86/blockdsp: Remove obsolete MMX functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 18:28:06 +0000 (20:28 +0200)]
avcodec/x86/idctdsp: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 18:47:39 +0000 (20:47 +0200)]
avcodec/x86/xvididct: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 18:10:45 +0000 (20:10 +0200)]
avcodec/x86/sbrdsp: Remove obsolete SSE function
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from ff_sbr_qmf_deint_bfly_sse are truely ancient 32bit x86s
it is removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Sat, 11 Jun 2022 14:24:23 +0000 (16:24 +0200)]
avcodec/x86/h264dsp_init: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Sat, 11 Jun 2022 02:09:24 +0000 (04:09 +0200)]
avcodec/x86/mpegvideoencdsp: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Tue, 7 Jun 2022 21:34:42 +0000 (23:34 +0200)]
avcodec/x86/me_cmp: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Tue, 7 Jun 2022 20:26:33 +0000 (22:26 +0200)]
avfilter/x86/vf_noise: Remove obsolete MMX function
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from line_noise_mmx are truely ancient 32bit x86s
it is removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Tue, 7 Jun 2022 13:48:09 +0000 (15:48 +0200)]
avcodec/x86/h264_intrapred: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Tue, 7 Jun 2022 11:55:24 +0000 (13:55 +0200)]
avcodec/x86/cavsdsp: Remove obsolete MMX(EXT), 3dnow functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 14:28:37 +0000 (16:28 +0200)]
avcodec/x86/rv40dsp_init: Remove obsolete MMX(EXT), 3dnow functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 13:47:57 +0000 (15:47 +0200)]
avcodec/x86/hevcdsp_init: Remove obsolete MMXEXT functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Fri, 10 Jun 2022 13:32:33 +0000 (15:32 +0200)]
avcodec/x86/fdct: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Tue, 7 Jun 2022 00:06:41 +0000 (02:06 +0200)]
avcodec/x86/mpegvideoenc: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 6 Jun 2022 23:37:59 +0000 (01:37 +0200)]
avcodec/x86/diracdsp: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 6 Jun 2022 23:22:52 +0000 (01:22 +0200)]
avcodec/x86/audiodsp_init: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 6 Jun 2022 22:55:25 +0000 (00:55 +0200)]
avcodec/x86/ac3dsp_init: Remove obsolete 3dnow, MMX(EXT), SSE functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt [Mon, 6 Jun 2022 22:40:04 +0000 (00:40 +0200)]
avcodec/x86/vc1dsp_init: Remove obsolete 3dnow, MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Michael Goulet [Thu, 16 Jun 2022 11:17:25 +0000 (13:17 +0200)]
lavc/dovi_rpu: Fix UB for possible left shift of negative values
It is undefined to left-shift a negative value.
Paul B Mahol [Tue, 21 Jun 2022 15:13:59 +0000 (17:13 +0200)]
avfilter/vf_estdif: tweak ecost option
Nil Admirari [Mon, 20 Jun 2022 10:30:01 +0000 (13:30 +0300)]
libavfilter/vf_frei0r.c: Use UTF-8 version of getenv()
Signed-off-by: Martin Storsjö <martin@martin.st>
Nil Admirari [Mon, 20 Jun 2022 10:30:00 +0000 (13:30 +0300)]
libavformat: Remove MAX_PATH limit and use UTF-8 version of getenv()
1. getenv() is replaced with getenv_utf8() across libavformat.
2. New versions of AviSynth+ are now called with UTF-8 filenames.
3. Old versions of AviSynth are still using ANSI strings,
but MAX_PATH limit on filename is removed.
Signed-off-by: Martin Storsjö <martin@martin.st>
Nil Admirari [Mon, 20 Jun 2022 10:29:59 +0000 (13:29 +0300)]
fftools: Remove MAX_PATH limit and switch to UTF-8 versions of fopen() and getenv()
Signed-off-by: Martin Storsjö <martin@martin.st>
Nil Admirari [Mon, 20 Jun 2022 10:29:58 +0000 (13:29 +0300)]
compat/w32dlfcn.h: Remove MAX_PATH limit and replace LoadLibraryExA with LoadLibraryExW
Signed-off-by: Martin Storsjö <martin@martin.st>
Nil Admirari [Mon, 20 Jun 2022 10:29:57 +0000 (13:29 +0300)]
libavutil: Add wchartoutf8(), wchartoansi(), utf8toansi(), getenv_utf8(), freeenv_utf8() and getenv_dup()
wchartoutf8() converts strings returned by WinAPI into UTF-8,
which is FFmpeg's preffered encoding.
Some external dependencies, such as AviSynth, are still
not Unicode-enabled. utf8toansi() converts UTF-8 strings
into ANSI in two steps: UTF-8 -> wchar_t -> ANSI.
wchartoansi() is responsible for the second step of the conversion.
Conversion in just one step is not supported by WinAPI.
Since these character converting functions allocate the buffer
of necessary size, they also facilitate the removal of MAX_PATH limit
in places where fixed-size ANSI/WCHAR strings were used
as filename buffers.
On Windows, getenv_utf8() wraps _wgetenv() converting its input from
and its output to UTF-8. Strings returned by getenv_utf8()
must be freed by freeenv_utf8().
On all other platforms getenv_utf8() is a wrapper around getenv(),
and freeenv_utf8() is a no-op.
The value returned by plain getenv() cannot be modified;
av_strdup() is usually used when modifications are required.
However, on Windows, av_strdup() after getenv_utf8() leads to
unnecessary allocation. getenv_dup() is introduced to avoid
such an allocation. Value returned by getenv_dup() must be freed
by av_free().
Because of cleanup complexities, in places that only test the existence
of an environment variable or compare its value with a string
consisting entirely of ASCII characters, the use of plain getenv()
is still preferred. (libavutil/log.c check_color_terminal()
is an example of such a place.)
Plain getenv() is also preffered in UNIX-only code,
such as bktr.c, fbdev_common.c, oss.c in libavdevice
or af_ladspa.c in libavfilter.
Signed-off-by: Martin Storsjö <martin@martin.st>
Marton Balint [Mon, 13 Jun 2022 21:02:04 +0000 (23:02 +0200)]
fftools/ffprobe: report avio errors
Signed-off-by: Marton Balint <cus@passwd.hu>
Andreas Rheinhardt [Wed, 15 Jun 2022 09:49:48 +0000 (11:49 +0200)]
avformat/matroskaenc: Don't check twice whether to write tags
Because not all metadata is written as tags, the Matroska muxer
filters out the tags that are not written as tags.
Therefore the code first checks whether a Tag master element
needs to be opened for a given stream/chapter/attachment/global
metadata. If the answer turns out to be yes, it is checked again
whether a given AVDictionaryEntry is written as a tag.
This commit changes this: The Tag element is opened unconditionally
and in case it turns out that it was unneeded, it is discarded again.
This is possible because the Tag element is written into its own
dynamic buffer.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>