Commit Graph

8862 Commits

Author SHA1 Message Date
Niklas Haas
4eaaa38d3d avutil: make av_frame_get_plane_buffer accept a const AVFrame*
Signed-off-by: Niklas Haas <git@haasn.dev>
2023-04-14 10:53:28 +02:00
Anton Khirnov
2f24290c8e fftools/ffmpeg: disable and deprecate -qphist
This option adds a long string of numbers to the progress line, where
i-th number contains the base-2 logarithm of the number of times a frame
with this QP value was seen by print_report().

There are multiple problems with this feature:
* despite this existing since 2005, web search shows no indication
  that it was ever useful for any meaningful purpose;
* the format of what is printed is entirely undocumented, one has to
  find it out from the source code;
* QP values above 31 are silently ignored;
* it only works with one video stream;
* as it relies on global state, it is in conflict with ongoing
  architectural changes.

It then seems that the nontrivial cost of maintaining this option is not
worth its negligible (or possibly negative - since it pollutes the
already large option space) value.
Users who really need similar functionality can also implement it
themselves using -vstats.
2023-04-13 15:11:56 +02:00
James Almer
61b27b15fc avutil/hdr_dynamic_metadata: allow av_dynamic_hdr_plus_to_t35() to accept an existing buffer
The function now accepts an existing buffer to avoid unnecessary allocations,
as well as only reporting the needed amount of bytes if you pass a NULL pointer
as input for data.
For this, both parameters become input and output, as well as making data
optional. This is backwards compatible, and as such not breaking any existing
use of the function in external code (if there's any).

Signed-off-by: James Almer <jamrial@gmail.com>
2023-04-05 09:47:12 -03:00
Anton Khirnov
2244722f1f doc/ffmpeg: rewrite the introductory paragraph
This is not the place to boast about high-quality polyphase filters -
the most important feature of the program is its universality.
2023-04-04 11:45:51 +02:00
Anton Khirnov
bf6df790c2 doc/ffmpeg: refine program title
It is a media converter, not just a video converter.
2023-04-04 11:45:44 +02:00
Stefano Sabatini
686e14e9fb doc/platform: drop reference to ffmpeg.zeranoe.com
It was closed in September 2020.

Fix issue:
http://trac.ffmpeg.org/ticket/9734
2023-04-02 16:28:54 +02:00
Stefano Sabatini
627d5a87bb doc/ffmpeg: slightly rework introductory examples
In particular, add a sentence to introduce the example, and add a
simpler starting example with no options.

Also use different format for input.avi and output.mp4, to convey
that the conversion also works on the container format.

Address issue:
http://trac.ffmpeg.org/ticket/8730
2023-04-02 16:28:54 +02:00
Stefano Sabatini
ee25a434dc doc/filters/find_rect: extend documentation
Document metadata entries set by the filter, extend and clarify
options, add additional example showing how to extract the generated
data.

Address issue:
http://trac.ffmpeg.org/ticket/8766
2023-04-02 16:22:14 +02:00
James Almer
113f684271 doc/encoders: add an entry for the frame_length option from libfdk-aac
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-31 10:17:57 -03:00
jackarain
4d216654ca libavformat/tcp: add local_addr/local_port for network option
Signed-off-by: jackarain <jack.wgm@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-03-30 12:09:49 +02:00
Stefano Sabatini
0684e58886 doc/filters/paletteuse: mention none dithering value
Fix issue:
http://trac.ffmpeg.org/ticket/9950
2023-03-29 00:15:19 +02:00
Stefano Sabatini
64016356bc doc/outdevs/sdl: update options documentation
Drop mention of missing icon_title option, document window_borderless option.

Fix issue:
http://trac.ffmpeg.org/ticket/9583
2023-03-29 00:15:19 +02:00
Stefano Sabatini
42d99d5132 doc/outdevs/sdl: sort options by name 2023-03-29 00:15:19 +02:00
Stefano Sabatini
47c56ff554 doc/filters/aspect: update documentation
Drop mention of unsupported N:M syntax, dropped since 0ed61546c4.

Also, drop reference of common expression constants, and fix
description of a expression parameter.

Fix issue:
http://trac.ffmpeg.org/ticket/9974
2023-03-29 00:15:19 +02:00
Stefano Sabatini
5c13307989 doc/filters: mentions that whitespaces are ignored in the filtergraph specification
Also provide example showing how to use this feature to improve filtergraph
readability.

Address issue:
http://trac.ffmpeg.org/ticket/8115
2023-03-29 00:15:19 +02:00
Stefano Sabatini
7792f53e5e doc/filters: propose solutions to avoid shell escaping
Reference drawtext textfile option and ffmpeg -filter_complex_script
and -filter_script as possible solutions to avoid shell escaping.

Address issue:
http://trac.ffmpeg.org/ticket/9008
2023-03-29 00:15:19 +02:00
Stefano Sabatini
030b34eac9 doc/filters/drawtext: clarify meaning of strftime format string
Also clarify what should be used instead of the strftime expansion mode.
2023-03-29 00:15:19 +02:00
TADANO Tokumei
b6138633cd lavc/libaribcaption.c: add ARIB caption decoder using libaribcaption
This patch add another ARIB caption decoder using libaribcaption
external library.

Unlike libaribb24, it supports 3 types of subtitle outputs:
* text: plain text
* ass: ASS formatted text
* bitmap: bitmap image

Default subtitle type is ass as same as libaribb24.
Advantages compared with libaribb24 on ASS subtitle are:
* Subtitle positioning.
* Multi-rect subtitle: some captions are displayed at different
  position at a time.
* More stability and reproducibility.

To compile with this feature:
* libaribcaption external library has to be pre-installed.
  https://github.com/xqq/libaribcaption
* configure with `--enable-libaribcaption` option.

`--enable-libaribb24` and `--enable-libaribcaption` options are
not exclusive. If both enabled, libaribcaption precedes as
order listed in `libavcodec/allcodecs.c`.

Signed-off-by: rcombs <rcombs@rcombs.me>
2023-03-28 12:05:19 -04:00
James Almer
20dade27d9 fftools/ffprobe: print crop_* frame fields
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-26 16:39:59 -03:00
Stefano Sabatini
261fb55e39 doc/ffmpeg: add vstats format documentation
Address issue:
http://trac.ffmpeg.org/ticket/7520
2023-03-26 12:24:26 +02:00
Michael Niedermayer
06b451d276
avfilter/vf_mcdeint: update to new API
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-03-26 01:46:49 +01:00
Anton Khirnov
632c349931 lavfi: add a flag for filters able to work with hw_device_ctx
This way the caller can set it just on the filters that can make use of
it.
2023-03-24 10:16:51 +01:00
Raphaël Zumer
0a3ce5f738 avutil: add HDR10+ dynamic metadata serialization function
Co-authored-by: Mohammad Izadi <moh.izadi@gmail.com>
Signed-off-by: Raphaël Zumer <rzumer@tebako.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-21 13:52:39 -03:00
Anton Khirnov
49b733c73c doc/developer.texi: add a section on API/ABI compatibility
Document established practices in it.
2023-03-20 10:52:17 +01:00
Anton Khirnov
f4dd302a38 doc/developer.texi: document checkasm 2023-03-20 10:52:17 +01:00
Anton Khirnov
a36ad2c649 doc/developer.texi: document the use of other languages than C 2023-03-20 10:52:17 +01:00
Anton Khirnov
27f8c9b27b lavu/frame: deprecate AVFrame.pkt_{pos,size}
These fields are supposed to store information about the packet the
frame was decoded from, specifically the byte offset it was stored at
and its size.

However,
- the fields are highly ad-hoc - there is no strong reason why
  specifically those (and not any other) packet properties should have a
  dedicated field in AVFrame; unlike e.g. the timestamps, there is no
  fundamental link between coded packet offset/size and decoded frames
- they only make sense for frames produced by decoding demuxed packets,
  and even then it is not always the case that the encoded data was
  stored in the file as a contiguous sequence of bytes (in order for pos
  to be well-defined)
- pkt_pos was added without much explanation, apparently to allow
  passthrough of this information through lavfi in order to handle byte
  seeking in ffplay. That is now implemented using arbitrary user data
  passthrough in AVFrame.opaque_ref.
- several filters use pkt_pos as a variable available to user-supplied
  expressions, but there seems to be no established motivation for using them.
- pkt_size was added for use in ffprobe, but that too is now handled
  without using this field. Additonally, the values of this field
  produced by libavcodec are flawed, as described in the previous
  ffprobe conversion commit.

In summary - these fields are ill-defined and insufficiently motivated,
so deprecate them.
2023-03-20 10:42:09 +01:00
Michael Niedermayer
cee4b99d41
avfilter/vf_uspp: Support any codec
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-03-18 18:20:14 +01:00
Wenbin Chen
31a23149da doc/encoders: Add av1 to qsv encoder's summary
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-03-17 14:13:37 +08:00
Wenbin Chen
2db22d14bf doc/examples/qsv_transcode: Fix a bug when use more than one parameter set
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-03-17 14:13:37 +08:00
Wenbin Chen
55c8c9493f libavcodec/qsvenc: Add dynamic setting support of low_delay_brc to av1_qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-03-17 14:13:37 +08:00
Zhao Zhili
3be46ee767 libavutil/hdr_dynamic_vivid_metadata: fix three spline params
There are two group of three_Spline params.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-03-17 18:51:16 +08:00
Niklas Haas
1231003c3c avfilter/vf_libplacebo: remove deprecated field
This has not been functional since a year ago, including in our current
minimum dependency of libplacebo (v4.192.0). It also causes build errors
against libplacebo v6, so it needs to be removed from the code. We can
keep the option around for now, but it should also be removed soon.

Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-13 11:30:58 -03:00
Stefano Sabatini
cd0d267b92 doc/examples/mux: rename alloc_picture to alloc_frame
The new name is consistent with the updated API.
2023-03-12 16:45:05 +01:00
Werner Robitza
79b40ff58c doc/filters: update SITI description
The filter implements the 'legacy' version from a superseded recommendation.
2023-03-02 18:59:37 +01:00
Marth64
373ef1c4fa
avcodec/version: bump minor version to accommodate spatial audio detection
Signed-off-by: Marth64 <marth64@proxyid.net>
2023-03-02 13:49:04 +01:00
Michael Niedermayer
011f30fc82
Use https for repository links
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-03-01 21:59:10 +01:00
Martin Storsjö
083dde57e2 doc: Fix building community.html from the new community.texi
In texi source, @ characters need to be escaped.

This fixes the following build errors:

community.texi:59: unknown command `ffmpeg'
community.texi:143: unknown command `ffmpeg'

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-03-01 09:42:09 +02:00
Thilo Borgmann
6709e468f6 doc: Merge doc/dev_community/* and Code of Conduct into a seperate file
Remove doc/dev_communit markup files completely as they are at the wrong place.
Create a new community page, merging all of doc/dev_community and subsection Code of Conduct into a common place.
The corresponding patch to ffmpeg-web puts the Organisation & Code of Conduct into a seperate community chapter on the FFmpeg website.
2023-03-01 00:30:59 +01:00
Nicolas George
9a0d202118 doc/dev_community: add the addresses of the committees
Omitting the .org from the address should be protection enough
against spam spiders.

Signed-off-by: Nicolas George <george@nsup.org>
2023-03-01 00:30:59 +01:00
Stefano Sabatini
f88a4cb5e0 doc/ffmpeg: extend documentation for -dts_delta_threshold and -dts_error_threshold
PR: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=8252
2023-02-28 22:26:28 +01:00
Linjie Fu
f459377543 lavc/avcodec: Add HEVC Screen Content Coding Extensions profile
Described in HEVC spec A.3.7. Bump minor version and add APIchanges
entry for new added profile.

Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2023-02-27 13:42:06 +08:00
Pierre-Anthony Lemieux
23b4251808
doc: improve IMF demuxer documentation
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
2023-02-21 19:38:54 -08:00
James Almer
223c70cf1d swresample/swresample: add a used channel layout option using the new API
Replaces the "used channel count" option, which is now deprecated.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-19 18:28:45 -03:00
James Almer
1d14959f12 doc/resampler.texi: add missing swr channel layout options
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-19 18:26:53 -03:00
Marton Balint
3807fbd90a doc: remove docs for options removed at the bump
Signed-off-by: Marton Balint <cus@passwd.hu>
2023-02-19 19:29:17 +01:00
Michael Niedermayer
9e80dfbfd9
doc/APIchanges: Add 6.0 cut point
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-02-19 18:34:25 +01:00
Michael Niedermayer
e33c1a5494
doc/APIchange: fill in missing things
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-02-19 18:23:21 +01:00
Niklas Haas
eabc304d12 avfilter/vf_libplacebo: add SMPTE ST2094 tone-mappers
libplacebo gained these exciting new functions upstream.
2023-02-17 18:35:39 +01:00
Haihao Xiang
0f407cdea2 avfilter: add QSV variants of the stack filters
Include hstack_qsv, vstack_qsv and xstack_qsv. They may accept input
streams with different sizes.

Examples:
$ ffmpeg -hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-filter_complex "[0:v][0:v]hstack_qsv" -f null -

$ ffmpeg \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-filter_complex "[0:v][1:v][2:v][3:v]xstack_qsv=inputs=4:fill=0x000000:layout=0_0_1920x1080|w0_0_1920x1080|0_h0_1920x1080|w0_h0_1920x1080" \
-f null -

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-02-16 11:15:50 +08:00
Marton Balint
927042b409 avformat: deprecate AVFormatContext io_close callback
io_close2 should be used instead.

Signed-off-by: Marton Balint <cus@passwd.hu>
2023-02-16 01:18:45 +01:00
Marton Balint
2296078397 avutil/frame: deprecate AVFrame.coded_picture_number and display_picture_number
Their usefulness is questionable, very few decoders set them, and their type
should have been int64_t. A replacement field can be added later if a valid use
case is found.

Signed-off-by: Marton Balint <cus@passwd.hu>
2023-02-13 00:37:50 +01:00
Marton Balint
6b6f7db819 avcodec: add AVCodecContext.frame_num as 64 bit variant to frame_number
Frame counters can overflow relatively easily (INT_MAX number of frames is
slightly more than 1 year for 60 fps content), so make sure we use 64 bit
values for them.

Also deprecate the old 32 bit frame_number attribute.

Signed-off-by: Marton Balint <cus@passwd.hu>
2023-02-13 00:36:46 +01:00
Anton Khirnov
78f46065d8 fftools/ffmpeg: add special syntax for loading filter options from files
Many filters accept user-provided data that is cumbersome to provide as
text strings - e.g. binary files or very long text. For that reason such
filters typically provide a option whose value is the path from which
the filter loads the actual data.

However, filters doing their own IO internally is a layering violation
that the callers may not expect, and is thus best avoided. With the
recently introduced graph segment parsing API, loading option values
from files can now be handled by the caller.

This commit makes use of the new API in ffmpeg CLI. Any option name in
the filtergraph syntax can now be prefixed with a slash '/'. This will
cause ffmpeg to interpret the value as the path to load the actual value
from.
2023-02-12 10:34:45 +01:00
Anton Khirnov
d1b9a3ddb4 lavfi: add a new filtergraph parsing API
Callers currently have two ways of adding filters to a graph - they can
either
- create, initialize, and link them manually
- use one of the avfilter_graph_parse*() functions, which take a
  (typically end-user-written) string, split it into individual filter
  definitions+options, then create filters, apply options, initialize
  filters, and finally link them - all based on information from this
  string.

A major problem with the second approach is that it performs many
actions as a single atomic unit, leaving the caller no space to
intervene in between. Such intervention would be useful e.g. to
- modify filter options;
- supply hardware device contexts;
both of which typically must be done before the filter is initialized.

Callers who need such intervention are then forced to invent their own
filtergraph parsing, which is clearly suboptimal.

This commit aims to address this problem by adding a new modular
filtergraph parsing API. It adds a new  avfilter_graph_segment_parse()
function to parse a string filtergraph description into an intermediate
tree-like representation (AVFilterGraphSegment and its children).

This intermediate form may then be applied step by step using further
new avfilter_graph_segment*() functions, with user intervention possible
between each step.
2023-02-12 10:28:06 +01:00
J. Dekker
926059dbf3 tools: add general_assembly.pl
This script generates the current general assembly voters according to
the criteria of '20 commits in the last 36 months'.

Signed-off-by: J. Dekker <jdek@itanimul.li>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-12 10:14:22 +01:00
Paul B Mahol
a13210ab39 avformat: add RKA demuxer 2023-02-11 21:29:35 +01:00
Paul B Mahol
b8c0802156 avcodec: add RKA decoder 2023-02-11 21:26:37 +01:00
Stefano Sabatini
e3bbf5c17d doc/examples: fix make command, reference Makefile.example
Fix regression since b25d6290c6.
2023-02-11 18:06:02 +01:00
Stefano Sabatini
051e1ed1e2 examples/Makefile.example: add note about missing entries 2023-02-11 18:04:32 +01:00
Stefano Sabatini
34ff361921 examples: apply doxy entries consistency fixes
Use consistent format for the @file field and file description.
2023-02-11 17:49:01 +01:00
Stefano Sabatini
3d4dc6aa77 examples: rename transcoding to transcode 2023-02-11 17:49:01 +01:00
Stefano Sabatini
3856f82ef9 examples: rename scaling_video to scale_video 2023-02-11 17:49:01 +01:00
Stefano Sabatini
cd8211527e examples: rename resampling audio to resample_audio 2023-02-11 17:49:01 +01:00
Stefano Sabatini
0a69ca656b examples: rename remuxing to remux 2023-02-11 17:49:01 +01:00
Stefano Sabatini
ab2ec8ef01 examples: rename qsvdec to qsv_decode 2023-02-11 17:49:01 +01:00
Stefano Sabatini
eac4324bfb examples: rename muxing to mux 2023-02-11 17:49:01 +01:00
Stefano Sabatini
7a53ae931d examples: rename metadata to show_metadata 2023-02-11 17:49:01 +01:00
Stefano Sabatini
2e4694707e examples: rename http_multiclient to avio_http_serve_files 2023-02-11 17:49:01 +01:00
Stefano Sabatini
1ae619e8ee examples: rename filtering_video to decode_filter_video 2023-02-11 17:49:01 +01:00
Stefano Sabatini
3367bd56d1 examples: rename filtering_audio to decode_filter_audio 2023-02-11 17:49:01 +01:00
Stefano Sabatini
7f5630a899 examples: rename demuxing_decoding to demux_decode
Follow general scheme VERB_OBJECT.
2023-02-11 17:49:01 +01:00
Stefano Sabatini
f0a415c7eb examples: rename avio_reading to avio_read_callback
Adopt general scheme VERB_OBJECT.
2023-02-11 17:49:01 +01:00
Stefano Sabatini
2a3a36e279 doc/filters/astats: sort measure entries, add missing ones
Also apply minor consistency and formatting fixes.

Fix trac issue:
http://trac.ffmpeg.org/ticket/8397
2023-02-11 17:30:20 +01:00
Paul B Mahol
385ec46424 avformat: add SDNS demuxer 2023-02-11 11:30:46 +01:00
Anton Khirnov
2c4dcbd66b fftools/ffmpeg: rename -enc_stats* to -stats_enc*
This is consistent with -stats_mux*

As the options were added very recently, this should not break any
users.
2023-02-10 11:02:13 +01:00
James Almer
5bad485603 Bump major versions of all libraries
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
Leo Izen
719a93f4e4 avutil/{color_utils, csp}: merge color_utils into csp and expose API
libavutil/color_utils contains some avpriv_ symbols that map
enum AVTransferCharacteristic values to gamma-curve approximations and
to the actual transfer functions to invert them (i.e. -> linear).

There's two issues with this:
(1) avpriv is evil and should be avoided whenever possible
(2) libavutil/csp.h exposes a public API for handling color that
    already handles primaries and matricies

I don't see any reason this API has to be private, so this commit takes
the functionality from avutil/color_utils and merges it into avutil/csp
with an exposed av_ API rather than the previous avpriv_ API.

Every reference to the previous API has been updated to point to the
new one. color_utils.h has been deleted as well. This should not break
any applications as it only contained avpriv_ symbols in the first
place, so nothing in that header could be referenced by other
applications.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:35:14 +01:00
Andreas Rheinhardt
868a31b42d avcodec: Make avcodec_decode_subtitle2 accept a const AVPacket*
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:24:15 +01:00
Anton Khirnov
42a0dd6e7e fftools/ffmpeg: add an option for writing pre-muxing stats
Analogous to -enc_stats*, but happens right before muxing. Useful
because bitstream filters and the sync queue can modify packets after
encoding and before muxing. Also has access to the muxing timebase.
2023-02-09 15:24:15 +01:00
gnattu
d09254a658 avformat/hls: Add option to retry failed segments for hls
Current HLS implementation simply skip a failed segment to catch up
the stream, but this is not optimal for some use cases like livestream
recording.
Add an option to retry a failed segment to ensure the output file is
a complete stream.

Signed-off-by: gnattu <gnattuoc@me.com>
Reviewed-by: Steven Liu <liuqi05@kuaishou.com>
2023-02-09 14:37:23 +05:30
Anton Khirnov
d02340b9e3 lavc/decode: allow using AV_CODEC_FLAG_COPY_OPAQUE for decoding
Use it to propagate AVPacket.opaque[_ref] to corresponding AVFrame
fields. This is a more convenient alternative to reordered_opaque.
2023-02-04 13:14:20 +01:00
Paul B Mahol
4e3e70c19d avformat: add WavArc demuxer 2023-02-04 09:37:19 +01:00
Paul B Mahol
651da91915 avcodec: add WavArc decoder 2023-02-04 09:36:01 +01:00
Jan Ekström
9a820ec8b1 ffmpeg: add video heartbeat capability to fix_sub_duration
Splits the currently handled subtitle at random access point
packets that can be configured to follow a specific output stream.
Currently only subtitle streams which are directly mapped into the
same output in which the heartbeat stream resides are affected.

This way the subtitle - which is known to be shown at this time
can be split and passed to muxer before its full duration is
yet known. This is also a drawback, as this essentially outputs
multiple subtitles from a single input subtitle that continues
over multiple random access points. Thus this feature should not
be utilized in cases where subtitle output latency does not matter.

Co-authored-by: Andrzej Nadachowski <andrzej.nadachowski@24i.com>
Co-authored-by: Bernard Boulay <bernard.boulay@24i.com>

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
2023-02-03 16:17:29 +02:00
Anton Khirnov
806ecace91 fftools/ffmpeg: support input frame params in encoding stats 2023-01-31 09:09:23 +01:00
Paul B Mahol
229f3259f8 doc/general_contents: sync with available decoders and demuxers 2023-01-30 21:42:39 +01:00
Haihao Xiang
aecfec6f80 avfilter: add VA-API variants of the stack filters
Include hstack_vaapi, vstack_vaapi and xstack_vaapi. They may accept
input streams with different sizes.  libva2 (VA-API 1.0+) is required.

Example:
$ ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -i input.h265 -filter_complex
"[0:v][0:v]hstack_vaapi" -c:v h264_vaapi out.h264

$ ffmpeg \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-filter_complex "[0:v][1:v][2:v][3:v]xstack_vaapi=inputs=4:fill=0x000000:layout=0_0_1920x1080|w0_0_1920x1080|0_h0_1920x1080|w0_h0_1920x1080" \
-c:v hevc_vaapi out.h265

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-01-30 08:48:58 +08:00
Anton Khirnov
a1a80f2e64 lavc/encode: pass through frame durations to encoded packets
The generic code can only handle the no-delay case. Encoders with delay
need to be handled individually, which will be done in the following
commits.
2023-01-29 09:23:15 +01:00
Anton Khirnov
5c0348f3d6 lavc: add a codec flag for propagating opaque from frames to packets
This is intended to be a more convenient replacement for
reordered_opaque.

Add support for it in the two encoders that offer
AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE: libx264 and libx265. Other
encoders will be supported in future commits.
2023-01-29 09:18:14 +01:00
Anton Khirnov
935964bd41 doc/ffmpeg: drop non-existent -dc option 2023-01-29 09:12:40 +01:00
Anton Khirnov
425b2c4a56 fftools/ffmpeg: add options for writing encoding stats
Similar to -vstats, but more flexible:
- works for audio as well as video
- frame and/or packet information
- user-specifiable format
2023-01-29 09:09:59 +01:00
Paul B Mahol
40512dbd96 avfilter/af_adynamicequalizer: add auto option 2023-01-27 15:00:53 +01:00
Ashyni
69c060bea2 avfilter/vf_cropdetect: add ability to change limit at runtime
Fixes: https://trac.ffmpeg.org/ticket/9851

Signed-off-by: Ashyni <jeffrey.c@tuta.io>
2023-01-24 21:53:53 +01:00
Paul B Mahol
ac7d21284b avfilter: add fractional delay IR source filter 2023-01-16 09:59:31 +01:00
Jan Ekström
002d0ec740 avutil: introduce AVAmbientViewingEnvironment side data
This enables exposing H.274 Ambient Viewing Environment
metadata in the framework.
2023-01-13 21:26:13 +02:00
Zhao Zhili
6e7c006e40 avformat/file: add fd protocol
Unlike the pipe protocol, fd protocol has seek support if it
corresponding to a regular file.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-01-11 18:50:36 +08:00
Zhao Zhili
49b8f043ca avformat/file: add fd option for pipe
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-01-11 18:50:36 +08:00
Anton Khirnov
e884360e91 doc/ffmpeg: improve -r documentation
Explain different behavior for encoding and streamcopy.
2023-01-10 11:49:28 +01:00
Anton Khirnov
1a6ba73ff7 doc/ffmpeg.texi: drop a non-existent option
-ilme has not existed for 17 years, since
637b5326f3
2023-01-10 11:49:28 +01:00
Paul B Mahol
5d3f0226ad avfilter/avf_avectorscope: add anti-aliased line drawing mode 2023-01-09 18:07:05 +01:00
Wenbin Chen
13d04e30d7 libavcodec/qsvenc_av1: Add max_frame_size support to av1_qsv encoder
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-01-09 13:56:03 +08:00
Wenbin Chen
c8e73558fe libavcodec/qsvenc_av1: Add low_delay_brc support to av1_qsv encoder
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-01-09 13:56:03 +08:00
Clément Bœsch
68275043a0 avfilter/paletteuse: add atkinson dithering
Atkinson according to
https://bisqwit.iki.fi/jutut/kuvat/ordered_dither/error_diffusion.txt:

        *   1   1    / 8
    1   1   1
        1
2023-01-03 17:29:13 +01:00
Clément Bœsch
c973e8ae79 avfilter/paletteuse: add burkes dithering
Burkes according to
https://bisqwit.iki.fi/jutut/kuvat/ordered_dither/error_diffusion.txt:

          *  8  4
    2  4  8  4  2   / 32
2023-01-03 17:29:13 +01:00
Clément Bœsch
9973343bf9 avfilter/paletteuse: add sierra3 dithering
Sierra3 according to
https://bisqwit.iki.fi/jutut/kuvat/ordered_dither/error_diffusion.txt:

          *  5  3
    2  4  5  4  2
       2  3  2      / 32
2023-01-03 17:29:13 +01:00
Clément Bœsch
320fbf5f24 avfilter/palette{gen,use}: revert support palettes with alpha
This reverts commit dea673d0d5.

This change cannot work for several reasons, the most obvious ones are:

- the alpha is being part of the scoring of the color difference, even
  though we can not interpret the alpha as part of the perception of the
  color (we don't even know if it's premultiplied or postmultiplied)
- the colors are averaged with their alpha value which simply cannot
  work

The command proposed in the original thread of the patch actually
produces a completely broken file:

    ffmpeg -y -loglevel verbose -i fate-suite/apng/o_sample.png -filter_complex "split[split1][split2];[split1]palettegen=max_colors=254:use_alpha=1[pal1];[split2][pal1]paletteuse=use_alpha=1" -frames:v 1 out.png

We can see that many color pixels are off, but more importantly some
colors have a random alpha value: https://imgur.com/eFQ2UK7

I don't see any easy fix for this unfortunately, the approach appears to
be flawed by design.
2023-01-03 17:18:55 +01:00
Paul B Mahol
c94988a781 avfilter/af_afade: add options to control unity/silence gains 2023-01-03 10:25:06 +01:00
Gyan Doshi
d39b34123d avformat/segment: add option min_seg_duration
New option can be used to avoid creating very short segments with inputs
whose GOP size is variable or unharmonic with segment_time.

Only effective with segment_time.
2022-12-29 15:43:40 +05:30
Paul B Mahol
8906145cdf avfilter/af_afir: increase max partition size 2022-12-25 20:39:54 +01:00
Paul B Mahol
3b66757d7d avfilter: add adrc filter 2022-12-19 20:43:58 +01:00
mail@nodoa.me
38b837e0e1 avfilter/vf_decimate: add mixed option to process input only partially to be decimated
Enabling the option will only decimate frames below dupthresh and output at
variable frame rate.
2022-12-19 16:24:25 +01:00
Paul B Mahol
8c75e5fdd3 avfilter/af_afir: improve output when IR switching at runtime
Also improve normalization and add more gtype modes
2022-12-18 19:58:12 +01:00
Derek Buitenhuis
5a46647f00 doc/protocols: Remove IPFS urls to specific content in examples
We shouldn't be providing links to unverified and non-FFmpeg-controlled
content in our documentation.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2022-12-12 21:47:02 +00:00
Derek Buitenhuis
27b5ce2805 doc/protocols: Remove third party server
We do not endorse or recommend specific third party servers or companies
that users' data will be funneled through.

It is also incorrectly describing how FFmpeg currently works.

Should have been part of 412922cc6f but was
missed.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2022-12-12 21:47:02 +00:00
Paul B Mahol
c3e20f78b0 doc/filters: add more advanced and useful afir example 2022-12-11 20:53:26 +01:00
Timo Rothenpieler
7a8d78f7e3 lavc: add new unsafe_output hwaccel_flag 2022-12-10 00:52:33 +01:00
Paul B Mahol
f0f19f3d3d avfilter: add corr video filter 2022-12-08 13:03:42 +01:00
James Almer
d4f853f4ed doc/filters.texi: add documentation for the ts_sync_mode framesync option
Signed-off-by: James Almer <jamrial@gmail.com>
2022-12-07 14:37:11 -03:00
Paul B Mahol
b08e8d520e doc/filters: link framesync options for msad/identity/vif 2022-12-07 12:23:16 +01:00
Paul B Mahol
520111c610 avfilter/vf_thumbnail: allow to change stats log level 2022-12-05 21:08:02 +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
Paul B Mahol
569b1a24cd avfilter/avf_showcwt: add yet another mode variant 2022-11-30 20:08:18 +01:00
Paul B Mahol
7d20635aeb avfilter/avf_showcwt: add frame slide mode 2022-11-30 18:06:42 +01:00
Paul B Mahol
d34c1b389e avfilter: add showcwt multimedia filter 2022-11-28 23:18:03 +01:00
Lynne
e97368eba5
lavu: bump minor and add APIchanges entry for lavu/tx DCT 2022-11-24 15:58:36 +01:00
Anton Khirnov
14c6093528 doc/developer.texi: extend and update naming conventions
Bring it up to date with current practice, as the current text does not
cover everything. Drop the reference to unprefixed exported symbols,
which do not exist anymore.
2022-11-23 10:43:41 +01:00
Anton Khirnov
2d172b89b2 doc/developer.texi: drop a misplaced sentence from code formatting section
It describes a general development policy, not code formatting. It is
also not true, as these days we tend to prioritize correctness, safety,
and completeness over code size.
2022-11-23 10:43:27 +01:00
Anton Khirnov
d95d0b1b72 doc/developer.texi: move editor configuration under formatting
It logically belongs there.
2022-11-23 10:43:22 +01:00
Anton Khirnov
9177556bb9 doc/developer.texi: update the language feature section
It is currently very out of touch with reality.

* declare we are using C99 fully, rather than C90 plus extensions
* mention our use of stdatomic.h
* mention forbidden C99 features, like VLAs and complex numbers
2022-11-23 10:41:06 +01:00
Anton Khirnov
256db01851 doc/developer.texi: move the language feature section higher up
It makes more sense to first describe the language we are using and only
then document how to format code in it, rather than the reverse.
2022-11-23 10:41:01 +01:00
Marton Balint
98f6c59f4f avformat/electronicarts: add option to return alpha channel in the main video stream in VP6A codec
VP6 alpha in EA format is a second VP6 encoded video stream where only the Y
component is used and is interpreted as the alpha channel of the first VP6
stream. The alpha VP6 stream is muxed separately from the main VP6 stream, has
its own stream headers and packet headers. In theory the two streams might not
even have the same resolution (although most likely that is not something that
is seen or supported in the wild), but the format is capable of doing it.

Merged VP6 alpha (also known as the VP6A codec) means that a packet of the
video stream contains the corresponding packet of both VP6 substreams like
this:

{OffsetOfAlpha, DataPacket, AlphaDataPacket}

So data and alpha data of a frame is merged to a single packet, this is how VP6
video with alpha is muxed in FLV and SWF.

The first approach is more like how the demuxer sees data in the EA format,
unfortunately it is different to what the FLV or SWF format expects, so -
having no better place for it in the framework - I decided to do an optional
format conversion in the EA demuxer.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-11-22 22:59:51 +01:00
Wenbin Chen
efe2b63c89 doc/examples: Add qsv_transcode example
Add qsv_transcode example which shows how to use qsv to do hardware
accelerated transcoding, also show how to dynamically set encoding
parameters.

examples:
Normal usage:
qsv_transcode input.mp4 h264_qsv output.mp4 "g 60"

Dynamic setting usage:
qsv_transcode input.mp4 hevc_qsv output.mp4 "g 60 asyne_depth 1"
100 "g 120"
This command initializes codec with gop_size 60 and change it to
120 after 100 frames

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-11-22 13:52:38 +08:00
Niklas Haas
05d390890a avfilter/vf_libplacebo: default to normalize_sar=0
As a result of a typo in the source code, this option was completely
non-functional. In order to fix it, without breaking the current default
behavior, explicitly change this default to 0.

This behavior is also consistent with how other scale filters behave by
default, so it's probably best to enshrine it anyways.
2022-11-19 14:15:19 +01:00
Paul B Mahol
52291d2ac8 avfilter/af_surround: implement smooth option/support 2022-11-18 21:51:10 +01:00
Paul B Mahol
59b16355ec avfilter/avf_showspatial: switch to lavu TX
Also try harder to make output constant frame rate.
2022-11-17 12:37:22 +01:00
Anton Khirnov
6a3e174ad1 doc/developer.texi: refine the "contributing code" section
Drop the reference to directly committing code, because
- it is highly discouraged and very rarely done these days
- there is no good reason NOT to submit patches for review

Add a link to the development policy chapter.
2022-11-17 10:58:30 +01:00
Anton Khirnov
66871647dc doc/developer.texi: demote the "contributing" chapter to a section
It is very short and its main functions is linking to the
coding rules/submitting patches chapters.
2022-11-17 10:58:20 +01:00
Anton Khirnov
c0c492dd47 doc/developer.texi: extend the argument for submitting patches
Stop talking about commercial programs, since this applies to any
downstream user.
2022-11-17 10:57:37 +01:00
Anton Khirnov
26080d1542 doc/developer.texi: improve the introductory text
Remove confusing references to "external" vs. "internal" developers.
2022-11-17 10:56:48 +01:00
Paul B Mahol
64031c5e65 avfilter/af_surround: add focus option
And improve angle option handling.
2022-11-15 19:52:38 +01:00
Paul B Mahol
8e96319674 avfilter/af_dynaudnorm: add curve option 2022-11-10 19:16:05 +01:00
Paul B Mahol
a0c7c9d636 avfilter/f_ebur128: add quiet framelog mode 2022-11-10 19:15:53 +01:00
Paul B Mahol
7027101904 avfilter/af_speechnorm: implement rms option 2022-11-07 08:32:48 +01:00
Wenbin Chen
dc4d3429e1 libavcodec/qsvenc: Add skip_frame support to qsvenc
Add skip_frame support to qsvenc. Use per-frame metadata
"qsv_skip_frame" to control it. skip_frame option defines the behavior
of qsv_skip_frame.
no_skip: Frame skipping is disabled.
insert_dummy: Encoder inserts into bitstream frame where all macroblocks
are encoded as skipped.
insert_nothing: Similar to insert_dummy, but encoder inserts nothing.
The skipped frames are still used in brc. For example, gop still include
skipped frames, and the frames after skipped frames will be larger in
size.
brc_only: skip_frame metadata indicates the number of missed frames
before the current frame.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-11-07 10:57:12 +08:00
nyanmisaka
af67f627d1 doc/encoders: add doc of the tier option for hevc_qsv
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2022-11-07 10:57:12 +08:00
softworkz
e137d197b5 doc/filters.texi: update overlay_vaapi documentation
Signed-off-by: softworkz <softworkz@hotmail.com>
2022-11-07 10:56:44 +08:00
softworkz
00ce6f486b doc/filters.texi: remove incorrect statement
Signed-off-by: softworkz <softworkz@hotmail.com>
2022-11-07 10:56:44 +08:00
James Almer
26cb36f357 Revert "lavc: deprecate avcodec_dct, av_fft, av_dct, av_rdft and av_mdct"
There are sill many users of these APIs within libav*, so this commit
introduced too many deprecation warnings, making compilation too noisy and
potentially hiding legit warnings.
Once the remaining users are ported, this can be reapplied.

This reverts commit 76d0038579.
2022-11-06 12:15:56 -03:00
Lynne
76d0038579
lavc: deprecate avcodec_dct, av_fft, av_dct, av_rdft and av_mdct
Replaced by lavu/tx. Dedicated code soon to be removed, replaced with
a simple wrapper code.
2022-11-06 14:39:42 +01:00
Marvin Scholz
9dad237928 avutil/dict: Add av_dict_iterate
This is a more explicit iteration API rather than using the "magic"
av_dict_get(d, "", t, AV_DICT_IGNORE_SUFFIX) which is not really
trivial to grasp what it does when casually reading through code.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-11-06 08:26:48 +01:00
Paul B Mahol
5c2a29cf72 avfilter: add backgroundkey video filter 2022-11-05 10:52:39 +01:00
Paul B Mahol
4dda3b1653 avfilter/vf_pseudocolor: add spectral preset 2022-11-04 08:50:04 +01:00
James Almer
6228ba141d avutil/channel_layout: add a 7.1(top) channel layout
Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-03 19:39:45 -03:00
James Almer
83e918de71 avutil/channel_layout: add a cube channel layout
Signed-off-by: James Almer <jamrial@gmail.com>
2022-10-30 16:18:30 -03:00
Jun Zhao
307326b36d doc/protocols: update rtsp options
Split the rtsp options to muxer/demuxer, and update the options.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2022-10-29 12:26:42 +08:00
Jun Zhao
3497362be1 doc/examples/muxing: Remove unnecessary ret
Remove unnecessary ret and make the code more compact

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2022-10-29 12:26:30 +08:00
Wenbin Chen
d79c240196 doc/encoders: Add doc for av1_qsv
Add doc for av1_qsv.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-10-24 13:30:22 +08:00
Takeshi (Kesh) Ikuma
65f96a965a avfilter/vf_curves: add PCHIP interpolator and interp option
summary: This patch modifies the `curves` filter with new `interp` option
         to let user pick the existing natural cubic spline interpolation
         and the new PCHIP interapolation.

reason:  The natural cubic spline does not impose monotonicity between
         the keypoints. As such, the fitted curve may vary wildly against
         user's intension. The PCHIP interpolation is not as smooth as
         the natural spline but guarantees the monotonicity. Providing
         both options enhances users experience (e.g., reduces the number
         of keypoints to realize the desired curve). See the related bug
         report for the example of an ill-interpolated curve.

alternate solution:
         Both Photoshop and GIMP appear to use monotonic interpolation in
         their curve tools, which were the models for this filter. As
         such, an alternate solution is to drop the natural spline and
         go without the `interp` option.

related bug report: https://trac.ffmpeg.org/ticket/9947 (filed by myself)

Signed-off-by: Takeshi (Kesh) Ikuma <tikuma@hotmail.com>
2022-10-22 19:35:44 +02:00
Paul B Mahol
da4ff1d536 avfilter/vf_maskedthreshold: implement diff mode
To be useful for adaptive thresholding with threshold filter.
2022-10-21 20:11:14 +02:00
Paul B Mahol
754d52cf42 avfilter/window_func: add kaiser window 2022-10-20 12:13:37 +02:00
Jan Ekström
c889248647 ffmpeg: Add display_{rotation, hflip, vflip} options
This enables overriding the rotation as well as horizontal/vertical
flip state of a specific video stream on the input side.

Additionally, switch the singular test that was utilizing the rotation
metadata to instead override the input display rotation, thus leading
to the same result.
2022-10-19 11:53:52 +02:00
Peter Ross
3141dbb7ad avcodec: ViewQuest VQC decoder
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Peter Ross <pross@xvid.org>
2022-10-18 13:20:37 +11:00
Marvin Scholz
fe9381ede6 doc/Doxyfile: Add FF_PAD_STRUCTURE to PREDEFINED
The FF_PAD_STRUCTURE is too complex for doxygen to be able to
properly handle, resulting in completely broken AVBPrint documentation.

To fix that, tell Doxygen what to expand that macro to.
2022-10-17 09:55:19 +02:00
Paul B Mahol
fd5c273f26 doc/filters: add another afftfilt example 2022-10-16 11:06:16 +02:00
James Almer
662e838ad6 doc/decoders: document the max_frame_delay libdav1d option
Signed-off-by: James Almer <jamrial@gmail.com>
2022-10-15 19:11:52 -03:00
Leo Izen
479747645f avutil/pixfmt.h: add native-endian RGB32F and RGBA32F formats
Add an AV_PIX_FMT_NE macro for RGB32FBE/RGB32FLE and also one for
RGBA32FBE/RGBA32FLE for packed 32-bit float RGB samples, and also
packed 32-bit float RGBA samples, respectively.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Leo Izen <leo.izen@gmail.com>
2022-10-11 16:31:15 -03:00
Paul B Mahol
504fbc2149 avfilter/af_aspectralstats: allow to select subset of measurements 2022-10-11 18:14:06 +02:00
Paul B Mahol
5676b7cdcf avfilter/af_adynamicequalizer: rework processing 2022-10-09 09:16:24 +02:00
Zhao Zhili
2205ccd216 avformat/mpegtsenc: add omit_rai flag
Add PCR at keyframe can be undesirable when -pcr_period is
specified. Add an flag to disable this behavior.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-10-08 22:55:31 +08:00
Lynne
bd3e552549
lavu: bump minor and add APIChanges entry for RISC-V's RVBbasic 2022-10-05 08:31:15 +02:00
Anton Khirnov
a6bf4d47a9 lavfi/avf_showspatial: add framerate option
Apparently this option was intended (the context contains a
currently-unused frame_rate field), but was never added. This results in
the output timebase being unset after config_output(), so the input
audio timebase ends up being used for video output, which is clearly
wrong.

Add an option for setting output video framerate. Also set output frame
durations.
2022-10-04 11:55:03 +02:00
Anton Khirnov
3d86a13b47 fftools/ffmpeg: drop the -async option
It has been deprecated in favor of the aresample filter for almost 10
years.

Another thing this option can do is drop audio timestamps and have them
generated by the encoding code or the muxer, but
- for encoding, this can already be done with the setpts filter
- for muxing this should almost never be done as timestamp generation by
  the muxer is deprecated, but people who really want to do this can use
  the setts bitstream filter
2022-10-04 11:55:03 +02:00
Andreas Rheinhardt
d09776d486 avformat/avio: Schedule AVIODirContext to become an opaque type
Users can't make anything with its content.
Making it opaque might allow us to avoid one level of indirection.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-03 23:21:57 +02:00
Anton Khirnov
5c94b6694a lavu: add an APIchanges entry for RISC-V CPU flags
Forgotten in 0c0a3deb18.
2022-10-02 11:59:34 +02:00
Anton Khirnov
8bafe8a418 doc/APIchanges: mention the addition of AV_PIX_FMT_RGB[A]F*
lavu minor bump was apparently forgotten for those, so mention them in
the block adding av_chroma_location*(), which was the next lavu minor
bump.
2022-10-02 11:59:25 +02:00
Wenbin Chen
3771d54989 libavcodec/qsvenc: Add pic_timing_sei reset support to qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-30 09:20:15 +08:00
Wenbin Chen
29a3ba8693 libavcodec/qsvenc: Add bitrate reset support to qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-30 09:20:15 +08:00
Wenbin Chen
17df61083d libavcodec/qsvenc: Add framerate reset support to qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-30 09:20:15 +08:00
Andreas Rheinhardt
a02a0e8db4 avcodec/avcodec: Deprecate lavc chroma pos API functions
avcodec_enum_to_chroma_pos() and avcodec_chroma_pos_to_enum()
deal with enum AVChromaLocation which is defined in lavu.
These functions are therefore replaced by
av_chroma_location_enum_to_pos() and av_chroma_location_pos_to_enum().
This commit provides the necessary deprecations. Also already make
these functions wrappers around the corresponding lavu functions
as not doing so would force one to disable deprecation warnings.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-26 03:02:49 +02:00
Andreas Rheinhardt
8be6552aa4 avutil/pixdesc: Add av_chroma_location_(enum_to_pos|pos_to_enum)
They are intended as replacements for avcodec_enum_to_chroma_pos()
and avcodec_chroma_pos_to_enum().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-26 03:02:25 +02:00
Andreas Rheinhardt
cf856d8957 avcodec/avcodec: Move AV_ER_* and FF_COMPLIANCE_* to defs.h
They are also frequently used in libavformat.
This change does not cause any breakage as avcodec.h
includes defs.h.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-26 02:51:46 +02:00
Andreas Rheinhardt
7ae1c0dd3e avcodec/h264_redundant_pps_bsf: Don't remove PPS
There is no check for whether these supposedly redundant PPS
are actually redundant. One could check via memcmp which would
work in practice* (because all content buffers are initially
zero-allocated), but this is not portable as compilers may
trash padding inside structures as they wish.

In case the PPS is not really redundant the output is garbage.
This happens with several files from the FATE-suite. E.g.
h264-conformance/CVCANLMA2_Sony_C.jsv doesn't decode correctly
any more, whereas h264-conformance/CABA3_TOSHIBA_E.264 even
fails in ff_cbs_write_packet(), because the inferred value
of num_ref_idx_l0_active_minus1 mismatches with the value set
in the slice (this happens when num_ref_idx_l0_default_active_minus1
changes in the PPS; the value in the slice header is inferred from
the original PPS's num_ref_idx_l0_default_active_minus1).

*: Unless slice_group_id is used, i.e. unless slice_group_map_type
is six.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-25 14:53:45 +02:00
Paul B Mahol
257eea3db4 doc: mention new audio formats 2022-09-24 14:03:59 +02:00
Chema Gonzalez
7adf7502b8
doc/examples/extract_mvs: add motion information
Note that the motion information includes subpel motion information

This was likely forgotten in 56bdf61baa.

Tested:
```
$ make examples -j
...
$ doc/examples/extract_mvs in.264 | head -40 | \
    csvcut -C framenum,source,flags |csvlook
| blockw | blockh |  srcx | srcy |  dstx | dsty | motion_x | motion_y | motion_scale |
| ------ | ------ | ----- | ---- | ----- | ---- | -------- | -------- | ------------ |
|     16 |     16 |    20 |   26 |     8 |    8 |       49 |       72 |            4 |
|     16 |     16 |   152 |   15 |   136 |    8 |       65 |       28 |            4 |
|     16 |      8 |   360 |    3 |   360 |    4 |        1 |       -6 |            4 |
|     16 |      8 |   360 |   13 |   360 |   12 |       -1 |        4 |            4 |
|     16 |     16 |   440 |   10 |   440 |    8 |        3 |       10 |            4 |
|      8 |     16 |   829 |    7 |   836 |    8 |      -31 |       -6 |            4 |
|      8 |     16 |   844 |    7 |   844 |    8 |       -1 |       -4 |            4 |
|     16 |     16 | 1,004 |   14 | 1,048 |    8 |     -177 |       24 |            4 |
|     16 |     16 | 1,096 |    8 | 1,096 |    8 |       -1 |        0 |            4 |
|     16 |      8 | 1,417 |   24 | 1,416 |    4 |        7 |       82 |            4 |
|     16 |      8 | 1,416 |   13 | 1,416 |   12 |        0 |        6 |            4 |
|     16 |      8 |    87 |   20 |    88 |   20 |       -7 |        0 |            4 |
|     16 |      8 |    99 |   44 |    88 |   28 |       45 |       66 |            4 |
...
```

Also:
```
$ make fate -j
...
```

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-09-23 22:42:19 +02:00
Lynne
ace42cf581
x86/tx_float: add 15xN PFA FFT AVX SIMD
~4x faster than the C version.
The shuffles in the 15pt dim1 are seriously expensive. Not happy with it,
but I'm contempt.

Can be easily converted to pure AVX by removing all vpermpd/vpermps
instructions.
2022-09-23 12:35:27 +02:00
James Zern
bd7d69fe35 avcodec/libvpxenc: add -min-gf-interval
this maps to the vpxenc argument with the same name and the
VP9E_SET_MIN_GF_INTERVAL codec control

Signed-off-by: James Zern <jzern@google.com>
Reviewed-by: Vignesh Venkatasubramanian <vigneshv@google.com>
2022-09-22 11:52:16 -07:00
Paul B Mahol
1af0051977 doc/filters: add speechnorm examples 2022-09-18 19:43:42 +02:00
Paul B Mahol
dd2a01ef5c avformat: add LAF demuxer 2022-09-16 10:02:19 +02:00
Paul B Mahol
ea93943bee avcodec: add MI-SC4 audio decoder 2022-09-16 10:02:19 +02:00
Roman Arzumanyan
cc81ab283c libavfilter: add vf_colorrange_cuda, CUDA-accelerated color conversion filter
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2022-09-13 22:59:30 +02:00
Rémi Denis-Courmont
092ce9712f doc: reference the RISC-V specification 2022-09-13 16:50:43 -03:00
Wenbin Chen
a2fd553dd3 libavcodec/qsvenc: Add low_delay_brc reset support to qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen
005c7a4f61 libavcodec/qsvenc: Add max/min qp reset support in qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen
9155ec096b libavcodec/qsvenc: Add intra refresh reset support to qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen
f3ba1458b6 libavcodec/qsvenc: Add "slice" intra refresh type to qsvenc
Add "slice" intra refresh type to h264_qsv and hevc_qsv. This type means
horizontal refresh by slices without overlapping. Also update the doc.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen
d60f657a50 libavcodec/qsvenc: Add gop_size reset support to qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen
c679de9be0 libavcodec/qsvenc: Add max_frame_size reset support to qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Haihao Xiang
a5b6e29227 lavc/qsvenc: use VBR if maxrate is not specified on Windows
Currently AVBR is disabled and VBR is the default method if maxrate is
not specified on Linux, but AVBR is the default one if maxrate is not
specified on Windows. In order to make user experience better accross
Linux and Windows, use VBR by default on Windows if maxrate is not
specified. User need to set both avbr_accuracy and avbr_convergence to
non-zero explicitly and not to specify maxrate if AVBR is expected.

In addition, AVBR works for H264 and HEVC only in the SDK.

$ ffmpeg.exe -v verbose -f lavfi -i yuvtestsrc -vf "format=nv12" -c:v
vp9_qsv -f null -
2022-09-07 14:01:06 +08:00
Andreas Rheinhardt
5c16df1b92 fftools/ffprobe: Report initial and trailing padding
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-05 20:32:12 +02:00