Commit Graph

107092 Commits

Author SHA1 Message Date
Andreas Rheinhardt 9cc38cc636 avcodec/mss2: Remove write-only QpelDSPContext
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-19 19:16:23 +02:00
Andreas Rheinhardt 6e5acb6c88 avcodec/error_resilience: Only keep what is needed from MECmpContext
ERContext currently has an embedded MECmpContext, despite only
needing exactly one function from it. This is wasteful because
MECmpContext is pretty large (135 pointers, 1080 B for eight byte
pointers). So keep only what is needed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-19 19:16:23 +02:00
Limin Wang 94968dbc11 avcodec/dvdsubenc: return error if canvas_size is too small for subtitle render
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-05-19 21:17:31 +08:00
Limin Wang 8e828ee1ad avformat/sccenc: avoid potential invalid access
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-05-19 21:17:31 +08:00
Limin Wang 4607868b98 Makefile: remove sccenc dependency on subtitles
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-05-19 21:17:31 +08:00
Vignesh Venkatasubramanian dd99d34d67 avformat/img2: Add support for AVIF mux in image2
Add support for AVIF muxing in the image2 muxer.

Tested with this example:
ffmpeg -lavfi testsrc=duration=1:size=320x320 -g 1 -flags global_header -c:v libaom-av1 -f image2 img-%2d.avif

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
2022-05-19 14:22:52 +05:30
softworkz b8ede4d637 fftools/opt_common: add includes of avf headers for clarity
Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-18 18:01:51 +02:00
Andreas Rheinhardt e3580f6077 avformat/hls, dashdec: Don't use AV_OPT flags in av_dict_set()
av_dict_set() expects a different set of flags, namely the AV_DICT_*
flags. Using AV_OPT_FLAG_DECODING_PARAM (or any AV_OPT_FLAG_*) ic
av_dict_set() is therefore completely wrong and given that av_dict_set()
just doesn't care about whether the string it receives has anything
to do with a decoding parameter or not, it should just be removed
without replacement.
(The numerical value of AV_OPT_FLAG_DECODING_PARAM currently coincides
with AV_DICT_IGNORE_SUFFIX. Given that the dictionaries we are dealing
with here are always empty (i.e. NULL) before the calls to
av_dict_set(), this flag changes nothing. It would be different if
it were equal to one of the AV_DICT_DONT_STRDUP_* values.)

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-16 10:56:34 +02:00
Gyan Doshi 00ae20dfb4 doc/muxers: note write_btrt option for MOV/MP4 2022-05-16 13:56:38 +05:30
Andreas Rheinhardt d31a3af6a9 avcodec/wrapped_avframe: Don't attach FrameDecodeData unnecessarily
It is unneeded, as this decoder does not call ff_get_buffer().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-15 19:08:43 +02:00
Andreas Rheinhardt 104abea646 avcodec/ac3: Move non-(de|en)coder-only parts out of ac3.h
Move AC3HeaderInfo into ac3_parser_internal.h and the rest
into a new header ac3defs.h.

This also breaks an include cycle of ac3.h and ac3tab.h
(the latter now only needs ac3defs.h).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-15 18:13:56 +02:00
Andreas Rheinhardt cbd75ecc18 avcodec/ac3tab: Move some tables only used by ac3.c to it
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-15 18:13:55 +02:00
Andreas Rheinhardt 996ec1cbe8 avcodec/ac3: Remove declaration of inexistent function
Removed in 7b11eead1b.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-15 18:13:55 +02:00
Paul B Mahol 163e737c17 avfilter/af_afir: add support for double sample format 2022-05-15 13:34:50 +02:00
Paul B Mahol e6f0cec880 avfilter/af_acrossover: add precision option 2022-05-14 14:11:52 +02:00
Gyan Doshi 8b64d8d9aa avformat/dashdec: accept and relay CENC decryption key
Allows to process CENC-encrypted media segments.
Option arg syntax is same as that for option decryption_key in MOV demuxer
2022-05-14 14:46:01 +05:30
Paul B Mahol b90341d1d5 avfilter/af_asubboost: add channels option 2022-05-13 22:09:08 +02:00
Paul B Mahol 710dce131f avfilter/vf_zscale: active region use doubles so use that type here too 2022-05-13 15:18:43 +02:00
Paul B Mahol 075c2308e3 avfilter/af_asubboost: add boost option 2022-05-13 15:18:42 +02:00
Paul B Mahol 2c77d9150d avfilter/af_crossfeed: always return same number of samples with block processing 2022-05-13 15:18:42 +02:00
Paul B Mahol 52a14b8505 avfilter/vf_zscale: improve slice processing 2022-05-13 10:22:51 +02:00
Vignesh Venkatasubramanian 84241e63cf avformat/movenc: Add support for AVIF muxing
Add an AVIF muxer by re-using the existing the mov/mp4 muxer.

AVIF Specification: https://aomediacodec.github.io/av1-avif

Sample usage for still image:
ffmpeg -i image.png -c:v libaom-av1 -still-picture 1 image.avif

Sample usage for animated AVIF image:
ffmpeg -i video.mp4 animated.avif

We can re-use any of the AV1 encoding options that will make
sense for image encoding (like bitrate, tiles, encoding speed,
etc).

The files generated by this muxer has been verified to be valid
AVIF files by the following:
1) Displays on Chrome (both still and animated images).
2) Displays on Firefox (only still images, firefox does not support
   animated AVIF yet).
3) Verified to be valid by Compliance Warden:
   https://github.com/gpac/ComplianceWarden

Fixes the encoder/muxer part of Trac Ticket #7621

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
2022-05-13 12:46:21 +05:30
Vignesh Venkatasubramanian 98ec4261fd avformat/av1: Add a parameter to av1c to omit seq header
Add a parameter to omit seq header when generating the av1C atom.

For now, this does not change any behavior. This will be used by a
follow-up patch to add AVIF support.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
2022-05-13 12:45:17 +05:30
Vignesh Venkatasubramanian ab05e9a7f2 avcodec/libaomenc: Add parameter for avif single image encoding
Add a parameter to libaom-av1 encoder to enforce some of the single
image constraints in the AV1 encoder. Setting this flag will limit
the encoder to producing exactly one frame and the sequence header
that is produced by the encoder will be conformant to the AVIF
specification [1].

Part of Fixing Trac ticket #7621

[1] https://aomediacodec.github.io/av1-avif

Signed-off-by:: Vignesh Venkatasubramanian <vigneshv@google.com>
2022-05-13 12:45:00 +05:30
Diederick Niehorster d2d8b9b972 avdevice/dshow: reuse unused variables.
Fix for f125c504d8, requested_sample_rate
and such should be used.

Signed-off-by: Diederick Niehorster <dcnieho@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2022-05-12 22:06:44 -03:00
Semen Belozerov e71d5156c8 avcodec/vp9: ipred_vl_16x16_16 avx2 implementation
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2022-05-12 14:43:08 -04:00
Paul B Mahol b5aa514bbb avfilter/af_biquads: always return same number of samples with block processing 2022-05-12 18:23:37 +02:00
Tomas Härdin 30e2bb0f64 doc/encoders.texi: Document updated behavior
Bitrates of akiyo changed slightly.
2022-05-12 11:19:12 +02:00
Tomas Härdin 1cd8596ef4 libavcodec/cinepakenc: Mark no-skip frames as keyframes
Reset curframe whenever we generate a keyframe.
Use -g instead of -keyint_min.
2022-05-12 11:19:12 +02:00
Tomas Härdin 61bcd7737d doc/encoders.texi: Document cinepak encoder 2022-05-12 11:19:12 +02:00
Paul B Mahol ee9345e905 avfilter/af_ladspa: remove not wanted line
This fixes output when trimming output samples.
2022-05-12 10:52:52 +02:00
Wang Cao d82481ef41 avfilter/af_alimiter: add latency compensation option
Signed-off-by: Wang Cao <wangcao@google.com>
2022-05-12 10:52:52 +02:00
Steven Liu ea6ed838c3 avformat/hlsenc: check discont_program_date_time before use it in parse_playlist
Fix ticket: 9238
In parse_playlist, the discont_program_date_time should be used after
EXT-X-PROGRAM-DATE-TIME tag parsed.

Tested-by: pero
Reviewed-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2022-05-12 16:21:27 +08:00
Andreas Rheinhardt 439ca8b5f4 avformat/internal: Hide BSF stuff only used by the core APIs
The general demuxing API uses bitstream filters to extract extradata
and the muxing API uses them in order to transform packets into
the format desired by the target format. Therefore FFStream contains
pointers to AVBSFContexts and lavf/internal.h includes lavc/bsf.h.

Yet actually, only a few files files are supposed to use these,
namely avformat.c, demux.c and mux.c. For all the other files,
it should be an opaque type that they should not touch and that
they need not know anything about. This can be achieved by not
including these headers and using the structs instead of the
corresponding typedefs.
This also forces translation units that really use the BSF API
themselves to include lavc/bsf.h directly instead of relying on
indirect inclusions (a few other files also use the BSF API;
they already abided by this).
Of course, it also avoids unnecessary rebuilds when bsf.h changes.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-12 08:52:59 +02:00
Andreas Rheinhardt aaeb37f385 avformat/internal: Move FFERROR_REDO to demux.h
It is demuxer-only.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-12 08:52:59 +02:00
Andreas Rheinhardt c19797bf59 avcodec/internal: Hide stuff only used by the core decode API
The general decoding API uses bitstream filters and an AVFifo
and therefore AVCodecInternal contains pointers to an AVBSFContext
and to an AVFifo and lavc/internal.h includes lavc/bsf.h and
lavu/fifo.h.
Yet actually, only two files are supposed to use these, namely
avcodec.c and (mainly) decode.c. For all the other files,
it should be an opaque type that they should not touch and that
they need not know anything about. This can be achieved by not
including these headers and using the structs instead of the
corresponding typedefs.
This also forces translation units that really use the BSF
and the FIFO APIs themselves to include the relevant headers
directly instead of relying on indirect inclusions (up until now,
even avcodec.c and decode.c relied on fifo.h to be included
by internal.h).
Of course, it also avoids unnecessary rebuilds when bsf.h or fifo.h
change.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-12 08:52:59 +02:00
Andreas Rheinhardt e92e74b897 avcodec/texturedspenc: Fix invalid shift
Left shifts of signed types are UB unless the results fit
into the type. (Furthermore the value to be shifted need to be
nonnegative.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-12 08:33:11 +02:00
Andreas Rheinhardt cf9e470d05 fate/matroska: Add test for remuxing DVB subtitles to Matroska
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-12 08:33:11 +02:00
Christopher Degawa e5163b1d34 configure: extend SDL check to accept all 2.x versions
sdl2 recently changed their versioning, moving the patch level to minor level
cd7c2f1de7
and have said that they will instead ship sdl3.pc for 3.0.0

Fixes ticket 9768

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
2022-05-12 11:51:07 +05:30
Steven Liu 1d6e9a7a30 avformat/http: remove unused function ff_http_get_shutdown_status
ff_http_get_shutdown_status is unused after ticket 9010 fixed.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2022-05-12 11:31:38 +08:00
Paul B Mahol cbc1b8adad avfilter/af_biquads: add zdf transform type 2022-05-11 22:14:58 +02:00
Anton Khirnov 8016219472 lavc: drop a confusing message about "thread emulation"
There is no such thing.
2022-05-11 10:37:26 +02:00
Anton Khirnov 28b8b41e5a lavc/pthread_frame: do not copy AVCodecInternal contents
None of its fields have meaningful values at that point that would need
to be copied to frame thread workers.
2022-05-11 10:37:26 +02:00
Anton Khirnov 2cb86cd00c lavc/avcodec: only allocate decoding packets for decoders 2022-05-11 10:37:26 +02:00
Anton Khirnov c954cf1e1b lavc/encode: add an encoder-specific get_buffer() variant
Several encoders (roqvideo, svq1, snow, and the mpegvideo family)
currently call ff_get_buffer(). However this function is written
assuming it is called by a decoder. Though nothing has been obviously
broken by this until now, that may change in the future.

To avoid potential future issues, introduce a simple encode-specific
wrapper around avcodec_default_get_buffer2() and enforce its use in
encoders.
2022-05-11 10:37:17 +02:00
Anton Khirnov a4ce370659 lavc/snow: only allocate mconly_picture for decoding
It is not used in the encoder.
2022-05-11 10:33:55 +02:00
NetSysFire cd78d5bba9 doc/ffmpeg: fix typo in ffmpeg.texi 2022-05-10 22:02:58 +02:00
Andreas Rheinhardt 260d7d5a6c avfilter/avfilter: Fix compilation with TRACE defined
av_get_pix_fmt_name() is used in an ff_tlog(), which is only
compiled if TRACE is defined. Fixes a regression caused by
f2b79c5b85.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 18:22:20 +02:00
Andreas Rheinhardt f98b6cf543 fate/matroska: Add tests for muxing PGS into Matroska
They test the new pgs_frame_merge BSF.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 10:03:32 +02:00
John Stebbins 7f5b57766b lavf/matroskaenc: enable PGS merge auto bsf
PGS segments must be merged to one packet for muxing to mkv

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 10:03:32 +02:00