1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

111795 Commits

Author SHA1 Message Date
Martin Storsjö
aea2d269db configure: Include objbase.h when checking for CoTaskMemFree
ddc1cd5cdd defined WIN32_LEAN_AND_MEAN
globally, which makes for much fewer transitive includes from
windows.h. With that define, CoTaskMemFree no longer gets
implicitly declared by just including windows.h, but one has to
include the right header objbase.h too.

That commit caused ole32 to no longer get detected, which caused
dxva2 to no longer be enabled. This gets fixed by this patch.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-08-21 23:11:43 +03:00
Evgeny Pavlov
cb1479faca avfilter/vf_ssim: Fix x86 assembly code for SSIM calculation
This commit fixes bug #10495

The code had several bugs related to post-loop compensation code:
- test assembly instruction performs bitwise AND operation and
generate flags used by jz branch instruction. Wrong test condition
leads to incorrect branching
- Incorrect compensation code for some branches

Signed-off-by: Evgeny Pavlov <lucenticus@gmail.com>
2023-08-21 17:04:51 +02:00
Chris Spencer
f0b1cab538 hwcontext_vulkan: always use create_pnext in vulkan_pool_alloc
Currently, create_pnext is only used if an applicable external memory
extension is enabled. This will usually the case when used from the command
line, but may not be when the Vulkan context is created manually.

For images used in video decoding, create_pnext contains the video profile
list, which is mandatory.[1] This fixes a GPU crash when using RADV.

[1] https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkImageCreateInfo.html#VUID-VkImageCreateInfo-usage-04815

Signed-off-by: Chris Spencer <spencercw@gmail.com>
2023-08-20 22:47:09 +02:00
James Almer
8c789c5da3 avutil/thread: add wrappers for pthread_cond_t functions
This abstraction is similar to the existing one for pthread_mutex_t and
pthread_once_t functions, and should reduce the amount of ifdeffery used
in future code.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-08-19 10:03:07 -03:00
James Almer
7e246a5db5 doc/APIChanges: remove bogus entry
New AVOptions in modules don't belong here.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-08-18 08:27:27 -03:00
Zhao Zhili
ff094f5ebb avutil/channel_layout: make pre-defined channel layouts C++ friendly
C++ doesn't support designated initializers until C++20. We have
a bunch of pre-defined channel layouts, the gains to make them
usable in C++ exceed the losses.

Bump minor version so C++ project can check before use these defines.

Also initialize .opaque field explicitly to reduce warning in C++.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-08-18 08:27:24 -03:00
Nuo Mi
81a48d96e2 cbs_h266: slice_header, fix inference for pred_weight_table
Signed-off-by: James Almer <jamrial@gmail.com>
2023-08-17 10:05:24 -03:00
Nuo Mi
763eb59187 cbs_h266: H266RawSliceHeader, expose NumRefIdxActive[]
Signed-off-by: James Almer <jamrial@gmail.com>
2023-08-17 10:05:24 -03:00
Nuo Mi
088bda0f8e cbs_h266: H266RawPredWeightTable, expose num_weights_l0 and num_weights_l1
Signed-off-by: James Almer <jamrial@gmail.com>
2023-08-17 10:05:24 -03:00
Nuo Mi
ea8571dc99 cbs_h266: H266RawSliceHeader, expose NumEntryPoints
Signed-off-by: James Almer <jamrial@gmail.com>
2023-08-17 10:05:24 -03:00
Nuo Mi
ad8dc5e814 cbs_h266: fix slice_height_in_ctus for single slice tile
Failed clips:
TILE_E_Nokia_2.bit
TILE_D_Nokia_2.bit
LMCS_A_Dolby_3.bit

Signed-off-by: James Almer <jamrial@gmail.com>
2023-08-17 10:05:24 -03:00
Nuo Mi
c837c055a2 cbs_h266: fix inference for xh_deblocking_filter_disabled_flag
if !ph_deblocking_params_present_flag is true, ph_deblocking_filter_disabled_flag infered from pps
if !sh_deblocking_params_present_flag is true, sh_deblocking_filter_disabled_flag infered from ph

Failed clips:
ENT444MAINTIER_C_Sony_3.bit
ENT444HIGHTIER_D_Sony_3.bit

Signed-off-by: James Almer <jamrial@gmail.com>
2023-08-17 10:05:24 -03:00
Nuo Mi
d7f851b8c4 cbs_h266: fix inference for sh_alf_enabled_flag
if pps_alf_info_in_ph_flag is true
sh_alf_enabled_flag infered from ph

Failed clip:
LTRP_A_ERICSSON_3.bit

Signed-off-by: James Almer <jamrial@gmail.com>
2023-08-17 10:05:24 -03:00
Nuo Mi
fe745c2007 cbs_h266: fix inference for sh_lmcs_used_flag and sh_explicit_scaling_list_used_flag
if sh_picture_header_in_slice_header_flag is true
sh_lmcs_used_flag and sh_explicit_scaling_list_used_flag are infered from ph

Failed clips:
LMCS: CLM_A_KDDI_2.bit STILL444_A_KDDI_1.bit
Scaling: SCALING_B_InterDigital_1.bit SCALING_A_InterDigital_1.bit

Signed-off-by: James Almer <jamrial@gmail.com>
2023-08-17 10:05:24 -03:00
Leo Izen
7098bec73b
avcodec/exr: tag gamma=1.0 output as linear light
By default the OpenEXR decoder outputs linear light pixel data by
applying a gamma=1.0 transfer (i.e. a no-op). When it does so, it
should tag the data as linear so color-managed filters or other tools
can work with it correctly.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2023-08-17 07:42:58 -04:00
Wenbin Chen
9ae4863cc5 libavfilter/vf_vpp_qsv: Fix a timestamp bug when framerate is not set
If user doesn't set framerate when he creates a filter, the filter uses
default framerate {0, 1}. This causes error when setting timebase to
1/framerate. Now change it to pass inlink->time_base to outlink when
framerate is not set.
This patch fixes ticket: #10476 #10468

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-08-17 12:06:09 +08:00
Haihao Xiang
e0a5c35270 lavc/qsvenc: return error with zero output
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-08-17 12:06:09 +08:00
Haihao Xiang
a7f24d79b8 lavc/qsvenc_hevc: restore the default gop size
commit a3c0a3e changed the default settings and expected the runtime can
choose a best value. However the runtime doesn't set a valid gop size
for hevc encoder, hence the output steam is non-seekable, which is
inconvenient to user [1][2]

[1] https://github.com/intel/media-driver/issues/1576
[2] https://ffmpeg.org/pipermail/ffmpeg-user/2023-August/056716.html

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-08-17 12:06:09 +08:00
David Rosca
2ec58055f5 lavu/hwcontext_vaapi: Add vaapi_drm_format_map support for x2rgb10
Support for allocating frames with x2rgb10 format was added
in c00264f501, this adds support for importing DMA-BUFs.
2023-08-17 12:06:09 +08:00
Paul B Mahol
3057ce797f avcodec/wavpack: fix indentation 2023-08-16 22:05:14 +02:00
Paul B Mahol
082133fc07 avcodec/tta: fix minor code style issues 2023-08-16 21:36:40 +02:00
Paul B Mahol
8f7850a22e avcodec/wavpack: reduce extra dereferencing inside loops 2023-08-16 12:36:18 +02:00
Paul B Mahol
8653dcaf7d avformat/sox*: extend long name 2023-08-15 21:42:21 +02:00
Paul B Mahol
4d0a25d760 avformat/soxdec: improve probe a little 2023-08-15 21:42:20 +02:00
Paul B Mahol
4b30aef4c0 avcodec/alac: use branchless sign 2023-08-15 19:09:23 +02:00
Paul B Mahol
4463778aab avcodec/alac: reduce dereferencing inside loops
Also fix style while here.
2023-08-15 19:09:22 +02:00
Paul B Mahol
a3b434e151 avcodec/wavpackenc: add support for encoding unspec channel layouts
Also write 0 for chmask if mask have bits outside of first 32 bits,
as wavpack does not support more bits than 32 for channel layouts.
2023-08-15 00:32:45 +02:00
Paul B Mahol
46412a8935 avcodec/wavpack: remove hard limitation on number of supported channels 2023-08-15 00:32:44 +02:00
L. E. Segovia
ddc1cd5cdd configure: Set WIN32_LEAN_AND_MEAN at configure time
Including winsock2.h or windows.h without WIN32_LEAN_AND_MEAN cause
bzlib.h to parse as nonsense, due to an instance of #define char small
in rpcndr.h.

See:

https://stackoverflow.com/a/27794577

Signed-off-by: L. E. Segovia <amy@amyspark.me>
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-08-14 22:57:28 +03:00
Paul B Mahol
c704901324 Bump minor libavfilter version and add Changelog entry 2023-08-14 11:24:12 +02:00
Paul B Mahol
24c013369d avfilter/af_asdr: remove wrong scaling from sdr, and fix sisdr formula 2023-08-14 11:19:56 +02:00
Paul B Mahol
10110a30b5 avfilter/af_asdr: use single structure for sums 2023-08-14 11:19:56 +02:00
Paul B Mahol
e41d52216c avfilter: add asisdr filter 2023-08-14 11:19:56 +02:00
Paul B Mahol
951def850a avfilter: add apsnr filter 2023-08-14 11:19:55 +02:00
Steven Liu
a1928dff2c Changelog: Add Support hevc,vp9,av1 codec in enhanced flv format
Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
2023-08-14 15:21:16 +08:00
Steven Liu
a9a92682dd avformat/flv: correct the video frametype mask to 0x70
because the flv specification said the video frametype
should use value range from 0x00 to 0x70,
so use 0xF0 have no problem before support enhanced flv,
but the 0xF0 will get incorrect result after support enhanced flv,
so should set the video frametype mask 0x70 to make it correct now.

Reported-By: flvAnalyser <hybase@qq.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2023-08-14 14:17:35 +08:00
Steven Liu
ab88970fba avformat/flvdec: remove unused context member of flv
The exheader is unnecessary after 207e9f4e50
Iust use local varible can do the same function.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2023-08-14 14:14:07 +08:00
Random Joe
176ed008bd avcodec/cuviddec: dynamically set max decode surfaces 2023-08-13 19:13:01 +02:00
Andreas Rheinhardt
f7715feb5d fate/matroska: Fix requirements of fate-matroska-alac-remux test
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-08-13 16:47:12 +02:00
Andreas Rheinhardt
5d07757c70 fate/matroska: Add test for stereo 3D
Just mark a non-stereo file as stereo to test the code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-08-13 16:46:54 +02:00
Paul B Mahol
a5b334e18e avfilter/af_astats: fix reporting of noise_floor for small number of samples 2023-08-13 14:38:28 +02:00
Paul B Mahol
90afcc2bfd avfilter/af_astats: drop usage of histogram for noise floor calculation 2023-08-13 14:24:47 +02:00
Paul B Mahol
80fdf51b8f avfilter/af_asdr: add fltp sample format support 2023-08-13 02:33:32 +02:00
Paul B Mahol
37b4837584 avfilter/af_asdr: stop recreating output timestamps 2023-08-13 02:33:30 +02:00
Paul B Mahol
9c694804fd avfilter/af_adeclick: stop returning EINVAL error
Instead clip relevant parameters.
2023-08-12 11:27:32 +02:00
Paul B Mahol
3e04f53571 avfilter/af_adeclick: stop outputing pointless message 2023-08-12 00:26:50 +02:00
Paul B Mahol
3d85892052 avfilter/af_adeclick: fix window generation
Stops adding invalid sinusoids in overlap-add mode.
2023-08-11 23:59:19 +02:00
Paul B Mahol
97741adf6f avformat/au: improve au_probe() 2023-08-11 23:55:05 +02:00
Andreas Rheinhardt
d53acf452f avformat/matroskaenc: Don't write \0 unnecessarily
Writing the duration SimpleTag is special: It's size is
reserved in advance via an EBML Void element (if seekable)
and this reserved space is overwritten when writing the trailer;
it does not use put_ebml_string().

The string to write is created via snprintf on a buffer
of size 20; this buffer is then written via put_ebml_binary()
with a size of 20.

EBML strings need not be zero-terminated; if not, they
are implicitly terminated by the element's length field.
snprintf() always zero-terminates the buffer, i.e.
the last byte can be discarded when using an EBML string.
This patch does this.

The FATE changes are as expected: One byte saved for every
track; the only exception is the matroska-qt-mode test:
An additional byte is saved because an additional byte
could be saved from the enclosing Tags length field.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-08-10 23:56:35 +02:00
Andreas Rheinhardt
59cb099478 avformat/matroskaenc: Reindent after the previous commit
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-08-10 23:56:35 +02:00