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

111338 Commits

Author SHA1 Message Date
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
Zhao Zhili
372f71cdc7 avcodec/hevc_parse: restrict configurationVersion to 0 and 1
The standard only defined configurationVersion 1.
configurationVersion 0 is for backward compatibility predates the
standard.

This patch reduces the chance that some malformated streams being
detected as hvcC.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-07-04 04:49:48 +08:00
James Almer
50f34172e0 fftools/ffplay: remove usage of internal AVInputFormat.read_seek field
It's an internal field, so it should not be touched.

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-02 19:04:25 -03:00
Tomas Härdin
25a91824af Add SMC vsynth tests 2023-07-02 21:08:59 +02:00
Devin Heitmueller
695789eacc avcodec/decode: Preserve AFD side data when going from AVPacket to AVFrame
This is needed to ensure that AFD data continues to work when
capturing V210 video with the Decklink libavdevice input.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2023-07-02 19:57:45 +02:00
Devin Heitmueller
ac4247270c avdevice/decklink_enc: add support for SMPTE 2038 VANC packet output
Support decoding and embedding VANC packets delivered via SMPTE 2038
into the SDI output.  We leverage an intermediate queue because
data packets are announced separately from video but we need to embed
the data into the video frame when it is output.

Note that this patch has some additional abstraction for data
streams in general as opposed to just SMPTE 2038 packets.  This is
because subsequent patches will introduce support for other
data codecs.

Thanks to Marton Balint for review/feedback.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2023-07-02 19:57:45 +02:00
Devin Heitmueller
e7d800fe89 avdevice/decklink: move queue_size to an argument for ff_decklink_packet_queue_init
The existing queue initialization function would always sets it's
maximum queue size to ctx->queue_size.  But because we are introducing
more queues we may want the sizes to differ between them.

Move the specification of the queue size into an argument, which can
be passed from the caller.

This patch makes no functional change to the behavior.  It is being
made to accommodate Marton Balin's request to split out the queue
size for the new VANC queue being introduced in a later patch.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2023-07-02 19:57:45 +02:00
xufuji456
5930d397ef lavc/videotoolboxenc: fix enabling low-latency encode
Use CFDictionarySetValue to enable low-latency encoding mode.
Since the key is a type of "EncoderSpecification", instead of
"CompressionProperty".

Signed-off-by: xufuji456 <839789740@qq.com>
Signed-off-by: Rick Kern <kernrj@gmail.com>
2023-07-02 12:02:51 -04:00
James Almer
8a6d3482de fate/cbs: fix sample path for discard tests
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-02 12:53:23 -03:00
Nuo Mi
3720fa5fec cbs_h266: fix typo for ols_mode_idc == 2
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-02 09:37:16 -03:00
Nuo Mi
8489e317bf cbs_h266: fix sign for pps_xxx_qp_offset_list
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-02 09:36:45 -03:00
James Almer
ab57b44527 fate/cbs: simplify the filter_unit discard tests
No need to generate intermediate files and probe them. We only care to know that the
output of the bsf excludes the frames in question, and a simple checksum is enough.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-01 19:41:12 -03:00
James Almer
a77f5019f5 avcodec/cbs_h266: store SubpicIdVal in the context
And use it to derive CurrSubpicIdx

Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-01 19:41:12 -03:00
Andreas Rheinhardt
e7f152a8c2 avcodec/cbs_h266_syntax_template: Avoid shadowing
Reviewed-by: Nuo Mi <nuomi2021@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-07-01 17:38:54 +02:00
Andreas Rheinhardt
c732fdfa05 avcodec/cbs_h266_syntax_template: Don't use uninitialized value
Just a typo. Fixes a warning from Clang.

Reviewed-by: Nuo Mi <nuomi2021@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-07-01 17:37:55 +02:00
Paul B Mahol
b40324d417 doc/general_contents: update for recent additions 2023-06-30 21:39:45 +02:00
James Almer
e4d4d616ba fate/cbs: run the VVC tests within the fate-cbs target
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-30 13:48:50 -03:00
Andreas Rheinhardt
46a5b9e2c0 avcodec/tests/avcodec: Remove unnecessary internal.h inclusion
Forgotten in a688f3c13c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-06-30 17:47:53 +02:00
Andreas Rheinhardt
686156f366 avcodec/hevc_ps: Constify VPS, SPS pointers when parsing PPS
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-06-30 17:47:53 +02:00
James Almer
96d6990517 avcodec/cbs_h266: use VVC_MAX_VPS_COUNT for range checks and array size
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-30 08:42:07 -03:00
James Almer
3fd7841ef1 fate/cbs: add VVC tests
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-30 08:26:38 -03:00
James Almer
995976750a avcodec/cbs_h2645: fix parsing and storing Picture Header references in the context
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-30 08:26:38 -03:00
James Almer
f48ddc1ba0 tools/target_bsf_fuzzer: fix some filter names
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 22:44:11 -03:00
Andreas Rheinhardt
915701939c avcodec/evc_ps: Replace av_malloc+memset by av_mallocz
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-06-30 00:49:11 +02:00
Andreas Rheinhardt
b7158377c9 avcodec/vvc_parser: Mark close function as av_cold
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-06-30 00:48:46 +02:00
Andreas Rheinhardt
0009cbe11d avcodec/vvc_parser: Don't store state unnecessarily
VVCParserContext.au_info is only used once (and in a read-only manner);
but this happens immediately after au_info has been completely
overwritten. Therefore one can just the src structure used to overwrite
au_info directly and remove au_info.

This also means that the whole referencing and unreferncing of au_info
(which duplicates AVBufferRefs CodedBitstreamH266Context and is
therefore of dubious gain) can be removed, as can the AVBufferRef*
contained in PuInfo; this also removes a certain uglyness: Sometimes
these AVBufferRef* were ownership pointers and sometimes not.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-06-30 00:00:57 +02:00
Andreas Rheinhardt
6caf5642c8 avcodec/vvc_parser: Remove unnecessary headers
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-06-29 23:50:29 +02:00
Kacper Michajłow
0cd2e7dcfb
avformat/http: copy only mime type from Content-Type
Content-Type can include charset and boundary which is not a part of
mime type and shouldn't be copied as such.

Fixes HLS playback when the Content-Type includes additional fields.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2023-06-29 17:28:46 -04:00
Andreas Rheinhardt
f780e07149 avformat/ac4dec: Constify demuxer
The discrepancy between the definition and the declaration
in allformats.c is actually UB.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-06-29 20:22:58 +02:00
Andreas Rheinhardt
652add3a6d avfilter/vf_ccrepack: Constify filter
The discrepancy between the definition and the declaration
in allfilters.c is actually UB.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-06-29 20:22:51 +02:00
Andreas Rheinhardt
22c47b10b2 avcodec/vvc_parser: Constify parser
The discrepancy between the definition and the declaration
in parsers.c is actually UB.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-06-29 20:22:27 +02:00
Andreas Rheinhardt
e132fae1a5 avcodec/cbs_h266: Remove double ;
Fixes a warning from GCC when in pedantic mode:
"extra semicolon in struct or union specified"
May also fix compilation with MSVC, see
https://fate.ffmpeg.org/report.cgi?time=20230629174305&slot=x86_64-msvc17-windows-native

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-06-29 20:21:24 +02:00
James Almer
9367b58e71 tools/target_bsf_fuzzer: set aud option on h266_metadata bsf
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 14:12:50 -03:00
James Almer
05186be641 avformat/version: bump minor after recent additions
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 14:12:50 -03:00
Thomas Siedel
45a8a62df9 avformat/rawenc: add H266/VVC muxer
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 14:12:50 -03:00
Thomas Siedel
ac2b25f4e5 avformat: add demuxer and probe support for H266/VVC
Add demuxer to probe raw vvc and parse vvcc byte stream format.

Co-authored-by: Nuo Mi <nuomi2021@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 14:12:50 -03:00
James Almer
86796f1f0e avcodec/version: bump minor after recent additions
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 14:12:50 -03:00
Thomas Siedel
54390f4fa7 avcodec: add MP4 to annexb bsf for H266/VVC
Add parser for H.266/VVC MP4 to Annex B byte stream format.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 14:12:50 -03:00
Nuo Mi
c7864a9987 avcodec: add Metadata bsf for H266/VVC
Add H.266/VVC metadata bsf.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 14:12:50 -03:00
Nuo Mi
b5aefb6e70 avcodec: add bitstream parser for H266/VVC
Add nal parser ff_vvc_parser to parse vvc elementary bitstreams.

Co-authored-by: Thomas Siedel <thomas.ff@spin-digital.com>
Co-authored-by: James Almer <jamrial@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 14:12:50 -03:00
Nuo Mi
dfc62fd1c6 avcodec/cbs: add cbs implementation for H266/VVC
Add CodedBitstreamContext to parse VPS,SPS,PPS in VVC nal units.
Implement parsing and writing of SPS,PPS,VPS,PH,AUD,SEI and slices.
Add ff_cbs_type_h266 to cbs types tables and AV_CODEC_ID_H266
to cbs codec ids.

Co-authored-by: Thomas Siedel <thomas.ff@spin-digital.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 14:12:50 -03:00
James Almer
136e96a8a8 avcodec/extract_extradata: add support for H266/VVC
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 14:12:50 -03:00