Commit Graph

113446 Commits

Author SHA1 Message Date
Anton Khirnov e0da916b8f fftools/ffmpeg: optimize inter-thread queue sizes
Use 8 packets/frames by default rather than 1, which seems to provide
better throughput.

Allow -thread_queue_size to set the muxer queue size manually again.
2024-01-28 13:34:56 +01:00
Andreas Rheinhardt 341d0419e1 avcodec/texturedsp: Factor common code out
Namely calling avctx->execute2(avctx,...).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-01-28 11:00:01 +01:00
Andreas Rheinhardt 4f58372c10 avcodec/hap: Avoid unnecessary opt.h inclusion
It presumably exists because HapContext contains an AVClass*.
Yet AVClass is actually defined in log.h and even this inclusion
can be avoided by struct AVClass*. This avoids opt.h inclusions
in hap.c and hapdec.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-01-28 10:59:36 +01:00
Andreas Rheinhardt a3fc9fb9fb avcodec/texturedsp: Add separate TextureDSPEncContext
ff_texturedspenc_init() doesn't support most of the function types
supported for decoding; add a separate context containing only pointers
for the actually supported types.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-01-28 10:52:48 +01:00
Andreas Rheinhardt 8f791304f2 avcodec/dxvenc, hap(dec|enc): Move TextureDSPContext to stack
Only used during init.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-01-28 10:52:41 +01:00
Andreas Rheinhardt e1d1304b4b avcodec/texturedspenc: Remove unused rgtc1_u_alpha encoding func
Effectively reverts 50a20de6b9.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-01-28 10:52:38 +01:00
Andreas Rheinhardt 916f016741 avcodec/dxvenc: Fix data races with slice threading
The old code set a common struct from each thread;
this only "worked" (but is still UB) because the values
written are the same for each thread.
Fix this by moving the assignments to the main thread.

(This also avoids casting const away from a const AVFrame*.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-01-28 10:52:24 +01:00
Andreas Rheinhardt 555879ca7c avcodec/dxvenc: Don't cast const away
Reviewed-by: Connor Worley <connorbworley@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-01-28 10:52:11 +01:00
Wenbin Chen d52e8ed114 libavfilter/vf_dnn_detect: Use class confidence to filt boxes
Use class confidence instead of box_score to filt boxes, which is more
accurate. Class confidence is obtained by multiplying class probability
distribution and box_score.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2024-01-28 11:18:13 +08:00
Wenbin Chen 3de38b9da5 libavfilter/dnn_interface: use dims to represent shapes
For detect and classify output, width and height make no sence, so
change width, height to dims to represent the shape of tensor. Use
layout and dims to get width, height and channel.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2024-01-28 11:18:06 +08:00
Wenbin Chen c695de56b5 libavfilter/dnn_bakcend_openvino: Add automatic input/output detection
Now when using openvino backend, user doesn't need to set input/output
names in command line. Model ports will be automatically detected.

For example:
ffmpeg -i input.png -vf \
dnn_detect=dnn_backend=openvino:model=model.xml:input=image:\
output=detection_out -y output.png

can be simplified to:
ffmpeg -i input.png -vf dnn_detect=dnn_backend=openvino:model=model.xml\
 -y output.png

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2024-01-28 11:17:59 +08:00
Frank Plowman 0c517fcbe8 lavc/vvc: Fix emulation prevention byte handling
nal->skipped_bytes_pos contains the positions of errors relative to the
start of the slice header, whereas the position they were tested against
is relative to the start of the slice data, i.e. one byte after the end
of the slice header.

Patch fixes this by storing the size of the slice header in H266RawSlice
and adding it to the position given by the GetBitContext before
comparing to skipped_bytes_pos.  This fixes AVERROR_INVALIDDATAs for
various valid bitstreams, such as the LMCS_B_Dolby_2 conformance
bitstream.

Signed-off-by: Frank Plowman <post@frankplowman.com>
2024-01-27 11:29:40 -03:00
Anton Khirnov bab7f91c36 tests/fate/ffmpeg: add a test for the issue fixed in previous commit 2024-01-27 09:24:29 +01:00
Anton Khirnov 1ea2e757f7 fftools/ffmpeg_filter: do not end filtering when a graph input EOFs
There may be other inputs or sources in the filtergraph. Propagate the
EOF to the scheduler and continue filtering.

Fixes #10803
2024-01-27 09:24:29 +01:00
Anton Khirnov 00013341df fftools/ffmpeg_sched: add filter API to signal EOF on input 2024-01-27 09:24:29 +01:00
James Almer eb4584f994 avcodec/vvc_ps: remove duplicated enum
Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-26 19:20:48 -03:00
Frank Plowman 763e31a8d3 lavc/vvc: Clamp shift RHS
Resolves the following undefined behavior sanitiser error:
runtime error: shift exponent 32 is too large for 32-bit type 'int'

Signed-off-by: Frank Plowman <post@frankplowman.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-26 15:47:41 -03:00
Frank Plowman cb7b4ee024 lavc/vvc: Use av_log2 when destination is integer
Signed-off-by: Frank Plowman <post@frankplowman.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-26 15:47:41 -03:00
Tong Wu 8c99a1429a avcodec/d3d12va_mpeg2|vc1: remove the unused macros
These macros are no longer used. Remove them.

Signed-off-by: Tong Wu <tong1.wu@intel.com>
2024-01-26 09:22:12 +08:00
Tong Wu 8b41e9cfbe avcodec/d3d12va_decode: check existance before assigning a new index
Fixes #10759.

It can happen in H.264, MPEG2, VC1 that the current frame resource
memory is already in ref_resource. For example, for a interlaced frame,
the same curr memory is passed twice. For the second time it could possibly
reference itself. When this happens the curr is already given an index and
in ref_resources. When the reference frame index is required, we should check
the existance in the ref_resources first before assigning a new index for it.

Signed-off-by: Tong Wu <tong1.wu@intel.com>
2024-01-26 09:22:12 +08:00
Leo Izen ac06190a5a
avcodec/libjxl.h: include version.h
This file has been exported since our minimum required version (0.7.0),
but it wasn't documented. Instead it was transitively included by
<jxl/decode.h> (but not jxl/encode.h), which ffmpeg relied on.

libjxl broke its API in libjxl/libjxl@66b9592393 by removing
the transitive include of version.h, and they do not plan on adding
it back. Instead they are choosing to leave the API backwards-
incompatible with downstream callers written for some fairly recent
versions of their API.

As a result, we include <jxl/version.h> to continue to build against
more recent versions of libjxl. The version macros removed are also
present in that file, so we no longer need to redefine them.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2024-01-25 11:07:28 -05:00
Leo Izen 9d4eda8040
avformat/mxfenc: remove unused variables
Produces a -Wunused-variables warning with -Wall.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2024-01-25 11:06:55 -05:00
James Almer 00b288da73 fate/matroska: add missing speex decoder dependency to fate-matroska-ms-mode
Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-24 20:55:54 -03:00
James Almer 45a2f2635d avcodec/d3d12va: remove unused variables
Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-24 17:34:28 -03:00
James Almer 49a7fe86fe avcodec/d3d12va_vc1: cast mapped_data to void* before passing it to mapped_data()
Fixes -Wincompatible-pointer-types warnings.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-24 17:28:05 -03:00
James Almer 9aa388e758 avcodec/d3d12va_hevc: cast mapped_data to void* before passing it to mapped_data()
Fixes -Wincompatible-pointer-types warnings.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-24 17:28:05 -03:00
James Almer 342cc1792f avcodec/d3d12va_h264: cast mapped_data to void* before passing it to mapped_data()
Fixes -Wincompatible-pointer-types warnings.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-24 17:28:04 -03:00
James Almer 04332ca35e avcodec/d3d12va_vp9.c: change the type for the ID3D12Resource_Map mapped_data argument
Fixes -Wincompatible-pointer-types warnings.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-24 17:27:58 -03:00
James Almer b4d871fdc8 avcodec/d3d12va_av1.c: change the type for the ID3D12Resource_Map mapped_data argument
Fixes -Wincompatible-pointer-types warnings.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-24 17:27:40 -03:00
James Almer cb6a488fba avcodec/vvc_mvs: remove an unnecessary AV_ZERO64() call
Should fix "member access within misaligned address 0xf00 for type 'const union
av_alias64', which requires 8 byte alignment" errors as reported by GCC ubsan.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-24 12:41:01 -03:00
James Almer bc1d8a9b76 avcodec/vvc_mvs: align local motion vector fields
Should fix "member access within misaligned address 0xf00 for type 'const union
av_alias64', which requires 8 byte alignment" errors as reported by GCC ubsan.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-24 12:41:01 -03:00
Andreas Rheinhardt 3435565e26 avcodec/d3d12va_(av1|hevc|vp9): Don't use deprecated FF_PROFILE_*
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-01-24 15:49:12 +01:00
Andreas Rheinhardt 280df9d0eb avutil/hwcontext_d3d12va: Use av_image_copy() wrapper
Avoids casts all over the place; in this case, it also
replaces the unsafe cast uint8_t**->const uint8_t **
by the safe cast uint8_t**->const uint8_t * const*.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-01-24 15:48:54 +01:00
James Almer 0b8e51b584 avformat/iamf_parse: use the public iamf helpers to allocate structs
Should fix memory leaks from non-freed fields due to missing AVClass
in the allocated structs.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-23 20:57:41 -03:00
Michael Niedermayer d6c62b4bce
tests/checkasm/aacencdsp: Use float_near_ulp_array() for abs_pow34() test
Fixes: ticket/10818
Approved-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-01-24 00:42:13 +01:00
Michael Niedermayer 88a9142cac
avformat/mxfenc: Remove AVERROR²
Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-01-24 00:42:13 +01:00
Stefano Sabatini 792c713504 doc/muxers: add MPEG-1/2 muxers section 2024-01-24 00:20:03 +01:00
Stefano Sabatini 02e4598f8f lavf/mpegenc: extend options definition 2024-01-24 00:09:21 +01:00
Stefano Sabatini 58d13d6377 doc/muxers: add dv 2024-01-24 00:09:21 +01:00
Stefano Sabatini f6f781625a doc/muxers/raw: drop duplicated whitespace 2024-01-24 00:09:21 +01:00
Stefano Sabatini 8bcea02f6c doc/muxers/raw: add dfpwm item 2024-01-24 00:09:21 +01:00
Stefano Sabatini 916373014e doc/muxers: add daud 2024-01-24 00:09:21 +01:00
Stefano Sabatini bba784d604 lavf/daudenc: clarify error messages 2024-01-24 00:09:21 +01:00
Stefano Sabatini 9c06dedad1 doc/muxers/dash: review documentation
Sort options by name, review formatting, apply consistency fixes and
fill the gaps (e.g. missing value for constants or flags), and review
and extend content.
2024-01-24 00:09:21 +01:00
Stefano Sabatini f8b14d8bee lavf/dashenc: sort options by name 2024-01-24 00:09:21 +01:00
James Almer eee3b7e2fb avformat/mov: zero initialize the index ranges buffer
Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-23 18:39:52 -03:00
Connor Worley dfbbd11a4b lavc/dxvenc: add DXV encoder with support for DXT1 texture format
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2024-01-23 21:31:22 +01:00
James Almer 1496ce8f6b avcodec/vvc_ctu: align motion vector fields
Should fix "member access within misaligned address 0xf00 for type 'const union
av_alias64', which requires 8 byte alignment" errors as reported by GCC ubsan.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-23 17:24:15 -03:00
James Almer 67b5012cb1 fate: remove unused filtergraph files
They were added by mistake.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-23 13:49:41 -03:00
James Almer e8759580b1 fate/iamf: add an ambisonic test
Signed-off-by: James Almer <jamrial@gmail.com>
2024-01-23 13:35:28 -03:00