Commit Graph

109384 Commits

Author SHA1 Message Date
James Darnley cfd1c3c0a1 checkasm/v210enc: test the entire width of 10-bit planar input arrays 2022-12-01 18:19:03 +01:00
Marvin Scholz 45ab5307a6 avformat/fifo: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:15 +01:00
Marvin Scholz d75d8370bd avformat/matroskaenc: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:15 +01:00
Marvin Scholz 643c2b4722 avformat/http: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:15 +01:00
Marvin Scholz fb93d3d043 avformat/asfenc: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:15 +01:00
Marvin Scholz 521d8dcf88 avformat/apetag: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:15 +01:00
Marvin Scholz 4bf8c9c2d8 avformat/nutenc: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz 0464aa484e avformat/id3v2enc: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz 995616b752 avformat/ffmetaenc: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz b31c16d625 avformat/wtvenc: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz 2b5391b88f avformat/dump: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz 8298f20c59 avformat/lrcenc: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz 6c4f23cc20 avformat/hls: use av_dict_iterate
And constify oldentry too while at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz b463ef0339 avformat/flvenc: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz b7c577cec7 avformat/metadata: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz 562d19b503 avformat/movenc: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz 4d1c9fa871 doc/examples/metadata: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz 401508b24b avformat/cafenc: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz fcbdd145cd avfilter/f_metadata: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz 492b45cb19 avfilter/vf_libvmaf: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz 734acfde4c avformat/vorbiscomment: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz aa4edbb633 avcodec/avpacket: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz 0b3092aed3 avcodec/libxavs2: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz d5d6e5ccec avfilter/vf_coreimage: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz 1cf526c37a avfilter/vf_scale: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz f8584c13f0 avformat/smjpegenc: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz 3000cf7a57 avcodec/libvpxenc: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz 5b13238ce0 avcodec/librav1e: remove unnecessary variable
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz e048d06621 avcodec/librav1e: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz ece29ad0dc fftools: use av_dict_get_string
Instead of manually assembling the string, use av_dict_get_string
which handles things like proper escaping too (even though it is
not yet needed here).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz f1907faab4 fftools: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Andreas Rheinhardt 7b450bafd7 avcodec/h2645_sei: Factor attaching film grain side-data to frame out
This unfortunately involved adding some parameters
to ff_h2645_sei_to_frame() that will be mostly unused.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:41 +01:00
Andreas Rheinhardt 8bf18018a3 avcodec/(h264|hevc)_ps: Factor common VUI code out
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:41 +01:00
Andreas Rheinhardt 1e38e7fd14 avcodec/h264_ps: Don't output invalid chroma location
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:41 +01:00
Andreas Rheinhardt 881e8bcc51 avcodec/h264data: Deduplicate H.26[45] aspect ratio table
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:41 +01:00
Andreas Rheinhardt 8d481b0234 avcodec/h264_ps: Don't error out on unknown aspect ratio
Values 17..254 are actually only reserved and not invalid.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:41 +01:00
Andreas Rheinhardt a5bba606a0 avcodec/h2645_sei: Also support Active Format Descriptor for HEVC
It is valid for HEVC; in fact, the ATSC-HEVC spec [1] simply
refers to the relevant H.264 spec.

It is also trivial to implement now: Just move applying AFD
to ff_h2645_sei_to_frame() and stop ignoring AFD when parsing
a HEVC SEI containing it.

A FATE-test for this has been added.

[1]: https://www.atsc.org/atsc-documents/a3412017-video-hevc/

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:41 +01:00
Andreas Rheinhardt 01e775f4b7 avcodec/h2645_sei: Attach AVStereo3D side data generically
There are only slight differences between H.264 and HEVC
for this side data, so it makes sense to share the code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:41 +01:00
Andreas Rheinhardt 38d0d12c46 avcodec/h264_sei, sei: Make H264_SEI_FpaType generic
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:41 +01:00
Andreas Rheinhardt 3bafc4ead4 avcodec/h2645_sei: Factor out applying SEIs to frames
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:41 +01:00
Andreas Rheinhardt f89825e60a avcodec/h2645_sei: Factor out freeing common SEI parts
This commit only factors out freeing the common SEI parts,
not whether the fields indicating whether an SEI is present
shall be reset. H.264 and HEVC differ in this regard
(ff_h264_sei_uninit() really resets, whereas ff_hevc_reset_sei()
only uninits.) and neither actually honours the persistency
as prescribed by the relevant specs.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:40 +01:00
Andreas Rheinhardt de5891d371 avcodec/h2645_sei: Factor updating H.2645 SEIs out
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:40 +01:00
Andreas Rheinhardt 33239ebd07 avcodec/h2645_sei: Factor parsing common SEI messages out
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:40 +01:00
Andreas Rheinhardt 0d84725cb9 avcodec/sei: Add tag to SEI enumeration
This makes it a usable type.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:40 +01:00
Andreas Rheinhardt 4d9c0b3efa configure: Add (h264|hevc)_sei subsystems
Currently, several components select atsc_a53, despite
not using anything from it themselves. They only select
it because parsing SEI messages adds an indirect dependency.
But using direct dependencies is more natural, so add
dedicated subsystems for them.

It already allows to remove a superfluous dependency of
the HEVC QSV encoder on hevc_sei and atsc_a53.

Adding new subsystems only becomes effective after a reconfiguration.
In order to force this, some needed headers (which are only included
implicitly before this commit) were included explicitly in
libavformat/allformats.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:40 +01:00
Andreas Rheinhardt adf3b01158 avcodec/h264_sei: Don't use GetBit-API for byte-aligned reads
SEI NALUs and several SEI messages are naturally byte-aligned,
so reading them via the bytestream-API is more natural.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:40 +01:00
Haihao Xiang 0ae459176b lavfi/vf_vpp_qsv: scale_mode can be applied to color conversion
Reviewed-by: Soft Works <softworkz@hotmail.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-12-01 09:40:40 +08:00
Haihao Xiang 7a856588dc lavfi/qsvvpp: provide a default framerate if needed
VPP in the SDK requires the frame rate to be set to a valid value,
otherwise init will fail, so always set a default framerate when the
input link doesn't have a valid framerate.

Reviewed-by: Soft Works <softworkz@hotmail.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-12-01 09:40:31 +08:00
Haihao Xiang 51bad2e6a7 lavfi/qsvvpp: avoid overriding the returned value
It means more than one output is ready when
MFXVideoVPP_RunFrameVPPAsync() returns MFX_ERR_MORE_SURFACE [1].
Currently the returned value from MFXVideoVPP_RunFrameVPPAsync() might
be overridden, so the check of 'ret == MFX_ERR_MORE_SURFACE' is always
false when MFX_ERR_MORE_SURFACE is returned from
MFXVideoVPP_RunFrameVPPAsync()

[1] https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#video-processing-procedures

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-12-01 09:39:32 +08:00
Chen,Wenbin 50575e24be lavfi/qsvvpp: change the output frame's width and height
Make sure the size of the output frame always matches the agreed upon
image size.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-12-01 09:39:32 +08:00