Re: [FFmpeg-devel] about mediacodec encoder on android platform

2020-03-31 Thread Martin Storsjö
On Tue, 31 Mar 2020, Matthieu Bouron wrote: On Fri, Mar 27, 2020 at 04:21:59PM +0800, aistoy wrote: Hi, I want to know why ffmpeg do not include mediacodec encoder, just include mediacodec decoder. And why the decoder implemention don’t use mediacodec native api, but use jni call mediacodec

Re: [FFmpeg-devel] [PATCH]configure: Remove all C standard versions from the MSVC command line

2020-03-26 Thread Martin Storsjö
On Thu, 26 Mar 2020, Carl Eugen Hoyos wrote: Hi! Attached patch removes an ugly warning shown for every file when using clang-cl.exe. Please comment, Carl Eugen LGTM // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

Re: [FFmpeg-devel] [PATCH]configure: Get the correct ident for clang-cl.exe

2020-03-26 Thread Martin Storsjö
On Thu, 26 Mar 2020, Carl Eugen Hoyos wrote: Hi! Attached patch avoids that ffmpeg claims its compiler was "No input file" when using clang-cl. Please comment, Carl Eugen @@ -4663,7 +4663,11 @@ probe_cc(){ _ld_path='-libpath:' elif $_cc -nologo- 2>&1 | grep -q Microsoft || {

Re: [FFmpeg-devel] [PATCH] libavformat/url: check url root node when rel include double dot

2020-04-27 Thread Martin Storsjö
On Mon, 27 Apr 2020, Steven Liu wrote: fix ticket: 8625 Signed-off-by: Steven Liu --- libavformat/url.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/libavformat/url.c b/libavformat/url.c index 596fb49cfc..e5003f795a 100644 --- a/libavformat/url.c

Re: [FFmpeg-devel] [PATCH v5 3/5] lavc/libopenh264enc: add bit rate control select support

2020-04-28 Thread Martin Storsjö
On Tue, 28 Apr 2020, Fu, Linjie wrote: From: Martin Storsjö Sent: Tuesday, April 28, 2020 18:31 To: FFmpeg development discussions and patches Cc: Fu, Linjie Subject: Re: [FFmpeg-devel] [PATCH v5 3/5] lavc/libopenh264enc: add bit rate control select support On Tue, 28 Apr 2020, Linjie Fu

Re: [FFmpeg-devel] [PATCH v4 5/9] lavc/libopenh264enc: set slice_mode option to deprecated

2020-04-27 Thread Martin Storsjö
On Wed, 15 Apr 2020, Linjie Fu wrote: "slice mode" option seems to be unnecessary since it could be determined by -slices/max_nal_size. default:SM_FIXEDSLCNUM_SLICE mode with cpu-number slices. -slices N: SM_FIXEDSLCNUM_SLICE mode with N slices. -max_nal_size:

Re: [FFmpeg-devel] [PATCH v4 9/9] lavc/libopenh264enc: Add coder option to replace cabac

2020-04-27 Thread Martin Storsjö
On Wed, 15 Apr 2020, Linjie Fu wrote: Set DEPRECATED flag to option cabac, replace with coder. Change the default option to -1 and allow the default cabac to be determined by profile. Add FF_API_OPENH264_CABAC macro for cabac to remove this option after LIBAVCODEC_VERSION_MAJOR = 59.

Re: [FFmpeg-devel] [PATCH v4 2/9] lavc/libopenh264enc: add default gop size and bit rate

2020-04-27 Thread Martin Storsjö
On Wed, 15 Apr 2020, Linjie Fu wrote: It would be 200kbps bitrate with gop size = 12 by default which generated too many IDR frames in rather low bit rate. The quality would be poor. Set these default values according to vaapi encoder, and use 2Mbps bitrate if user doesn't set it explicitly as

Re: [FFmpeg-devel] [PATCH v4 1/9] lavc/libopenh264enc: Add default qmin/qmax support

2020-04-27 Thread Martin Storsjö
On Wed, 15 Apr 2020, Linjie Fu wrote: Set default QP range to (1, 51) instead of (2, 32). QP = 0 is not well supported currently in libopenh264. If iMaxQp/iMinQp equals 0, the QP range would be changed unexpectedly inside libopenh264 with a warning: Warning:Change QP Range from(0,51) to

Re: [FFmpeg-devel] [PATCH v4 3/9] lavc/libopenh264enc: add bit rate control select support

2020-04-27 Thread Martin Storsjö
On Wed, 15 Apr 2020, Linjie Fu wrote: RC_BITRATE_MODE: set BITS_EXCEEDED to iCurrentBitsLevel and allows QP adjust in RcCalculatePictureQp(). RC_BUFFERBASED_MODE: use buffer status to adjust the video quality. RC_TIMESTAMP_MODE: bit rate control based on timestamp. Default to use

Re: [FFmpeg-devel] [PATCH v4 6/9] lavc/libopenh264enc: separate svc_encode_init() into several functions

2020-04-27 Thread Martin Storsjö
On Wed, 15 Apr 2020, Linjie Fu wrote: Separate the initialization procedure into different functions. Make it more readable and easier to be extended. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 283 +++- 1 file changed, 174

Re: [FFmpeg-devel] [PATCH v4 8/9] lavc/libopenh264enc: allow specifying the profile through AVCodecContext

2020-04-27 Thread Martin Storsjö
On Wed, 15 Apr 2020, Linjie Fu wrote: Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 16 1 file changed, 16 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 0fe8cf4..4d337d2 100644 --- a/libavcodec/libopenh264enc.c +++

Re: [FFmpeg-devel] [PATCH v4 4/9] lavc/libopenh264enc: prompt slice number changing inside libopenh264

2020-04-27 Thread Martin Storsjö
On Wed, 15 Apr 2020, Linjie Fu wrote: Libopenh264enc would set the slice according to the number of cpu cores if uiSliceNum equals to 0 (auto) in SM_FIXEDSLCNUM_SLICE mode. Prompt a warning for user to catch this. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 2 ++ 1 file

Re: [FFmpeg-devel] [PATCH v4 7/9] lavc/libopenh264enc: add profile high option support

2020-04-27 Thread Martin Storsjö
On Wed, 15 Apr 2020, Linjie Fu wrote: Add support for PRO_HIGH/PRO_BASELINE in SVC Encoding extention mode, which determined by iEntropyCodingModeFlag in ParamTranscode(). Signed-off-by: Linjie Fu ---

Re: [FFmpeg-devel] [PATCH] fate: hevc: Skip a few large testcases if large tests are disabled

2020-04-25 Thread Martin Storsjö
On Thu, 23 Apr 2020, Martin Storsjö wrote: --- I've seen spurious failures of specifically these tests, in memory constrained setups. --- tests/fate/hevc.mak | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) Will apply soon unless there's any comments - same

Re: [FFmpeg-devel] [PATCH] dnn-layer-mathbinary-test: Fix tests for cases with extra intermediate precision

2020-04-24 Thread Martin Storsjö
On Thu, 23 Apr 2020, Guo, Yejun wrote: -Original Message- From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of Martin Storsj? Sent: Thursday, April 23, 2020 2:34 PM To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] dnn-layer-mathbinary-test: Fix tests for

Re: [FFmpeg-devel] [PATCH] dnn-layer-mathbinary-test: Fix tests for cases with extra intermediate precision

2020-04-24 Thread Martin Storsjö
On Fri, 24 Apr 2020, Guo, Yejun wrote: -Original Message- From: ffmpeg-devel On Behalf Of Martin Storsj? Sent: Friday, April 24, 2020 6:44 PM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] dnn-layer-mathbinary-test: Fix tests for cases with extra

[FFmpeg-devel] [PATCH] dnn-layer-mathbinary-test: Fix tests for cases with extra intermediate precision

2020-04-23 Thread Martin Storsjö
This fixes tests on 32 bit x86 mingw with clang, which uses x87 fpu by default. In this setup, while the get_expected function is declared to return float, the compiler is (especially given the optimization flags set) free to keep the intermediate values (in this case, the return value from the

[FFmpeg-devel] [PATCH] fate: Skip the dnxhd-uhd-hr-sq tests of large tests are disabled

2020-04-23 Thread Martin Storsjö
These tests are also in the same size range as the previously skipped 2k and 4k tests. --- tests/fate/vcodec.mak | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak index fc27da5456..ec2a9c339d 100644 --- a/tests/fate/vcodec.mak

[FFmpeg-devel] [PATCH] fate: hevc: Skip a few large testcases if large tests are disabled

2020-04-23 Thread Martin Storsjö
--- I've seen spurious failures of specifically these tests, in memory constrained setups. --- tests/fate/hevc.mak | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/fate/hevc.mak b/tests/fate/hevc.mak index 35af3e43ac..65c5a262e9 100644 ---

Re: [FFmpeg-devel] [PATCH v4 2/9] lavc/libopenh264enc: add default gop size and bit rate

2020-04-28 Thread Martin Storsjö
On Tue, 28 Apr 2020, Fu, Linjie wrote: From: Martin Storsjö Sent: Tuesday, April 28, 2020 14:28 To: Fu, Linjie Cc: FFmpeg development discussions and patches Subject: RE: [FFmpeg-devel] [PATCH v4 2/9] lavc/libopenh264enc: add default gop size and bit rate On Tue, 28 Apr 2020, Fu, Linjie

Re: [FFmpeg-devel] [PATCH v4 1/9] lavc/libopenh264enc: Add default qmin/qmax support

2020-04-28 Thread Martin Storsjö
On Tue, 28 Apr 2020, Fu, Linjie wrote: From: Martin Storsjö Sent: Tuesday, April 28, 2020 03:27 If qmax/qmin < 0, i.e. wasn't specified by the user, wouldn't it be better to not touch param.iMax/MinQp at all (and use the default value of the library, which may change between versi

Re: [FFmpeg-devel] [PATCH v4 2/9] lavc/libopenh264enc: add default gop size and bit rate

2020-04-28 Thread Martin Storsjö
On Tue, 28 Apr 2020, Fu, Linjie wrote: From: Martin Storsjö Sent: Tuesday, April 28, 2020 03:28 static const AVCodecDefault svc_enc_defaults[] = { +{ "b", "0" }, +{ "g", "120" }, { "qmin", "-1&q

Re: [FFmpeg-devel] [PATCH v4 1/9] lavc/libopenh264enc: Add default qmin/qmax support

2020-04-28 Thread Martin Storsjö
On Tue, 28 Apr 2020, Fu, Linjie wrote: From: Martin Storsjö Sent: Tuesday, April 28, 2020 14:19 To: Fu, Linjie Cc: FFmpeg development discussions and patches Subject: RE: [FFmpeg-devel] [PATCH v4 1/9] lavc/libopenh264enc: Add default qmin/qmax support On Tue, 28 Apr 2020, Fu, Linjie wrote

Re: [FFmpeg-devel] [PATCH v4 1/9] lavc/libopenh264enc: Add default qmin/qmax support

2020-04-28 Thread Martin Storsjö
On Tue, 28 Apr 2020, Fu, Linjie wrote: From: ffmpeg-devel On Behalf Of Martin Storsjö Sent: Tuesday, April 28, 2020 14:31 To: Fu, Linjie Cc: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH v4 1/9] lavc/libopenh264enc: Add default qmin/qmax support On Tue, 28

Re: [FFmpeg-devel] [PATCH v5 2/5] lavc/libopenh264enc: add default gop size and bit rate

2020-04-28 Thread Martin Storsjö
On Tue, 28 Apr 2020, Linjie Fu wrote: It would be 200kbps bitrate with gop size = 12 by default which generated too many IDR frames in rather low bit rate. The quality would be poor. Set these default values to -1 to check whether it's specified by user explicitly. Use 2Mbps bitrate as nvenc

Re: [FFmpeg-devel] [PATCH v5 1/5] lavc/libopenh264enc: Add qmin/qmax support

2020-04-28 Thread Martin Storsjö
On Tue, 28 Apr 2020, Linjie Fu wrote: Clip iMinQp/iMaxQp to (1, 51) if user specified qp range explicitly since QP = 0 is not well supported currently in libopenh264, otherwise leave iMinQp/iMaxQp untouched and use the values initialized in FillDefault(). I'd suggest changing the commit

Re: [FFmpeg-devel] [PATCH v5 3/5] lavc/libopenh264enc: add bit rate control select support

2020-04-28 Thread Martin Storsjö
On Tue, 28 Apr 2020, Linjie Fu wrote: RC_BITRATE_MODE: set BITS_EXCEEDED to iCurrentBitsLevel and allows QP adjust in RcCalculatePictureQp(). RC_BUFFERBASED_MODE: use buffer status to adjust the video quality, introduced in release 1.2. RC_TIMESTAMP_MODE: bit rate control based

Re: [FFmpeg-devel] [PATCH v5 5/5] lavc/libopenh264enc: set slice_mode option to deprecated

2020-04-28 Thread Martin Storsjö
On Tue, 28 Apr 2020, Linjie Fu wrote: "slice mode" option seems to be unnecessary since it could be determined by -slices/max_nal_size. default:SM_FIXEDSLCNUM_SLICE mode with cpu-number slices. -slices N: SM_FIXEDSLCNUM_SLICE mode with N slices. -max_nal_size:

Re: [FFmpeg-devel] [PATCH v5 4/5] lavc/libopenh264enc: prompt slice number changing inside libopenh264

2020-04-28 Thread Martin Storsjö
On Tue, 28 Apr 2020, Linjie Fu wrote: Libopenh264enc would set the slice according to the number of cpu cores if uiSliceNum equals to 0 (auto) in SM_FIXEDSLCNUM_SLICE mode. Prompt a warning for user to catch this. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 2 ++ 1 file

Re: [FFmpeg-devel] [PATCH v6 5/5] lavc/libopenh264enc: set slice_mode option to deprecated

2020-04-29 Thread Martin Storsjö
On Wed, 29 Apr 2020, Linjie Fu wrote: "slice mode" option seems to be unnecessary since it could be determined by -slices/max_nal_size. default:SM_FIXEDSLCNUM_SLICE mode with cpu-number slices. -slices N: SM_FIXEDSLCNUM_SLICE mode with N slices. -max_nal_size:

Re: [FFmpeg-devel] [PATCH v6 4/5] lavc/libopenh264enc: prompt slice number changing inside libopenh264

2020-04-29 Thread Martin Storsjö
On Wed, 29 Apr 2020, Linjie Fu wrote: Libopenh264enc would set the slice according to the number of cpu cores if uiSliceNum equals to 0 (auto) in SM_FIXEDSLCNUM_SLICE mode. Prompt a warning for user to catch this. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 2 ++ 1 file

Re: [FFmpeg-devel] [PATCH v6 1/5] lavc/libopenh264enc: Add qmin/qmax support

2020-04-29 Thread Martin Storsjö
On Wed, 29 Apr 2020, Linjie Fu wrote: Clip iMinQp/iMaxQp to (1, 51) for user specified qp range. If not set, leave iMinQp/iMaxQp untouched and use the values (0, 51) initialized in FillDefault(), and the QP range would be adjusted to the defaults inside libopenh264 library according to the

Re: [FFmpeg-devel] [PATCH v6 2/5] lavc/libopenh264enc: add default gop size and bit rate

2020-04-29 Thread Martin Storsjö
On Wed, 29 Apr 2020, Linjie Fu wrote: It would be 200kbps bitrate with gop size = 12 by default which generated too many IDR frames in rather low bit rate. The quality would be poor. Set these default values to -1 to check whether it's specified by user explicitly. Use 2Mbps bitrate as nvenc

Re: [FFmpeg-devel] [PATCH v6 3/5] lavc/libopenh264enc: add bit rate control select support

2020-04-29 Thread Martin Storsjö
On Wed, 29 Apr 2020, Linjie Fu wrote: RC_BITRATE_MODE: set BITS_EXCEEDED to iCurrentBitsLevel and allows QP adjust in RcCalculatePictureQp(). RC_BUFFERBASED_MODE: use buffer status to adjust the video quality. RC_TIMESTAMP_MODE: bit rate control based on timestamp, introduced in

[FFmpeg-devel] [PATCH] avfoundation: Fix building on iOS

2020-04-30 Thread Martin Storsjö
Apparently the changes from 3c9185bf3a83395d12a987f626dbdb985eac4320 aren't enough; even with that in place, I got errors like this when trying to build for iOS: src/libavdevice/avfoundation.m:135:5: error: 'AVCaptureDeviceTransportControlsPlaybackMode' is unavailable: not available

Re: [FFmpeg-devel] [FFmpeg-cvslog] avfilter/af_amix: use av_strtod() for weights

2020-04-14 Thread Martin Storsjö
On Tue, 14 Apr 2020, Paul B Mahol wrote: ffmpeg | branch: master | Paul B Mahol | Tue Apr 14 12:38:47 2020 +0200| [10a68ccd58318c00c7872081a0518acec7ebe6c3] | committer: Paul B Mahol avfilter/af_amix: use av_strtod() for weights

[FFmpeg-devel] [PATCH] avcodec: Add MediaFoundation encoder wrapper

2020-05-09 Thread Martin Storsjö
for splitting out the encoding parts of the original patch) and further cleanup, build compatibility fixes and tweaks for use with Qualcomm encoders by Martin Storsjö. --- This allows access to the HW video encoder on Windows on ARM64 on Qualcomm platforms. However, to actually use that, one has to manually

[FFmpeg-devel] [PATCH] pixblockdsp, avdct: Add get_pixels_unaligned

2020-05-12 Thread Martin Storsjö
Use this in vf_spp.c, where the get_pixels operation is done on unaligned source addresses. This fixes fate-filter-spp on armv7. --- People more familiar with the other assembly implementations of get_pixels (in particular, x86) can hook them up to get_pixels_unaligned if unaligned use explicitly

Re: [FFmpeg-devel] [PATCH v5 1/3] lavc/libopenh264enc: Rewrite profile handling

2020-05-12 Thread Martin Storsjö
On Wed, 6 May 2020, Linjie Fu wrote: Support the profiles "constrained_baseline" and "high" for libopenh264 version >= 1.8, support "constrained_baseline" and "main" for earlier version. If option not supported with current version, convert to constrained baseline with a warning for users.

Re: [FFmpeg-devel] [PATCH v5 2/3] lavc/libopenh264enc: Allow specifying the profile through AVCodecContext

2020-05-12 Thread Martin Storsjö
On Wed, 6 May 2020, Linjie Fu wrote: And determine the profile with following priority: 1. s->profile; then 2. avctx->profile; then 3. s->cabac; then 4. a default profile. This seems more natural in case user somehow sets both avctx->profile and s->profile. Signed-off-by: Linjie Fu ---

Re: [FFmpeg-devel] [PATCH] avcodec: Add MediaFoundation encoder wrapper

2020-05-12 Thread Martin Storsjö
On Sun, 10 May 2020, Lou Logan wrote: On Sat, May 9, 2020, at 1:41 PM, Martin Storsjö wrote: + --enable-mf enable decoding via MediaFoundation [auto] encoding/decoding typo I presume. Good catch, thanks. (The original patch supported both, but for now it's thinned down

[FFmpeg-devel] [PATCH v2] avcodec: Add MediaFoundation encoder wrapper

2020-05-12 Thread Martin Storsjö
for splitting out the encoding parts of the original patch) and further cleanup, build compatibility fixes and tweaks for use with Qualcomm encoders by Martin Storsjö. --- v2: Added AV_CODEC_CAP_HYBRID, removed a leftover unused AVBSFContext, added changelog and encoders.text entries, renamed the configure

Re: [FFmpeg-devel] [PATCH v5 3/3] lavc/libopenh264enc: Add coder option to replace cabac

2020-05-12 Thread Martin Storsjö
On Wed, 6 May 2020, Linjie Fu wrote: Set DEPRECATED flag to option cabac, replace with coder. The priority logic is: 1. s->coder; then 2. avctx->coder_type; then 3. s->cabac. Change the default option to -1 and allow the default cabac to be determined by profile. Add FF_API_OPENH264_CABAC

Re: [FFmpeg-devel] [PATCH] avcodec: Add MediaFoundation encoder wrapper

2020-05-12 Thread Martin Storsjö
On Sun, 10 May 2020, James Almer wrote: On 5/9/2020 6:41 PM, Martin Storsjö wrote: +#define MF_ENCODER(MEDIATYPE, NAME, ID, OPTS, EXTRA) \ +static const AVClass ff_ ## NAME ## _mf_encoder_class = { \ +.class_name = #NAME &quo

Re: [FFmpeg-devel] [PATCH] avcodec: Add MediaFoundation encoder wrapper

2020-05-12 Thread Martin Storsjö
On Sun, 10 May 2020, Marton Balint wrote: On Sun, 10 May 2020, Martin Storsjö wrote: From: wm4 This contains encoder wrappers for H264, HEVC, AAC, AC3 and MP3. This is based on top of an original patch by wm4 . The original patch supported both encoding and decoding, but this patch only

Re: [FFmpeg-devel] [PATCH v2] checkasm: add hscale test

2020-05-13 Thread Martin Storsjö
On Wed, 13 May 2020, Josh de Kock wrote: This tests the hscale 8bpp to 14bpp functions with different filter sizes. Signed-off-by: Josh de Kock --- Should address all previous comments. tests/checkasm/Makefile | 2 +- tests/checkasm/checkasm.c | 1 + tests/checkasm/checkasm.h | 1 +

Re: [FFmpeg-devel] [PATCH] avcodec: Add MediaFoundation encoder wrapper

2020-05-10 Thread Martin Storsjö
On Sun, 10 May 2020, Paul B Mahol wrote: What's next? Decoders? I probably won't put in effort in getting the MediaFoundation decoder support merged myself, but if this is merged, I can at least try to make a WIP patch somewhere that adds the rest of the decoding support from the original

[FFmpeg-devel] [PATCH v2 2/2] swscale: aarch64: Add a NEON implementation of interleaveBytes

2020-05-15 Thread Martin Storsjö
This allows speeding up format conversions from yuv420 to nv12. Cortex A53 A72 A73 interleave_bytes_c: 86077.5 51433.0 66972.0 interleave_bytes_neon: 19701.7 23019.2 15859.2 interleave_bytes_aligned_c: 86603.0 52017.2 67484.2

[FFmpeg-devel] [PATCH v2 1/2] checkasm: sw_rgb: Add a test for interleaveBytes

2020-05-15 Thread Martin Storsjö
--- This depends on "checkasm: Add functions for printing pixel buffers". The existing x86 implementations of interleaveBytes seem to slow down significantly for unaligned copies (GCC 7.5, Sandy Bridge): interleave_bytes_c: 36251.6 interleave_bytes_mmx:10038.8 interleave_bytes_mmxext:

[FFmpeg-devel] [PATCH] swscale: fix arm NEON hscale init

2020-05-15 Thread Martin Storsjö
-by: Martin Storsjö --- libswscale/arm/swscale.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libswscale/arm/swscale.c b/libswscale/arm/swscale.c index 1ec360fe24..7b8fbcbc79 100644 --- a/libswscale/arm/swscale.c +++ b/libswscale/arm/swscale.c @@ -34,7 +34,10 @@ av_cold void

Re: [FFmpeg-devel] [PATCH 3/3] libavcodec: aarch64: Add a NEON implementation of pixblockdsp

2020-05-15 Thread Martin Storsjö
On Wed, 13 May 2020, Martin Storsjö wrote: Cortex A53A72A73 get_pixels_c:140.7 87.7 72.5 get_pixels_neon: 46.0 20.0 19.5 get_pixels_unaligned_c: 140.7 87.7 73.0 get_pixels_unaligned_neon:49.2 20.2 26.2

Re: [FFmpeg-devel] [PATCH 5/5] checkasm: aarch64: Check for stack overflows

2020-05-15 Thread Martin Storsjö
On Fri, 15 May 2020, Henrik Gramner wrote: All 5 lgtm. Thanks, pushed. // Martin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email

Re: [FFmpeg-devel] [PATCH] checkasm: Add functions for printing pixel buffers

2020-05-14 Thread Martin Storsjö
On Thu, 14 May 2020, Josh de Kock wrote: From: Martin Storsjö This was ported from dav1d (c950e7101bdf5f7117bfca816984a21e550509f0). Signed-off-by: Josh de Kock --- tests/checkasm/checkasm.c | 42 +++ tests/checkasm/checkasm.h | 16 +++ 2 files

[FFmpeg-devel] [PATCH 2/5] checkasm: arm: Make the indentation consistent with other files

2020-05-14 Thread Martin Storsjö
This makes it easier to share code with e.g. the dav1d implementation of checkasm. --- tests/checkasm/aarch64/checkasm.S | 196 +++--- tests/checkasm/arm/checkasm.S | 144 +++--- 2 files changed, 170 insertions(+), 170 deletions(-) diff --git

[FFmpeg-devel] [PATCH 1/5] aarch64: Explicitly forbid using the x18 register

2020-05-14 Thread Martin Storsjö
On windows and darwin (and modern android), the x18 register is reserved and shouldn't be modified by user code, while it is freely available on linux. Strictly avoid it, to keep the assembly code portable. This would have helped catch the issue fixed in 872790b1f9be6 immediately. ---

[FFmpeg-devel] [PATCH 3/5] checkasm: arm: Don't use blx to call checkasm_fail_func

2020-05-14 Thread Martin Storsjö
We should just use a normal bl here, and the linker will add the 'x' bit if necessary. This fixes calling the checkasm_fail_func on windows, where the code is built in thumb mode (and the linker doesn't clear the 'x' bit in the blx instruction). --- tests/checkasm/arm/checkasm.S | 2 +- 1 file

[FFmpeg-devel] [PATCH 5/5] checkasm: aarch64: Check for stack overflows

2020-05-14 Thread Martin Storsjö
Also fill x8-x17 with garbage before calling the function. Figure out the number of stack parameters and make sure that the value on the stack after those is untouched. --- tests/checkasm/aarch64/checkasm.S | 47 +-- tests/checkasm/checkasm.h | 7 +++-- 2

[FFmpeg-devel] [PATCH 4/5] checkasm: arm: Check for stack overflows

2020-05-14 Thread Martin Storsjö
Figure out the number of stack parameters and make sure that the value on the stack after those is untouched. --- tests/checkasm/arm/checkasm.S | 35 --- tests/checkasm/checkasm.h | 6 -- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git

Re: [FFmpeg-devel] [PATCH v3] checkasm: add hscale test

2020-05-15 Thread Martin Storsjö
On Thu, 14 May 2020, Josh de Kock wrote: This tests the hscale 8bpp to 14bpp functions with different filter sizes. ^ 8bpp to 14, and to 18, right? Signed-off-by: Josh de Kock --- Adds support for checking corner cases for signed and large coefficients. Also makes the padded coefficients

Re: [FFmpeg-devel] [PATCH v2] avcodec: Add MediaFoundation encoder wrapper

2020-05-15 Thread Martin Storsjö
On Tue, 12 May 2020, Martin Storsjö wrote: From: wm4 This contains encoder wrappers for H264, HEVC, AAC, AC3 and MP3. This is based on top of an original patch by wm4 . The original patch supported both encoding and decoding, but this patch only includes encoding. The patch contains further

[FFmpeg-devel] [PATCH 1/2] checkasm: sw_rgb: Add a test for interleaveBytes

2020-05-15 Thread Martin Storsjö
--- This depends on "checkasm: Add functions for printing pixel buffers". The existing x86 implementations of interleaveBytes seem to slow down significantly for unaligned copies (GCC 7.5, Sandy Bridge): interleave_bytes_c: 36251.6 interleave_bytes_mmx:10038.8 interleave_bytes_mmxext:

[FFmpeg-devel] [PATCH 2/2] swscale: aarch64: Add a NEON implementation of interleaveBytes

2020-05-15 Thread Martin Storsjö
This allows speeding up format conversions from yuv420 to nv12. Cortex A53 A72 A73 interleave_bytes_c: 86077.5 51433.0 66972.0 interleave_bytes_neon: 19701.7 23019.2 15859.2 interleave_bytes_aligned_c: 86603.0 52017.2 67484.2

Re: [FFmpeg-devel] [PATCH v3] checkasm: add hscale test

2020-05-15 Thread Martin Storsjö
On Thu, 14 May 2020, Josh de Kock wrote: This tests the hscale 8bpp to 14bpp functions with different filter sizes. Signed-off-by: Josh de Kock --- Adds support for checking corner cases for signed and large coefficients. Also makes the padded coefficients random data. Tested on x86_64 and

[FFmpeg-devel] [PATCH 3/3] libavcodec: aarch64: Add a NEON implementation of pixblockdsp

2020-05-13 Thread Martin Storsjö
Cortex A53A72A73 get_pixels_c:140.7 87.7 72.5 get_pixels_neon: 46.0 20.0 19.5 get_pixels_unaligned_c: 140.7 87.7 73.0 get_pixels_unaligned_neon:49.2 20.2 26.2 diff_pixels_c: 209.7 133.7 138.7

[FFmpeg-devel] [PATCH 1/3] checkasm: pixblockdsp: Add tests for get_pixels_unaligned and diff_pixels_unaligned

2020-05-13 Thread Martin Storsjö
--- tests/checkasm/pixblockdsp.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/checkasm/pixblockdsp.c b/tests/checkasm/pixblockdsp.c index e14b0a90de..79ab156d45 100644 --- a/tests/checkasm/pixblockdsp.c +++ b/tests/checkasm/pixblockdsp.c @@ -44,13

[FFmpeg-devel] [PATCH 2/3] libavcodec: arm: Add a NEON implementation of pixblockdsp

2020-05-13 Thread Martin Storsjö
Cortex A7 A8 A9A53 A72 get_pixels_c:144.7 146.0 143.0 137.7 69.0 get_pixels_armv6:112.0 106.7 90.2 95.0 72.5 get_pixels_neon: 69.0 29.7 68.7 40.2 19.0 get_pixels_unaligned_c: 144.7 146.2

Re: [FFmpeg-devel] [WIP PATCH 2/2] checkasm: add hscale test

2020-05-07 Thread Martin Storsjö
On Thu, 7 May 2020, Josh de Kock wrote: This tests the hscale 8bpp to 14bpp functions with different filter sizes. Signed-off-by: Josh de Kock --- Not quite ready to be committed but I wanted to submit it anyway so I could get some comments. I still need to do the rest of the scale sizes

Re: [FFmpeg-devel] [PATCH, RFC] lavc/options_table: Add basic candidate h264 profiles

2020-05-06 Thread Martin Storsjö
On Wed, 6 May 2020, Linjie Fu wrote: Allows specifying avctx->profile with string type profile for h264 encoders. Private field/option "profile" may be abled to be removed for basic h264 profiles, directly for encoders like libopenh264/h264_vaapi, or with an map to hardware profile like

Re: [FFmpeg-devel] [PATCH] pixblockdsp, avdct: Add get_pixels_unaligned

2020-05-12 Thread Martin Storsjö
On Tue, 12 May 2020, Michael Niedermayer wrote: On Tue, May 12, 2020 at 11:25:34AM +0300, Martin Storsjö wrote: Use this in vf_spp.c, where the get_pixels operation is done on unaligned source addresses. This fixes fate-filter-spp on armv7. LGTM --- People more familiar with the other

Re: [FFmpeg-devel] [PATCH 2/2] Use gcc/clang builtins for av_sat_(add|sub)_64_c if available.

2020-05-20 Thread Martin Storsjö
On Wed, 20 May 2020, James Almer wrote: On 5/20/2020 5:17 AM, Michael Niedermayer wrote: On Mon, May 18, 2020 at 03:24:59PM -0700, Dale Curtis wrote: On Mon, May 18, 2020 at 3:24 PM Dale Curtis wrote: On Mon, May 18, 2020 at 2:22 PM Michael Niedermayer wrote:

Re: [FFmpeg-devel] [PATCH v2] avcodec: Add MediaFoundation encoder wrapper

2020-05-19 Thread Martin Storsjö
On Mon, 18 May 2020, Aman Gupta wrote: On Fri, May 15, 2020 at 12:04 AM Martin Storsjö wrote: On Tue, 12 May 2020, Martin Storsjö wrote: > From: wm4 > > This contains encoder wrappers for H264, HEVC, AAC, AC3 and MP3. > > This is based on top of an original patch by wm4 &

[FFmpeg-devel] [PATCH] mfenc: Fall back to avctx->time_base if avctx->framerate isn't set

2020-05-20 Thread Martin Storsjö
The framerate field is the one users are supposed to set, but not all users might be setting it, so it might be good to fall back time_base in that case. --- libavcodec/mfenc.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c

[FFmpeg-devel] [PATCH] mfenc: Fix setting has_b_frames for max_b_frames == 1

2020-05-20 Thread Martin Storsjö
This was a mistake in my own additions in 050b72ab5ef318605b305aa6cb920e8b52f1002e. --- libavcodec/mfenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c index dd8188dae3..e62ae4019a 100644 --- a/libavcodec/mfenc.c +++

[FFmpeg-devel] [PATCH] movenc: Try to extract extradata from the first H264/HEVC packet, if none is set

2020-05-19 Thread Martin Storsjö
Some encoders don't provide split out extradata directly on init (or at all). In particular, the MediaFoundation encoder wrapper doesn't always (depending on the actual encoder device) - this is the case for Qualcomm's HEVC encoder on SD835, and also on some QSV H264 encoders). This only works

Re: [FFmpeg-devel] [PATCH] movenc: Try to extract extradata from the first H264/HEVC packet, if none is set

2020-05-19 Thread Martin Storsjö
On Tue, 19 May 2020, James Almer wrote: On 5/19/2020 5:57 PM, Martin Storsjö wrote: Some encoders don't provide split out extradata directly on init (or at all). In particular, the MediaFoundation encoder wrapper doesn't always (depending on the actual encoder device) - this is the case

[FFmpeg-devel] [PATCH] cbs_h265: Fix use of an uninitialized variable

2020-05-21 Thread Martin Storsjö
This fixes test failures in fate-cbs-hevc-* in certain configurations since c53f9f436440be4e18. --- Not sure if this is what was intended, but the current code doesn't work at least. --- libavcodec/cbs_h265_syntax_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [FFmpeg-devel] [PATCH v2] movenc: Use first H264/HEVC frame as extradata, if it is missing

2020-05-21 Thread Martin Storsjö
On Thu, 21 May 2020, Michael Niedermayer wrote: On Wed, May 20, 2020 at 09:10:21AM +0300, Martin Storsjö wrote: Sticking a full frame in the extradata works, as the code for writing the avcC/hvcC extracts the relevant parameter set NAL units - provided that they actually exist in the frame

[FFmpeg-devel] [PATCH] movenc: Fix conversion of the first frame for extradata-less H264/HEVC

2020-05-21 Thread Martin Storsjö
Move the copying of the frame to vos_data further up in the function, so that when writing the actual frame data for the first frame, it's clear that the stream really is in annex b format, for the cases where we create extradata from the first frame. Alternatively - we could invert the checks

Re: [FFmpeg-devel] [PATCH v2] movenc: Use first H264/HEVC frame as extradata, if it is missing

2020-05-21 Thread Martin Storsjö
On Thu, 21 May 2020, Andreas Rheinhardt wrote: Martin Storsjö: On Thu, 21 May 2020, Andreas Rheinhardt wrote: Martin Storsjö: On Thu, 21 May 2020, Michael Niedermayer wrote: On Wed, May 20, 2020 at 09:10:21AM +0300, Martin Storsjö wrote: Sticking a full frame in the extradata works

Re: [FFmpeg-devel] [PATCH v2] movenc: Use first H264/HEVC frame as extradata, if it is missing

2020-05-21 Thread Martin Storsjö
On Thu, 21 May 2020, Andreas Rheinhardt wrote: Martin Storsjö: On Thu, 21 May 2020, Michael Niedermayer wrote: On Wed, May 20, 2020 at 09:10:21AM +0300, Martin Storsjö wrote: Sticking a full frame in the extradata works, as the code for writing the avcC/hvcC extracts the relevant parameter

[FFmpeg-devel] [PATCH] x86: cabac: Disable the inline asm on clang on windows on i386

2020-05-23 Thread Martin Storsjö
The cabac inline assembly is very brittle to assemble properly on i386 windows with clang; libavcodec/hevc_cabac.c fails to build in the default mode (which is -march=pentium4), it only works if ffmpeg is configured with --cpu=i686 (translating to -march=i686), and likewise, the inline assembly

Re: [FFmpeg-devel] [aarch64] yuv2planeX - unroll outer loop by 4 to increase performance by 6.3%

2020-09-14 Thread Martin Storsjö
Hi, On Tue, 18 Aug 2020, Sebastian Pop wrote: Unrolling by 4 the outer loop in yuv2planeX reduces the number of cache accesses by 7.5%. The values loaded for the filter are used in the 4 unrolled iterations and avoids reloading 3 times the same values. The performance was measured on an Arm64

Re: [FFmpeg-devel] [PATCH v2] avformat/movenc: handle tracks w/o AVStreams in calculate_mpeg4_bit_rates

2020-10-02 Thread Martin Storsjö
On Mon, 28 Sep 2020, Jan Ekström wrote: The generated text streams for chapters lack an AVStream since they are but an internal concept within movenc. Fixes #8190 --- libavformat/movenc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/movenc.c

Re: [FFmpeg-devel] [PATCH 1/6] avformat/rtpdec: update the previous with new seq

2020-10-14 Thread Martin Storsjö
On Wed, 14 Oct 2020, lance.lmw...@gmail.com wrote: From: Limin Wang If the rtp input is discontinued, we'll drop all the new received packets now, It's better to update the previous seq with the new seq so that the following packets will not be dropped always. Signed-off-by: Limin Wang ---

Re: [FFmpeg-devel] [PATCH v2] avformat/http, tls: honor http_proxy command line variable for HTTPS

2020-08-21 Thread Martin Storsjö
Hej Moritz, On Fri, 21 Aug 2020, Moritz Barsnick wrote: Patch version 2 attached, with added documentation. LGTM, with one small nit: @@ -49,6 +50,7 @@ typedef struct TLSShared { {"cert_file", "Certificate file",offsetof(pstruct, options_field . cert_file),

Re: [FFmpeg-devel] [PATCH] libavformat/http, tls: honor http_proxy command line variable for HTTPS

2020-08-20 Thread Martin Storsjö
Hej, On Thu, 20 Aug 2020, Moritz Barsnick wrote: Hej Martin, On Thu, Aug 20, 2020 at 22:05:39 +0300, Martin Storsjö wrote: Even if you do e.g. a plain tls socket (or rtmps, or whatever), you may want to do the tls connection through a proxy server (be that a socks proxy or http proxy

Re: [FFmpeg-devel] [PATCH] libavformat/http, tls: honor http_proxy command line variable for HTTPS

2020-08-20 Thread Martin Storsjö
On Thu, 20 Aug 2020, Moritz Barsnick wrote: Add the "http_proxy" option and its handling to the "tls" protocol, pass the option from the "https" protocol. The "https" protocol already defines the "http_proxy" command line option, like the "http" protocol does. The "http" protocol properly

Re: [FFmpeg-devel] [PATCH v3] avformat/http, tls: honor http_proxy command line variable for HTTPS

2020-08-23 Thread Martin Storsjö
On Sun, 23 Aug 2020, Moritz Barsnick wrote: Hej igen, On Fri, Aug 21, 2020 at 12:19:06 +0300, Martin Storsjö wrote: LGTM, with one small nit: [...] {"listen", "Listen for incoming connections", offsetof(pstruct, options_field . listen),AV_OPT_TYPE_INT

Re: [FFmpeg-devel] [PATCH v3 1/2] avformat/rtsp: fix infinite loop with udp transport

2020-09-30 Thread Martin Storsjö
Hi, On Sun, 27 Sep 2020, Zhao Zhili wrote: Fix #8840. Steps to reproduce: 1. sender: ./ffmpeg -i test.mp4 -c copy -f rtsp -rtsp_transport udp rtsp://localhost:12345/live.sdp 2. receiver: ./ffmpeg_g -y -rtsp_flags listen -timeout 100 -i rtsp://localhost:12345/live.sdp -c copy test.mp4 ---

[FFmpeg-devel] [PATCH] rtsp: Fix infinite loop in listen mode with UDP transport

2020-09-30 Thread Martin Storsjö
In listen mode with UDP transport, once the sender has sent the TEARDOWN and closed the connection, poll will indicate that one can read from the connection (indicating that the socket has reached EOF and should be closed by the receiver as well). In this case, parse_rtsp_message won't try to

Re: [FFmpeg-devel] [PATCH v3 2/2] avformat/rtsp: fix parse_rtsp_message

2020-09-30 Thread Martin Storsjö
On Sun, 27 Sep 2020, Zhao Zhili wrote: 1. Remove the assumption that the message method is TEARDOWN. 2. Don't ignore the error code of ff_rtsp_parse_streaming_commands. --- libavformat/rtsp.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavformat/rtsp.c

Re: [FFmpeg-devel] [PATCH v2 3/5] avformat/movenc: implement writing of the btrt box

2020-09-22 Thread Martin Storsjö
On Mon, 21 Sep 2020, Jan Ekström wrote: This is utilized by various media ingests to figure out the bit rate of the content you are pushing towards it, so write it by default for video, audio and subtitle tracks. It is only mentioned for timed metadata sample descriptions in QTFF, so limit it

Re: [FFmpeg-devel] [GASPP PATCH 2/2] Use cl for preprocessing when using armasm

2020-09-25 Thread Martin Storsjö
On Wed, 23 Sep 2020, Martin Storsjö wrote: When invoking gas-preprocessor to preprocess only to get the dependency list, we still need to use cpp, as cl doesn't support the -M options. This allows using gas-preprocessor in an environment with only MSVC available, no GCC/Clang providing

[FFmpeg-devel] [GASPP PATCH] Handle a trailing flags field for .rodata, like '.section .rodata, "r"'

2020-09-23 Thread Martin Storsjö
--- gas-preprocessor.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index e51849b..bc36300 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -1204,7 +1204,7 @@ sub handle_serialized_line { $line =~

[FFmpeg-devel] [GASPP PATCH 1/2] Handle line continuations within gas-preprocessor

2020-09-23 Thread Martin Storsjö
If preprocessing with cl.exe, the preprocessor doesn't take care of concatenating continued lines. --- gas-preprocessor.pl | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index 126ee50..e9baeba 100755 ---

[FFmpeg-devel] [GASPP PATCH 2/2] Use cl for preprocessing when using armasm

2020-09-23 Thread Martin Storsjö
When invoking gas-preprocessor to preprocess only to get the dependency list, we still need to use cpp, as cl doesn't support the -M options. This allows using gas-preprocessor in an environment with only MSVC available, no GCC/Clang providing a cpp.exe, allowing building e.g. dav1d with MSVC

Re: [FFmpeg-devel] [PATCH] rtsp: Fix infinite loop in listen mode with UDP transport

2020-09-30 Thread Martin Storsjö
On Wed, 30 Sep 2020, Zhao Zhili wrote: Hi Martin, On 9/30/20 5:41 PM, Martin Storsjö wrote: In listen mode with UDP transport, once the sender has sent the TEARDOWN and closed the connection, poll will indicate that one can read from the connection (indicating that the socket has reached EOF

Re: [FFmpeg-devel] [PATCH] avformat/movenc: Fix stack overflow when remuxing timecode tracks

2020-10-01 Thread Martin Storsjö
On Wed, 30 Sep 2020, Andreas Rheinhardt wrote: There are two possible kinds of timecode tracks (with tag "tmcd") in the mov muxer: Tracks created internally by the muxer and timecode tracks sent by the user. If any of the latter exists, the former are deactivated. The former all belong to

Re: [FFmpeg-devel] [PATCH v3 1/2] avformat/rtsp: fix infinite loop with udp transport

2020-10-01 Thread Martin Storsjö
Hi, On Thu, 1 Oct 2020, Andriy Gelman wrote: On Wed, 30. Sep 12:41, Martin Storsjö wrote: Hi, On Sun, 27 Sep 2020, Zhao Zhili wrote: > Fix #8840. > > Steps to reproduce: > 1. sender: > ./ffmpeg -i test.mp4 -c copy -f rtsp -rtsp_transport udp rtsp://localhost:12345/live.sd

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