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

111330 Commits

Author SHA1 Message Date
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
Nuo Mi
0b8c1f26d3 avcodec/h2645_parse: add support for H266/VVC
Co-authored-by: Thomas Siedel <thomas.ff@spin-digital.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-29 14:12:29 -03:00
Romain Beauxis
bcfcc19821 Add FATE test for timed id3 demux.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-06-29 17:33:01 +02:00
Dmitrii Ovchinnikov
f593dc98bf libavcodec/amfenc: add PreAnalysis support
Additional information about the work of preanalysis can be found here:
https://github.com/GPUOpen-LibrariesAndSDKs/AMF/wiki/PreProcessing%20and%20PreAnalysis
2023-06-29 10:49:33 -03:00
Dmitrii Ovchinnikov
9e3f07aa21 amfenc: Update the min version to 1.4.29.0 for AMF SDK. 2023-06-29 10:49:33 -03:00
Michael Niedermayer
9b6d191a66
avcodec/jpeg2000dec: Check for reduction factor and image offset
This combination is not working (it writes out of array)

Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-06-27 22:36:44 +02:00
James Almer
6ff95758e6 avformat/evc: use get_ue_golomb_long()
This partially reverts commit d0fc1b3507, which reintroduced a regression
originally fixed in 5e9986fd2d.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-06-27 12:52:38 -03:00
Gyan Doshi
285c7f6f6b doc/filters: correct luma terminology
Partially fixes #10427

See https://poynton.ca/notes/colour_and_gamma/ColorFAQ.html#RTFToC11 for
ref.
2023-06-26 16:02:42 +05:30
Tong Wu
d51b0580e4 lavu/hwcontext_qsv: fix memory leak for d3d9 impl
Signed-off-by: Tong Wu <tong1.wu@intel.com>
2023-06-25 10:01:51 +08:00