[FFmpeg-devel] [PATCH 3/3 v2] avutil/mem_internal: use av_max_alloc_get() in ff_fast_malloc()

2021-05-22 Thread James Almer
This puts ff_fast_malloc() and av_fast_malloc() in line with av_fast_realloc() Signed-off-by: James Almer --- Now freeing the buffer on error, since that's what the doxy for av_fast_malloc() states is meant to happen. libavutil/mem_internal.h | 11 ++- 1 file changed, 10 insertions(+),

[FFmpeg-devel] [PATCH 2/3] avutil/mem: add a function to retrieve the current max_alloc_size value

2021-05-22 Thread James Almer
Signed-off-by: James Almer --- Missing APIChanges entry (Do i bump version? We're still in open ABI season). libavutil/mem.c | 4 libavutil/mem.h | 13 + 2 files changed, 17 insertions(+) diff --git a/libavutil/mem.c b/libavutil/mem.c index c12c24aa90..495eed880d 100644 --- a/

[FFmpeg-devel] [PATCH 3/3] avutil/mem_internal: use av_max_alloc_get() in ff_fast_malloc()

2021-05-22 Thread James Almer
This puts ff_fast_malloc() and av_fast_malloc() in line with ff_fast_realloc() Signed-off-by: James Almer --- The alternative to this set would be to move av_fast_padded_malloc() from avcodec to avutil, and moving ff_fast_malloc() from mem_internal.h to mem.c, in which case it will no longer be i

[FFmpeg-devel] [PATCH 1/3] avutil/mem: make max_alloc_size an atomic type

2021-05-22 Thread James Almer
This is in preparation for the following commit. Signed-off-by: James Almer --- libavutil/mem.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/libavutil/mem.c b/libavutil/mem.c index fa227f5e12..c12c24aa90 100644 --- a/libavutil/mem.c +++ b/libavutil/mem.c

Re: [FFmpeg-devel] [PATCH 31/39] avcodec/encode: Always use intermediate buffer in ff_alloc_packet2()

2021-05-22 Thread James Almer
On 5/22/2021 5:24 PM, Michael Niedermayer wrote: On Fri, May 21, 2021 at 11:17:34AM +0200, Andreas Rheinhardt wrote: Up until now, ff_alloc_packet2() has a min_size parameter: It is supposed to be a lower bound on the final size of the packet to allocate. If it is not too far from the upper boun

Re: [FFmpeg-devel] [PATCH 31/39] avcodec/encode: Always use intermediate buffer in ff_alloc_packet2()

2021-05-22 Thread Michael Niedermayer
On Fri, May 21, 2021 at 11:17:34AM +0200, Andreas Rheinhardt wrote: > Up until now, ff_alloc_packet2() has a min_size parameter: > It is supposed to be a lower bound on the final size of the packet > to allocate. If it is not too far from the upper bound (namely, > if it is at least half the upper

Re: [FFmpeg-devel] [PATCH 2/2] avio: do not export avpriv_io_{move, delete}

2021-05-22 Thread Anton Khirnov
Quoting Anton Khirnov (2020-01-13 11:33:01) > Quoting Hendrik Leppkes (2020-01-10 23:40:37) > > On Fri, Jan 10, 2020 at 7:31 PM James Almer wrote: > > > Yes, i agree with this if we were talking about clearly marked > > > non-public structs, fields and defines. In those cases, people using > > > t

Re: [FFmpeg-devel] Unable to compile with cuda

2021-05-22 Thread Timo Rothenpieler
On 22.05.2021 20:54, Dylan Fernando wrote: I'm unable to compile on Arch Linux with cuda enabled. Command: ./configure --enable-opencl --enable-vulkan --enable-libglslang --disable-stripping --enable-nonfree --enable-cuda-nvcc --extra-c flags=-I/opt/local/cuda/include Error: ERROR: failed chec

Re: [FFmpeg-devel] Unable to compile with cuda

2021-05-22 Thread Dennis Mungai
On Sat, 22 May 2021 at 11:55, Dylan Fernando wrote: > I'm unable to compile on Arch Linux with cuda enabled. Command: > > ./configure --enable-opencl --enable-vulkan --enable-libglslang > --disable-stripping --enable-nonfree --enable-cuda-nvcc --extra-c > flags=-I/opt/local/cuda/include > > Error