[FFmpeg-devel] [PATCH v2 10/14] aarch64/vvc: Add sad

2024-09-11 Thread Zhao Zhili
From: Zhao Zhili sad_8x16_c: 0.8 ( 1.00x) sad_8x16_neon: 0.2 ( 3.00x) sad_16x8_c: 0.5 ( 1.00x) sad_16x8_neon: 0.2 ( 2.00x

[FFmpeg-devel] [PATCH v2 09/14] aarch64/vvc: Add put_qpel_hv

2024-09-11 Thread Zhao Zhili
From: Zhao Zhili With Apple M1 (no i8mm): put_luma_hv_8_4x4_c: 2.2 ( 1.00x) put_luma_hv_8_4x4_neon: 0.8 ( 3.00x) put_luma_hv_8_8x8_c: 7.0 ( 1.00x) put_luma_hv_8_8x8_neon

[FFmpeg-devel] [PATCH v2 11/14] aarch64/vvc: Add put_epel_h

2024-09-11 Thread Zhao Zhili
From: Zhao Zhili put_chroma_h_8_4x4_c:0.2 ( 1.00x) put_chroma_h_8_4x4_neon: 0.2 ( 1.00x) put_chroma_h_8_8x8_c:0.8 ( 1.00x) put_chroma_h_8_8x8_neon: 0.2 ( 3.00x

[FFmpeg-devel] [PATCH v2 12/14] aarch64/vvc: Add put_epel_h i8mm

2024-09-11 Thread Zhao Zhili
From: Zhao Zhili put_chroma_h_8_4x4_c:0.4 ( 1.00x) put_chroma_h_8_4x4_neon: 0.0 ( 0.00x) put_chroma_h_8_4x4_i8mm: 0.1 ( 2.67x) put_chroma_h_8_8x8_c:1.6 ( 1.00x

[FFmpeg-devel] [PATCH v2 13/14] aarch64/vvc: Add put_epel_hv

2024-09-11 Thread Zhao Zhili
From: Zhao Zhili On Apple M1: put_chroma_hv_8_4x4_c: 1.7 ( 1.00x) put_chroma_hv_8_4x4_neon:0.2 ( 7.67x) put_chroma_hv_8_8x8_c: 5.5 ( 1.00x) put_chroma_hv_8_8x8_neon

[FFmpeg-devel] [PATCH v2 14/14] aarch64/vvc: Add avg

2024-09-11 Thread Zhao Zhili
From: Zhao Zhili avg_8_2x2_c: 0.2 ( 1.00x) avg_8_2x2_neon: 0.2 ( 1.00x) avg_8_4x4_c: 0.2 ( 1.00x) avg_8_4x4_neon: 0.2 ( 1.00x

[FFmpeg-devel] [PATCH v2 08/14] aarch64/vvc: Add put_qpel_vx

2024-09-11 Thread Zhao Zhili
From: Zhao Zhili put_luma_v_8_4x4_c: 1.0 ( 1.00x) put_luma_v_8_4x4_neon: 0.0 ( 0.00x) put_luma_v_8_8x8_c: 3.5 ( 1.00x) put_luma_v_8_8x8_neon: 0.5 ( 7.00x

[FFmpeg-devel] [PATCH] avcodec/vvc: Fix output and unref a frame which isn't decoding yet

2024-09-12 Thread Zhao Zhili
From: Zhao Zhili ff_vvc_output_frame is called before actually decoding. It's possible for ff_vvc_output_frame to select current frame to output. If current frame is nonref frame, it will be released by ff_vvc_unref_frame. Fix this by always marking the current frame

[FFmpeg-devel] [PATCH v2] avcodec/vvc: Fix output and unref a frame which isn't decoding yet

2024-09-12 Thread Zhao Zhili
From: Zhao Zhili ff_vvc_output_frame is called before actually decoding. It's possible for ff_vvc_output_frame to select current frame to output. If current frame is nonref frame, it will be released by ff_vvc_unref_frame. Fix this by always marking the current frame

[FFmpeg-devel] [PATCH] avcodec/libx265: fix build error

2022-11-03 Thread Zhao Zhili
From: Zhao Zhili x265_sei is available since X265_BUILD 88. This fixes a regression from commit 1f585030137. Signed-off-by: Zhao Zhili --- libavcodec/libx265.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 4aa96e1f2d..e36f20a812

[FFmpeg-devel] [PATCH] avcodec/libx265: fix build error

2022-11-03 Thread Zhao Zhili
From: Zhao Zhili x265_sei is available since X265_BUILD 88. Bump required version to 89 to fix the regression from commit 1f585030137, and remove a conditional compilation. Signed-off-by: Zhao Zhili --- configure| 2 +- libavcodec/libx265.c | 2 -- 2 files changed, 1 insertion

Re: [FFmpeg-devel] [Internet][PATCH 00/12] Add MediaCodec encoder and NDK MediaCodec support

2022-11-11 Thread Zhao Zhili
ec encoder > and NDK MediaCodec support > > On Thu, Nov 10, 2022 at 7:36 PM "zhilizhao(赵志立)" > wrote: > > > > Ping for review. > > > > > On Oct 24, 2022, at 11:16, Zhao Zhili wrote: > > > > > > From: Zhao Zhili > > > &

Re: [FFmpeg-devel] [Internet][PATCH 00/12] Add MediaCodec encoder and NDK MediaCodec support

2022-11-13 Thread Zhao Zhili
nvert it to use the NDK MediaCodec API > > instead. > > > > // Martin > > > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > &g

[FFmpeg-devel] [PATCH] avformat/file: add fd protocol

2022-11-18 Thread Zhao Zhili
From: Zhao Zhili Unlike the pipe protocol, fd protocol has seek support if it corresponding to a regular file. --- Sometimes it's the only way to access files via file descriptor, e.g., requesting a shared file on Android: https://developer.android.com/training/secure-file-sharing/request

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. >

[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

[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

[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 consum

[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

[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_com

[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

[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 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

[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

[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

[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

[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

[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

[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_demu

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

2022-11-20 Thread Zhao Zhili
On Sat, 2022-11-19 at 16:35 -0500, Rick Kern wrote: > 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 fr

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

2022-11-21 Thread Zhao Zhili
On Sun, 2022-11-20 at 14:49 +0800, Zhao Zhili wrote: > 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: Cha

[FFmpeg-devel] [PATCH 1/2] avcodec/mediacodec: fix missing crop info when use NDK MediaCodec

2022-11-23 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodec_wrapper.c | 38 --- libavcodec/mediacodec_wrapper.h | 24 +++ libavcodec/mediacodecdec_common.c | 4 3 files changed, 63 insertions(+), 3 deletions(-) diff --git a/libavcodec/mediacodec_wrapper.c b

[FFmpeg-devel] [PATCH 2/2] avcodec/mediacodecenc: check missing Surface

2022-11-23 Thread Zhao Zhili
From: Zhao Zhili It's an invalid combination of Java MediaCodec with ANativeWindow. --- libavcodec/mediacodecenc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 7cdde59945..a4390a9df6 100644 --- a/libav

[FFmpeg-devel] [PATCH 1/3] avcodec/mediacodecenc: add option to select codec by name

2022-11-27 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 8 +++- libavcodec/version.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index a4390a9df6..693faca118 100644 --- a/libavcodec/mediacodecenc.c +++ b

[FFmpeg-devel] [PATCH 2/3] avcodec/mediacodec_wrapper: use hardcoded value of profiles from MediaCodecInfo

2022-11-27 Thread Zhao Zhili
From: Zhao Zhili Those are static const values and documented at https://developer.android.com/reference/android/media/MediaCodecInfo.CodecProfileLevel No runtime query is needed. Now the method can be used without JVM. --- libavcodec/mediacodec_wrapper.c | 98

[FFmpeg-devel] [PATCH 3/3] avcodec/mediacodecenc: configure profile

2022-11-27 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 693faca118..69246ad693 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc.c @@ -213,6 +213,11 @@ static

[FFmpeg-devel] [RFC PATCH] fftools/ffmpeg: make main function actually return

2022-12-01 Thread Zhao Zhili
From: Zhao Zhili --- When working on mediacodec encoder, I test it by making fftools/ffmpeg into a lib, since JNI requires a JVM environment. There are three steps mostly: 1. Rename main() function 2. Reset global variables 3. Make main() function actuall return There is no point for this patch

[FFmpeg-devel] [PATCH 4/7] avcodec/mediacodecenc: use bsf to handle crop

2022-12-04 Thread Zhao Zhili
From: Zhao Zhili It's well known that mediacodec encoder requires 16x16 alignment. Use our bsf to fix the crop info. --- configure | 2 ++ libavcodec/mediacodecenc.c | 65 +++--- 2 files changed, 63 insertions(+), 4 deletions(-) diff --

[FFmpeg-devel] [PATCH 5/7] avcodec/mediacodecenc: remove the strategy to create DTS

2022-12-04 Thread Zhao Zhili
From: Zhao Zhili Use input PTS as DTS has multiple problems: 1. If there is no reordering, it's better to just use the output PTS as DTS, since encoder may change the timestamp value (do it on purpose or rounding error). 2. If there is reordering, input PTS should be shift a few frames a

[FFmpeg-devel] [PATCH 6/7] avcodec/mediacodecenc: add max-bframes support

2022-12-04 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 4b0397d1ea..9378563fac 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc.c @@ -264,6 +264,8 @@ static av_cold

[FFmpeg-devel] [PATCH 3/7] avcodec/mediacodecenc: add level option

2022-12-04 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 143 - libavcodec/version.h | 2 +- 2 files changed, 142 insertions(+), 3 deletions(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index c28cce56c6..d098880941 100644 --- a

[FFmpeg-devel] [PATCH 1/7] avcodec/mediacodecenc: add bitrate_mode option

2022-12-04 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 25 + libavcodec/version.h | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 69246ad693..c8d8f84e46 100644 --- a/libavcodec

[FFmpeg-devel] [PATCH 2/7] avcodec/mediacodecenc: make each encoder has its own option

2022-12-04 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 42 ++ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index c8d8f84e46..c28cce56c6 100644 --- a/libavcodec/mediacodecenc.c +++ b

[FFmpeg-devel] [PATCH 7/7] avcodec/mediacodecenc: add pts_as_dts option

2022-12-04 Thread Zhao Zhili
From: Zhao Zhili It works since most of Android devices don't output B frames by default. The behavior is documented by Android now, although there is some exception in history, which should have been fixed now. --- libavcodec/mediacodecenc.c | 8 libavcodec/version.h | 2

[FFmpeg-devel] [PATCH v2 5/7] avcodec/mediacodecenc: remove the strategy to create DTS

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili Use input PTS as DTS has multiple problems: 1. If there is no reordering, it's better to just use the output PTS as DTS, since encoder may change the timestamp value (do it on purpose or rounding error). 2. If there is reordering, input PTS should be shift a few frames a

[FFmpeg-devel] [PATCH v2 2/7] avcodec/mediacodecenc: add bitrate_mode option

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 25 + libavcodec/version.h | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 4f9185342f..ec0e0b3a86 100644 --- a/libavcodec

[FFmpeg-devel] [PATCH v2 3/7] avcodec/mediacodecenc: add level option

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 143 - libavcodec/version.h | 2 +- 2 files changed, 142 insertions(+), 3 deletions(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index ec0e0b3a86..2f78567451 100644 --- a

[FFmpeg-devel] [PATCH v2 0/7] MediaCodec encoder: Fix width/height alignment issue and add more options

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili v2: Reorder 1/7 and 2/7. Zhao Zhili (7): avcodec/mediacodecenc: make each encoder has its own option avcodec/mediacodecenc: add bitrate_mode option avcodec/mediacodecenc: add level option avcodec/mediacodecenc: use bsf to handle crop avcodec/mediacodecenc: remove the

[FFmpeg-devel] [PATCH v2 1/7] avcodec/mediacodecenc: make each encoder has its own option

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 69246ad693..4f9185342f 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec

[FFmpeg-devel] [PATCH v2 6/7] avcodec/mediacodecenc: add max-bframes support

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 8e28a50e0d..e9cff8167a 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc.c @@ -264,6 +264,8 @@ static av_cold

[FFmpeg-devel] [PATCH v2 7/7] avcodec/mediacodecenc: add pts_as_dts option

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili It works since most of Android devices don't output B frames by default. The behavior is documented by Android now, although there is some exception in history, which should have been fixed now. --- libavcodec/mediacodecenc.c | 8 libavcodec/version.h | 2

[FFmpeg-devel] [PATCH v2 4/7] avcodec/mediacodecenc: use bsf to handle crop

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili It's well known that mediacodec encoder requires 16x16 alignment. Use our bsf to fix the crop info. --- configure | 2 ++ libavcodec/mediacodecenc.c | 65 +++--- 2 files changed, 63 insertions(+), 4 deletions(-) diff --

Re: [FFmpeg-devel] Defect: MediaCodec Encoder - Pixel ColorSpace of many Adreno GPUs not supported

2022-12-07 Thread Zhao Zhili
> From: ffmpeg-devel On Behalf Of Ben Temple > Sent: 2022年12月7日 6:53 > To: ffmpeg-devel@ffmpeg.org; Zhao Zhili > Subject: [FFmpeg-devel] Defect: MediaCodec Encoder - Pixel ColorSpace of many > Adreno GPUs not supported > > MediaCodec Encoder: Pixel ColorSpace of ma

Re: [FFmpeg-devel] [PATCH] avformat/file: add fd protocol

2022-12-08 Thread Zhao Zhili
On Mon, 2022-12-05 at 10:51 +0800, zhilizhao(赵志立) wrote: > > On Nov 19, 2022, at 02:48, Zhao Zhili > > wrote: > > > > From: Zhao Zhili > > > > Unlike the pipe protocol, fd protocol has seek support if it > > corresponding to a regular file. > &g

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/mediacodec: fix missing crop info when use NDK MediaCodec

2022-12-08 Thread Zhao Zhili
On Thu, 2022-11-24 at 00:49 +0800, Zhao Zhili wrote: > From: Zhao Zhili > > --- > libavcodec/mediacodec_wrapper.c | 38 - > -- > libavcodec/mediacodec_wrapper.h | 24 +++ > libavcodec/mediacodecdec_common.c | 4 &

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/mediacodecenc: add option to select codec by name

2022-12-08 Thread Zhao Zhili
On Mon, 2022-11-28 at 00:55 +0800, Zhao Zhili wrote: > From: Zhao Zhili > > --- > libavcodec/mediacodecenc.c | 8 +++- > libavcodec/version.h | 2 +- > 2 files changed, 8 insertions(+), 2 deletions(-) > > Applied.

Re: [FFmpeg-devel] [PATCH] avformat/file: add fd protocol

2022-12-08 Thread Zhao Zhili
On Thu, 2022-12-08 at 16:28 +0100, Andreas Rheinhardt wrote: > Marvin Scholz: > > > > On 8 Dec 2022, at 16:11, Zhao Zhili wrote: > > > > > On Mon, 2022-12-05 at 10:51 +0800, zhilizhao(赵志立) wrote: > > > > > On Nov 19, 2022, at

[FFmpeg-devel] [PATCH v3 3/7] avcodec/mediacodecenc: use bsf to handle crop

2022-12-09 Thread Zhao Zhili
From: Zhao Zhili It's well known that mediacodec encoder requires 16x16 alignment. Use our bsf to fix the crop info. --- v3: don't change the dimension for AV_PIX_FMT_MEDIACODEC. It can have side effect. configure | 2 + libavcodec/mediacodec

Re: [FFmpeg-devel] [PATCH] avformat/file: add fd protocol

2022-12-10 Thread Zhao Zhili
> From: ffmpeg-devel On Behalf Of Anton > Khirnov > Sent: 2022年12月9日 22:32 > To: FFmpeg development discussions and patches > Cc: Zhao Zhili > Subject: Re: [FFmpeg-devel] [PATCH] avformat/file: add fd protocol > > Quoting Zhao Zhili (2022-11-18 19:48:02) > > Fr

[FFmpeg-devel] [PATCH v2 2/3] avformat/file: dup file descriptor for pipe protocol

2022-12-11 Thread Zhao Zhili
From: Zhao Zhili This can fix read/write error when user close the file descriptor earlier. Now user can close the file descriptor earlier to avoid file descriptor leak. So it's safer in both way. --- libavformat/file.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --

[FFmpeg-devel] [PATCH v2 1/3] avformat/file: add fd protocol

2022-12-11 Thread Zhao Zhili
From: Zhao Zhili Unlike the pipe protocol, fd protocol has seek support if it corresponding to a regular file. --- v2: dup the file descriptor for safety doc/protocols.texi | 24 ++ libavformat/Makefile| 1 + libavformat/file.c | 55

[FFmpeg-devel] [PATCH v2 3/3] fftools/ffmpeg_demux: fix stdin interaction condition

2022-12-11 Thread Zhao Zhili
From: Zhao Zhili Disable stdin interaction for pipe and fd protocols only if the file descriptor is explicitly or implicitly setting to zero. --- fftools/ffmpeg_demux.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index

Re: [FFmpeg-devel] [PATCH] avformat/file: add fd protocol

2022-12-12 Thread Zhao Zhili
On Mon, 2022-12-12 at 18:31 +0200, Rémi Denis-Courmont wrote: > Le maanantaina 5. joulukuuta 2022, 4.51.34 EET zhilizhao(赵志立) a écrit > : > > > On Nov 19, 2022, at 02:48, Zhao Zhili > > > wrote: > > > > > > From: Zhao Zhili > > > > > &g

Re: [FFmpeg-devel] [PATCH v3] avformat/movenc: correct write_colr warning placement

2022-12-14 Thread Zhao Zhili
> -Original Message- > From: ffmpeg-devel On Behalf Of Gyan Doshi > Sent: 2022年12月14日 20:49 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v3] avformat/movenc: correct write_colr > warning placement > > > > On 2022-12-14 06:10 pm, "zhilizhao(赵志立)" wrote: > > > >> O

[FFmpeg-devel] [PATCH v3 2/8] avformat/file: reindent after the previous commit

2022-12-14 Thread Zhao Zhili
From: Zhao Zhili --- libavformat/file.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavformat/file.c b/libavformat/file.c index db619fcaac..a56be64342 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -384,17 +384,17 @@ static int

[FFmpeg-devel] [PATCH v3 3/8] avformat/file: dup file descriptor for pipe

2022-12-14 Thread Zhao Zhili
From: Zhao Zhili --- libavformat/file.c | 44 ++-- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/libavformat/file.c b/libavformat/file.c index a56be64342..878983a336 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -167,6

[FFmpeg-devel] [PATCH v3 1/8] avformat/file: add fd option for pipe

2022-12-14 Thread Zhao Zhili
From: Zhao Zhili --- doc/protocols.texi| 4 +++- libavformat/file.c| 9 +++-- libavformat/version.h | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/protocols.texi b/doc/protocols.texi index d1c6fced7b..a686a7f0ac 100644 --- a/doc/protocols.texi +++ b/doc

[FFmpeg-devel] [PATCH v3 0/8] add fd protocol

2022-12-14 Thread Zhao Zhili
From: Zhao Zhili v2: 1. Forbid pass file descriptor via fd:{num}, instead of -fd option 2. Set CLOEXEC 3. Prefer fd over pipe for fftools v1: dup file descriptor Zhao Zhili (8): avformat/file: add fd option for pipe avformat/file: reindent after the previous commit avformat/file: dup

[FFmpeg-devel] [PATCH v3 4/8] avformat/file: add fd protocol

2022-12-14 Thread Zhao Zhili
From: Zhao Zhili Unlike the pipe protocol, fd protocol has seek support if it corresponding to a regular file. --- doc/protocols.texi | 27 + libavformat/Makefile| 1 + libavformat/file.c | 87 + libavformat/protocols.c | 1

[FFmpeg-devel] [PATCH v3 5/8] fftools/ffmpeg_demux: disable stdin interaction for fd protocol

2022-12-14 Thread Zhao Zhili
From: Zhao Zhili --- fftools/ffmpeg_demux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index e845e6784d..be0e8970ba 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -886,6 +886,7 @@ int ifile_open(const OptionsContext

[FFmpeg-devel] [PATCH v3 6/8] fftools/ffplay: prefer fd over pipe for seek support

2022-12-14 Thread Zhao Zhili
From: Zhao Zhili --- fftools/ffplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index fc7e1c2fb1..d6479aef5f 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -3537,7 +3537,7 @@ static void opt_input_file(void *optctx, const

[FFmpeg-devel] [PATCH v3 8/8] fftools/ffmpeg_demux: prefer fd over pipe for seek support

2022-12-14 Thread Zhao Zhili
From: Zhao Zhili --- Because fate tests can concat multiple results to a single output, we can't do the same for muxer, unless making a lot of modification on fate-run.sh. Although unlikely, our users may do the same thing. fftools/ffmpeg_demux.c | 2 +- 1 file changed, 1 insertion(

[FFmpeg-devel] [PATCH v3 7/8] fftools/ffprobe: prefer fd over pipe for seek support

2022-12-14 Thread Zhao Zhili
From: Zhao Zhili --- fftools/ffprobe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index d2f126d9d6..c18aee9846 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3714,7 +3714,7 @@ static void opt_input_file(void *optctx

Re: [FFmpeg-devel] [PATCH v3 3/7] avcodec/mediacodecenc: use bsf to handle crop

2022-12-14 Thread Zhao Zhili
On Wed, 2022-12-14 at 18:08 +0100, Tomas Härdin wrote: > tis 2022-12-13 klockan 11:20 +0800 skrev zhilizhao(赵志立): > > > > > On Dec 12, 2022, at 23:27, Tomas Härdin wrote: > > > > > > lör 2022-12-10 klockan 01:22 +0800 skrev Zhao Zhili: > > > > Fr

Re: [FFmpeg-devel] [PATCH v3 3/7] avcodec/mediacodecenc: use bsf to handle crop

2022-12-14 Thread Zhao Zhili
On Thu, 2022-12-15 at 01:37 +0800, Zhao Zhili wrote: > On Wed, 2022-12-14 at 18:08 +0100, Tomas Härdin wrote: > > tis 2022-12-13 klockan 11:20 +0800 skrev zhilizhao(赵志立): > > > > On Dec 12, 2022, at 23:27, Tomas Härdin wrote: > > > > > > > > lör 20

Re: [FFmpeg-devel] [PATCH] lavc/videotoolbox: validate vt context in the decoder callback

2022-12-15 Thread Zhao Zhili
> -Original Message- > From: ffmpeg-devel On Behalf Of Alessandro > Di Nepi > Sent: 2022年12月15日 22:16 > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH] lavc/videotoolbox: validate vt context in > the decoder callback > > Ping on this, > Can I contr

Re: [FFmpeg-devel] [PATCH v2 0/7] MediaCodec encoder: Fix width/height alignment issue and add more options

2022-12-15 Thread Zhao Zhili
On Wed, 2022-12-07 at 17:31 +0800, Zhao Zhili wrote: > From: Zhao Zhili > > v2: > Reorder 1/7 and 2/7. > > Zhao Zhili (7): > avcodec/mediacodecenc: make each encoder has its own option > avcodec/mediacodecenc: add bitrate_mode option > avcodec/mediacodecenc: a

[FFmpeg-devel] [PATCH] avcodec/mediacodec_wrapper: include stdbool.h

2022-12-15 Thread Zhao Zhili
From: Zhao Zhili Since NDK failed to do that: https://github.com/android/ndk/issues/1281 --- libavcodec/mediacodec_wrapper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 7ddf93ccc7..4d6e9487b8 100644 --- a/libavcodec

[FFmpeg-devel] [PATCH] avcodec/mediacodecdec: add AV1 decoding support

2022-12-19 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavcodec/allcodecs.c | 1 + libavcodec/mediacodecdec.c | 16 +++- libavcodec/version.h | 4 ++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index

[FFmpeg-devel] [PATCH v2] avcodec/mediacodecdec: add AV1 decoding support

2022-12-19 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- configure | 2 ++ libavcodec/Makefile| 1 + libavcodec/allcodecs.c | 1 + libavcodec/mediacodecdec.c | 16 +++- libavcodec/version.h | 4 ++-- 5 files changed, 21 insertions(+), 3 deletions

Re: [FFmpeg-devel] [PATCH v2] avformat/mov: fix buffering issue for special HTTP(s) mp4.

2022-12-22 Thread Zhao Zhili
On Tue, 2022-12-20 at 09:20 +, Chen, Jinkai wrote: > Problem: > Using ffplay play on these sources: > https://ali-sprite-video.yyouwang.com/video/works/202211/1667997073624_73.mp4 > https://images.voghion.com/productImages/04_01_C_30011_2020220106GiuseppeFanara0012.mp4 > > Solution: > Add a pr

[FFmpeg-devel] [PATCH] avcodec/h264_mp4toannexb: fix missing SPS/PPS to IDR frames

2022-12-28 Thread Zhao Zhili
From: Zhao Zhili If there is a single group of SPS/PPS before an IDR frame, but no SPS/PPS after that, we will miss the chance to reset idr_sps_seen/idr_pps_seen. The result is missing SPS/PPS for all IDR frames except the first one. Signed-off-by: Zhao Zhili --- libavcodec

Re: [FFmpeg-devel] [PATCH v3 1/8] avformat/file: add fd option for pipe

2022-12-28 Thread Zhao Zhili
On Thu, 2022-12-15 at 01:10 +0800, Zhao Zhili wrote: > From: Zhao Zhili > > --- > doc/protocols.texi| 4 +++- > libavformat/file.c| 9 +++-- > libavformat/version.h | 2 +- > 3 files changed, 11 insertions(+), 4 deletions(-) > > diff --git a/doc/protocol

Re: [FFmpeg-devel] [PATCH v2] avcodec/mediacodecdec: add AV1 decoding support

2022-12-28 Thread Zhao Zhili
On Tue, 2022-12-20 at 19:03 +0100, Tomas Härdin wrote: > mån 2022-12-19 klockan 20:45 +0800 skrev Zhao Zhili: > > From: Zhao Zhili > > > > Signed-off-by: Zhao Zhili > > --- > > configure | 2 ++ > > libavcodec/Makefile| 1

[FFmpeg-devel] [RFC PATCH] avcodec/nvenc: add alpha layer encoding support

2022-12-30 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- I need help. A lot of things doesn't work as Nvidia's doc: 1. Global header is broken. NV_ENC_SEQUENCE_PARAM_PAYLOAD doesn't work with multi SPS/PPS. It output VPS, SPS_0, SPS_1, PPS_0, with P

[FFmpeg-devel] [PATCH 1/3] avcodec/videotoolboxenc: log when get_cv_pixel_format failed

2023-01-03 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavcodec/videotoolboxenc.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index aec98ade4f..27db4e0d5e 100644 --- a/libavcodec

[FFmpeg-devel] [PATCH 2/3] avcodec/videotoolboxenc: pass error code through

2023-01-03 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavcodec/videotoolboxenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index 27db4e0d5e..3b00e542cb 100644 --- a/libavcodec/videotoolboxenc.c +++ b

[FFmpeg-devel] [PATCH 3/3] avutil/hwcontext_videotoolbox: BGRA should be full range

2023-01-03 Thread Zhao Zhili
From: Zhao Zhili HEVC alpha layer encoding is broken without the patch. Signed-off-by: Zhao Zhili --- libavutil/hwcontext_videotoolbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext_videotoolbox.c b/libavutil/hwcontext_videotoolbox.c index

[FFmpeg-devel] [PATCH 4/4] avcodec/videotoolboxenc: fix error code

2023-01-03 Thread Zhao Zhili
From: Zhao Zhili 1. Fix return 0 on success. 2. Fix return OS error code passthrough. --- libavcodec/videotoolboxenc.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index 3b00e542cb..56971471e4 100644

[FFmpeg-devel] [PATCH v2 4/4] avcodec/videotoolboxenc: fix error code

2023-01-03 Thread Zhao Zhili
From: Zhao Zhili 1. Fix return 0 on error. 2. Fix return OS error code passthrough. --- v2: fix commit message libavcodec/videotoolboxenc.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index 3b00e542cb

Re: [FFmpeg-devel] [Internet]Re: [PATCH v2 5/7] avcodec/mediacodecenc: remove the strategy to create DTS

2023-01-04 Thread Zhao Zhili
> From: ffmpeg-devel On Behalf Of Tomas Härdin > Sent: 2023年1月4日 22:00 > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [Internet]Re: [PATCH v2 5/7] > avcodec/mediacodecenc: remove the strategy to create DTS > > ons 2023-01-04 klockan 19:31 +0800 skrev zhilizhao(赵

Re: [FFmpeg-devel] [Internet]Re: [PATCH v2 5/7] avcodec/mediacodecenc: remove the strategy to create DTS

2023-01-04 Thread Zhao Zhili
> -Original Message- > From: ffmpeg-devel On Behalf Of Anton > Khirnov > Sent: 2023年1月4日 23:16 > To: 'FFmpeg development discussions and patches' > Subject: Re: [FFmpeg-devel] [Internet]Re: [PATCH v2 5/7] > avcodec/mediacodecenc: remove the strategy

[FFmpeg-devel] [RFC PATCH 1/4] avcodec/hevc_parse: keep nal->nuh_layer_id > 0

2023-01-05 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/hevc_parse.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/hevc_parse.c b/libavcodec/hevc_parse.c index 29dfd479f3..dddb293df6 100644 --- a/libavcodec/hevc_parse.c +++ b/libavcodec/hevc_parse.c @@ -37,8 +37,6 @@ static int hevc_decode_nal_units

[FFmpeg-devel] [RFC PATCH 0/4] Add hevc alpha layer basic decoding support

2023-01-05 Thread Zhao Zhili
From: Zhao Zhili This is a POC for adding hevc alpha layer decoding support. I'd like to know: 1. Is there any plan/interesting to add fullly support inside our hevc decoder? If the answer is yes, then the patchset is less useful. 2. What does the current method break? 3. Any idea to im

[FFmpeg-devel] [RFC PATCH 3/4] avcodec/hevcdec: add nuh_layer_id option

2023-01-05 Thread Zhao Zhili
From: Zhao Zhili It can be used to decode selected independent non-base layer. One use case is alpha layer decoding. Signed-off-by: Zhao Zhili --- libavcodec/hevcdec.c | 20 +++- libavcodec/version.h | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a

[FFmpeg-devel] [RFC PATCH 2/4] avcodec/cbs_h2645: keep nal->nuh_layer_id > 0

2023-01-05 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/cbs_h2645.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index 4ee06003c3..b12abede29 100644 --- a/libavcodec/cbs_h2645.c +++ b/libavcodec/cbs_h2645.c @@ -477,9 +477,6 @@ static int

[FFmpeg-devel] [RFC PATCH 4/4] avcodec/h265_metadata_bsf: add nuh_layer_id option

2023-01-05 Thread Zhao Zhili
From: Zhao Zhili Extract NALUs with the specified nuh_layer_id and rewrite as base layer. For example, to extract alpha layer with nuh_layer_id equal to 1: ./ffmpeg -i alpha.mp4 \ -an -c:v copy \ -bsf:v hevc_mp4toannexb,hevc_metadata=nuh_layer_id=1 \ alpha.hevc --- doc

[FFmpeg-devel] [PATCH] avcodec/mediacodecenc: enable B frames only with -strict experimental

2023-01-05 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavcodec/mediacodecenc.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 4c1809093c..7a498f039e 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec

[FFmpeg-devel] [PATCH v2 4/4] avcodec: add hevc_extract_layer bsf

2023-01-05 Thread Zhao Zhili
From: Zhao Zhili For example, to extract alpha layer with nuh_layer_id equal to 1: ./ffmpeg -i alpha.mp4 \ -an -c:v copy \ -bsf:v hevc_extract_layer=nuh_layer_id=1 \ output.mp4 Signed-off-by: Zhao Zhili --- configure | 1 + doc

[FFmpeg-devel] [PATCH v2 3/4] avcodec/hevcdec: add nuh_layer_id option

2023-01-05 Thread Zhao Zhili
From: Zhao Zhili It can be used to decode selected independent non-base layer. One use case is alpha layer decoding. Partially fix #7965. Signed-off-by: Zhao Zhili --- libavcodec/hevcdec.c | 56 +++- libavcodec/version.h | 2 +- 2 files changed, 56

<    2   3   4   5   6   7   8   9   10   11   >