1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

111379 Commits

Author SHA1 Message Date
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
Niklas Haas
2e83ba001d lavfi/vf_libplacebo: deprecate hybrid_mix option
Deprecated upstream in libplacebo v6.292.
2023-07-08 12:41:45 +02:00
James Almer
13ef5025e3 fate/cbs: add more VVC tests
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-07 11:56:37 -03:00
James Almer
3a30abd8ae avcodec/cbs_h266: use exp_tile_height when checking the allowed range for pps_num_exp_tile_rows_minus1
Fixes warnings about variable set but not used.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-07 11:56:37 -03:00
James Almer
0f008a0ffa avcodec/cbs_h266: fix use of uninitialized value
And fix the allowed range for ph_log2_diff_max_bt_min_qt_intra_slice_luma while at it.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-07 11:56:37 -03:00
Zhao Zhili
7eeef72c67 avcodec/nvenc: set idrPeriod to gopLength unconditionally
When intra_refresh is enabled, gopLength is equal to
NVENC_INFINITE_GOPLENGTH. gopLength should be 1 at least.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-07-07 13:39:26 +02:00
Zhao Zhili
0d0c39832f avcodec/nvenc: fix intraRefreshPeriod setting
Regression since 99dfdb45. intraRefreshPeriod access cc->gopLength,
which has been overwritten to NVENC_INFINITE_GOPLENGTH before.

Fixes #10445.
2023-07-07 13:39:26 +02:00
Anton Khirnov
ac616afa62 lavf/dv: stop setting a random video bitrate
A real value is determined from the bytestream.
2023-07-07 12:13:05 +02:00
Anton Khirnov
9b625ab679 lavc/dvdec: export bitrate
Changes the result of fate-mxf-probe-dv25, where the bitrate is now
exported.

Also changes the result of fate-bsf-dv-error-marker, where the exported
bitrate is now different. Note that the codec layer bitrate does not
match the container bitrate, because container timing is 25fps, while
the DV profile is 50.
2023-07-07 12:12:52 +02:00
Anton Khirnov
b54603a26a lavc/decode: do not perform decoding when sending draining packets
This way decoding errors will not be returned when the user starts
draining the decoder, avoiding confusion over whether draining did or
did not start.

Fixes failures of fate-h264-attachment-631 for certain numbers of frame
threads (e.g. 5).
2023-07-07 12:07:24 +02:00
Anton Khirnov
69516ab3e9 lavc/decode: move submitting input packets to bitstream filters
Do it from ff_decode_get_packet() rather than from
avcodec_send_packet(). This way all nontrivial stages of the decoding
pipeline (i.e. other than just placing a packet at its entrance) are
pull-based rather than a mix of push an pull.
2023-07-07 12:07:24 +02:00
Anton Khirnov
0f957cfba2 lavc/bsf: move IS_EMPTY() to packet_internal()
It will be useful in other places.
2023-07-07 12:07:24 +02:00
Anton Khirnov
c4332dfda9 lavc/decode: track whether the caller started draining with a separate flag
Decoding pipeline has multiple stages, some of which may have their own
delay (e.g. bitstream filters). The code currently uses
AVCodecInternal.draining to track all of them, but they do not have to
all be in sync.
2023-07-07 12:07:24 +02:00
Anton Khirnov
fd915dc1da lavc: move AVCodecInternal.last_audio_frame to EncodeContext
It does not need to be visible outside of encode.c.
2023-07-07 12:07:24 +02:00
Anton Khirnov
232700154c lavc: add generic-encode-layer private data
Move AVCodecInternal.intra_only_flag to it, should should not be visible
outside of encode.c.
2023-07-07 12:07:23 +02:00
Anton Khirnov
f2fb882b3f lavc: add generic-decode-layer private data
Move AVCodecInternal.nb_draining_errors to it, should should not be
visible outside of decode.c.
2023-07-07 12:07:23 +02:00
Anton Khirnov
21de4db402 lavc: reindent after previous commit 2023-07-07 12:07:23 +02:00
Anton Khirnov
6ff27024b8 lavc/avcodec: split flushing into decode- and encode-specific functions
Will allow making some state private to encoding/decoding in the future.
2023-07-07 12:07:23 +02:00
Anton Khirnov
5e7b5b0090 lavc: add a header for internal generic-layer APIs
The goal is to distinguish between APIs provided by the generic layer to
individual codecs and APIs internal to the generic layer.

Start by moving ff_{decode,encode}_receive_frame() and
ff_{decode,encode}_preinit() into this new header, as those functions
are called from generic code and should not be visible to individual
codecs.
2023-07-07 12:07:23 +02:00
Andreas Rheinhardt
83c0f7b046 avformat/evcdec: Avoid nonsense casts
For uint8_t buf[EVC_NALU_LENGTH_PREFIX_SIZE], &buf still points
to the beginning of buf, but it is of type "pointer to array of
EVC_NALU_LENGTH_PREFIX_SIZE uint8_t" (i.e. pointer arithmetic
would operate on blocks of size EVC_NALU_LENGTH_PREFIX_SIZE).
This is of course a different type than uint8_t*, which is why
there have been casts in evc_read_packet(). But these are unnecessary
if one justs removes the unnecessary address-of operator.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-07-07 03:47:29 +02:00
QiTong Li
79f41a0760 fftools/ffplay: fix typo in frame_queue_destory
Not sure if the function naming frame_queue_destory is intended because
"destory" is not really a word. Changing it to "destroy" makes more sense.

Signed-off-by: QiTong Li <liqitong@163.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2023-07-06 21:24:47 +02:00
Marton Balint
4e27b485d7 avcodec/mpeg12dec: ignore picture start code in extradata for AVID mpeg2 files
AVID IMX MPEG2 files in MOV seems to have extradata like this:

00000000: 0000 0018 4143 4c52 4143 4c52 3030 3031  ....ACLRACLR0001
00000010: 0000 0001 0000 0000                      ........

Signed-off-by: Marton Balint <cus@passwd.hu>
2023-07-06 21:08:57 +02:00
James Almer
b7f4d5fa7e avutil/random_seed: add support for gcrypt and OpenSSL as source of randomness
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-06 15:30:27 -03:00
James Almer
68e9d2835f avcodec/cbs_h266: add support for Adaptation parameter set NALU type
Reviewed-by: Nuo Mi <nuomi2021@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-06 11:43:13 -03:00
Frank Plowman
4b19690ff4 cbs_h266: add range extension support
example clips:
  * 12b444vvc1_E_Sony_2
  * 12b444Ietsrc_A_Kwai_2
  * 10b444P16_D_Sony_2
  * 12b444Iepp_A_Sharp_2
  * 12b444SPetsrc_B_Kwai_2

Co-authored-by: Nuo Mi <nuomi2021@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-06 09:05:13 -03:00
John Cox
f00222e81f avfilter/vf_bwdif: Add neon for filter_line3
Signed-off-by: John Cox <jc@kynesim.co.uk>
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-06 00:21:05 +03:00
John Cox
697533e76d avfilter/vf_bwdif: Add a filter_line3 method for optimisation
Add an optional filter_line3 to the available optimisations.

filter_line3 is equivalent to filter_line, memcpy, filter_line

filter_line shares quite a number of loads and some calculations in
common with its next iteration and testing shows that using aarch64
neon filter_line3s performance is 30% better than two filter_lines
and a memcpy.

Adds a test for vf_bwdif filter_line3 to checkasm

Rounds job start lines down to a multiple of 4. This means that if
filter_line3 exists then filter_line will not sometimes be called
once at the end of a slice depending on thread count. The final slice
may do up to 3 extra lines but filter_edge is faster than filter_line
so it is unlikely to create any noticable thread load variation.

Signed-off-by: John Cox <jc@kynesim.co.uk>
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-06 00:21:05 +03:00
John Cox
94cb94a2c0 avfilter/vf_bwdif: Add neon for filter_line
Exports C filter_line needed for tail fixup of neon code
Adds neon for filter_line

Signed-off-by: John Cox <jc@kynesim.co.uk>
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-06 00:21:05 +03:00
John Cox
8130df83e0 avfilter/vf_bwdif: Add neon for filter_edge
Adds clip and spatial macros for aarch64 neon
Exports C filter_edge needed for tail fixup of neon code
Adds neon for filter_edge

Signed-off-by: John Cox <jc@kynesim.co.uk>
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-06 00:21:05 +03:00
John Cox
7ed7c00f55 tests/checkasm: Add test for vf_bwdif filter_edge
Signed-off-by: John Cox <jc@kynesim.co.uk>
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-06 00:21:05 +03:00
John Cox
5075cfb4e6 avfilter/vf_bwdif: Add neon for filter_intra
Adds an outline for aarch neon functions
Adds common macros and consts for aarch64 neon
Exports C filter_intra needed for tail fixup of neon code
Adds neon for filter_intra

Signed-off-by: John Cox <jc@kynesim.co.uk>
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-06 00:21:05 +03:00
John Cox
7caa8d6b91 tests/checkasm: Add test for vf_bwdif filter_intra
Signed-off-by: John Cox <jc@kynesim.co.uk>
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-06 00:21:05 +03:00
James Almer
8995e2f77e avcodec/cbs_h266: add support for Decoding capability information NALU type
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-05 18:18:33 -03:00
James Almer
6cb57bb457 avcodec/cbs_h266: add support for Operating point information NALU type
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-05 18:18:33 -03:00
James Almer
319a6b3ae2 avcodec/cbs_h266: store RowHeightVal and ColWidthVal in the context
Stop overwriting values from the bitstream arrays pps_tile_column_width_minus1
and pps_tile_row_height_minus1.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-05 18:18:33 -03:00
James Almer
ee09f20796 avcodec/cbs_h266: don't infer derived values
The macro is meant for coded values only.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-05 18:18:33 -03:00
Paul B Mahol
3bbb1c023b avfilter/avf_showcwt: fix offset to take into initial delay
Syncs audio with video.
2023-07-05 23:02:08 +02:00
Paul B Mahol
0cdfe46f4e avfilter/avf_showcwt: fix output frame pts if inlink timebase does not match sample rate 2023-07-05 22:56:05 +02:00
Paul B Mahol
a196d02e86 avfilter/af_aresample: switch to activate 2023-07-05 21:42:22 +02:00
Philip Langdale
0e7fa8b3ca avutil/random_seed: include stddef.h
The new function uses size_t, which has to be defined.
2023-07-05 10:25:12 -07:00
James Almer
d694c25b44 avutil/random_seed: add av_random_bytes()
Uses the existing code for av_get_random_seed() to return a buffer with
cryptographically secure random data, or an error if none could be generated.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-05 10:06:05 -03:00
James Almer
7a1128ca07 avutil/random_seed: use fread() in read_random()
This ensures the requested amount of bytes is read.
Also remove /dev/random as it's no longer necessary.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-05 08:58:50 -03:00
Nuo Mi
a357758ec5 vvc.h: Enable 16-bit support for VVC_MAX_POINTS_IN_QP_TABLE
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-05 08:48:56 -03:00
Frank Plowman
a8178be3b3 cbs_h266: expand the bit depth range to 16 bits
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-05 08:46:50 -03:00
Haihao Xiang
ca939ebb4f lavfi/tonemap_vaapi: remove HDR metadata
The HDR metadata should be removed after HDR to SDR conversion,
otherwise the output frame still has HDR side data.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-07-05 09:34:19 +08:00
Paul B Mahol
8622dcb39b avfilter/adynamicequalizer_template: refactor and improve output 2023-07-05 01:53:04 +02:00
Lynne
9ff834c2a0
bwdif_vulkan: clamp the temporarily interpolated sample spatially
This makes the filter output match that of the C version.
It was left intentionally while we figured out if it was better
or not, and while it makes certain samples better, it makes static
samples jump around slightly.
2023-07-04 00:52:19 +02:00
Zhao Zhili
d4b989c94d avformat/asfdec_f: fix need_parsing flag for codec mpeg4
AVSTREAM_PARSE_FULL_ONCE is only implemented for H.264.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-07-04 04:49:48 +08:00
Zhao Zhili
3eb7968ed9 avformat/asfdec_f: support bmp_tags_unofficial
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-07-04 04:49:48 +08:00
Zhao Zhili
bdb4b64f16 avcodec/hevc_parse: check the size of hvcC is at least 23
The code after the check skip 21 bytes and then read two bytes.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-07-04 04:49:48 +08:00