Ok, I will file a bug ASAP.
Best regards
Sirius
发件人: ffmpeg-devel 代表 Xiang, Haihao
发送时间: Thursday, September 14, 2023 2:11:52 PM
收件人: an...@khirnov.net ; ffmpeg-devel@ffmpeg.org
主题: Re: [FFmpeg-devel] [PATCH v2 1/1] lavc/qsvdec: fix dead loop of qsv decoding
Sep 15, 2023, 03:00 by andreas.rheinha...@outlook.com:
> Lynne:
>
>> -static int get_data_set_buf(FFVulkanDecodeContext *s, AVBufferRef
>> **data_buf,
>> -int nb_vps, AVBufferRef * const
>> vps_list[HEVC_MAX_VPS_COUNT])
>> +static int alloc_hevc_header_structs(FFVulka
Lynne:
> -static int get_data_set_buf(FFVulkanDecodeContext *s, AVBufferRef **data_buf,
> -int nb_vps, AVBufferRef * const
> vps_list[HEVC_MAX_VPS_COUNT])
> +static int alloc_hevc_header_structs(FFVulkanDecodeContext *s,
> + int nb_vp
The issue is that we cannot rely on any context existing when we free
frames, due to threading. The Vulkan functions are loaded in each context
separately, so until now, we've just been loading them on every frame's
destruction.
Rather than do this, just save the function pointers we need in each
Sep 15, 2023, 01:45 by andreas.rheinha...@outlook.com:
> All Vulkan HWAccels share the same boilerplate code for creating
> session params and this includes a common bug: In case actually
> creating the video session parameters fails, the buffer destined
> to hold them leaks; in case of HEVC this
Simpler and more robust now that contexts are not shared between threads.
Patch attached.
>From f476162c2b0b165f5cb23398bf6b989b4503daee Mon Sep 17 00:00:00 2001
From: Lynne
Date: Fri, 15 Sep 2023 01:51:49 +0200
Subject: [PATCH] vulkan_hevc: switch from a buffer pool to a simple malloc
Simpler
All Vulkan HWAccels share the same boilerplate code for creating
session params and this includes a common bug: In case actually
creating the video session parameters fails, the buffer destined
to hold them leaks; in case of HEVC this is also true if
get_data_set_buf() fails.
This commit factors t
The alignment in vulkan_unmap_from_drm() (formerly the clone
of vulkan_frame_free()) is nicer than the in vulkan_frame_free(),
let's preserve it.
Signed-off-by: Andreas Rheinhardt
---
libavutil/hwcontext_vulkan.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavuti
Signed-off-by: Andreas Rheinhardt
---
libavutil/hwcontext_vulkan.c | 26 +-
1 file changed, 1 insertion(+), 25 deletions(-)
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index d1c2d69b7b..0c846fde38 100644
--- a/libavutil/hwcontext_vulkan.c
+++
The AVBuffer API uses uint8_t as base type for buffers
and therefore its free callbacks need to abide by this.
Therefore vulkan_frame_free() used an inappropriate signature
which caused casts whenever this function has been called
manually.
This commit changes this by making vulkan_frame_free()
us
vulkan_free_internal() already resets the AVVkFrame.internal
pointer.
Signed-off-by: Andreas Rheinhardt
---
1. I find it odd that the frame's internal is freed without
the frame itself being freed; vulkan_frame_free() expects
the internal to be present and seems to NPD if not.
(Actually, I was a
On Fri, Sep 15, 2023 at 12:19 AM Michael Niedermayer
wrote:
> On Wed, Sep 06, 2023 at 10:19:29PM +, Christophe Gisquet wrote:
> > ffmpeg | branch: master | Christophe Gisquet <
> christophe.gisq...@gmail.com> | Sun Jul 9 12:56:35 2017 +|
> [da888b790af779a7489068c25f9e7ab8ac653d41] | com
On Wed, Sep 06, 2023 at 10:19:29PM +, Christophe Gisquet wrote:
> ffmpeg | branch: master | Christophe Gisquet |
> Sun Jul 9 12:56:35 2017 +| [da888b790af779a7489068c25f9e7ab8ac653d41] |
> committer: Paul B Mahol
>
> avcodec/utvideodec: add vlc multi support
>
> Faster decoding, by av
On Fri, Sep 15, 2023 at 12:01 AM Michael Niedermayer
wrote:
> On Mon, Aug 28, 2023 at 07:36:17PM +0200, Paul B Mahol wrote:
> > Patches attached.
> >
> > Thanks for kurosu for pointing unmerged branches.
> >
> > The UNCACHED_PATH for x86_32 is broken with this for 2 codecs it touches.
> > Fix is
On Mon, Aug 28, 2023 at 07:36:17PM +0200, Paul B Mahol wrote:
> Patches attached.
>
> Thanks for kurosu for pointing unmerged branches.
>
> The UNCACHED_PATH for x86_32 is broken with this for 2 codecs it touches.
> Fix is trivial, to be fixed later.
[...]
> +int ff_init_vlc_multi_from_lengths(V
On Mon, Sep 04, 2023 at 09:06:35PM +0200, Michael Niedermayer wrote:
> Fixes: signed integer overflow: -2147483300 - 12285 cannot be represented in
> type 'int'
> Fixes:
> 59462/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BONK_fuzzer-5714298807386112
>
> Found-by: continuous fuzzing proces
On Tue, Jun 20, 2023 at 01:36:40AM +0200, Michael Niedermayer wrote:
> On Tue, Jun 20, 2023 at 01:05:45AM +0200, Paul B Mahol wrote:
> > Shouldnt it error out instead?
>
> yes but that would make it slower. Also i think real files (not fuzzeed files)
> would use vlc tables that have no "holes" th
On Sun, Sep 10, 2023 at 03:09:51AM +0200, Michael Niedermayer wrote:
> Fixes: out of array access
> Fixes:
> 61991/clusterfuzz-testcase-minimized-ffmpeg_dem_JPEGXL_ANIM_fuzzer-5524679648215040
>
> Found-by: continuous fuzzing process
> https://github.com/google/oss-fuzz/tree/master/projects/ffmp
On 14.09.2023 20:59, Kyle Swanson wrote:
Problem was slightly different, there is no `libvmaf_cuda`, just
`libvmaf` built with the cuda apis optionally enabled. `./configure`
is fixed now and I've tested all the possible combinations, updated
patch attached.
This looks more complicated than nec
Hi,
On Mon, Sep 11, 2023 at 11:51 AM Timo Rothenpieler
wrote:
>
> On 11.09.2023 19:53, Kyle Swanson wrote:
> > Hi,
> >
> > On Tue, Sep 5, 2023 at 10:16 AM Kyle Swanson wrote:
> >> I'll merge this in a few days.
> >
> > Not merged yet because I noticed a bug in the configure script.
> > Setting o
On Sat, Sep 09, 2023 at 09:23:35PM +0200, Tomas Härdin wrote:
> lör 2023-09-09 klockan 15:53 +0200 skrev Michael Niedermayer:
> > On Sat, Sep 09, 2023 at 09:04:25AM +0200, Tomas Härdin wrote:
> > > fre 2023-09-08 klockan 15:09 +0200 skrev Michael Niedermayer:
> > [...]
> >
> > > > AI based filters
Otherwise the thread_ctx pointer might be NULL or point to
a SliceThreadContext.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/pthread_frame.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 4973d6
It does not use ThreadFrames at all, so thread.h is the correct place.
bcb0faeaba60b5d329fafee2e55f28d3c709e7b1 was wrong.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/mpegvideo_dec.c | 1 +
libavcodec/thread.h| 2 ++
libavcodec/threadframe.h | 2 --
3 files changed, 3 insertions(+
The '<' in ///< says that the comment pertains to the previous item
on the same line as the ///<.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/pthread_frame.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
ind
No longer used since the removal of FF_API_THREAD_SAFE_CALLBACKS
in e0786a8eeb9e7c8feb057e83f284491f0a87e463.
Signed-off-by: Andreas Rheinhardt
---
libavcodec/pthread_frame.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
in
On 14.09.2023 18:52, Roman Arzumanyan wrote:
Got it, thanks.
Please find the patches in attachment.
Just for my own understanding - could you please explain how this magic
works in the configure script? I mean this section:
if ! disabled ffnvcodec; then
ffnv_hdr_list="ffnvcodec/nvEncodeAPI.h
Got it, thanks.
Please find the patches in attachment.
Just for my own understanding - could you please explain how this magic
works in the configure script? I mean this section:
if ! disabled ffnvcodec; then
ffnv_hdr_list="ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h
ffnvcodec/dynlink_c
Signed-off-by: Andreas Rheinhardt
---
libavcodec/thread.h | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/libavcodec/thread.h b/libavcodec/thread.h
index 2c8c0cdb16..180e1137ae 100644
--- a/libavcodec/thread.h
+++ b/libavcodec/thread.h
@@ -73,12 +73,7 @@ void ff_thread_f
On 9/14/2023 12:43 PM, Anton Khirnov wrote:
Quoting James Almer (2023-09-06 19:44:20)
Changes since the previous version:
- Removed the AVPacketSideDataSet from AVCodecContext, using instead the
existing coded_side_data field, at Anton's request.
I still prefer using a new field of type AVPa
Quoting James Almer (2023-09-06 19:44:20)
> Changes since the previous version:
> - Removed the AVPacketSideDataSet from AVCodecContext, using instead the
> existing coded_side_data field, at Anton's request.
>
> I still prefer using a new field of type AVPacketSideDataSet, given that the
> user
It is badly named (should have been -top_field_first, or at least -tff),
underdocumented and underspecified, and (most importantly) entirely
redundant with the setfield filter.
---
Changelog | 1 +
doc/ffmpeg.texi | 2 --
fftools/ffmpeg.h | 9 +
Fixes #9339.
---
fftools/ffmpeg_enc.c| 5 +
tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 | 2 +-
tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 | 2 +-
tests/ref/lavf/mxf_d10 | 2 +-
4 files changed, 8 insertions(+), 3 de
Merge three blocks with slightly inconsistent checks into one, treating
encoder input as interlaced when either:
* at least one of ilme/ildct flags is set
* the first frame in the stream is marked as interlaced
* the user specified the -top option
Stop modifying the frame passed to enc_open().
---
Quoting Roman Arzumanyan (2023-09-14 09:26:52)
> Hello,
>
> This is the second patch of the group which adds the option to use CUDA
> context current to calling thread. It simplifies the usage of ffmpeg
> libraries in applications which rely on CUDA runtime API.
>
> Example:
>
> AVDictionary *op
On Thu, Sep 14, 2023 at 3:34 PM Andreas Rheinhardt <
andreas.rheinha...@outlook.com> wrote:
> Paul B Mahol:
> > +unsigned val, bits;
> > +
> > +bits = get_vlc2(gb, lag_tab.table, VLC_BITS, 3);
> > +if (bits > 31) {
> > *value = 0;
> > return AVERROR_INVALIDDATA;
>
> U
Paul B Mahol:
> +unsigned val, bits;
> +
> +bits = get_vlc2(gb, lag_tab.table, VLC_BITS, 3);
> +if (bits > 31) {
> *value = 0;
> return AVERROR_INVALIDDATA;
Using a signed int and checking for zero is simpler.
And the depth of this VLC is 1, not 3.
- Andreas
___
On 14/09/2023 15:29, Roman Arzumanyan wrote:
Thanks for the swift reply Timo, you're right about versioning.
However, I didn't find any existing CUDA API versioning macro unlike
that for Video Codec SDK API.
So I basically did the same thing as that in previous commit to
nvcodec-headers which b
Thanks for the swift reply Timo, you're right about versioning.
However, I didn't find any existing CUDA API versioning macro unlike that
for Video Codec SDK API.
So I basically did the same thing as that in previous commit to
nvcodec-headers which barely adds new function pointer...
Anyway, I too
Hello everyone.
I submitted a patch, the details are as follows:
framequeue: Remove redundant logic code
In this logical branch, fq->queued and fq->allocated must be equal.
Deleting this code will make it easier to understand the logic (
copy the data before tail to the ne
Andreas Rheinhardt:
> Add a pointer parameter that if supplied will be used to return
> the updated decode_error_flags. This will allow to fix several
> races when using frame-threading; these resulted from AVFrame
> that the earlier code updated concurrently being used as source
> in an av_frame_r
Andreas Rheinhardt:
> Since bfb28b5ce89f3e950214b67ea95b45e3355c2caf the permutation
> type FF_IDCT_PERM_SIMPLE is ARCH_X86_32-only. So use this
> knowledge to disable code for it when not on ARCH_X86_32.
>
> Signed-off-by: Andreas Rheinhardt
> ---
> libavcodec/x86/idctdsp_init.c | 2 ++
This will either need updates to the ffnvcodec version checks in
configure, to ensure the new symbol always exists, or some kind of more
selective check to only build those parts of the code if the new
function is present.
As it is now, this would fail all current builds.
_
Hello,
This is the second patch of the group which adds the option to use CUDA
context current to calling thread. It simplifies the usage of ffmpeg
libraries in applications which rely on CUDA runtime API.
Example:
AVDictionary *opts = NULL;
AVBufferRef *hwDeviceCtx;
av_dict_set(&opts, "curre
Hello,
This patch adds cuCtxGetCurrent function to nvcodec-headers repo.
Second patch of the group which adds FFmpeg option to use current CUDA
context depends on this.
0001-Add-cuCtxGetCurrent-function.patch
Description: Binary data
___
ffmpeg-devel m
> On Sep 14, 2023, at 14:11, Xiang, Haihao
> wrote:
>
>
>> This seems like a bug in libmfx/libvpl.
>
> I agree there should be a bug in libmfx/libvpl, but we have to avoid this dead
> loop in FFmpeg.
Is it possible that a normal case which do take more than 500ms now break out
early and ret
45 matches
Mail list logo