Commit Graph

110107 Commits

Author SHA1 Message Date
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
Michael Niedermayer 771c266c0b
avcodec/tests/snowenc: return a failure if DWT/IDWT mismatches
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-03-26 01:46:48 +01:00
Michael Niedermayer 5b5fcadea0
avcodec/snowenc: Fix visual weight calculation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-03-26 01:46:48 +01:00
Michael Niedermayer 8b3351bbea
avcodec/tests/snowenc: unbreak DWT tests
the IDWT data type mismatched current code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-03-26 01:46:47 +01:00
Junxian Zhu 5ffe18bcea
mips: fix build fail on MIPS R6
Add macro define to avoid causing build fail with incompatible assembler code on MIPS R6.

Signed-off-by: Junxian Zhu <zhujunxian@oss.cipunited.com>
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-03-26 01:46:39 +01:00
Thilo Borgmann 653ee3f159 fftools/ffmpeg_mux_init: Use all metadata selectors if none is specified.
Fixes regression from 3c7dd5ed37.
Fixes ticket #10157.
2023-03-25 20:28:41 +01:00
Jerome Martinez 0fbae2178b avformat/mxfenc: SMPTE RDD 48:2018 Amd 1:2022 support 2023-03-25 19:28:36 +01:00
James Almer 6ee6dd93eb fftools/ffprobe: add support for HDR10+ packet side data
Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-25 13:27:20 -03:00
James Almer aca8ceb870 x86/vf_bwdif_init: limit AVX2 functions using 256bit vectors to cpus known to be fast with it
Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-25 13:27:20 -03:00
Jun Zhao a53bb071fe lavf/mpeg: Add G.711 A law support
Add G.711 A law support

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2023-03-25 22:14:09 +08:00
Jun Zhao 9a23d8d894 lavfi/Makefile: fix make checkheaders fail
Add stack_internal.h to the list of skipped headers to fix
make checkheaders fail, it's introduced by commit 742dfa281

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2023-03-25 22:13:56 +08:00
James Darnley 073ec3b9da avfilter/bwdif: add avx2 filter_line function
8-bit:
2.24x faster (1925±1.3 vs. 859±2.2 decicycles) compared with ssse3
10-bit:
2.00x faster (1703±1.7 vs. 853±2.0 decicycles) compared with ssse3
2023-03-25 02:38:17 +01:00
James Darnley a937723ca9 tests: add bwdif to fate filter tests 2023-03-25 02:38:17 +01:00
James Darnley 087faf8cac checkasm: add test for bwdif 2023-03-25 02:38:17 +01:00
James Darnley b503b5a0cf avfilter/bwdif: move filter_line init to a dedicated function 2023-03-25 02:38:17 +01:00
Jan Ekström 90488e1440 avutil/frame: move counters utilized in loops to their scope
This way we can clean up separate definitions in functions with
just a single loop, as well as have no reuse between different
loops' counters in functions with multiple.
2023-03-24 13:56:10 +02:00
Anton Khirnov 3f63685c35 fftools/ffmpeg: supply hw_device_ctx to filters before initializing them
This is more correct, but was not possible before the recently-added
filtergraph parsing API.

Also, only pass hw devices to filters that are flagged as capable of
using them.

Tested-by: Niklas Haas
2023-03-24 10:23:52 +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
Martin Storsjö 30cea1d39b Revert "avcodec/arm/hevc: remove duplicate mov of deblock neon"
This reverts commit 9413bdc381.

That commit broke the fate HEVC tests - unfortunately I only
tested checkasm for that patch, and that function is still
lacking checkasm coverage.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-03-23 09:39:32 +02:00
James Almer cbcc817353 avcodec/vorbisdec: export skip_samples instead of dropping frames
pts may not be set on input packets, which could result in the entire stream
being discarded.
This reverts commit 8fc2dedfe6, reintroducing the
behavior it replaced but now allowing the caller to manually drop the preroll
samples by looking at the skip_samples side data at the start while ignoring it
on seek, by setting the skip_manual avctx flag.

Fixes ticket #10251.

Suggested-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-22 12:49:30 -03:00
J. Dekker 37cde570bc lavc/aarch64: add clip N macro
Signed-off-by: J. Dekker <jdek@itanimul.li>
2023-03-22 14:48:13 +01:00
xufuji456 9413bdc381 avcodec/arm/hevc: remove duplicate mov of deblock neon
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-03-22 09:46:22 +02:00
rcombs c0d9327a63 lavc/ass: error if not passed exactly 1 rect
This never produced valid output.
2023-03-21 14:24:31 -04:00
rcombs b68a6ba469 ffmpeg: send only one rect per packet when encoding ASS
The packet and rect formats are identical,
so there's no support for multiple rects per packet.
2023-03-21 14:24:31 -04: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
Raphaël Zumer 6f2413a203 avcodec/avutil: move dynamic HDR10+ metadata parsing to libavutil
Signed-off-by: Raphaël Zumer <rzumer@tebako.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-03-21 13:52:36 -03:00
Anton Khirnov 1e406692e5 fftools/ffmpeg_mux_init: avoid invalid reads in forced keyframe parsing
Fixes #10243
2023-03-20 10:53:03 +01:00