Commit Graph

107759 Commits

Author SHA1 Message Date
Andreas Rheinhardt 333b32af8e avcodec/h264chroma: Constify src in h264_chroma_mc_func
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-05 03:02:13 +02:00
Andreas Rheinhardt 2c8dc7e953 avcodec/loongarch/h264chroma, vc1dsp_lasx: Add wrapper for __lasx_xvldx
__lasx_xvldx does not accept a pointer to const (in fact,
no function in lasxintrin.h does so), although it is not allowed
to modify the pointed-to buffer. Therefore this commit adds a wrapper
for it in order to constify the H264Chroma API in a later commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-05 02:59:58 +02:00
Andreas Rheinhardt b3bbbb14d0 avcodec/hevcdsp: Constify src pointers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-05 02:54:04 +02:00
Andreas Rheinhardt 6c9a60ada4 avcodec/loongarch: Add wrapper for __lsx_vldx
__lsx_vldx does not accept a pointer to const (in fact,
no function in lsxintrin.h does so), although it is not allowed
to modify the pointed-to buffer. Therefore this commit adds a wrapper
for it in order to constify the HEVC DSP functions in a later commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-05 02:53:35 +02:00
Jun Zhao 101e154c28 lavf/hevc: replace the unicode signal quotation with normal quotation
replace the unicode left/right signal quotation mark with normal
signal quotation.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2022-08-05 00:58:49 +08:00
Jun Zhao 33afa2167e lavc/Makefile: fix make checkheaders fail
Fix the build break when used make checkheaders

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2022-08-05 00:55:53 +08:00
Philip Langdale d3f48e68b3 lavc/vaapi: Declare support for decoding 8bit 4:4:4 content
Now that we have a combination of capable hardware (new enough Intel)
and a mutually understood format ("AYUV"), we can declare support for
decoding 8bit 4:4:4 content via VAAPI.

This requires listing AYUV as a supported format, and then adding VAAPI
as a supported hwaccel for the relevant codecs (HEVC and VP9). I also
had to add VP9Profile1 to the set of supported profiles for VAAPI as it
was never relevant before.
2022-08-03 14:10:55 -07:00
Philip Langdale 2b720676e0 lavu/hwcontext_vaapi: Map the AYUV format
This is the format used by Intel VAAPI for 8bit 4:4:4 content.
2022-08-03 14:10:12 -07:00
Philip Langdale 6ab8a9d375 lavu/pixfmt: Add packed 4:4:4 format
The "AYUV" format is defined by Microsoft as their preferred format for
4:4:4 content, and so it is the format used by Intel VAAPI and QSV.

As Microsoft like to define their byte ordering in little-endian
fashion, the memory order is reversed, and so our pix_fmt, which
follows memory order, has a reversed name (VUYA).
2022-08-03 14:09:46 -07:00
Andreas Rheinhardt 900ce6f8c3 avcodec/intrax8: Avoid indirection when accessing VLC table
To do so, store the pointer to the VLC table and not to the VLC.
This is possible, because all the VLCs of the same type use
the same number of bits.
Also use a const VLCElem*, because the target is static and must
therefore not be modified after its initialization.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-03 21:23:35 +02:00
Andreas Rheinhardt b0e38c7d1e configure: Add msmpeg4(dec|enc) subsystems
The msmpeg4 decoders/encoders share a common set of prerequisites,
ergo it makes sense to use common subsystems for them. This also
allows to remove the CONFIG_MSMPEG4_DECODER/ENCODER ad-hoc defines
(which violated the CONFIG_ namespace).

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-03 21:18:25 +02:00
Andreas Rheinhardt b10e218df1 configure, avcodec/Makefile: Make IntraX8 select WMV2DSP, fix MIPS build
IntraX8 uses WMV2DSP directly, so it should have a direct dependency
on it. Also remove the indirect Makefile dependency of the VC-1 decoder
on wmv2dsp.o. Notice that since the addition of the MIPS WMV2DSP
implementation building only the VC-1 decoder would fail, because
no Makefile dependency VC1->wmv2dsp_init_mips.o has been added.
This is of course fixed by this commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-03 21:17:56 +02:00
Andreas Rheinhardt eb5c5ae658 avcodec/intrax8: Remove unused IDCTDSPContext
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-03 21:10:00 +02:00
Andreas Rheinhardt 8d7d52721a avutil/opt: Combine multiple av_log statements
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-03 21:09:24 +02:00
Zhao Zhili f56730fb6f avformat/flvenc: fix shadowed variable ts 2022-08-03 17:52:55 +08:00
Zhao Zhili 988838cf4f avformat/flvdec: make key frame timestamps more accurate
There was an implicit cast from double to int64_t in time unit of
second.
2022-08-03 17:52:50 +08:00
Zhao Zhili 693c5be320 avformat/flvenc: fix timestamp of key frame index
Firstly, the timestamps generated from framerate are inaccurate for
variable framerate mode.

Secondly, the timestamps always start from zero, while pts/dts can
start from nonzero. FLV demuxer rejects such index with message:
"Found invalid index entries, clearing the index".
2022-08-03 17:52:45 +08:00
Zhao Zhili 30aa0c3f48 avdevice/v4l2: fix leak of timefilter
Fixes ticket #9844.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-08-03 17:52:25 +08:00
Haihao Xiang ad67ea9eee ffmpeg_opt: consider HW acceleration method when selecting decoder
Usually a HW decoder is expected when user specifies a HW acceleration
method via -hwaccel option, however the current implementation doesn't
take HW acceleration method into account, it is possible to select a SW
decoder.

For example:
$ ffmpeg -hwaccel vaapi -i av1.mp4 -f null -
$ ffmpeg -hwaccel nvdec -i av1.mp4 -f null -
$ ffmpeg -hwaccel vdpau -i av1.mp4 -f null -
[...]
Stream #0:0 -> #0:0 (av1 (libdav1d) -> wrapped_avframe (native))

libdav1d is selected in this case even if vaapi, nvdec or vdpau is
specified.

After applying this patch, the native av1 decoder (with vaapi, nvdec or
vdpau support) is selected for decoding(libdav1d is still used for
probing format).
$ ffmpeg -hwaccel vaapi -i av1.mp4 -f null -
$ ffmpeg -hwaccel nvdec -i av1.mp4 -f null -
$ ffmpeg -hwaccel vdpau -i av1.mp4 -f null -
[...]
Stream #0:0 -> #0:0 (av1 (native) -> wrapped_avframe (native))

Tested-by: Mario Roy <marioeroy@gmail.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-08-03 11:10:57 +08:00
Haihao Xiang df5defe15a ffmpeg_opt: select a decoder after getting values for per-stream hwdec options
After applying this patch, the desired HW acceleration method is known
before selecting decoder, so we may take HW acceleration method into
account when selecting decoder for input stream in the next commit

There should be no functional changes in this patch

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-08-03 09:54:20 +08:00
James Almer b0cd979a0b avcodec/libaomenc: support AV_CODEC_CAP_ENCODER_RECON_FRAME
Signed-off-by: James Almer <jamrial@gmail.com>
2022-08-02 09:56:27 -03:00
Anton Khirnov c6f22940e4 lavc/libx264: support AV_CODEC_CAP_ENCODER_RECON_FRAME
Bump the version requirement to 122, which introduced b_full_recon.
2022-08-02 10:52:15 +02:00
Anton Khirnov e3838b856f lavc: add API for exporting reconstructed frames from encoders 2022-08-02 10:46:11 +02:00
Anton Khirnov eede1d2927 lavu/frame: allow calling av_frame_make_writable() on non-refcounted frames
This is an easy way to make a refcounted frame from a non-refcounted
one.
2022-08-02 10:44:37 +02:00
Andreas Rheinhardt d9cd192ddd fftools/ffmpeg_opt: Fix copyinkf
Broken in 9c2b800203.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-02 09:02:11 +02:00
Andreas Rheinhardt 771d8937af avcodec/alpha/me_cmp_alpha: Remove commented-out function
This function is bitrotten: It uses different parameters
than the corresponding ASM functions which replaced it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-02 08:40:58 +02:00
Andreas Rheinhardt 088382a434 avcodec/alpha/me_cmp_alpha: Use proper me_cmp_func type
ea41e6d637 forgot
the int->ptrdiff_t switch for the stride. Libav didn't
do it because Libav had already dropped support for Alpha
at that point.
Only compilation has been tested for this commit.

(It might be that the ASM-versions of me_cmp_func functions
need to be updated as well.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-02 08:40:58 +02:00
Andreas Rheinhardt fe211aebbf fate/lavf-image: Disable file checksums for exr tests
The generated files are endian-dependent, so no checksums
may be part of the ref files.

Fixes ticket #9854.

Tested-by: Sebastian Ramacher <sramacher@debian.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-02 02:30:26 +02:00
Andreas Rheinhardt 4fb8741c46 tests/fate-run: Allow to skip file checksums for lavf_image
The output file (even the filesize) of the recently added
EXR tests depends on the endianness; therefore checksums
of these files must not be part of the ref file. Therefore
this commit adds an option (unused for now) to disable these
checksums on a per-test basis.

In order to avoid having to check twice, the checksum and
the filesize info are moved to immediately follow one another;
this results into updates to the ref files of all lavf-image tests.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-02 02:27:05 +02:00
James Almer db9fd78bd7 avcodec/aacdec_fixed: also clip samples on the second channel for stereo HE-AAC
Fixes outputting silence on the second channel when decoding Parametic Stereo
HE-AAC.

Closes ticekt #3361.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-08-01 20:25:09 -03:00
James Almer 9fb80bf760 avcodec/aacdec_fixed: add missing priv_class
This enables the same input options as the float decoder.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-08-01 20:25:09 -03:00
Martin Storsjö 8e6759f10c configure: Check for DXGI_OUTDUPL_FRAME_INFO for the ddagrab filter
The DXGI_OUTDUPL_FRAME_INFO type isn't available in Windows API
subsets other than "desktop", while the IDXGIOutput1 interface is
available for all API subsets.

This fixes compilation for UWP/"Windows Store" configurations (and
older API subsets like Windows Phone).

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-08-01 15:41:25 +03:00
Andreas Rheinhardt 1368b5a725 avcodec/ttmlenc: Use string literal macro for default namespacing
Fixes -Werror=format-security build failures when building with
disabled optimizations and (according to fate.ffmpeg.org also with
several other old GCC versions).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:57:23 +02:00
Andreas Rheinhardt e725c5e24e avcodec/exr: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:38:55 +02:00
Andreas Rheinhardt 9ea03f5678 avcodec/diracdec: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:38:37 +02:00
Andreas Rheinhardt 597dc96736 avcodec/dvdec: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:38:20 +02:00
Andreas Rheinhardt 5ad29e1590 avcodec/dxv: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:38:11 +02:00
Andreas Rheinhardt a18c372390 avcodec/jpeg2000dec: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:37:27 +02:00
Andreas Rheinhardt 0980d3801d avcodec/magicyuv: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:37:12 +02:00
Andreas Rheinhardt 0eae123dbd avcodec/proresdec2: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:22:53 +02:00
Andreas Rheinhardt 9c4f7d1e88 avcodec/vp8: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:22:14 +02:00
Andreas Rheinhardt 94dd8f421e avcodec/wavpack: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually) a data race,
so it must not happen. So only use a pointer to const to access
the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:21:51 +02:00
Andreas Rheinhardt 4368e86a02 avcodec/vp9dec: Constify VP9TileData->VP9Context pointer target
This is possible now that ff_thread_await_progress() accepts
a const ThreadFrame*.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:18:26 +02:00
Andreas Rheinhardt 0eb399ac39 avcodec: Constify ThreadFrames if possible
This is possible now that ff_thread_await_progress() accepts
a const ThreadFrame*.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:15:28 +02:00
Andreas Rheinhardt 34276b815b avcodec/motion_est: Constify pointers to frame data
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:56:32 +02:00
Andreas Rheinhardt 209a11053f avcodec/mpegvideodsp: Constify src pointers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:44:16 +02:00
Andreas Rheinhardt 966fc1230a avcodec/mpegvideoencdsp: Allow pointers to const where possible
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:32:40 +02:00
Andreas Rheinhardt abb85429f3 avcodec/me_cmp: Constify me_cmp_func buffer parameters
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:31:53 +02:00
Andreas Rheinhardt e7cb7c762a avcodec/cfhdencdsp: Constify input pointers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:18:19 +02:00
Andreas Rheinhardt dc3e25e4d3 avcodec/lossless_videoencdsp: Constify src sub_left_predict
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:16:35 +02:00