[FFmpeg-devel] [PATCH] avformat/utils fix calculating wrong bitrate on HLS, DASH stream

2020-07-17 Thread Dongwon Kim
Signed-off-by: Dongwon Kim Signed-off-by: Dongwon Kim --- libavformat/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 807d9f10cb..e90467e2e0 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2715,7 +2715,8

[FFmpeg-devel] [PATCH] avformat/utils fix calculating wrong bitrate on HLS, DASH stream

2020-07-17 Thread Dongwon Kim
Signed-off-by: Dongwon Kim --- libavformat/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 807d9f10cb..e90467e2e0 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2715,7 +2715,8 @@ static void update_strea

Re: [FFmpeg-devel] [PATCH] avformat/utils fix calculating wrong bitrate on HLS, DASH stream

2020-07-17 Thread Dongwon Kim
"filesize" variable is size of MPD file(MPEG-DASH) or M3U8 playlist file(HLS). So, the bitrate is calculated deviding size of playlist or manifest file(not segment files) by duration. On Fri, Jul 17, 2020 at 05:21:42PM +0900, Dongwon Kim wrote: > Signed-off-by: Dongwon Kim > Signed-off-by: Don

Re: [FFmpeg-devel] [PATCH 1/4] avformat/au: Store strings instead of pointers to strings in array

2020-07-17 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- > libavformat/au.c | 13 ++--- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/libavformat/au.c b/libavformat/au.c > index f92863e400..b419c9ed95 100644 > --- a/libavformat/au.c > +++ b/libavformat/au.c > @@

Re: [FFmpeg-devel] [PATCH] avfilter: add radial and circular blur video filter

2020-07-17 Thread Paul B Mahol
Will apply. On 7/12/20, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol > --- > doc/filters.texi | 46 > libavfilter/Makefile | 2 + > libavfilter/allfilters.c | 2 + > libavfilter/vf_rblur.c | 476 +++ > 4 files changed, 526 inserti

Re: [FFmpeg-devel] [PATCH] avfilter: add radial and circular blur video filter

2020-07-17 Thread Steinar H. Gunderson
On Sun, Jul 12, 2020 at 01:01:07PM +0200, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol Do you have any benchmarks on this? Or image samples? It looks like you are transforming to polar coordinates, doing a box blur and then transforming back... how does this compare speed- and quality-wise t

Re: [FFmpeg-devel] [PATCH] avfilter: add radial and circular blur video filter

2020-07-17 Thread Paul B Mahol
On 7/17/20, Steinar H. Gunderson wrote: > On Sun, Jul 12, 2020 at 01:01:07PM +0200, Paul B Mahol wrote: >> Signed-off-by: Paul B Mahol > > Do you have any benchmarks on this? Or image samples? It looks like you are > transforming to polar coordinates, doing a box blur and then transforming > back

[FFmpeg-devel] [PATCH 1/2] avdevice/decklink_dec: mark the field flag if framerate > 30FPS

2020-07-17 Thread lance . lmwang
From: Limin Wang In SMPTE ST 12-1: 2014 Sec 12.2, we need to mark the frame flag if the frame rate > 30FPS to avoid interoperability issues. It will be used by the encoder to identify even or odd frames and correctly calculate the frame number of the SEI TC. --- libavdevice/decklink_common.h

[FFmpeg-devel] [PATCH 2/2] avcodec/utils: calculate frame number of HEVC if the framerate > 30FPS

2020-07-17 Thread lance . lmwang
From: Limin Wang --- libavcodec/internal.h | 3 ++- libavcodec/nvenc.c| 2 +- libavcodec/utils.c| 13 - 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 0a1c0a1..4c34d7d 100644 --- a/libavcodec/internal.h ++

Re: [FFmpeg-devel] [RFC][GSoC][PATCH v2 1/6] avformat/abr: Adaptive Bitrate support

2020-07-17 Thread Nicolas George
Hongcheng Zhong (12020-07-16): > From: spartazhc > > Add abr module for hls/dash. > > v1 fixed: > 1. add an "ff" prefix to the protocol name to mark it internal. Then the file name should be changed the same way. > 2. use 1.2f for float constant 1.2. > 3. simplify abr_seek for we just need AV

Re: [FFmpeg-devel] [PATCH] avfilter: add radial and circular blur video filter

2020-07-17 Thread Steinar H. Gunderson
On Fri, Jul 17, 2020 at 02:24:44PM +0200, Paul B Mahol wrote: >> Do you have any benchmarks on this? Or image samples? It looks like you are >> transforming to polar coordinates, doing a box blur and then transforming >> back... how does this compare speed- and quality-wise to the more common >> re

[FFmpeg-devel] [PATCH 1/2] dnn/native: add native support for avg_pool

2020-07-17 Thread Ting Fu
It can be tested with the model generated with below python script: import tensorflow as tf import numpy as np import imageio in_img = imageio.imread('input_odd.jpg') in_img = in_img.astype(np.float32)/255.0 in_data = in_img[np.newaxis, :] x = tf.placeholder(tf.float32, shape=[1, None, None, 3],

[FFmpeg-devel] [PATCH 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-07-17 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 202 + tests/fate/dnn.mak | 5 + 4 files changed, 20

Re: [FFmpeg-devel] [PATCH] avfilter: add radial and circular blur video filter

2020-07-17 Thread Paul B Mahol
On 7/17/20, Steinar H. Gunderson wrote: > On Fri, Jul 17, 2020 at 02:24:44PM +0200, Paul B Mahol wrote: >>> Do you have any benchmarks on this? Or image samples? It looks like you >>> are >>> transforming to polar coordinates, doing a box blur and then transforming >>> back... how does this compar

Re: [FFmpeg-devel] [PATCH 1/2] avdevice/decklink_dec: mark the field flag if framerate > 30FPS

2020-07-17 Thread Marton Balint
On Fri, 17 Jul 2020, lance.lmw...@gmail.com wrote: From: Limin Wang In SMPTE ST 12-1: 2014 Sec 12.2, we need to mark the frame flag if the frame rate > 30FPS to avoid interoperability issues. It will be used by the encoder to identify even or odd frames and correctly calculate the frame nu

Re: [FFmpeg-devel] [PATCH] avfilter: add radial and circular blur video filter

2020-07-17 Thread Steinar H. Gunderson
On Fri, Jul 17, 2020 at 06:54:40PM +0200, Paul B Mahol wrote: > But crucial info is missing. How one build vectors? (point - center) * scale_factor + center > And what about circular blur? I've never seen anyone try it, but one would assume it can be done by blending rotations in a similar recur

Re: [FFmpeg-devel] [PATCH] avfilter: add radial and circular blur video filter

2020-07-17 Thread Paul B Mahol
On 7/17/20, Steinar H. Gunderson wrote: > On Fri, Jul 17, 2020 at 06:54:40PM +0200, Paul B Mahol wrote: >> But crucial info is missing. How one build vectors? > > (point - center) * scale_factor + center And how to pick scale_factor, more over how to make this recursive at all? > >> And what abo

Re: [FFmpeg-devel] [PATCH] avfilter: add radial and circular blur video filter

2020-07-17 Thread Steinar H. Gunderson
On Fri, Jul 17, 2020 at 08:00:31PM +0200, Paul B Mahol wrote: >>> But crucial info is missing. How one build vectors? >> (point - center) * scale_factor + center > And how to pick scale_factor, It's a user parameter. scale_factor signifies how long the blur is. 1.0 is no blur, 2.0 means every poin

Re: [FFmpeg-devel] [PATCH] avfilter: add radial and circular blur video filter

2020-07-17 Thread Paul B Mahol
On 7/17/20, Steinar H. Gunderson wrote: > On Fri, Jul 17, 2020 at 08:00:31PM +0200, Paul B Mahol wrote: But crucial info is missing. How one build vectors? >>> (point - center) * scale_factor + center >> And how to pick scale_factor, > > It's a user parameter. scale_factor signifies how long

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/libx264: use a function to parse x264opts

2020-07-17 Thread James Almer
On 7/10/2020 6:01 PM, James Almer wrote: > This is needed for the following patch. > > Signed-off-by: James Almer > --- > libavcodec/libx264.c | 44 > 1 file changed, 28 insertions(+), 16 deletions(-) Patchset pushed.

Re: [FFmpeg-devel] [PATCH v2 2/2] libavcodec/libaomenc.c: Add command-line options for inter-coding tools

2020-07-17 Thread James Zern
On Tue, Jul 14, 2020 at 7:09 PM Wang Cao wrote: > > From: Wang Cao > > Signed-off-by: Wang Cao > --- > doc/encoders.texi | 36 + > libavcodec/libaomenc.c | 60 ++ > libavcodec/version.h | 2 +- > 3 files changed, 97 inserti

Re: [FFmpeg-devel] [PATCH v2 1/2] libavcodec/libaomenc.c: Add command-line options for tx tools.

2020-07-17 Thread James Zern
On Tue, Jul 14, 2020 at 7:08 PM Wang Cao wrote: > > From: Wang Cao > > Signed-off-by: Wang Cao > --- > doc/encoders.texi | 20 > libavcodec/libaomenc.c | 32 > libavcodec/version.h | 2 +- > 3 files changed, 53 insertions(+), 1 delet

[FFmpeg-devel] [PATCH 1/2] avcodec/put_bits: Parametrize bit buffer type

2020-07-17 Thread Steinar H. Gunderson
Preparatory patch for making the bit buffer different size on different platforms; make a typedef and make all the hardcoded sizes into expressions deriving from this size. No functional change; generated assembler is near-identical. --- libavcodec/put_bits.h | 95 +++-

[FFmpeg-devel] [PATCH 2/2] avcodec/put_bits: Make bit buffers 64-bit

2020-07-17 Thread Steinar H. Gunderson
Change BitBuf into uint64_t on all supported 64-bit platforms. This means we need to flush the buffer less often, which is a significant speed win. 32-bit platforms are unchanged. Output bitstream is the same. All API constraints are kept in place, e.g., you still cannot put_bits() more than 31 bi

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/put_bits: Make bit buffers 64-bit

2020-07-17 Thread Paul B Mahol
Missing magicyuv benchmark. On 7/17/20, Steinar H. Gunderson wrote: > Change BitBuf into uint64_t on all supported 64-bit platforms. > This means we need to flush the buffer less often, which is a > significant speed win. 32-bit platforms are unchanged. > Output bitstream is the same. > > All API

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/put_bits: Make bit buffers 64-bit

2020-07-17 Thread Steinar H. Gunderson
On Fri, Jul 17, 2020 at 09:48:42PM +0200, Paul B Mahol wrote: > Missing magicyuv benchmark. I didn't intend to do every single codec, but sure: magicyuv 57.10 fps -> 63.29 fps (+10.8%) /* Steinar */ -- Homepage: https://www.sesse.net/ _

Re: [FFmpeg-devel] [PATCH] libaomenc: enable 8, 10 and 12 bit RGB encoding

2020-07-17 Thread Lynne
Jul 17, 2020, 02:12 by jamr...@gmail.com: > On 7/16/2020 7:46 AM, Lynne wrote: > >> -codecctl_int(avctx, AV1E_SET_COLOR_PRIMARIES, avctx->color_primaries); >> -codecctl_int(avctx, AV1E_SET_MATRIX_COEFFICIENTS, avctx->colorspace); >> -codecctl_int(avctx, AV1E_SET_TRANSFER_CHARACTERISTI

[FFmpeg-devel] [PATCH] avcodec/libaomenc: use pix_fmt descriptors where useful

2020-07-17 Thread James Almer
Signed-off-by: James Almer --- libavcodec/libaomenc.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index 0d6a376ef0..b65e491824 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -299,7 +299,8

[FFmpeg-devel] [PATCH v2 1/2] avcodec/put_bits: Parametrize bit buffer type

2020-07-17 Thread Steinar H. Gunderson
Preparatory patch for making the bit buffer different size on different platforms; make a typedef and make all the hardcoded sizes into expressions deriving from this size. No functional change; generated assembler is near-identical. --- libavcodec/put_bits.h | 95 +++-

[FFmpeg-devel] [PATCH v2 2/2] avcodec/put_bits: Make bit buffers 64-bit

2020-07-17 Thread Steinar H. Gunderson
Change BitBuf into uint64_t on all supported 64-bit platforms. This means we need to flush the buffer less often, which is a significant speed win. 32-bit platforms are unchanged. Output bitstream is the same. All API constraints are kept in place, e.g., you still cannot put_bits() more than 31 bi

Re: [FFmpeg-devel] [PATCH] libavutil/video_enc_params: add block type

2020-07-17 Thread Yongle Lin
On Wed, Jul 15, 2020 at 4:13 PM Mark Thompson wrote: > On 15/07/2020 18:43, Yongle Lin wrote: > > add block type field to AVVideoBlockParams so we could either export or > visualize it later. > > --- > > libavutil/video_enc_params.h | 19 +++ > > 1 file changed, 19 insertions(+

Re: [FFmpeg-devel] [PATCH] avcodec/libaomenc: use pix_fmt descriptors where useful

2020-07-17 Thread James Almer
On 7/17/2020 6:05 PM, Lynne wrote: > Jul 17, 2020, 22:01 by jamr...@gmail.com: > >> Signed-off-by: James Almer >> --- >> libavcodec/libaomenc.c | 15 --- >> 1 file changed, 4 insertions(+), 11 deletions(-) >> >> diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c >> index 0d

Re: [FFmpeg-devel] [PATCH] avfilter: add radial and circular blur video filter

2020-07-17 Thread Steinar H. Gunderson
On Sun, Jul 12, 2020 at 01:01:07PM +0200, Paul B Mahol wrote: > +@section rblur > +Apply Radial blur filter. I tried this; it looks very aliased and absolutely not like what I'd expect from a radial blur at all. $ wget https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/PM5644.svg/1000p

Re: [FFmpeg-devel] [PATCH 1/2] avdevice/decklink_dec: mark the field flag if framerate > 30FPS

2020-07-17 Thread lance . lmwang
On Fri, Jul 17, 2020 at 07:13:28PM +0200, Marton Balint wrote: > > > On Fri, 17 Jul 2020, lance.lmw...@gmail.com wrote: > > > From: Limin Wang > > > > In SMPTE ST 12-1: 2014 Sec 12.2, we need to mark the frame flag if the > > frame rate > 30FPS to > > avoid interoperability issues. It will be

[FFmpeg-devel] [PATCH 01/11] avformat/webmdashenc: Fix segfault when no filename is given when live

2020-07-17 Thread Andreas Rheinhardt
by checking a bit earlier. Signed-off-by: Andreas Rheinhardt --- libavformat/webmdashenc.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c index eb286cab99..3eefd6df8b 100644 --- a/libavformat/webmdashenc.c +++ b/l

[FFmpeg-devel] [PATCH 05/11] avformat/daudenc: Turn write_header function into init function

2020-07-17 Thread Andreas Rheinhardt
daud_write_header() doesn't write anything. Signed-off-by: Andreas Rheinhardt --- libavformat/daudenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/daudenc.c b/libavformat/daudenc.c index 15a5afdfc9..0d8d830a67 100644 --- a/libavformat/daudenc.c +++ b/liba

[FFmpeg-devel] [PATCH 03/11] avformat/webmdashenc: Only check for existence of metadata if it is used

2020-07-17 Thread Andreas Rheinhardt
Also return proper error codes when it is absent: AVERROR(EINVAL) instead of AVERROR_INVALIDDATA. Signed-off-by: Andreas Rheinhardt --- libavformat/webmdashenc.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/libavformat/webmdashenc.c b/libavformat/w

[FFmpeg-devel] [PATCH 06/11] avformat/daudenc: Return proper error codes instead if -1

2020-07-17 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/daudenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/daudenc.c b/libavformat/daudenc.c index 0d8d830a67..b489659a80 100644 --- a/libavformat/daudenc.c +++ b/libavformat/daudenc.c @@ -25,7 +25,7 @@ static in

[FFmpeg-devel] [PATCH 09/11] avformat/segafilmenc: Simplify writing two bytes

2020-07-17 Thread Andreas Rheinhardt
Use avio_wb16() instead of avio_write() to write two zero bytes. Signed-off-by: Andreas Rheinhardt --- libavformat/segafilmenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/segafilmenc.c b/libavformat/segafilmenc.c index e144da4e68..d935caf00d 100644 --- a/l

[FFmpeg-devel] [PATCH 07/11] avformat/segafilm: Reorder elements of struct to make it smaller

2020-07-17 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/segafilm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c index 777606bcb6..4d14b81d16 100644 --- a/libavformat/segafilm.c +++ b/libavformat/segafilm.c @@ -40,8 +40,8 @@ typed

[FFmpeg-devel] [PATCH 08/11] avformat/segafilmenc: Remove write-only variable

2020-07-17 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/segafilmenc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavformat/segafilmenc.c b/libavformat/segafilmenc.c index 93c482ef7d..e144da4e68 100644 --- a/libavformat/segafilmenc.c +++ b/libavformat/segafilmenc.c @@ -47,7 +47,6 @@ typedef

[FFmpeg-devel] [PATCH 04/11] avformat/webmdashenc: Cosmetics

2020-07-17 Thread Andreas Rheinhardt
Mostly using intermediate pointers for accesses (i.e. storing s->pb in a variable pb and then using pb for writing instead of s->pb) to improve readability. Furthermore, the opening brace '{' of a function has been moved into a line of its own in instances where it wasn't before. Signed-off-by: An

[FFmpeg-devel] [PATCH 11/11] avformat/segafilmenc: Avoid seek when writing header

2020-07-17 Thread Andreas Rheinhardt
Up until now, the Sega FILM muxer would first write all the packet data, then shift the data (in the muxer's write_trailer function) by the amount necessary to write the header at the front (which entails a seek to the front), then seek back to the beginning and actually write the header. This com

[FFmpeg-devel] [PATCH 10/11] avformat/segafilmenc: Don't store packet info in linked list

2020-07-17 Thread Andreas Rheinhardt
Up until now, the Sega FILM muxer would store some information about each packet in a linked list. When writing the trailer, the information in said linked list would be used to write a table in the file header. Each entry in said table is 16 bytes long, but each entry of the linked list is 32 byte

[FFmpeg-devel] [PATCH 02/11] avformat/webmdashenc: Avoid allocations, fix memleak

2020-07-17 Thread Andreas Rheinhardt
When using the WebM DASH Manifest muxer, every stream of each adaptation set has to contain a metadata entry containing the filename of the source file. In case of live stream manifests, said filename has to conform to a pattern of _.. These pieces are used to create the other strings that are actu

Re: [FFmpeg-devel] [PATCH] avcodec/libaomenc: use pix_fmt descriptors where useful

2020-07-17 Thread Lynne
Jul 17, 2020, 22:01 by jamr...@gmail.com: > Signed-off-by: James Almer > --- > libavcodec/libaomenc.c | 15 --- > 1 file changed, 4 insertions(+), 11 deletions(-) > > diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c > index 0d6a376ef0..b65e491824 100644 > --- a/libavcodec

Re: [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg.c: Use the streams from the first output in print_final_stats.

2020-07-17 Thread Wang Cao
Hi, I am wondering if this is a change that would make unpredictable impact on the stats report for ffmpeg. If this is the case, can you take a look at my next patch in the series? It adds an option to print stats for each output file when enabled. Thank you! Best, Wang __

[FFmpeg-devel] [aarch64] improve hscale by 50% with multi-threading

2020-07-17 Thread Sebastian Pop
hscale is bound by the number of multiply-adds available on a given core. The attached patch doubles the number of multiply-adds by distributing half the load to a helper thread. The performance improves up to 50% on Graviton2 Arm Neoverse-N1 processors. $ ./ffmpeg_g -nostats -f lavfi -i testsrc2

Re: [FFmpeg-devel] [aarch64] improve hscale by 50% with multi-threading

2020-07-17 Thread Michael Niedermayer
On Fri, Jul 17, 2020 at 11:08:02PM -0500, Sebastian Pop wrote: > hscale is bound by the number of multiply-adds available on a given core. > The attached patch doubles the number of multiply-adds by distributing half > the load to a helper thread. > > The performance improves up to 50% on Graviton