[FFmpeg-devel] [PATCH v3 12/12] fftools/ffmpeg_demux: set default hwaccel_output_format for mediacodec

2022-11-19 Thread Zhao Zhili
From: Zhao Zhili --- Fix commit subject ffmpeg_opt -> ffmpeg_demux fftools/ffmpeg_demux.c | 4 1 file changed, 4 insertions(+) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 76778d774d..d2a6d39703 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -625

[FFmpeg-devel] [PATCH v2 09/12] avcodec/mediacodec: add ANativeWindow support

2022-11-19 Thread Zhao Zhili
From: Zhao Zhili ANativeWindow can be used without JVM. --- libavcodec/mediacodec_surface.c | 46 --- libavcodec/mediacodec_surface.h | 8 -- libavcodec/mediacodec_wrapper.c | 30 +++- libavcodec/mediacodec_wrapper.h | 8 -- libavcode

[FFmpeg-devel] [PATCH v2 08/12] avutil/hwcontext_mediacodec: add ANativeWindow support

2022-11-19 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavutil/hwcontext_mediacodec.c | 56 +++- libavutil/hwcontext_mediacodec.h | 11 +++ libavutil/version.h | 2 +- 3 files changed, 67 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_med

[FFmpeg-devel] [PATCH v2 07/12] avcodec/mediacodecdec: enable NDK mediacodec

2022-11-19 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- Changelog | 1 + libavcodec/mediacodecdec.c| 10 +- libavcodec/mediacodecdec_common.c | 23 +++ libavcodec/mediacodecdec_common.h | 1 + libavcodec/version.h | 4 ++-- 5 fi

[FFmpeg-devel] [PATCH v2 12/12] fftools/ffmpeg_opt: set default hwaccel_output_format for mediacodec

2022-11-19 Thread Zhao Zhili
From: Zhao Zhili --- fftools/ffmpeg_demux.c | 4 1 file changed, 4 insertions(+) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 76778d774d..d2a6d39703 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -625,6 +625,10 @@ static void add_input_streams(con

[FFmpeg-devel] [PATCH v2 06/12] avcodec/mediacodec: add NDK media codec wrapper

2022-11-19 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- configure | 2 + libavcodec/mediacodec_wrapper.c | 596 +- libavcodec/mediacodec_wrapper.h | 8 +- libavcodec/mediacodecdec.c| 2 +- libavcodec/mediacodecdec_common.c | 2 +- 5

[FFmpeg-devel] [PATCH v2 11/12] avutil/hwcontext: verify hw_frames_ctx in transfer_data_alloc

2022-11-19 Thread Zhao Zhili
From: Zhao Zhili --- libavutil/hwcontext.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index ab9ad3703e..3396598269 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -397,10 +397,14 @@ int av_hwframe_trans

[FFmpeg-devel] [PATCH v2 05/12] avcodec/mediacodec_wrapper: separate implementation from interface

2022-11-19 Thread Zhao Zhili
From: Zhao Zhili This is in preparation for NDK media codec wrapper. Signed-off-by: Zhao Zhili --- libavcodec/mediacodec_wrapper.c | 244 +- libavcodec/mediacodec_wrapper.h | 255 +++- 2 files changed, 394 insertions(+), 105 deletions(-)

[FFmpeg-devel] [PATCH v2 10/12] avcodec: add MediaCodec encoder

2022-11-19 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- Changelog | 1 + configure | 4 + libavcodec/Makefile | 2 + libavcodec/allcodecs.c | 2 + libavcodec/mediacodec_wrapper.c | 101 ++- libavcodec/mediacodec_wrapper.h | 8

[FFmpeg-devel] [PATCH v2 04/12] avcodec/mediacodecdec_common: fix useless av_buffer_unref

2022-11-19 Thread Zhao Zhili
From: Zhao Zhili Since frame->buf[0] is always NULL in this case, av_buffer_unref has no effect. If it's not NULL, double-free will happen. Signed-off-by: Zhao Zhili --- libavcodec/mediacodecdec_common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/mediacodecdec_common.c b/li

[FFmpeg-devel] [PATCH v2 03/12] avcodec/mediacodecdec_common: fix misuse av_free/av_freep

2022-11-19 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavcodec/mediacodecdec_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mediacodecdec_common.c b/libavcodec/mediacodecdec_common.c index f430cfed31..4c48b9142e 100644 --- a/libavcodec/mediacodecdec_common.c

[FFmpeg-devel] [PATCH v2 02/12] avcodec/mediacodecdec: don't break out if both input and output port return try again

2022-11-19 Thread Zhao Zhili
From: Zhao Zhili At the beginning of decoding, if we feed mediacodec too fast, the input port will return try again. It takes some time for mediacodec to consume bitstream and output frame. So the output port also return try again. It possible that mediacodec_receive_frame doesn't consume any AVP

[FFmpeg-devel] [PATCH v2 01/12] avcodec/mediacodec: fix incorrect crop info

2022-11-19 Thread Zhao Zhili
From: Zhao Zhili The crop info is optional, but used unconditionally. Co-authored-by: Aman Karmani Signed-off-by: Zhao Zhili --- libavcodec/mediacodecdec_common.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/libavcodec/mediacodecdec_common.c b/libavco

[FFmpeg-devel] [PATCH v2 00/12] Add MediaCodec encoder and NDK MediaCodec support

2022-11-19 Thread Zhao Zhili
From: Zhao Zhili v2: Rebased on master. 01/12: Use crop-width/crop-height as fallback and add TODO. Co-authored-by: Aman Karmani 07/12: Fix libavcodec/version.h conflict 10/12: Change default i-frame-interval to 1 and add log message; bump minor version 12/12: Fix rebase conflict v1: Firs

[FFmpeg-devel] [PATCH v2] avcodec/av1_vaapi: add direct film grain mode

2022-11-19 Thread Ruijing Dong
Adding direct film grain mode for av1 decoder, which outputs alongside film grain. AV_HWACCEL_FLAG_DIRECT_FILM_GRAIN is the new flag introduced to enable this path. issue: By using AMD av1 decoder via VAAPI, when used with film grain content, the output displays black screen with incorrect frame

[FFmpeg-devel] [PATCH] avcodec/libsvtav1: guard against bit_rate being zero

2022-11-19 Thread Christopher Degawa
division by zero occurs if it's not specified Signed-off-by: Christopher Degawa --- libavcodec/libsvtav1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index 48cd58a0b3..06874dfa63 100644 --- a/libavcodec/libsvtav1.c +++ b

Re: [FFmpeg-devel] [PATCH v2 0/3] Some small ASS conversion fixes

2022-11-19 Thread Oneric
On Sun, Nov 13, 2022 at 20:57:15 +0100, Oneric wrote: > This fixes colours and font selection for files converted to ASS Ping. As a reminder v1 and v2 are equivalent and patchwork is buggy and can thus neither apply v1 or v2 and its results can be ignored and its patch or diff downloads should no

Re: [FFmpeg-devel] [PATCH 01/12] avcodec/mediacodec: fix incorrect crop info

2022-11-19 Thread Aman Karmani
On Sat, Nov 19, 2022 at 6:56 AM Zhao Zhili wrote: > On Sat, 2022-11-19 at 00:20 -0800, Aman Karmani wrote: > > Thank you for your work on this patchset! > > > > On Sun, Oct 23, 2022 at 8:17 PM Zhao Zhili > > wrote: > > > From: Zhao Zhili > > > > > > The crop info is optional, but used unconditi

Re: [FFmpeg-devel] [PATCH 2/2] swscale/input: Use more unsigned intermediates

2022-11-19 Thread Michael Niedermayer
On Tue, Nov 15, 2022 at 11:16:57PM +0100, Michael Niedermayer wrote: > Same principle as previous commit, with sufficiently huge rgb2yuv table > values this produces wrong results and undefined behavior. > The unsigned produces the same incorrect results. That is probably > ok as these cases with h

[FFmpeg-devel] [PATCH 2/2] lavc/videotoolboxenc: use objectpool for encoder output information

2022-11-19 Thread Rick Kern
Instead of allocating/freeing, use objpool for data passed from an input frame to an output packet. Signed-off-by: Rick Kern --- libavcodec/videotoolboxenc.c | 80 1 file changed, 71 insertions(+), 9 deletions(-) diff --git a/libavcodec/videotoolboxenc.c b/l

[FFmpeg-devel] [PATCH 1/2] fftools/objpool: move objpool to libavutil

2022-11-19 Thread Rick Kern
Moved objpool to libavutil to make it available outside of fftools. Signed-off-by: Rick Kern --- fftools/Makefile | 1 - fftools/ffmpeg_mux.c | 2 +- fftools/sync_queue.c | 2 +- fftools/thread_queue.c | 2 +- fftools/thread_queue.h | 2

[FFmpeg-devel] [PATCH 0/2] lavc/videotoolbox: use objpool instead of allocating memory each frame

2022-11-19 Thread Rick Kern
objpool was only being used in fftools, but it's useful in other components to reduce alloation time and memory fragmentation. This patch set moves objpool to libavutil, so it can be used by lavc/videotoolboxenc for data being passed from input frames to output packets. Rick Kern (2): fftools

Re: [FFmpeg-devel] [V2 01/10] libavfilter/vulkan: Fix problem when device have queue_count greater than 1

2022-11-19 Thread Dennis Mungai
On Tue, 31 Aug 2021 at 10:26, Wenbin Chen wrote: > If the descriptorSetCount is greater than the number of setLayouts, > vkAllocateDescriptorSets will report error. Now fix it. > > Now the following command can run on the device that has queue_count > greater > than one: > ffmpeg -v verbose -init

Re: [FFmpeg-devel] [PATCH 4/4] avcodec/vqcdec: Check for end of input in decode_vectors()

2022-11-19 Thread Michael Niedermayer
On Sat, Nov 19, 2022 at 10:03:08AM +1100, Peter Ross wrote: > On Fri, Nov 18, 2022 at 10:09:18PM +0100, Michael Niedermayer wrote: > > Fixes: Timeout > > Fixes: > > 52695/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQC_fuzzer-4882310386548736 > > > > Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/tiff: Ignore tile_count

2022-11-19 Thread Michael Niedermayer
On Sat, Nov 19, 2022 at 01:40:06PM +0100, Anton Khirnov wrote: > Quoting Michael Niedermayer (2022-11-18 22:09:15) > > Fixes: out of array access > > Fixes: > > 52427/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4849108968144896 > > > > Found-by: continuous fuzzing process > > h

Re: [FFmpeg-devel] [PATCH 10/12] avcodec: add MediaCodec encoder

2022-11-19 Thread Olivier Ayache
>That’s the case from my test on Google Pixel 3. There is no ‘csd’ inside >MediaFormat returned by ff_AMediaCodec_getOutputFormat(), until a frame >has been sent. It may depends on the device and OS. Hello there, if it can help concerning the csd your asumption is right and not only on Pixel 3. Wh

Re: [FFmpeg-devel] [PATCH 10/12] avcodec: add MediaCodec encoder

2022-11-19 Thread zhilizhao(赵志立)
> On Nov 19, 2022, at 17:15, Aman Karmani wrote: > > > > On Sun, Oct 23, 2022 at 8:17 PM Zhao Zhili wrote: > From: Zhao Zhili > > Signed-off-by: Zhao Zhili > --- > Changelog | 1 + > configure | 4 + > libavcodec/Makefile | 2

Re: [FFmpeg-devel] [PATCH] avcodec/vp8: Fix wrong vpx_rac_is_end() check

2022-11-19 Thread Ronald S. Bultje
Hi, On Fri, Nov 18, 2022 at 8:37 AM Ronald S. Bultje wrote: > From: Hirokazu Honda > > The check of vpx_rac_is_end check(s) are added originally from > 1afd246960202917e244c844c534e9c1e3c323f5. It causes a regression > of some vp8 stream. b6b9ac5698c8f911841b469af77199153278c55c fixes > the reg

Re: [FFmpeg-devel] [PATCH 01/12] avcodec/mediacodec: fix incorrect crop info

2022-11-19 Thread Zhao Zhili
On Sat, 2022-11-19 at 00:20 -0800, Aman Karmani wrote: > Thank you for your work on this patchset! > > On Sun, Oct 23, 2022 at 8:17 PM Zhao Zhili > wrote: > > From: Zhao Zhili > > > > The crop info is optional, but used unconditionally. > > > > Signed-off-by: Zhao Zhili > > --- > > libavcode

Re: [FFmpeg-devel] [PATCH 4/7] doc/developer.texi: document the use of other languages than C

2022-11-19 Thread Lynne
Nov 19, 2022, 15:22 by an...@khirnov.net: > Quoting Lynne (2022-11-17 15:17:44) > >> Nov 17, 2022, 11:09 by an...@khirnov.net: >> >> > --- >> > doc/developer.texi | 15 +-- >> > 1 file changed, 13 insertions(+), 2 deletions(-) >> > >> > diff --git a/doc/developer.texi b/doc/developer.

Re: [FFmpeg-devel] [PATCH 4/7] doc/developer.texi: document the use of other languages than C

2022-11-19 Thread Anton Khirnov
Quoting Lynne (2022-11-17 15:17:44) > Nov 17, 2022, 11:09 by an...@khirnov.net: > > > --- > > doc/developer.texi | 15 +-- > > 1 file changed, 13 insertions(+), 2 deletions(-) > > > > diff --git a/doc/developer.texi b/doc/developer.texi > > index 01735e07f5..44da6e41af 100644 > > ---

Re: [FFmpeg-devel] vulkan video

2022-11-19 Thread Lynne
Nov 19, 2022, 11:48 by danieloberh...@googlemail.com: > Hello, reposting this from the user list as it seems it did not get any > attention there and maybe is better suited here: > > I saw recently on phoronix that there was a vulkan video branch. > Unfortunately that seems to have grown stale.

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/tiff: Ignore tile_count

2022-11-19 Thread Anton Khirnov
Quoting Michael Niedermayer (2022-11-18 22:09:15) > Fixes: out of array access > Fixes: > 52427/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4849108968144896 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by

Re: [FFmpeg-devel] vulkan video

2022-11-19 Thread Timo Rothenpieler
On 19.11.2022 11:48, Daniel Oberhoff wrote: Hello, reposting this from the user list as it seems it did not get any attention there and maybe is better suited here: I saw recently on phoronix that there was a vulkan video branch. Unfortunately that seems to have grown stale. Is there any chanc

[FFmpeg-devel] vulkan video

2022-11-19 Thread Daniel Oberhoff
Hello, reposting this from the user list as it seems it did not get any attention there and maybe is better suited here: I saw recently on phoronix that there was a vulkan video branch. Unfortunately that seems to have grown stale. Is there any chance vulkan video will make it into ffmpeg any t

Re: [FFmpeg-devel] [PATCH] avformat: fix use of undeclared identifier error when compiling Chromium

2022-11-19 Thread 揚帆起航
problem solved "zhilizhao(赵志立)" 於 2022年11月9日週三 上午10:58寫道: > > > > On Nov 9, 2022, at 10:41, 揚帆起航 wrote: > > > > I encountered an error in the files included in this patch when compiling > > Chromium. When I followed this patch to modify the ffmpeg file in the > > Chromium source code, the compi