Re: [FFmpeg-devel] [PATCH v2 2/3] avfilter/x86/vf_exposure: add ff_exposure_avx2

2021-11-20 Thread Wu Jianhua
James Almer: >On 11/20/2021 5:42 PM, Wu Jianhua wrote: >> James Almer: >> On 11/4/2021 1:18 AM, Wu Jianhua wrote: Performance data(Less is better): exposure_sse: 500491 >> >>> You reported a better result in the first patch. >> >

[FFmpeg-devel] [PATCH] avcodec/h263: Fix global-buffer-overflow with noout flag2 set

2021-11-20 Thread Andreas Rheinhardt
h263_get_motion_length() forgot to take an absolute value; as a consequence, a negative index was used to access an array. This leads to potential crashes, but mostly it just accesses what is to the left of ff_mvtab (unless one uses ASAN), thereby defeating the purpose of the AV_CODEC_FLAG2_NO_OUTP

Re: [FFmpeg-devel] [PATCH 1/2] av(codec|device): Don't cast pointers to int

2021-11-20 Thread Michael Niedermayer
On Sat, Nov 20, 2021 at 05:32:56PM +0100, Andreas Rheinhardt wrote: > C99/C11 6.3.2.3 5: "Any pointer type may be converted to an integer > type. [...] If the result cannot be represented in the integer type, > the behavior is undefined." So stop casting pointers to int; use > uintptr_t instead. >

Re: [FFmpeg-devel] [PATCH v2 2/3] avfilter/x86/vf_exposure: add ff_exposure_avx2

2021-11-20 Thread James Almer
On 11/20/2021 5:42 PM, Wu Jianhua wrote: James Almer: On 11/4/2021 1:18 AM, Wu Jianhua wrote: Performance data(Less is better): exposure_sse: 500491 You reported a better result in the first patch. For they are tested on different baseline, I think it might

Re: [FFmpeg-devel] [PATCH v2 2/3] avfilter/x86/vf_exposure: add ff_exposure_avx2

2021-11-20 Thread Wu Jianhua
James Almer: On 11/4/2021 1:18 AM, Wu Jianhua wrote: >> Performance data(Less is better): >> exposure_sse: 500491 >You reported a better result in the first patch. For they are tested on different baseline, I think it might be better to only compare these two val

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/h263: Inline constant

2021-11-20 Thread Michael Niedermayer
On Fri, Nov 19, 2021 at 08:16:52PM +0100, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/h263.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/h263.h b/libavcodec/h263.h > index 491f2e0aac..70fd1ffdc0 100644 > --- a/libavcode

Re: [FFmpeg-devel] [PATCH v2 3/3] tests/checkasm: add check for vf_exposure

2021-11-20 Thread James Almer
On 11/4/2021 1:18 AM, Wu Jianhua wrote: Signed-off-by: Wu Jianhua --- tests/checkasm/Makefile | 1 + tests/checkasm/checkasm.c| 3 ++ tests/checkasm/checkasm.h| 1 + tests/checkasm/vf_exposure.c | 62 tests/fate/checkasm.mak | 1 +

Re: [FFmpeg-devel] [PATCH v2 2/3] avfilter/x86/vf_exposure: add ff_exposure_avx2

2021-11-20 Thread James Almer
On 11/4/2021 1:18 AM, Wu Jianhua wrote: Performance data(Less is better): exposure_sse: 500491 You reported a better result in the first patch. exposure_avx2: 449122 This looks like a really low speed up for a function that processes twice the amount of floats per loop. Si

Re: [FFmpeg-devel] [PATCH v2 1/3] avfilter/x86/vf_exposure: add x86 SIMD optimization

2021-11-20 Thread James Almer
On 11/20/2021 1:46 PM, James Almer wrote: On 11/4/2021 1:18 AM, Wu Jianhua wrote: diff --git a/libavfilter/x86/vf_exposure.asm b/libavfilter/x86/vf_exposure.asm new file mode 100644 index 00..3351c6fb3b --- /dev/null +++ b/libavfilter/x86/vf_exposure.asm @@ -0,0 +1,55 @@ +;*

Re: [FFmpeg-devel] [PATCH v2 1/3] avfilter/x86/vf_exposure: add x86 SIMD optimization

2021-11-20 Thread James Almer
On 11/4/2021 1:18 AM, Wu Jianhua wrote: Performance data(Less is better): exposure_c:857394 exposure_sse: 327589 Signed-off-by: Wu Jianhua --- libavfilter/exposure.h | 36 +++ libavfilter/vf_exposure.c | 36 +-- libavfilter/x86/Makef

[FFmpeg-devel] [PATCH 2/2] Revert "Disable warnings for casting pointers to integers, there is nothing wrong with that."

2021-11-20 Thread Andreas Rheinhardt
This reverts commit 5258f64a14713499cf84840b3ab3a1ee7cdcaeb8. The premise of said commit (that conversions from pointer to int are ok) is wrong: C99/C11 6.3.2.3 5: "Any pointer type may be converted to an integer type. [...] If the result cannot be represented in the integer type, the behavior is u

[FFmpeg-devel] [PATCH 1/2] av(codec|device): Don't cast pointers to int

2021-11-20 Thread Andreas Rheinhardt
C99/C11 6.3.2.3 5: "Any pointer type may be converted to an integer type. [...] If the result cannot be represented in the integer type, the behavior is undefined." So stop casting pointers to int; use uintptr_t instead. Signed-off-by: Andreas Rheinhardt --- When did these asserts actually help t

[FFmpeg-devel] [PATCH] avformat/cafdec: Avoid unnecessary avio_tell() calls

2021-11-20 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/cafdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c index 3ff0558afe..4b5b15b58d 100644 --- a/libavformat/cafdec.c +++ b/libavformat/cafdec.c @@ -224,7 +224,7 @@ static int r

Re: [FFmpeg-devel] [PATCH v2 1/3] avfilter/x86/vf_exposure: add x86 SIMD optimization

2021-11-20 Thread Paul B Mahol
will apply soon ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] fftools/ffmpeg: Take type limitations of AVFifo API into account

2021-11-20 Thread Andreas Rheinhardt
The types used by the AVFifo API are inconsistent: av_fifo_(space|size)() returns an int; av_fifo_alloc() takes an unsigned, other parts use size_t. This commit therefore ensures that the size of the muxing_queue FIFO never exceeds INT_MAX. While just at it, also make sure not to call av_fifo_size

Re: [FFmpeg-devel] [PATCH 2/2] libRIST: allow setting fifo size and fail on overflow.

2021-11-20 Thread Gijs Peskens
Thanks for reviewing again! On 18-11-2021 20:35, Marton Balint wrote: On Wed, 17 Nov 2021, Gijs Peskens wrote: Introduce fifo_size and overrun_nonfatal params to configure fifo buffer behavior. Fifo size is used to left shift 2, since libRIST only accepts powers of 2. Can you please make

Re: [FFmpeg-devel] [PATCH] avcodec/smcenc: Avoid dangling pointers in context

2021-11-20 Thread Andreas Rheinhardt
Paul B Mahol: > Commit message is misleading, better to use: switch to stack for > PutByteContext > Will do. Although the commit message is correct: The pointers contained in the PutByteContext become dangling after each encode call. - Andreas ___ ffmpe

Re: [FFmpeg-devel] [PATCH] avcodec/smcenc: Avoid dangling pointers in context

2021-11-20 Thread Paul B Mahol
Commit message is misleading, better to use: switch to stack for PutByteContext ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.