Commit Graph

111528 Commits

Author SHA1 Message Date
Paul B Mahol 422bfdc4ae avfilter/avf_showcwt: add bar display support 2023-07-13 00:11:34 +02:00
Nicolas George ca9ec4e7ed lavu/avassert: include config.h
Fix setting the assert level.
2023-07-12 15:35:37 +02:00
Nicolas George cf7ed01938 lavc/intrax8: fix an assert 2023-07-12 15:35:37 +02:00
James Almer e6954fd087 avcodec/decode: don't reject flush packets when buffer_pkt is not empty
Restores the behavior before commit a92dbeb9ae.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-12 10:34:42 -03:00
Nicolas George 02aeacbb5e lavd/opengl: select the GL context before drawing
Since “2d924b3a63 fftools/ffmpeg: move each muxer to a separate thread”,
opengl_write_packet() is called from a different thread than
opengl_write_header() and would nothing for lack of a selected context.
2023-07-12 15:06:15 +02:00
Jonas Lindner 886c1ffb5d libavcodec/ansi: fix ECMA-48 SGR parameter 49
As can be seen in man console_codes this parameter sets the default
background color

Signed-off-by: Jonas Lindner <jolindner@gmx.de>
2023-07-12 08:38:51 +10:00
Anton Khirnov 6a9d3f46c7 fftools/ffmpeg: drop an obsolete debug log
The value it prints has not been cur_dts from lavf for a very long time,
so it's misleading.
2023-07-11 19:28:18 +02:00
Anton Khirnov 57a42a714b fftools/ffmpeg_filter: consolidate calling avfilter_graph_set_auto_convert()
Do not call it from choose_pix_fmts(), as that function is not supposed
to modify random filtergraph properties.
2023-07-11 19:28:18 +02:00
Anton Khirnov 432399780a fftools/ffmpeg_filter: make OutputFile.{formats,ch_layouts,sample_rates} private
They are not used outside of the filtering code.
2023-07-11 19:28:18 +02:00
Anton Khirnov a3ab5bf80d fftools/ffmpeg_filter: make OutputFile.width,height private
They are not used outside of the filtering code.
2023-07-11 19:28:18 +02:00
Anton Khirnov c19aa9c28f fftools/ffmpeg_filter: make OutputFile.ch_layout private
It is not used outside of the filtering code.
2023-07-11 19:28:18 +02:00
Anton Khirnov 42f3f54cf4 fftools/ffmpeg_filter: make OutputFile.format/sample_rate private
They are not used outside of the filtering code.
2023-07-11 19:28:18 +02:00
Anton Khirnov c9a99ffe51 fftools/ffmpeg_filter: make sure no input or output is bound twice 2023-07-11 19:28:18 +02:00
Anton Khirnov fcc33ada47 lavfi: make sure frame SAR matches the link value 2023-07-11 19:28:18 +02:00
Anton Khirnov afeb2468b2 lavc/encode: improve unsupported-format error messages
Mention encoder name in the message to emphasize that the value in
question is not supported by this specific encoder, not necessarily by
libavcodec in general.

Print a list of values supported by the encoder.
2023-07-11 19:28:18 +02:00
Anton Khirnov 39206c5e58 lavc/encode: improve input sample rate validation
Reject zero sample rates in addition to negative ones and describe them
as 'invalid' rather than 'unsupported'.
2023-07-11 19:28:18 +02:00
Anton Khirnov fc6c746aa1 lavc/encoder: always print an error on an unsupported channel layout
Even if the layout is indescribable.
2023-07-11 19:28:18 +02:00
Anton Khirnov e026395d22 lavc/encode: shorten code by using a local variable 2023-07-11 19:28:18 +02:00
Anton Khirnov 160fefacd3 lavc/encode: print separate messages for unknown and unsupported formats
The former is typically a bug in the calling program, while the latter
will more often be a user configuration issue.
2023-07-11 19:28:18 +02:00
James Almer 2bbb6cf74e avcodec/test/avcodec: check decoders for FF_CODEC_CAP_SETS_PKT_DTS
Ensure that only decode() callback ones set it.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-11 14:26:43 -03:00
James Almer 31ae95d988 avcodec/v4l2_m2m_dec: remove FF_CODEC_CAP_SETS_PKT_DTS flag
It has no effect on receive_frame() decoders.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-11 14:26:43 -03:00
James Almer 132271c54e avcodec/mmaldec: remove FF_CODEC_CAP_SETS_PKT_DTS flag
It has no effect on receive_frame() decoders.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-11 14:26:43 -03:00
James Almer 823387aa9f avcodec/mjpegdec: remove FF_CODEC_CAP_SETS_PKT_DTS flag
It has no effect on receive_frame() decoders.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-11 14:26:43 -03:00
James Almer 994dbcdade avcodec/mediacodecdec: remove FF_CODEC_CAP_SETS_PKT_DTS flag
It has no effect on receive_frame() decoders.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-11 14:26:43 -03:00
James Almer 5ad78a2684 avcodec/libdav1d: remove FF_CODEC_CAP_SETS_PKT_DTS flag
It has no effect on receive_frame() decoders.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-11 14:26:43 -03:00
James Almer 62cb9d97c1 avcodec/av1dec: remove FF_CODEC_CAP_SETS_PKT_DTS flag
It has no effect on receive_frame() decoders.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-11 14:26:43 -03:00
Anton Khirnov 1b45405d44 tests/fate-run: add testing with a random number of threads
Useful for discovering bugs that depend on a specific thread count.

Use like THREADS=randomX for a random thread count from 1 to X, with
X=16 when not specified. Note that the thread count is different for
every test.
2023-07-11 19:19:32 +02:00
Anton Khirnov 551a9af5a1 lavu/tests/cpu: stop processing the thread count
Just print it as it is.

Needed by the following commit.
2023-07-11 19:15:04 +02:00
Anton Khirnov bbff143b07 lavfi/src_movie: stop using AV_CODEC_FLAG_COPY_OPAQUE
That feature is overkill for a constant pointer to AVFilterLink which
can be stored in AVCodecContext.opaque (indirectly, because the link is
not allocated yet at the time the codec is opened).

This also avoids leaking non-NULL AVFrame.opaque to callers.
2023-07-11 19:14:23 +02:00
Leo Izen 75b1a555a7
avcodec/libjxldec: build against libjxl 0.9
Git master libjxl changed several function signatures, so this commit
adds some #ifdefs to handle the new signatures without breaking old
releases. Do note that old git master development versions of libjxl
will be broken, but no releases will be.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2023-07-10 16:26:40 -04:00
Paul B Mahol f3896a148e avfilter/avf_showcwt: fix frame slide output 2023-07-10 18:57:14 +02:00
Paul B Mahol 1324698ff3 avfilter/avf_showcwt: simplify EOF checking 2023-07-10 18:57:13 +02:00
Paul B Mahol 2f2f76def7 avfilter/avf_showcwt: optimize multiplication with kernel 2023-07-10 18:57:12 +02:00
Paul B Mahol 587189cdb9 avfilter/avf_showcwt: simplify cache handling 2023-07-10 18:57:10 +02:00
Paul B Mahol 2c4fa968b6 avfilter/avf_showcwt: use av_rescale() 2023-07-10 18:57:08 +02:00
Andreas Rheinhardt a92dbeb9ae avcodec/decode: Return EAGAIN instead of discarding unused packet
Should fix #10457, a regression caused by
69516ab3e9.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-07-10 16:25:46 +02:00
Andreas Rheinhardt f6dc85ae16 avcodec/hevc_ps: Improve PPS SCC extension bit depth check
From the spec: "It is a requirement of bitstream conformance that
the value of luma_bit_depth_entry_minus8 shall be equal to
the value of bit_depth_luma_minus8"; similarly for chroma.

Also fixes Coverity ticket #1529226 (complaining about the fact
that chroma_bit_depth_entry is checked twice).

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-07-10 12:31:06 +02:00
Philip Langdale 1c61c24f5f vulkan/hevc: handle missing active PPS
I don't pretend to understand how we get into this situation, but there
are files out there where we can end up with the active PPS not being
identified when we call vk_hevc_end_frame. In these situations today,
we will segfault. So, before we give up, see if we can get the active
PPS id from the slice header, and use that if possible.

If that still doesn't work, return an error instead of segfaulting.
2023-07-10 16:49:32 +08:00
Dai, Jianhui J 3b358f151d avformat/ivfenc: Set the "number of frames" in IVF header
Should set "number of frames" to bytes 24-27 of IVF header, not
duration.
It is described by [1], and confirmed by parsing all IVF files in [2].

This commit also updates the md5sum of refs to pass fate-cbs.

[1] Duck IVF - MultimediaWiki
https://wiki.multimedia.cx/index.php/Duck_IVF

[2] webm/vp8-test-vectors
https://chromium.googlesource.com/webm/vp8-test-vectors

Signed-off-by: Jianhui Dai <jianhui.j.dai@intel.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2023-07-09 16:56:58 -04:00
Paul B Mahol fcbee7efdf avfilter/avf_showcwt: add qdrt frequency scale 2023-07-09 20:53:55 +02:00
Paul B Mahol aee8689ba5 avfilter/avf_showcwt: add cbrt frequency scale 2023-07-09 20:53:54 +02:00
Paul B Mahol 7f23b72dde avfilter/avf_showcwt: add sqrt frequency scale 2023-07-09 20:53:52 +02:00
Marton Balint 7357012bb5 fftools/ffmpeg: fix negative timestamps at the beginning of the encoding
Also fix a couple of possible overflows while at it.

Fixes the negative initial timestamps in ticket #10358.

Signed-off-by: Marton Balint <cus@passwd.hu>
2023-07-09 19:50:15 +02:00
Marton Balint f607e8517d avdevice/decklink_enc: use 64bit format string for BMD timebase instead of long long
BMDTimeValue is defined as LONGLONG on Windows, but int64_t on Linux/Mac.

Fixes format string warnings:

libavdevice/decklink_enc.cpp: In function ‘void construct_cc(AVFormatContext*, decklink_ctx*, AVPacket*, klvanc_line_set_s*)’:
libavdevice/decklink_enc.cpp:424:48: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘BMDTimeValue {aka long int}’ [-Wformat=]
                ctx->bmd_tb_num, ctx->bmd_tb_den);
                ~~~~~~~~~~~~~~~                 ^
libavdevice/decklink_enc.cpp:424:48: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 5 has type ‘BMDTimeValue {aka long int}’ [-Wformat=]

Signed-off-by: Marton Balint <cus@passwd.hu>
2023-07-09 19:50:15 +02:00
Paul B Mahol 20b8688092 avfilter/adynamicequalizer_template: fix peak filter 2023-07-09 11:58:22 +02:00
Paul B Mahol 889c2529cc avfilter/af_adynamicequalizer: simplify calculations 2023-07-09 11:58:03 +02:00
Andreas Rheinhardt e52676e20b avformat/evc: Don't cast const away, avoid loop
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-07-09 03:05:00 +02:00
Andreas Rheinhardt e5ab2dab2c avformat/evcdec: Check that enough data has been read
Fixes potential use of uninitialized values
in evc_read_nal_unit_length().

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-07-09 02:40:14 +02:00
Pavel Koshevoy 0056d9f176 avutil: fix build failure on osx 10.4
libavutil/random_seed.c calls arc4random_buf which is
not available on OSX 10.4 Tiger, but the configuration
script tests for arc4random which is available.

Fix the configuration test to match the actual API used.

Co-authored-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-08 14:51:15 -03:00
Niklas Haas 13e9899014 lavfi/vf_libplacebo: add contrast recovery options
New upstream option. Enabled by default in the high-quality preset
upstream, so enable it by default here.
2023-07-08 12:54:49 +02:00