1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

106629 Commits

Author SHA1 Message Date
Paul B Mahol
d41f85235d avfilter/avf_avectorscope: set time_base to outlink
And rescale timestamps.
2022-04-18 20:24:54 +02:00
Paul B Mahol
9f73c40d32 avfilter/avf_showvolume: set time_base to outlink
And rescale timestamps.
2022-04-18 20:24:54 +02:00
Timo Rothenpieler
d5687236ab doc: install css files along html docs 2022-04-18 12:55:32 +02:00
Paul B Mahol
4e98cc29f4 avfilter/vf_feedback: add missing .process_command 2022-04-15 18:57:36 +02:00
Paul B Mahol
391ce570c8 avfilter: add pixelize video filter 2022-04-14 22:37:21 +02:00
Paul B Mahol
7e81295488 avfilter: add feedback video filter 2022-04-14 22:29:46 +02:00
Paul B Mahol
a34fe3dfa9 avfilter/avf_showspectrum: fix pts offset by one 2022-04-14 22:26:54 +02:00
Andreas Rheinhardt
fe2eb9760f fate/oma: Use REMUX where appropriate
Simplifies the checks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:40:30 +02:00
Andreas Rheinhardt
c3b2bee589 fate/subtitles: Use REMUX where appropriate
It also adds the missing depenencies on the file and pipe protocols
and the framecrc muxer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:39:57 +02:00
Andreas Rheinhardt
c4c38d2d14 fate/image: Use TRANSCODE where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:39:35 +02:00
Andreas Rheinhardt
7297b17a84 tests/Makefile: Add auxiliary functions for transcode and stream_remux
Tests using the transcode and stream_remux functions have some common
requirements (namely the file and pipe protocols as well as the framecrc
muxer) and also other commonalities: The create a file and read it
immediately afterwards, so that they typically rely on a corresponding
muxer+demuxer pair which typically shares the same name; for transcode
(if it does not use stream copy) the same is true for encoders and
decoders. This means that using special Makefile-functions instead
of the general ALLYES is worthwhile. This commit adds such functions.

These functions allow to add arbitrary CONFIG-checks on top of the
aforementioned ones in order to satisfy special needs (for e.g. parsers,
filters) that several intended users have.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:38:55 +02:00
Andreas Rheinhardt
202da3bf48 avcodec/mjpegenc: Don't unnecessarily grow buffer
The size of the ICC chunk has already been accounted for when
the packet's buffer was initially set in ff_mpv_encode_picture()
and the header (including the ICC chunk) has already been written
at this point.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:38:55 +02:00
Andreas Rheinhardt
f703cbabdb avcodec/mpegvideo_enc: Remove always-true check
It is a remnant of the old way for user-supplied buffers;
it is always-true since 93016f5d1d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:38:55 +02:00
Andreas Rheinhardt
c3047da646 avcodec/mpegvideo_enc: Fix unnecessary linear growth of buffer
If one encodes MJPEG with a single slice and uses input with
AV_FRAME_DATA_ICC_PROFILE side data, the current allocation code
in ff_mpv_encode_picture() will always increase the size of the
temporary buffer used for allocating packets by the size needed
for to write the ICC chunk even when the current buffer is actually
large enough. This commit fixes this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:38:55 +02:00
Andreas Rheinhardt
4487dd8bb5 avcodec/mpegvideo_enc: Ignore ICC profile size when not MJPEG
MJPEG is the only mpegvideo-based encoder making use of it.
Fixes linking failures in case mpegvideo_enc.c is compiled
with AMV, LJPEG and MJPEG encoders disabled.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-14 18:38:55 +02:00
Paul B Mahol
1764a6887b avfilter/avf_showspectrum: add alpha pixel format support 2022-04-14 17:29:14 +02:00
Mark Gaiser
ea84eb2db1 avformat/ipfsgateway: define PATH_MAX
PATH_MAX is posix. Some compilers (MSVC) don't define this
thus failing to compile the ipfsgateway file.
Defining it fixes the compile.

Signed-off-by: Mark Gaiser <markg85@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-04-14 10:52:21 +03:00
Paul B Mahol
bf6735e945 avfilter/af_adenorm: simplify handling of commands 2022-04-13 22:02:47 +02:00
Paul B Mahol
24144af2dd avfilter/avf_showvolume: check for allocation error and stop leaks 2022-04-13 18:24:25 +02:00
Andreas Rheinhardt
fa3f9f2f6a avcodec/avcodec: Don't reset decoder-fields for encoders when flushing
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-13 18:04:25 +02:00
Andreas Rheinhardt
f6e167998f avcodec/avcodec: Simplify accessing AVSubtitleRect via dedicated pointer
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-13 18:03:40 +02:00
Andreas Rheinhardt
3649051dc4 avcodec/avcodec: Avoid av_frame_unref(NULL)
It works, but it is not documented to work.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-13 18:03:25 +02:00
Andreas Rheinhardt
3a920372a1 avcodec/encode: Fix check for encoders impl. encode-simple API
FFCodec.cb is a union.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-13 17:59:34 +02:00
Paul B Mahol
f67403edb3 avcodec/mlpenc: fix encoding after receiving last frame
This happened when major header needed to be written
after input EOF.
2022-04-13 14:22:39 +02:00
Anton Khirnov
e663030267 lavc/encode: pick a sane default for bits_per_raw_sample if it's not set
Fixes #9563.
2022-04-13 12:48:19 +02:00
Anton Khirnov
ee26138e67 lavc/encode: reindent 2022-04-13 12:48:18 +02:00
Anton Khirnov
15975881ae lavc/encode: factor audio/video-specific parts out of ff_encode_preinit() 2022-04-13 12:45:47 +02:00
Anton Khirnov
ce3c20f2aa lavc: move default get_buffer2() to its own file
It is also used by some encoders, so decode.c is not the right place for
it.
2022-04-13 12:15:02 +02:00
Anton Khirnov
32413600e8 lavc/encode: drop EncodeSimpleContext
It has only a single member.
2022-04-13 12:14:30 +02:00
Anton Khirnov
1c01dca144 lavc/avcodec: only allocate the encoding frame for encoders
And only when needed, i.e. for encoders using the simple API.
2022-04-13 12:14:08 +02:00
Anton Khirnov
7efa6418b8 lavc/avcodec: simplify codec id/type validity checking
On entry to avcodec_open2(), the AVCodecContext type and id either have
to be UNKNOWN/NONE or have to match the codec to be used.
2022-04-13 12:13:15 +02:00
Anton Khirnov
4a7c8bb3d8 fftools/ffmpeg: store output format separately from the muxer context
Allows accessing it without going through the muxer context. This will
be useful in the following commits, where the muxer context will be
hidden.
2022-04-13 12:07:54 +02:00
Anton Khirnov
5c66ee6351 fftools/ffmpeg: move freeing the output file to ffmpeg_mux.c 2022-04-13 12:07:54 +02:00
Anton Khirnov
5bc644ea8a fftools/ffmpeg: move writing the trailer to ffmpeg_mux.c 2022-04-13 12:07:54 +02:00
Anton Khirnov
288aa37387 fftools/ffmpeg: move some muxing-related code into a separate file
This is a first step towards making muxers more independent from the
rest of the code.
2022-04-13 12:07:54 +02:00
Anton Khirnov
b1a984cb49 fftools/ffmpeg: store the output file index in OutputFile
Use it to simplify check_init_output_file(). Will allow further
simplifications in the following commits.
2022-04-13 12:07:54 +02:00
Anton Khirnov
16aea9a38b fftools/ffmpeg: pass the muxer context explicitly to some functions
Stop accessing OutputFile.ctx. This will be useful in the following
commits, where it will become hidden.
2022-04-13 12:07:54 +02:00
Anton Khirnov
662364b2ef fftools/ffmpeg: stop using OutputStream.frame_number for streamcopy
This field is currently used by checks
- skipping packets before the first keyframe
- skipping packets before start time
to test whether any packets have been output already. But since
frame_number is incremented after the bitstream filters are applied
(which may involve delay), this use is incorrect. The keyframe check
works around this by adding an extra flag, the start-time check does
not.

Simplify both checks by replacing the seen_kf flag with a flag tracking
whether any packets have been output by do_streamcopy().
2022-04-13 12:07:54 +02:00
Anton Khirnov
86e1c0303c fftools/ffmpeg: move a comment to a more appropriate place 2022-04-13 12:07:54 +02:00
Anton Khirnov
a8c95e1feb fftools/ffmpeg: drop an obsolete hack
Introduced in 05741d70c7. All encoders should set the timestamps
properly now, so it should never be necessary.
2022-04-13 12:07:54 +02:00
Paul B Mahol
9a22c6508a avfilter/vf_deblock: fix posible overreads 2022-04-13 10:25:08 +02:00
Paul B Mahol
b74f212b7a avfilter/vf_xmedian: simplify changing index variable 2022-04-13 09:54:20 +02:00
Paul B Mahol
9d40fe20c9 avfilter/af_crystalizer: remove no longer needed wrapper function 2022-04-13 09:41:14 +02:00
Paul B Mahol
63d12a48b5 avfilter/vf_chromashift: simplify handling of commands 2022-04-13 09:30:36 +02:00
Wenbin Chen
7e7b3a4c28 libavutil/hwcontext_qsv: Align width and heigh when download qsv frame
The width and height for qsv frame to download need to be
aligned with 16. Add the alignment operation.
Now the following command works:
ffmpeg -hwaccel qsv -f rawvideo -s 1920x1080 -pix_fmt yuv420p -i \
input.yuv -vf "hwupload=extra_hw_frames=16,format=qsv,hwdownload, \
format=nv12" -f null -

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-04-13 13:41:27 +08:00
Andreas Rheinhardt
7427b87e44 avcodec/mss12: Constify slice context->parent context pointer
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-13 00:37:13 +02:00
Andreas Rheinhardt
77ed56f0ec avcodec/vbnenc: Add AV_CODEC_CAP_DR1
This encoder uses ff_get_encode_buffer().

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-13 00:37:06 +02:00
Andreas Rheinhardt
cc0a4fa630 avcodec/vbn(dec|enc): Avoid always-false checks
Do this by switching to bytestream2_(get|put)_le32u() from
bytestream2_(get|put)_le32(); it has after all already been checked
that the packet contains at least a full header, making all
the implicit checks in bytestream2_(get|put)_le32() dead code.

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-13 00:36:57 +02:00
Andreas Rheinhardt
300dd79c3d avcodec/vbn(dec|enc): Avoid leaving stale pointers in context
Therefore move the (Get|Put)ByteContext from the context to the stack.
It is transient anyway.

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-13 00:36:39 +02:00
Andreas Rheinhardt
81b6a10937 avcodec/vbn(dec|enc): Remove empty close function
Reviewed-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-13 00:25:36 +02:00