Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sibras committed May 15, 2022
2 parents d4f725d + e6f0cec commit 89f47e2
Show file tree
Hide file tree
Showing 398 changed files with 12,243 additions and 8,612 deletions.
5 changes: 5 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ version 5.1:
- avsynctest source filter
- feedback video filter
- pixelize video filter
- colormap video filter
- colorchart video source filter
- blurdetect filter
- multiply video filter
- PGS subtitle frame merge bitstream filter


version 5.0:
Expand Down
3 changes: 3 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ Codecs:
libcodec2.c Tomas Härdin
libdirac* David Conrad
libdavs2.c Huiwen Ren
libjxl*.c, libjxl.h Leo Izen
libgsm.c Michel Bardiaux
libkvazaar.c Arttu Ylä-Outinen
libopenh264enc.c Martin Storsjo, Linjie Fu
Expand Down Expand Up @@ -438,6 +439,7 @@ Muxers/Demuxers:
ipmovie.c Mike Melanson
ircam* Paul B Mahol
iss.c Stefan Gehrer
jpegxl_probe.* Leo Izen
jvdec.c Peter Ross
kvag.c Zane van Iperen
libmodplug.c Clément Bœsch
Expand Down Expand Up @@ -618,6 +620,7 @@ Haihao Xiang (haihao) 1F0C 31E8 B4FE F7A4 4DC1 DC99 E0F5 76D4 76FC 437F
Jaikrishnan Menon 61A1 F09F 01C9 2D45 78E1 C862 25DC 8831 AF70 D368
James Almer 7751 2E8C FD94 A169 57E6 9A7A 1463 01AD 7376 59E0
Jean Delvare 7CA6 9F44 60F1 BDC4 1FD2 C858 A552 6B9B B3CD 4E6A
Leo Izen (thebombzen) B6FD 3CFC 7ACF 83FC 9137 6945 5A71 C331 FD2F A19A
Loren Merritt ABD9 08F4 C920 3F65 D8BE 35D7 1540 DAA7 060F 56DE
Lynne FE50 139C 6805 72CA FD52 1F8D A2FE A5F0 3F03 4464
Michael Niedermayer 9FF2 128B 147E F673 0BAD F133 611E C787 040B 0FAB
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ vpath %/fate_config.sh.template $(SRC_PATH)
TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64 audiomatch
HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options

ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale swresample

# $(FFLIBS-yes) needs to be in linking order
FFLIBS-$(CONFIG_AVDEVICE) += avdevice
FFLIBS-$(CONFIG_AVFILTER) += avfilter
Expand Down Expand Up @@ -113,7 +115,7 @@ include $(SRC_PATH)/fftools/Makefile
include $(SRC_PATH)/doc/Makefile
include $(SRC_PATH)/doc/examples/Makefile

libavcodec/avcodec.o libavformat/utils.o libavdevice/avdevice.o libavfilter/avfilter.o libavutil/utils.o libpostproc/postprocess.o libswresample/swresample.o libswscale/utils.o : libavutil/ffversion.h
$(ALLFFLIBS:%=lib%/version.o): libavutil/ffversion.h

$(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
ifeq ($(STRIPTYPE),direct)
Expand Down
16 changes: 14 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ External library support:
--disable-iconv disable iconv [autodetect]
--enable-jni enable JNI support [no]
--enable-ladspa enable LADSPA audio filtering [no]
--enable-lcms2 enable ICC profile support via LittleCMS 2 [no]
--enable-libaom enable AV1 video encoding/decoding via libaom [no]
--enable-libaribb24 enable ARIB text and caption decoding via libaribb24 [no]
--enable-libass enable libass subtitles rendering,
Expand All @@ -240,6 +241,7 @@ External library support:
--enable-libiec61883 enable iec61883 via libiec61883 [no]
--enable-libilbc enable iLBC de/encoding via libilbc [no]
--enable-libjack enable JACK audio sound server [no]
--enable-libjxl enable JPEG XL de/encoding via libjxl [no]
--enable-libklvanc enable Kernel Labs VANC processing [no]
--enable-libkvazaar enable HEVC encoding via libkvazaar [no]
--enable-liblensfun enable lensfun lens correction [no]
Expand Down Expand Up @@ -1813,6 +1815,7 @@ EXTERNAL_LIBRARY_LIST="
gnutls
jni
ladspa
lcms2
libaom
libass
libbluray
Expand All @@ -1833,6 +1836,7 @@ EXTERNAL_LIBRARY_LIST="
libiec61883
libilbc
libjack
libjxl
libklvanc
libkvazaar
libmodplug
Expand Down Expand Up @@ -3331,6 +3335,8 @@ libgsm_ms_decoder_deps="libgsm"
libgsm_ms_encoder_deps="libgsm"
libilbc_decoder_deps="libilbc"
libilbc_encoder_deps="libilbc"
libjxl_decoder_deps="libjxl libjxl_threads"
libjxl_encoder_deps="libjxl libjxl_threads"
libkvazaar_encoder_deps="libkvazaar"
libmodplug_demuxer_deps="libmodplug"
libmp3lame_encoder_deps="libmp3lame"
Expand Down Expand Up @@ -3398,6 +3404,7 @@ asf_stream_muxer_select="asf_muxer"
av1_demuxer_select="av1_frame_merge_bsf av1_parser"
avi_demuxer_select="riffdec exif"
avi_muxer_select="riffenc"
avif_muxer_select="mov_muxer"
caf_demuxer_select="iso_media"
caf_muxer_select="iso_media"
dash_muxer_select="mp4_muxer"
Expand Down Expand Up @@ -3429,7 +3436,7 @@ latm_muxer_select="aac_adtstoasc_bsf mpeg4audio"
matroska_audio_muxer_select="matroska_muxer"
matroska_demuxer_select="riffdec"
matroska_demuxer_suggest="bzlib zlib"
matroska_muxer_select="mpeg4audio riffenc vp9_superframe_bsf aac_adtstoasc_bsf"
matroska_muxer_select="mpeg4audio riffenc aac_adtstoasc_bsf pgs_frame_merge_bsf vp9_superframe_bsf"
mlp_demuxer_select="mlp_parser"
mmf_muxer_select="riffenc"
mov_demuxer_select="iso_media riffdec"
Expand Down Expand Up @@ -3659,6 +3666,8 @@ gblur_vulkan_filter_deps="vulkan spirv_compiler"
hflip_vulkan_filter_deps="vulkan spirv_compiler"
histeq_filter_deps="gpl"
hqdn3d_filter_deps="gpl"
iccdetect_filter_deps="lcms2"
iccgen_filter_deps="lcms2"
interlace_filter_deps="gpl"
kerndeint_filter_deps="gpl"
ladspa_filter_deps="ladspa libdl"
Expand Down Expand Up @@ -6506,6 +6515,7 @@ enabled gmp && require gmp gmp.h mpz_export -lgmp
enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init
enabled jni && { [ $target_os = "android" ] && check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; }
enabled ladspa && require_headers "ladspa.h dlfcn.h"
enabled lcms2 && require_pkg_config lcms2 "lcms2 >= 2.13" lcms2.h cmsCreateContext
enabled libaom && require_pkg_config libaom "aom >= 1.0.0" aom/aom_codec.h aom_codec_version
enabled libaribb24 && { check_pkg_config libaribb24 "aribb24 > 1.0.3" "aribb24/aribb24.h" arib_instance_new ||
{ enabled gpl && require_pkg_config libaribb24 aribb24 "aribb24/aribb24.h" arib_instance_new; } ||
Expand Down Expand Up @@ -6545,6 +6555,8 @@ enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
check_lib libgsm "${gsm_hdr}" gsm_create -lgsm && break;
done || die "ERROR: libgsm not found"; }
enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc $pthreads_extralibs
enabled libjxl && require_pkg_config libjxl "libjxl >= 0.7.0" jxl/decode.h JxlDecoderVersion &&
require_pkg_config libjxl_threads "libjxl_threads >= 0.7.0" jxl/thread_parallel_runner.h JxlThreadParallelRunner
enabled libklvanc && require libklvanc libklvanc/vanc.h klvanc_context_create -lklvanc
enabled libkvazaar && require_pkg_config libkvazaar "kvazaar >= 0.8.1" kvazaar.h kvz_api_get
enabled liblensfun && require_pkg_config liblensfun lensfun lensfun.h lf_db_new
Expand Down Expand Up @@ -6731,7 +6743,7 @@ fi

if enabled sdl2; then
SDL2_CONFIG="${cross_prefix}sdl2-config"
test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 2.1.0" SDL_events.h SDL_PollEvent
test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 3.0.0" SDL_events.h SDL_PollEvent
if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
Expand Down
3 changes: 3 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ HTMLPAGES = $(AVPROGS-yes:%=doc/%.html) $(AVPROGS-yes:%=doc/%-all.html) $(COMP
doc/mailing-list-faq.html \
doc/nut.html \
doc/platform.html \
$(SRC_PATH)/doc/bootstrap.min.css \
$(SRC_PATH)/doc/style.min.css \
$(SRC_PATH)/doc/default.css \

TXTPAGES = doc/fate.txt \

Expand Down
8 changes: 8 additions & 0 deletions doc/bitstream_filters.texi
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,14 @@ for NTSC frame rate using the @option{frame_rate} option.
ffmpeg -f lavfi -i sine=r=48000:d=1 -c pcm_s16le -bsf pcm_rechunk=r=30000/1001 -f framecrc -
@end example

@section pgs_frame_merge

Merge a sequence of PGS Subtitle segments ending with an "end of display set"
segment into a single packet.

This is required by some containers that support PGS subtitles
(muxer @code{matroska}).

@section prores_metadata

Modify color property metadata embedded in prores stream.
Expand Down
11 changes: 11 additions & 0 deletions doc/demuxers.texi
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,17 @@ which streams to actually receive.
Each stream mirrors the @code{id} and @code{bandwidth} properties from the
@code{<Representation>} as metadata keys named "id" and "variant_bitrate" respectively.

@subsection Options

This demuxer accepts the following option:

@table @option

@item cenc_decryption_key
16-byte key, in hex, to decrypt files encrypted using ISO Common Encryption (CENC/AES-128 CTR; ISO/IEC 23001-7).

@end table

@section imf

Interoperable Master Format demuxer.
Expand Down
84 changes: 84 additions & 0 deletions doc/encoders.texi
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,55 @@ follows.

A64 / Commodore 64 multicolor charset encoder. @code{a64_multi5} is extended with 5th color (colram).

@section Cinepak

Cinepak aka CVID encoder.
Compatible with Windows 3.1 and vintage MacOS.

@subsection Options

@table @option
@item g @var{integer}
Keyframe interval.
A keyframe is inserted at least every @code{-g} frames, sometimes sooner.

@item q:v @var{integer}
Quality factor. Lower is better. Higher gives lower bitrate.
The following table lists bitrates when encoding akiyo_cif.y4m for various values of @code{-q:v} with @code{-g 100}:

@table @option
@item @code{-q:v 1} 1918 kb/s
@item @code{-q:v 2} 1735 kb/s
@item @code{-q:v 4} 1500 kb/s
@item @code{-q:v 10} 1041 kb/s
@item @code{-q:v 20} 826 kb/s
@item @code{-q:v 40} 553 kb/s
@item @code{-q:v 100} 394 kb/s
@item @code{-q:v 200} 312 kb/s
@item @code{-q:v 400} 266 kb/s
@item @code{-q:v 1000} 237 kb/s
@end table

@item max_extra_cb_iterations @var{integer}
Max extra codebook recalculation passes, more is better and slower.

@item skip_empty_cb @var{boolean}
Avoid wasting bytes, ignore vintage MacOS decoder.

@item max_strips @var{integer}
@itemx min_strips @var{integer}
The minimum and maximum number of strips to use.
Wider range sometimes improves quality.
More strips is generally better quality but costs more bits.
Fewer strips tend to yield more keyframes.
Vintage compatible is 1..3.

@item strip_number_adaptivity @var{integer}
How much number of strips is allowed to change between frames.
Higher is better but slower.

@end table

@section GIF

GIF image/animation encoder.
Expand Down Expand Up @@ -1809,6 +1858,41 @@ by ":". See the SVT-AV1 encoder user guide for a list of accepted parameters.

@end table

@section libjxl

libjxl JPEG XL encoder wrapper.

Requires the presence of the libjxl headers and library during
configuration. You need to explicitly configure the build with
@code{--enable-libjxl}.

@subsection Options

The libjxl wrapper supports the following options:

@table @option

@item distance
Set the target Butteraugli distance. This is a quality setting: lower
distance yields higher quality, with distance=1.0 roughly comparable to
libjpeg Quality 90 for photographic content. Setting distance=0.0 yields
true lossless encoding. Valid values range between 0.0 and 15.0, and sane
values rarely exceed 5.0. Setting distance=0.1 usually attains
transparency for most input. The default is 1.0.

@item effort
Set the encoding effort used. Higher effort values produce more consistent
quality and usually produces a better quality/bpp curve, at the cost of
more CPU time required. Valid values range from 1 to 9, and the default is 7.

@item modular
Force the encoder to use Modular mode instead of choosing automatically. The
default is to use VarDCT for lossy encoding and Modular for lossless. VarDCT
is generally superior to Modular for lossy encoding but does not support
lossless encoding.

@end table

@section libkvazaar

Kvazaar H.265/HEVC encoder.
Expand Down
12 changes: 8 additions & 4 deletions doc/examples/decode_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ int main(int argc, char **argv)
uint8_t *data;
size_t data_size;
int ret;
int eof;
AVPacket *pkt;

if (argc <= 2) {
Expand Down Expand Up @@ -150,15 +151,16 @@ int main(int argc, char **argv)
exit(1);
}

while (!feof(f)) {
do {
/* read raw data from the input file */
data_size = fread(inbuf, 1, INBUF_SIZE, f);
if (!data_size)
if (ferror(f))
break;
eof = !data_size;

/* use the parser to split the data into frames */
data = inbuf;
while (data_size > 0) {
while (data_size > 0 || eof) {
ret = av_parser_parse2(parser, c, &pkt->data, &pkt->size,
data, data_size, AV_NOPTS_VALUE, AV_NOPTS_VALUE, 0);
if (ret < 0) {
Expand All @@ -170,8 +172,10 @@ int main(int argc, char **argv)

if (pkt->size)
decode(c, frame, pkt, outfilename);
else if (eof)
break;
}
}
} while (!eof);

/* flush the decoder */
decode(c, frame, NULL, outfilename);
Expand Down
Loading

0 comments on commit 89f47e2

Please sign in to comment.