1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

110133 Commits

Author SHA1 Message Date
Leo Izen
c125860892
avcodec/pngenc: write sBIT chunks
Add support for writing sBIT chunks, which mark the significant
bit depth of the PNG file. This obtains the metadata using the field
bits_per_raw_sample of AVCodecContext.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2023-04-01 00:37:55 -04:00
Leo Izen
84b454935f
avcodec/pngdec: support sBIT chunks
Add support for reading sBIT chunks, which mark the significant
bit depth of the PNG file. This passes the metadata using the field
bits_per_raw_sample of AVCodecContext.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2023-04-01 00:37:25 -04: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
Raphael Schlarb
d2e1389285 avcodec/libfdk-accenc: Add option to set frame length when encoding with libfdk_aac
Some specifications require the size of ld/eld frames to be 480 samples
instead of the default 512. libfdk_aac provides an option to set an alternative
frame size, but it's not exposed via the ffmpeg interface.
This patch adds a frame_length option to solve this problem.

Signed-off-by: Raphael Schlarb <info@raphael.schlarb.one>
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-31 08:46:29 -03:00
Haihao Xiang
412d43b09a lavfi/vf_vpp_qsv: only add the given output sw format to output pad
Otherwise the output format is not changed when output is in system
memory. For example, the output format is still p010le in the following
case:

$ ffmpeg -qsv_device /dev/dri/renderD128 -f lavfi -i testsrc -vf
"format=p010le,vpp_qsv=extra_hw_frames=8:format=nv12" -f null -
...
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf60.4.100
  Stream #0:0: Video: wrapped_avframe, p010le(tv, progressive), 320x240
[SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-03-31 10:27:58 +08:00
Paul B Mahol
b75159682a avfilter/af_rubberband: use correct array for multichannels 2023-03-30 14:08:52 +02: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
7d58df7bb2 lavfi/aspect: apply style fixes 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
rcombs
57271e4a68 lavf/oggdec: fix demux with unrecognized header packets
Fixes ticket #10289.

Co-authored-by: James Almer <jamrial@gmail.com>
2023-03-28 16:46:03 -04:00
rcombs
e0835b4878 lavc/vorbis_parser: ignore unrecognized packet types 2023-03-28 16:46:03 -04: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
TADANO Tokumei
38bb137e99 lavf/mpegts.c: set some properties for ARIB caption
Some additional properties are set for ARIB caption.
* need_parsing = 0
  ARIB caption doesn't require any parser.
  This avoids "parser not found" warning message.
* need_context_update = 1
  When any profiles are changed, set this flag to notify.

Signed-off-by: rcombs <rcombs@rcombs.me>
2023-03-28 12:04:52 -04:00
TADANO Tokumei
e1dc78a13d lavc/codec_desc.c: remove AV_CODEC_PROP_TEXT_SUB property from ARIB_CAPTION
To support bitmap subtitle output, remove AV_CODEC_PROP_TEXT_SUB
property from codec descriptor for AV_CODEC_ID_ARIB_CAPTION.
This is similar to `libavcodec/libzvbi-teletextdec.c`
(AV_CODEC_ID_DVB_TELETEXT).

Instead, each subtitle decoder has to specify a subtitile format.
`libavcodec/libaribb24.c` uses same AV_CODEC_ID_ARIB_CAPTION and
expects AV_CODEC_PROP_TEXT_SUB to be set, so this adds a line to
specify a format there.

Signed-off-by: rcombs <rcombs@rcombs.me>
2023-03-28 12:02:55 -04:00
James Almer
d6e30291db fate/lavf-container: add missing swscale deps to mxf_dvcpro100 and mxf_ffv1
Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-28 08:54:39 -03:00
Anton Khirnov
b62632e2c9 lavc: turn mentions of AV_CODEC_FLAG_RECON_FRAME in doxy into links 2023-03-28 13:00:42 +02:00
Anton Khirnov
83eb52323c lavc: expand doxy for AV_CODEC_FLAG_RECON_FRAME 2023-03-28 13:00:42 +02:00
Anton Khirnov
5f87c9915d lavc/avcodec: fix documentation typo 2023-03-28 13:00:42 +02:00
Anton Khirnov
ea748c7a4d tools: add an AV_CODEC_CAP_ENCODER_RECON_FRAME test tool 2023-03-28 13:00:42 +02:00
Anton Khirnov
554c6d7cb1 tools/decode_simple: initialize decoder parameters with container info 2023-03-28 13:00:42 +02:00
Anton Khirnov
992e984fa8 tools/decode_simple: always call process_frame(NULL) at the end
Currently this would not be done if max_frames is triggered.

Makes no difference in either of the tools currently using
decode_simple, but may be important in future tools.
2023-03-28 13:00:42 +02:00
U. Artie Eoff
9bf1848acf lavfi: add hwdevice flag to hwupload/hwmap
This fixes a regression introduced by:

  commit 3f63685c35
   and
  commit 632c349931

...where command-lines like:

ffmpeg -v verbose -hwaccel qsv \
  -init_hw_device qsv=qsv,child_device=/dev/dri/renderD128 \
  -hwaccel_output_format qsv -f rawvideo -pix_fmt yuv420p \
  -s:v 352x288 -r:v 25 -i input.yuv \
  -vf 'format=nv12,hwupload=extra_hw_frames=120' \
  -an -c:v h264_qsv -y output.h264

ffmpeg -v verbose -hwaccel qsv \
  -init_hw_device qsv=qsv,child_device=/dev/dri/renderD128 \
  -hwaccel_output_format qsv -f rawvideo -pix_fmt nv12 \
  -s:v 352x288 -r:v 25 -i input.yuv \
  -vf 'format=nv12|qsv,hwupload=extra_hw_frames=16,vpp_qsv=procamp=1:saturation=1.0,hwdownload,format=nv12' \
  -pix_fmt nv12 -f rawvideo -fps_mode passthrough -an -y output.yuv

...produced errors like:

[hwupload @ 0x55b6171d0dc0] A hardware device reference is required to upload frames to.
[Parsed_hwupload_1 @ 0x55b6172053c0] Query format failed for 'Parsed_hwupload_1': Invalid argument
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-03-27 17:14:31 +02:00
Anton Khirnov
3f4c41839d lavf: return AVERROR_EOF rather than EIO on EOF 2023-03-27 17:14:31 +02:00
J. Dekker
2e61ae2cbe fate: specify EC-off for damaged inter samples
The previous commit allowed turning on error correction for interlaced
samples. Turning it off amounts to a no-op for FATE. These samples
should be tested with EC1-3 (guess_mvs/deblock/favor_inter)
additionally.

Signed-off-by: J. Dekker <jdek@itanimul.li>
2023-03-27 14:00:05 +02:00
Fei Wang
c549bc9d96 lavc/vaapi_hevc: Remove duplicate code
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2023-03-27 09:28:59 +02:00
Fei Wang
9026f446d6 lavc/hevcdec: Initialize missed parameters in slice header for IDR frame
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2023-03-27 09:28:59 +02:00
Fei Wang
c38370dc5d avcodec/hevcdec: Replace number with enum
Keep same style with IS_IDR()/IS_BLA().

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2023-03-27 09:14:00 +02:00
J. Dekker
f7abe92bd7 avcodec/er: remove check for fields
This change on its own is almost certainly not correct; however, in
testing, many samples show notable improvement.

Signed-off-by: J. Dekker <jdek@itanimul.li>
2023-03-27 08:46:07 +02:00
J. Dekker
4f55568217 configure: add LTO optarg
This allows users to specify an argument such as './configure
--enable-lto=thin' to use ThinLTO with Clang. The old functionality with
'./configure --enable-lto' is preserved.

Signed-off-by: J. Dekker <jdek@itanimul.li>
2023-03-27 08:42:44 +02:00
Fei Wang
ee8fc4f355 lavc/vp9: Add RGB* formats for VAAPI hwaccel
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2023-03-27 11:53:37 +08:00
Jerome Martinez
174ca11d91 avformat/mxfenc: fix stored/sampled/displayed width/height
According to MXF specs the Stored Rectangle corresponds to the data which is
passed to the compressor and received from the decompressor, so they should
contain the width / height extended to the macroblock boundary.

In practice however width and height values rounded to the upper 16 multiples
are only seen when muxing MPEG formats. Therefore this patch changes stored
width and height values to unrounded for all non-MPEG formats, even macroblock
based ones.

For DNXHD the specs (ST 2019-4) explicitly indicates to use 1080 for 1088p.
For ProRes the specs (RDD 44) only refer to to ST 377-1 without precision but
no known commercial implementations are using rounded values.
DV is not using 16x16 macroblocks, so 16 rounding makes no sense.

The patch also fixes Sampled Width / Display Width to use unrounded values.

Signed-off-by: Marton Balint <cus@passwd.hu>
2023-03-26 22:04:44 +02:00
Marton Balint
cd954aa3c6 avformat/mxfenc: reindent after last mxfenc commit
Signed-off-by: Marton Balint <cus@passwd.hu>
2023-03-26 22:02:23 +02: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
Devin Heitmueller
19798229df avformat/mpegts: add support for preserving SMPTE 2038 when transcoding MPEG-TS streams
Add the appropriate descriptors to the MPEG-TS demux and mux to
ensure that SMPTE 2038 VANC streams are properly preserved
when using codec copy (including adding the appropriate PMT
descriptors).

The focus of this patch is TS input to TS output.  A separate
patch adds support for output of 2038 VANC over decklink SDI.

Thanks to Marton Balint for feedback to preserve ABI compatibility.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2023-03-26 18:51:25 +02:00
Devin Heitmueller
0d3a2f9370 avcodec: add SMPTE 2038 VANC data codec used in MPEG-TS streams
Signed-off-by: Marton Balint <cus@passwd.hu>
2023-03-26 18:51:25 +02: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
Martin Storsjö
fd97a16157 tests: Fix fate-source after 0fbae2178b
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-03-26 12:39:16 +03:00
Ting Fu
bc589c91f7 lavfi/dnn: add error info for TF backend filling task failure
Signed-off-by: Ting Fu <ting.fu@intel.com>
2023-03-26 09:19:42 +08:00
Ting Fu
af052f9066 lavfi/dnn: fix mem leak in TF backend error handle
Signed-off-by: Ting Fu <ting.fu@intel.com>
2023-03-26 09:19:42 +08:00
Ting Fu
5c216d081d lavfi/dnn: fix corruption when TF backend infer failed
Signed-off-by: Ting Fu <ting.fu@intel.com>
2023-03-26 09:19:42 +08: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
Michael Niedermayer
5310c975cf
avfilter/vf_uspp: add AV_CODEC_FLAG_RECON_FRAME support
about 50% faster (based on command line fps)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-03-26 01:46:49 +01:00
Michael Niedermayer
006136efaf
avcodec/snowenc: AV_CODEC_CAP_ENCODER_RECON_FRAME support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-03-26 01:46:49 +01:00
Michael Niedermayer
163013c724
avcodec/tests/snowenc: Fix 2nd test 2023-03-26 01:46:48 +01:00