Re: [FFmpeg-devel] [PATCH v4 7/7] avcodec/nvenc: support for HEVC timecode passthrough

2020-06-26 Thread Josh de Kock

On 26/06/2020 15:03, lance.lmw...@gmail.com wrote:

On Wed, Jun 24, 2020 at 09:43:20PM +0800, lance.lmw...@gmail.com wrote:

From: Limin Wang 

Reviewed-by: Timo Rothenpieler 
Signed-off-by: Limin Wang 
---
  libavcodec/nvenc.c  | 17 +
  libavcodec/nvenc.h  |  1 +
  libavcodec/nvenc_hevc.c |  1 +
  3 files changed, 19 insertions(+)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 22c19f3..4efd532 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -22,6 +22,7 @@
  #include "config.h"
  
  #include "nvenc.h"

+#include "hevc_sei.h"
  
  #include "libavutil/hwcontext_cuda.h"

  #include "libavutil/hwcontext.h"
@@ -2147,6 +2148,22 @@ static int nvenc_send_frame(AVCodecContext *avctx, const 
AVFrame *frame)
  }
  }
  
+if (ctx->tc && av_frame_get_side_data(frame, AV_FRAME_DATA_S12M_TIMECODE)) {

+void *tc_data = NULL;
+size_t tc_size = 0;
+
+if (ff_alloc_timecode_sei(frame, 0, (void**)_data, _size) < 
0) {
+av_log(ctx, AV_LOG_ERROR, "Not enough memory for timecode sei, 
skipping\n");
+}
+
+if (tc_data) {
+sei_data[sei_count].payloadSize = (uint32_t)tc_size;
+sei_data[sei_count].payloadType = HEVC_SEI_TYPE_TIME_CODE;
+sei_data[sei_count].payload = (uint8_t*)tc_data;
+sei_count ++;
+}
+}
+
  nvenc_codec_specific_pic_params(avctx, _params, sei_data);
  } else {
  pic_params.encodePicFlags = NV_ENC_PIC_FLAG_EOS;
diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h
index 007721a..b67abca 100644
--- a/libavcodec/nvenc.h
+++ b/libavcodec/nvenc.h
@@ -196,6 +196,7 @@ typedef struct NvencContext
  int coder;
  int b_ref_mode;
  int a53_cc;
+int tc;
  int dpb_size;
  } NvencContext;
  
diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c

index 434dc66..45dda3d 100644
--- a/libavcodec/nvenc_hevc.c
+++ b/libavcodec/nvenc_hevc.c
@@ -129,6 +129,7 @@ static const AVOption options[] = {
  { "each", "",   0,
AV_OPT_TYPE_CONST, { .i64 = 1 }, 0, 0,   VE, "b_ref_mode" },
  { "middle",   "",   0,
AV_OPT_TYPE_CONST, { .i64 = 2 }, 0, 0,   VE, "b_ref_mode" },
  #endif
+{ "tc",   "Use timecode (if available)",OFFSET(tc),
   AV_OPT_TYPE_BOOL,  { .i64 = 1 }, 0, 1,   VE },
  { "dpb_size", "Specifies the DPB size used for encoding (0 means 
automatic)",
  OFFSET(dpb_size), 
AV_OPT_TYPE_INT,   { .i64 = 0 }, 0, INT_MAX, VE },
  { NULL }
--
1.8.3.1



will apply the patchset(except #1 fate testing) tomorrow if no objections.


Thanks for updating the set, this is what I had in mind. I can't 
properly LGTM it since I haven't tested it myself but it looks mostly 
fine with a precursory glance.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH v2 2/4] avcodec/hevcdec: create AVFrame side data from HEVC timecodes like H.264

2020-06-23 Thread Josh de Kock

On 17/06/2020 17:07, lance.lmw...@gmail.com wrote:

From: Limin Wang 

Signed-off-by: Limin Wang 
---
  libavcodec/hevcdec.c | 44 
  1 file changed, 44 insertions(+)

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index c9e28f5..39abbb9 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -2808,6 +2808,50 @@ static int set_side_data(HEVCContext *s)
  }
  s->sei.unregistered.nb_buf_ref = 0;
  
+if (s->sei.timecode.present) {

+uint32_t tc = 0;
+uint32_t *tc_sd;
+AVFrameSideData *tcside = av_frame_new_side_data(out, 
AV_FRAME_DATA_S12M_TIMECODE,
+ sizeof(uint32_t) * 4);
+if (!tcside)
+return AVERROR(ENOMEM);
+
+tc_sd = (uint32_t*)tcside->data;
+tc_sd[0] = s->sei.timecode.num_clock_ts;
+
+for (int i = 0; i < tc_sd[0]; i++) {
+uint32_t frames;
+
+/* For SMPTE 12-M timecodes, frame count is a special case if > 30 
FPS.
+   See SMPTE ST 12-1:2014 Sec 12.1 for more info. */
+if (av_cmp_q(s->avctx->framerate, (AVRational) {30, 1}) == 1) {
+frames = s->sei.timecode.n_frames[i] / 2;
+if (s->sei.timecode.n_frames[i] % 2 == 1) {
+if (av_cmp_q(s->avctx->framerate, (AVRational) {50, 1}) == 
0)
+tc |= (1 << 7);
+else
+tc |= (1 << 23);
+}
+} else {
+frames = s->sei.timecode.n_frames[i];
+}
+
+tc |= s->sei.timecode.cnt_dropped_flag[i] << 30;
+tc |= (frames / 10) << 28;
+tc |= (frames % 10) << 24;
+tc |= (s->sei.timecode.seconds_value[i] / 10) << 20;
+tc |= (s->sei.timecode.seconds_value[i] % 10) << 16;
+tc |= (s->sei.timecode.minutes_value[i] / 10) << 12;
+tc |= (s->sei.timecode.minutes_value[i] % 10) << 8;
+tc |= (s->sei.timecode.hours_value[i] / 10) << 4;
+tc |= (s->sei.timecode.hours_value[i] % 10);
+
+tc_sd[i + 1] = tc;
+}
+
+s->sei.timecode.num_clock_ts = 0;
+}
+
  return 0;
  }
  



As you said in the commit message, h264 already does this so it would be 
nice if you didn't duplicate the code. Split both parts of s12m decoding 
you've copied into a common h2645 or just an s12m file maybe?


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] mailmap: add entry for myself

2020-06-17 Thread Josh de Kock

On 17/06/2020 18:16, Josh de Kock wrote:

On 17/06/2020 15:16, Zhong Li wrote:

Signed-off-by: Zhong Li 
---
  .mailmap | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index d1925bfab0..f14770d800 100644
--- a/.mailmap
+++ b/.mailmap
@@ -15,7 +15,8 @@
   
   
   
- 
+ 
+ 

  

Is better if you would like the last two emails to be displayed as 
lizhong1...@gmail.com.

   
  rcombs  
   



Actually not sure this is supported syntax. Probably just worked by 
accident in my testing.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] mailmap: add entry for myself

2020-06-17 Thread Josh de Kock

On 17/06/2020 15:16, Zhong Li wrote:

Signed-off-by: Zhong Li 
---
  .mailmap | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index d1925bfab0..f14770d800 100644
--- a/.mailmap
+++ b/.mailmap
@@ -15,7 +15,8 @@
   
   
   
- 
+ 
+ 

  

Is better if you would like the last two emails to be displayed as 
lizhong1...@gmail.com.

   
  rcombs  
   


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH v3 0/3] swscale: add AVX2 version of yuv2nv12cX

2020-06-14 Thread Josh de Kock

Hi,

On 03/06/2020 08:02, Nelson Gomez wrote:

Bumping this patchset (and apologies if Outlook mangles the threading)

[...]

Nelson Gomez (3):
   swscale: make yuv2interleavedX more asm-friendly
   swscale/x86/output: add AVX2 version of yuv2nv12cX
   swscale: cosmetic fixes

  libswscale/output.c   |  19 ++---
  libswscale/swscale_internal.h |   6 +-
  libswscale/vscale.c   |   2 +-
  libswscale/x86/output.asm | 126 +-
  libswscale/x86/swscale.c  |  28 
  5 files changed, 168 insertions(+), 13 deletions(-)


Thank you for the patch. Almost a 3x speedup on my machine.
Pushed.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 02/17] avdevice: deprecate av_*_device_next()

2020-05-28 Thread Josh de Kock

On 28/05/2020 21:15, Anton Khirnov wrote:

These functions rely on deprecated libavformat APIs and apparently have
zero users outside of cmdutils. Since the functionality they provide is
apparently not useful to anyone, deprecate them without replacement.
---
  doc/APIchanges | 4 
  fftools/cmdutils.c | 2 +-
  fftools/cmdutils.h | 4 ++--
  libavdevice/avdevice.c | 4 
  libavdevice/avdevice.h | 6 ++
  5 files changed, 17 insertions(+), 3 deletions(-)

[...]


This is the last part of the iterate() API update. I was recently 
looking at this again, and I think this is the best way to solve it.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] lavc/h264_cavlc: use inline function get_bits API

2020-05-26 Thread Josh de Kock
To prepare for using the cached bitstream reader, which only defines the
inline functions rather than the macros, with CAVLC decoding.

Signed-off-by: Josh de Kock 
---
 libavcodec/h264_cavlc.c | 13 +++--
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c
index 6481992e58..c1ecaea1ba 100644
--- a/libavcodec/h264_cavlc.c
+++ b/libavcodec/h264_cavlc.c
@@ -414,19 +414,12 @@ av_cold void ff_h264_decode_init_vlc(void){
 }
 
 static inline int get_level_prefix(GetBitContext *gb){
-unsigned int buf;
 int log;
 
-OPEN_READER(re, gb);
-UPDATE_CACHE(re, gb);
-buf=GET_CACHE(re, gb);
+log = 16 - av_log2_16bit(show_bits(gb, 16));
+skip_bits(gb, log);
 
-log= 32 - av_log2(buf);
-
-LAST_SKIP_BITS(re, gb, log);
-CLOSE_READER(re, gb);
-
-return log-1;
+return log - 1;
 }
 
 /**
-- 
2.26.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 1/2] swscale: fix NEON hscale init

2020-05-16 Thread Josh de Kock

On 16/05/2020 11:50, Carl Eugen Hoyos wrote:

Am Fr., 15. Mai 2020 um 12:27 Uhr schrieb Josh de Kock :


On 08/05/2020 12:25, Michael Niedermayer wrote:

On Thu, May 07, 2020 at 12:25:34PM +0100, Josh de Kock wrote:

The NEON hscale function only supports X8 filter sizes and should only
be selected when these are being used.

Signed-off-by: Josh de Kock 
---
   libswscale/aarch64/swscale.c | 5 -
   1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libswscale/aarch64/swscale.c b/libswscale/aarch64/swscale.c
index 54a3beabe8..eecbea88ca 100644
--- a/libswscale/aarch64/swscale.c
+++ b/libswscale/aarch64/swscale.c
@@ -34,7 +34,10 @@ av_cold void ff_sws_init_swscale_aarch64(SwsContext *c)
   int cpu_flags = av_get_cpu_flags();

   if (have_neon(cpu_flags)) {
-if (c->srcBpc == 8 && c->dstBpc <= 14) {
+if (c->srcBpc == 8 && c->dstBpc <= 14 &&
+(c->hLumFilterSize % 8) == 0 &&
+(c->hChrFilterSize % 8) == 0)
+{
   c->hyScale = c->hcScale = ff_hscale_8_to_15_neon;
   }


isnt filterAlign set to 8 when neon is available ?


Discussed on IRC. Pushed with set.


Could you give a very short explanation on why the comment
was not relevant?



At the moment filterAlign is set to 8 but in the future when extra NEON 
assembly for specific sizes is added they will need to have checks here too.


The immediate use-case for this change is making the hscale checkasm
test easier and without NEON specific edge-cases (x86 already has these
guards).

Michael then said the extra check was fine here. The checkasm test 
breaks on altivec (I was unable to test this) but I'm discussing with 
Martin if there's a better way to do this, these checks are likely to be 
reverted with a different solution implemented.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2020-05-15 Thread Josh de Kock

On 15/05/2020 19:11, Martin Storsjö wrote:

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
interleave_bytes_aligned_neon:   9061.0   7623.0   6309.0
---
v2: Made the stride handling signed, to properly handle negative strides,
fixing filter-pixfmts-vflip.
---
  libswscale/aarch64/Makefile   |  4 +-
  libswscale/aarch64/rgb2rgb.c  | 41 
  libswscale/aarch64/rgb2rgb_neon.S | 79 +++
  libswscale/rgb2rgb.c  |  2 +
  libswscale/rgb2rgb.h  |  1 +
  5 files changed, 126 insertions(+), 1 deletion(-)
  create mode 100644 libswscale/aarch64/rgb2rgb.c
  create mode 100644 libswscale/aarch64/rgb2rgb_neon.S

diff --git a/libswscale/aarch64/Makefile b/libswscale/aarch64/Makefile
index 64a3fe208d..da1d909561 100644
--- a/libswscale/aarch64/Makefile
+++ b/libswscale/aarch64/Makefile
@@ -1,6 +1,8 @@
-OBJS+= aarch64/swscale.o\
+OBJS+= aarch64/rgb2rgb.o\
+   aarch64/swscale.o\
 aarch64/swscale_unscaled.o   \
  
  NEON-OBJS   += aarch64/hscale.o \

 aarch64/output.o \
+   aarch64/rgb2rgb_neon.o   \
 aarch64/yuv2rgb_neon.o   \
diff --git a/libswscale/aarch64/rgb2rgb.c b/libswscale/aarch64/rgb2rgb.c
new file mode 100644
index 00..a9bf6ff9e0
--- /dev/null
+++ b/libswscale/aarch64/rgb2rgb.c
@@ -0,0 +1,41 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include 
+
+#include "config.h"
+#include "libavutil/attributes.h"
+#include "libavutil/aarch64/cpu.h"
+#include "libavutil/cpu.h"
+#include "libavutil/bswap.h"
+#include "libswscale/rgb2rgb.h"
+#include "libswscale/swscale.h"
+#include "libswscale/swscale_internal.h"
+
+void ff_interleave_bytes_neon(const uint8_t *src1, const uint8_t *src2,
+  uint8_t *dest, int width, int height,
+  int src1Stride, int src2Stride, int dstStride);
+
+av_cold void rgb2rgb_init_aarch64(void)
+{
+int cpu_flags = av_get_cpu_flags();
+
+if (have_neon(cpu_flags)) {
+interleaveBytes = ff_interleave_bytes_neon;
+}
+}
diff --git a/libswscale/aarch64/rgb2rgb_neon.S 
b/libswscale/aarch64/rgb2rgb_neon.S
new file mode 100644
index 00..d81110ec57
--- /dev/null
+++ b/libswscale/aarch64/rgb2rgb_neon.S
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2020 Martin Storsjo
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavutil/aarch64/asm.S"
+
+// void ff_interleave_bytes_neon(const uint8_t *src1, const uint8_t *src2,
+//   uint8_t *dest, int width, int height,
+//   int src1Stride, int src2Stride, int 
dstStride);
+function ff_interleave_bytes_neon, export=1
+sub w5,  w5,  w3
+sub w6,  w6,  w3
+sub w7,  w7,  w3, lsl #1
+1:
+andsw8,  w3,  #0xfff0 // & ~15
+b.eq3f
+2:
+ld1 {v0.16b}, [x0], #16
+ld1 {v1.16b}, [x1], #16
+subsw8,  w8,  #16
+st2 {v0.16b, v1.16b}, [x2], #32
+b.gt2b
+
+tst w3,  #15
+   

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

2020-05-15 Thread Josh de Kock

On 15/05/2020 19:35, Martin Storsjö wrote:

From: Josh de Kock 

The NEON hscale function only supports X8 filter sizes and should only
be selected when these are being used. At the moment filterAlign is
set to 8 but in the future when extra NEON assembly for specific sizes is
added they will need to have checks here too.

The immediate usecase for this change is making the hscale checkasm
test easier and without NEON specific edge-cases (x86 already has these
guards).

This applies the same fix from 718c8f9aa59751bb490e2688acf2b5cb68fd5ad1
on the 32 bit arm version of the function, fixing fate-checkasm-sw_scale
there.

Signed-off-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 ff_sws_init_swscale_arm(SwsContext *c)
  int cpu_flags = av_get_cpu_flags();
  
  if (have_neon(cpu_flags)) {

-if (c->srcBpc == 8 && c->dstBpc <= 14) {
+if (c->srcBpc == 8 && c->dstBpc <= 14 &&
+(c->hLumFilterSize % 8) == 0 &&
+(c->hChrFilterSize % 8) == 0)
+{
  c->hyScale = c->hcScale = ff_hscale_8_to_15_neon;
  }
  if (c->dstBpc == 8) {



LGTM

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2020-05-15 Thread Josh de Kock

On 14/05/2020 22:28, Martin Storsjö wrote:

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 changed, 58 insertions(+)


This looks good to me, although I might be biased :-)



Pushed with amended commit message (I don't think it's necessary to 
mention pixels as it's a more general function for checking and diffing 
rectangular sections of memory).


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2020-05-15 Thread Josh de Kock

On 15/05/2020 09:41, Martin Storsjö wrote:

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

tests/checkasm/Makefile   |   2 +-
tests/checkasm/checkasm.c |   1 +
tests/checkasm/checkasm.h |   1 +
tests/checkasm/sw_scale.c | 134 ++
4 files changed, 137 insertions(+), 1 deletion(-)
create mode 100644 tests/checkasm/sw_scale.c


I forgot to point out, this is missing an addition to 
tests/fate/checkasm.mak - as the tests are run in separate checkasm 
invocations, we need to add new tests groups there, otherwise they 
aren't run as part of "make fate".




Thanks for the reviews! Pushed with both fixes.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 1/2] swscale: fix NEON hscale init

2020-05-15 Thread Josh de Kock

On 08/05/2020 12:25, Michael Niedermayer wrote:

On Thu, May 07, 2020 at 12:25:34PM +0100, Josh de Kock wrote:

The NEON hscale function only supports X8 filter sizes and should only
be selected when these are being used.

Signed-off-by: Josh de Kock 
---
  libswscale/aarch64/swscale.c | 5 -
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libswscale/aarch64/swscale.c b/libswscale/aarch64/swscale.c
index 54a3beabe8..eecbea88ca 100644
--- a/libswscale/aarch64/swscale.c
+++ b/libswscale/aarch64/swscale.c
@@ -34,7 +34,10 @@ av_cold void ff_sws_init_swscale_aarch64(SwsContext *c)
  int cpu_flags = av_get_cpu_flags();
  
  if (have_neon(cpu_flags)) {

-if (c->srcBpc == 8 && c->dstBpc <= 14) {
+if (c->srcBpc == 8 && c->dstBpc <= 14 &&
+(c->hLumFilterSize % 8) == 0 &&
+(c->hChrFilterSize % 8) == 0)
+{
  c->hyScale = c->hcScale = ff_hscale_8_to_15_neon;
  }


isnt filterAlign set to 8 when neon is available ?

[...]



Discussed on IRC. Pushed with set.

--
Josh

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2020-05-14 Thread Josh de Kock
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 aarch64.

 tests/checkasm/Makefile   |   2 +-
 tests/checkasm/checkasm.c |   1 +
 tests/checkasm/checkasm.h |   1 +
 tests/checkasm/sw_scale.c | 134 ++
 4 files changed, 137 insertions(+), 1 deletion(-)
 create mode 100644 tests/checkasm/sw_scale.c

diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile
index de850c016e..9e9569777b 100644
--- a/tests/checkasm/Makefile
+++ b/tests/checkasm/Makefile
@@ -45,7 +45,7 @@ AVFILTEROBJS-$(CONFIG_NLMEANS_FILTER)+= vf_nlmeans.o
 CHECKASMOBJS-$(CONFIG_AVFILTER) += $(AVFILTEROBJS-yes)
 
 # swscale tests
-SWSCALEOBJS += sw_rgb.o
+SWSCALEOBJS += sw_rgb.o sw_scale.o
 
 CHECKASMOBJS-$(CONFIG_SWSCALE)  += $(SWSCALEOBJS)
 
diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
index 5c9013d922..120052a816 100644
--- a/tests/checkasm/checkasm.c
+++ b/tests/checkasm/checkasm.c
@@ -183,6 +183,7 @@ static const struct {
 #endif
 #if CONFIG_SWSCALE
 { "sw_rgb", checkasm_check_sw_rgb },
+{ "sw_scale", checkasm_check_sw_scale },
 #endif
 #if CONFIG_AVUTIL
 { "fixed_dsp", checkasm_check_fixed_dsp },
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index 5807d32e14..e98a800c50 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -69,6 +69,7 @@ void checkasm_check_pixblockdsp(void);
 void checkasm_check_sbrdsp(void);
 void checkasm_check_synth_filter(void);
 void checkasm_check_sw_rgb(void);
+void checkasm_check_sw_scale(void);
 void checkasm_check_utvideodsp(void);
 void checkasm_check_v210dec(void);
 void checkasm_check_v210enc(void);
diff --git a/tests/checkasm/sw_scale.c b/tests/checkasm/sw_scale.c
new file mode 100644
index 00..06c8a93103
--- /dev/null
+++ b/tests/checkasm/sw_scale.c
@@ -0,0 +1,134 @@
+/*
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include 
+
+#include "libavutil/common.h"
+#include "libavutil/intreadwrite.h"
+#include "libavutil/mem.h"
+
+#include "libswscale/swscale.h"
+#include "libswscale/swscale_internal.h"
+
+#include "checkasm.h"
+
+#define randomize_buffers(buf, size)  \
+do {  \
+int j;\
+for (j = 0; j < size; j+=4)   \
+AV_WN32(buf + j, rnd());  \
+} while (0)
+
+#define SRC_PIXELS 128
+
+static void check_hscale(void)
+{
+#define MAX_FILTER_WIDTH 40
+#define FILTER_SIZES 5
+static const int filter_sizes[FILTER_SIZES] = { 4, 8, 16, 32, 40 };
+
+#define HSCALE_PAIRS 2
+static const int hscale_pairs[HSCALE_PAIRS][2] = {
+{ 8, 14 },
+{ 8, 18 },
+};
+
+int i, j, fsi, hpi, width;
+struct SwsContext *ctx;
+
+// padded
+LOCAL_ALIGNED_32(uint8_t, src, [SRC_PIXELS + MAX_FILTER_WIDTH - 1]);
+LOCAL_ALIGNED_32(uint32_t, dst0, [SRC_PIXELS]);
+LOCAL_ALIGNED_32(uint32_t, dst1, [SRC_PIXELS]);
+
+// padded
+LOCAL_ALIGNED_32(int16_t, filter, [SRC_PIXELS * MAX_FILTER_WIDTH + 
MAX_FILTER_WIDTH]);
+LOCAL_ALIGNED_32(int32_t, filterPos, [SRC_PIXELS]);
+
+// The dst parameter here is either int16_t or int32_t but we use void* to
+// just cover both cases.
+declare_func(void, void *c, void *dst, int dstW,
+ const uint8_t *src, const int16_t *filter,
+ const int32_t *filterPos, int filterSize);
+
+ctx = sws_alloc_context();
+if (sws_init_context(ctx, NULL, NULL) < 0)
+fail();
+
+randomize_buffers(src, SRC_PIXELS + MAX_FILTER_WIDTH - 1);
+
+for (hpi = 0; hpi < HSCALE_PAIRS; hpi++) {
+for (fsi = 0; fsi < FILTER_SIZES; fsi++) {
+width = filter_sizes[fsi];
+
+ctx->srcBpc = hscale_pairs[hpi][0];
+ctx->dstBpc = hscale_pairs[hpi][1];
+ctx->hLumFilterSize = ctx->hChrFilterSize = width;
+
+for (i = 0; i < SRC_PIXELS; i++) {

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

2020-05-14 Thread Josh de Kock
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 changed, 58 insertions(+)

diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
index 91066514f6..120052a816 100644
--- a/tests/checkasm/checkasm.c
+++ b/tests/checkasm/checkasm.c
@@ -269,6 +269,7 @@ static struct {
 int cpu_flag;
 const char *cpu_flag_name;
 const char *test_name;
+int verbose;
 } state;
 
 /* PRNG state */
@@ -687,6 +688,8 @@ int main(int argc, char *argv[])
 state.bench_pattern = "";
 } else if (!strncmp(argv[1], "--test=", 7)) {
 state.test_name = argv[1] + 7;
+} else if (!strcmp(argv[1], "--verbose") || !strcmp(argv[1], "-v")) {
+state.verbose = 1;
 } else {
 seed = strtoul(argv[1], NULL, 10);
 }
@@ -837,3 +840,42 @@ void checkasm_report(const char *name, ...)
 max_length = length;
 }
 }
+
+#define DEF_CHECKASM_CHECK_FUNC(type, fmt) \
+int checkasm_check_##type(const char *const file, const int line, \
+  const type *buf1, ptrdiff_t stride1, \
+  const type *buf2, ptrdiff_t stride2, \
+  const int w, int h, const char *const name) \
+{ \
+stride1 /= sizeof(*buf1); \
+stride2 /= sizeof(*buf2); \
+int y = 0; \
+for (y = 0; y < h; y++) \
+if (memcmp([y*stride1], [y*stride2], w*sizeof(*buf1))) \
+break; \
+if (y == h) \
+return 0; \
+checkasm_fail_func("%s:%d", file, line); \
+if (!state.verbose) \
+return 1; \
+fprintf(stderr, "%s:\n", name); \
+while (h--) { \
+for (int x = 0; x < w; x++) \
+fprintf(stderr, " " fmt, buf1[x]); \
+fprintf(stderr, ""); \
+for (int x = 0; x < w; x++) \
+fprintf(stderr, " " fmt, buf2[x]); \
+fprintf(stderr, ""); \
+for (int x = 0; x < w; x++) \
+fprintf(stderr, "%c", buf1[x] != buf2[x] ? 'x' : '.'); \
+buf1 += stride1; \
+buf2 += stride2; \
+fprintf(stderr, "\n"); \
+} \
+return 1; \
+}
+
+DEF_CHECKASM_CHECK_FUNC(uint8_t,  "%02x")
+DEF_CHECKASM_CHECK_FUNC(uint16_t, "%04x")
+DEF_CHECKASM_CHECK_FUNC(int16_t,  "%6d")
+DEF_CHECKASM_CHECK_FUNC(int32_t,  "%9d")
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index 77e573774f..e98a800c50 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -258,4 +258,20 @@ typedef struct CheckasmPerf {
 #define PERF_STOP(t)   while(0)
 #endif
 
+#define DECL_CHECKASM_CHECK_FUNC(type) \
+int checkasm_check_##type(const char *const file, const int line, \
+  const type *const buf1, const ptrdiff_t stride1, \
+  const type *const buf2, const ptrdiff_t stride2, \
+  const int w, const int h, const char *const name)
+
+DECL_CHECKASM_CHECK_FUNC(uint8_t);
+DECL_CHECKASM_CHECK_FUNC(uint16_t);
+DECL_CHECKASM_CHECK_FUNC(int16_t);
+DECL_CHECKASM_CHECK_FUNC(int32_t);
+
+#define PASTE(a,b) a ## b
+#define CONCAT(a,b) PASTE(a,b)
+
+#define checkasm_check(prefix, ...) CONCAT(checkasm_check_, prefix)(__FILE__, 
__LINE__, __VA_ARGS__)
+
 #endif /* TESTS_CHECKASM_CHECKASM_H */
-- 
2.26.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2020-05-13 Thread Josh de Kock
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 +
 tests/checkasm/sw_scale.c | 114 ++
 4 files changed, 117 insertions(+), 1 deletion(-)
 create mode 100644 tests/checkasm/sw_scale.c

diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile
index de850c016e..9e9569777b 100644
--- a/tests/checkasm/Makefile
+++ b/tests/checkasm/Makefile
@@ -45,7 +45,7 @@ AVFILTEROBJS-$(CONFIG_NLMEANS_FILTER)+= vf_nlmeans.o
 CHECKASMOBJS-$(CONFIG_AVFILTER) += $(AVFILTEROBJS-yes)
 
 # swscale tests
-SWSCALEOBJS += sw_rgb.o
+SWSCALEOBJS += sw_rgb.o sw_scale.o
 
 CHECKASMOBJS-$(CONFIG_SWSCALE)  += $(SWSCALEOBJS)
 
diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
index d67147ae6f..91066514f6 100644
--- a/tests/checkasm/checkasm.c
+++ b/tests/checkasm/checkasm.c
@@ -183,6 +183,7 @@ static const struct {
 #endif
 #if CONFIG_SWSCALE
 { "sw_rgb", checkasm_check_sw_rgb },
+{ "sw_scale", checkasm_check_sw_scale },
 #endif
 #if CONFIG_AVUTIL
 { "fixed_dsp", checkasm_check_fixed_dsp },
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index 0a7f9f25c4..77e573774f 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -69,6 +69,7 @@ void checkasm_check_pixblockdsp(void);
 void checkasm_check_sbrdsp(void);
 void checkasm_check_synth_filter(void);
 void checkasm_check_sw_rgb(void);
+void checkasm_check_sw_scale(void);
 void checkasm_check_utvideodsp(void);
 void checkasm_check_v210dec(void);
 void checkasm_check_v210enc(void);
diff --git a/tests/checkasm/sw_scale.c b/tests/checkasm/sw_scale.c
new file mode 100644
index 00..52a15247d5
--- /dev/null
+++ b/tests/checkasm/sw_scale.c
@@ -0,0 +1,114 @@
+/*
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include 
+
+#include "libavutil/common.h"
+#include "libavutil/intreadwrite.h"
+#include "libavutil/mem.h"
+
+#include "libswscale/swscale.h"
+#include "libswscale/swscale_internal.h"
+
+#include "checkasm.h"
+
+#define randomize_buffers(buf, size)  \
+do {  \
+int j;\
+for (j = 0; j < size; j+=4)   \
+AV_WN32(buf + j, rnd());  \
+} while (0)
+
+#define MAX_WIDTH 128
+
+#define FILTER_SIZES 5
+int filter_sizes[FILTER_SIZES] = { 4, 8, 16, 32, 40 };
+#define MAX_FILTER_WIDTH 40
+
+#define HSCALE_PAIRS 2
+int hscale_pairs[HSCALE_PAIRS][2] = {
+{ 8, 14 },
+{ 8, 18 },
+};
+
+static void check_hscale(void)
+{
+int i, j, fsi, hpi, width;
+struct SwsContext *ctx;
+
+// padded
+LOCAL_ALIGNED_32(uint8_t, src, [MAX_WIDTH + MAX_FILTER_WIDTH - 1]);
+LOCAL_ALIGNED_32(uint32_t, dst0, [MAX_WIDTH]);
+LOCAL_ALIGNED_32(uint32_t, dst1, [MAX_WIDTH]);
+
+// padded
+LOCAL_ALIGNED_32(int16_t, filter, [MAX_WIDTH * MAX_FILTER_WIDTH + 
MAX_FILTER_WIDTH]);
+LOCAL_ALIGNED_32(int32_t, filterPos, [MAX_WIDTH]);
+
+// The dst parameter here is either int16_t or int32_t but we use void* to
+// just cover both cases.
+declare_func(void, void *c, void *dst, int dstW,
+ const uint8_t *src, const int16_t *filter,
+ const int32_t *filterPos, int filterSize);
+
+ctx = sws_alloc_context();
+if (sws_init_context(ctx, NULL, NULL) < 0)
+fail();
+
+randomize_buffers(src, MAX_WIDTH + MAX_FILTER_WIDTH - 1);
+
+for (hpi = 0; hpi < HSCALE_PAIRS; hpi++) {
+for (fsi = 0; fsi < FILTER_SIZES; fsi++) {
+width = filter_sizes[fsi];
+
+ctx->srcBpc = hscale_pairs[hpi][0];
+ctx->dstBpc = hscale_pairs[hpi][1];
+ctx->hLumFilterSize = ctx->hChrFilterSize = width;
+for (i = 0; i < MAX_WIDTH; i++) {
+filterPos[i] = i;
+for (j = 0; j < width; j++) {
+filter[i * width + j] = (1 << 14) / width;
+}
+  

Re: [FFmpeg-devel] [PATCH v3] libavcodec/libx264: fix reference frame computation based on level

2020-05-07 Thread Josh de Kock

On 05/05/2020 17:02, Fu, Linjie wrote:

From: ffmpeg-devel  On Behalf Of
Josh Brewster
Sent: Tuesday, May 5, 2020 23:52
To: FFmpeg development discussions and patches 
Subject: Re: [FFmpeg-devel] [PATCH v3] libavcodec/libx264: fix reference
frame computation based on level


From: ffmpeg-devel ffmpeg-devel-boun...@ffmpeg.org On Behalf Of
Josh de Kock
Sent: Tuesday, April 28, 2020 23:47
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v3] libavcodec/libx264: fix reference
frame computation based on level
On 26/04/2020 12:46, Josh Brewster wrote:


Hi, is there anything else I need to do to have this merged?


 From a precursory look at what x264 and we're doing here your patch is
correct. It doesn't break from a quick test, and looks OK to me. Would
rather someone else has a look at it too but I will again in a couple
days if no one does.


Should be ok IMHO, thx.

-   Linjie


Thanks for the feedback, I'll wait for it to be merged then.



FYI, already merged several days ago with the help of Josh in:
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/79f001675a2bae16e243f30a3e7de9da6aeb3c2d



Ah, it seems my 'Patch applied' email never came though. Yes, I merged this.

--
Josh

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2020-05-07 Thread Josh de Kock
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
 (such as 8bpp to 19bpp) and make the benchmarks work.

 tests/checkasm/Makefile|   2 +-
 tests/checkasm/checkasm.c  |   1 +
 tests/checkasm/checkasm.h  |   1 +
 tests/checkasm/sw_hscale.c | 108 +
 4 files changed, 111 insertions(+), 1 deletion(-)
 create mode 100644 tests/checkasm/sw_hscale.c

diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile
index de850c016e..c04c2a304e 100644
--- a/tests/checkasm/Makefile
+++ b/tests/checkasm/Makefile
@@ -45,7 +45,7 @@ AVFILTEROBJS-$(CONFIG_NLMEANS_FILTER)+= vf_nlmeans.o
 CHECKASMOBJS-$(CONFIG_AVFILTER) += $(AVFILTEROBJS-yes)
 
 # swscale tests
-SWSCALEOBJS += sw_rgb.o
+SWSCALEOBJS += sw_hscale.o sw_rgb.o
 
 CHECKASMOBJS-$(CONFIG_SWSCALE)  += $(SWSCALEOBJS)
 
diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
index d67147ae6f..8bf32d5b65 100644
--- a/tests/checkasm/checkasm.c
+++ b/tests/checkasm/checkasm.c
@@ -182,6 +182,7 @@ static const struct {
 #endif
 #endif
 #if CONFIG_SWSCALE
+{ "sw_scale", checkasm_check_sw_scale },
 { "sw_rgb", checkasm_check_sw_rgb },
 #endif
 #if CONFIG_AVUTIL
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index 0a7f9f25c4..98d59aedf7 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -68,6 +68,7 @@ void checkasm_check_opusdsp(void);
 void checkasm_check_pixblockdsp(void);
 void checkasm_check_sbrdsp(void);
 void checkasm_check_synth_filter(void);
+void checkasm_check_sw_scale(void);
 void checkasm_check_sw_rgb(void);
 void checkasm_check_utvideodsp(void);
 void checkasm_check_v210dec(void);
diff --git a/tests/checkasm/sw_hscale.c b/tests/checkasm/sw_hscale.c
new file mode 100644
index 00..f54ed72d81
--- /dev/null
+++ b/tests/checkasm/sw_hscale.c
@@ -0,0 +1,108 @@
+/*
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include 
+
+#include "libavutil/common.h"
+#include "libavutil/intreadwrite.h"
+#include "libavutil/mem.h"
+
+#include "libswscale/swscale.h"
+#include "libswscale/swscale_internal.h"
+
+#include "checkasm.h"
+
+#define randomize_buffers(buf, size)  \
+do {  \
+int j;\
+for (j = 0; j < size; j+=4)   \
+AV_WN32(buf + j, rnd());  \
+} while (0)
+
+#define MAX_WIDTH 128
+#define MAX_FILTER_WIDTH 40
+
+#define INIT_FILTER(bsrc, bdst, width) \
+ctx->srcBpc = bsrc; \
+ctx->dstBpc = bdst; \
+ctx->hLumFilterSize = ctx->hChrFilterSize = width; \
+for (i = 0; i < MAX_WIDTH; i++) { \
+filterPos[i] = i; \
+for (j = 0; j < width; j++) { \
+filter[i * width + j] = (1 << 14) / width; \
+} \
+} \
+\
+for (i = 0; i < MAX_FILTER_WIDTH; i++) { \
+filter[MAX_WIDTH * width + i] = (1 << 14) / width; \
+} \
+ff_getSwsFunc(ctx);
+
+#define CHECK_FILTER(width) \
+INIT_FILTER(8, 14, width) \
+if (check_func(ctx->hcScale, "hscale_8_to_15_width" #width)) { \
+memset(dst0, 0, MAX_WIDTH * sizeof(dst0[0])); \
+memset(dst1, 0, MAX_WIDTH * sizeof(dst1[0])); \
+\
+call_ref(NULL, dst0, MAX_WIDTH, src, filter, filterPos, width); \
+call_new(NULL, dst1, MAX_WIDTH, src, filter, filterPos, width); \
+if (memcmp(dst0, dst1, MAX_WIDTH)) \
+fail(); \
+/*bench_new();*/ \
+}
+
+static void check_hscale(void)
+{
+int i, j;
+struct SwsContext *ctx;
+
+// padded
+LOCAL_ALIGNED_32(uint8_t, src, [MAX_WIDTH + MAX_FILTER_WIDTH - 1]);
+LOCAL_ALIGNED_32(uint16_t, dst0, [MAX_WIDTH]);
+LOCAL_ALIGNED_32(uint16_t, dst1, [MAX_WIDTH]);
+
+// padded
+LOCAL_ALIGNED_32(int16_t, filter, [MAX_WIDTH * MAX_FILTER_WIDTH + 
MAX_FILTER_WIDTH]);
+LOCAL_ALIGNED_32(int32_t, filterPos, [MAX_WIDTH]);
+
+declare_func(void, void*c, int

[FFmpeg-devel] [PATCH 1/2] swscale: fix NEON hscale init

2020-05-07 Thread Josh de Kock
The NEON hscale function only supports X8 filter sizes and should only
be selected when these are being used.

Signed-off-by: Josh de Kock 
---
 libswscale/aarch64/swscale.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libswscale/aarch64/swscale.c b/libswscale/aarch64/swscale.c
index 54a3beabe8..eecbea88ca 100644
--- a/libswscale/aarch64/swscale.c
+++ b/libswscale/aarch64/swscale.c
@@ -34,7 +34,10 @@ av_cold void ff_sws_init_swscale_aarch64(SwsContext *c)
 int cpu_flags = av_get_cpu_flags();
 
 if (have_neon(cpu_flags)) {
-if (c->srcBpc == 8 && c->dstBpc <= 14) {
+if (c->srcBpc == 8 && c->dstBpc <= 14 &&
+(c->hLumFilterSize % 8) == 0 &&
+(c->hChrFilterSize % 8) == 0)
+{
 c->hyScale = c->hcScale = ff_hscale_8_to_15_neon;
 }
 if (c->dstBpc == 8) {
-- 
2.20.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] tools: fix const specifier for AVInputFormat

2020-04-30 Thread Josh de Kock

On 29/04/2020 20:58, Michael Niedermayer wrote:

On Wed, Apr 29, 2020 at 12:00:23PM +0100, Josh de Kock wrote:

Signed-off-by: Josh de Kock 
---
  tools/probetest.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

  Small fix for compiler warning caused by my earlier change.


LGTM



Thanks, applied.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] Add general_assembly_bootstrap.pl

2020-04-29 Thread Josh de Kock

On 29/04/2020 14:00, Nicolas George wrote:

Anton Khirnov (12020-04-29):

  Better late than never, this patch will continue to put in place the
  voting systems for FFmpeg discussed at VDD 2019 and FOSDEM 2020.
  There is probably a better way to do this, but the aim is just to
  'bootstrap' and kickstart the process and commitees.

 ^

Since it is only useful once, is there a point in having it in the tree?

Why would it only be useful once? I thought we'd use the same procedure
for every vote.


We did not yet agree on the procedure for all votes, AFAIK, we only
agreed on the procedure for the first vote. Having a procedure already
implemented and in the official Git source tree would be pretty
disloyal.



To add to this:

We could decide to use this every time, but that would have to be done 
by a vote. But we can't vote on that with nothing, so hence we have this 
to begin somewhere.


The community and technical committees will be decided by the 
bootstrapped general assembly, along with formalising the voting 
procedures and processes. Going forward from there it should be a pretty 
simple case of just continuing the methods which were chosen.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH v2] avfilter/vf_v360: adjustment out_pad and in_pad maximum value to 1/10

2020-04-29 Thread Josh de Kock

On 26/04/2020 15:43, Steven Liu wrote:




2020年4月21日 下午10:54,Steven Liu  写道:

Because not every user know about in_pad and out_pad reasonable value range
so maybe try to set 1.0, but setting 1.0 is so hugh to get an fatal error.

Suggested-by: Paul B Mahol 
Signed-off-by: Steven Liu 
---
doc/filters.texi  | 1 +
libavfilter/vf_v360.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 80c33f5edb..740aba0642 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -18956,6 +18956,7 @@ No padding.
@end table

Default value is @b{@samp{0}}.
+Maximum value is @b{@samp{0.1}}.

@item fin_pad
@item fout_pad
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index ebc281dfca..e5b75c7226 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -133,8 +133,8 @@ static const AVOption v360_options[] = {
 {"out_forder", "output cubemap face order", OFFSET(out_forder), AV_OPT_TYPE_STRING, 
{.str="rludfb"},0, NB_DIRECTIONS-1, FLAGS, "out_forder"},
 {   "in_frot", "input cubemap face rotation",  OFFSET(in_frot), AV_OPT_TYPE_STRING, 
{.str="00"},0, NB_DIRECTIONS-1, FLAGS, "in_frot"},
 {  "out_frot", "output cubemap face rotation",OFFSET(out_frot), AV_OPT_TYPE_STRING, 
{.str="00"},0, NB_DIRECTIONS-1, FLAGS, "out_frot"},
-{"in_pad", "percent input cubemap pads",OFFSET(in_pad), AV_OPT_TYPE_FLOAT,  
{.dbl=0.f},   0.f, 1.f,TFLAGS, "in_pad"},
-{   "out_pad", "percent output cubemap pads",  OFFSET(out_pad), AV_OPT_TYPE_FLOAT,  
{.dbl=0.f},   0.f, 1.f,TFLAGS, "out_pad"},
+{"in_pad", "percent input cubemap pads",OFFSET(in_pad), AV_OPT_TYPE_FLOAT,  
{.dbl=0.f},   0.f, 0.1,TFLAGS, "in_pad"},
+{   "out_pad", "percent output cubemap pads",  OFFSET(out_pad), AV_OPT_TYPE_FLOAT,  
{.dbl=0.f},   0.f, 0.1,TFLAGS, "out_pad"},
 {   "fin_pad", "fixed input cubemap pads", OFFSET(fin_pad), AV_OPT_TYPE_INT,
{.i64=0},   0, 100,TFLAGS, "fin_pad"},
 {  "fout_pad", "fixed output cubemap pads",   OFFSET(fout_pad), AV_OPT_TYPE_INT,
{.i64=0},   0, 100,TFLAGS, "fout_pad"},
 {   "yaw", "yaw rotation", OFFSET(yaw), AV_OPT_TYPE_FLOAT,  
{.dbl=0.f},-180.f,   180.f,TFLAGS, "yaw"},
--
2.25.0




Ping

Thanks

Steven Liu



Applied.

--
Josh

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] tests/api/api-h264-slice-test: remove unused bool header

2020-04-29 Thread Josh de Kock

On 29/04/2020 13:11, Fu, Linjie wrote:

From: ffmpeg-devel  On Behalf Of
Carl Eugen Hoyos
Sent: Thursday, April 2, 2020 03:23
To: FFmpeg development discussions and patches 
Subject: Re: [FFmpeg-devel] [PATCH] tests/api/api-h264-slice-test: remove
unused bool header

Am Mi., 1. Apr. 2020 um 06:58 Uhr schrieb Linjie Fu :


Signed-off-by: Linjie Fu 
---
  tests/api/api-h264-slice-test.c | 1 -
  1 file changed, 1 deletion(-)

diff --git a/tests/api/api-h264-slice-test.c b/tests/api/api-h264-slice-test.c
index dee93b8..b7aa405 100644
--- a/tests/api/api-h264-slice-test.c
+++ b/tests/api/api-h264-slice-test.c
@@ -24,7 +24,6 @@

  #include "config.h"

-#include 


Good idea.

Carl Eugen


Ping for this, thx.

  - Linjie


Thanks, applied.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 0/2] fix for seeking in HLS with TS/FMP4 media

2020-04-29 Thread Josh de Kock

On 25/04/2020 22:42, Carl Eugen Hoyos wrote:

Am Fr., 24. Apr. 2020 um 17:21 Uhr schrieb vectronic
:


I am resubmitting a patch which fixes the following two tickets:



Do you not want to commit with your name rather than a handle here?


https://trac.ffmpeg.org/ticket/7359
https://trac.ffmpeg.org/ticket/7485


Are you Nick Ryan / did you write the attached patches?


The LinkedIn on his website suggests he is.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] Add general_assembly_bootstrap.pl

2020-04-29 Thread Josh de Kock

On 24/04/2020 11:44, Josh de Kock wrote:

On 24/04/2020 11:29, Nicolas George wrote:

Josh de Kock (12020-04-24):

This script aims to extract contributors who are eligible for the
general assembly.

Signed-off-by: Josh de Kock 
---

  Better late than never, this patch will continue to put in place the
  voting systems for FFmpeg discussed at VDD 2019 and FOSDEM 2020.
  There is probably a better way to do this, but the aim is just to
  'bootstrap' and kickstart the process and commitees.


Since it is only useful once, is there a point in having it in the tree?

There is no particular need for it to stay in the tree. Regardless, I 
wanted to send it to the mailing list to avoid any complications vs if I 
had just sent the output of the script (so that it can be reviewed and 
tested by others).


My suggestion would be to actually commit it and then remove it later 
when we have another system properly setup so that it is in git history.




Ping for further comments. This will affect all developers.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2020-04-29 Thread Josh de Kock

On 23/04/2020 08:14, Martin Storsjö wrote:

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
+++ b/tests/fate/vcodec.mak
@@ -29,13 +29,14 @@ FATE_VCODEC-$(call ENCDEC, DNXHD, DNXHD) += dnxhd-720p  
\
  dnxhd-720p-rd   \
  dnxhd-720p-10bit\
  dnxhd-720p-hr-lb\
-dnxhd-uhd-hr-sq \
  dnxhd-edge1-hr  \
  dnxhd-edge2-hr  \
  dnxhd-edge3-hr
  
  FATE_VCODEC-$(call ALLYES, DNXHD_ENCODER DNXHD_DECODER LARGE_TESTS) += dnxhd-4k-hr-lb \

-   
dnxhd-2k-hr-hq
+   
dnxhd-2k-hr-hq \
+   
dnxhd-uhd-hr-sq
+
  
  FATE_VCODEC-$(call ENCDEC, VC2 DIRAC, MOV) += vc2-420p vc2-420p10 vc2-420p12 \

vc2-422p vc2-422p10 vc2-422p12 \



This was applied.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] avformat/hls: disable persistent HTTP connections by default w/ schannel

2020-04-29 Thread Josh de Kock

On 26/04/2020 20:43, Jan Ekström wrote:

This TLS implementation has always had issues with the way that
libavformat implemented persistency, yet nobody seemed to be able to
figure out why. It currently can lead to completely stuck playback,
so disable it by default.

Additionally, update the documentation to match the new behavior.
---
  doc/demuxers.texi | 3 ++-
  libavformat/hls.c | 2 +-
  2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/doc/demuxers.texi b/doc/demuxers.texi
index 3c15ab9eee..35920af32d 100644
--- a/doc/demuxers.texi
+++ b/doc/demuxers.texi
@@ -337,7 +337,8 @@ Default value is 1000.
  
  @item http_persistent

  Use persistent HTTP connections. Applicable only for HTTP streams.
-Enabled by default.
+Enabled by default, except when the Windows schannel TLS implementation
+is utilized.
  
  @item http_multiple

  Use multiple HTTP connections for downloading HTTP segments.
diff --git a/libavformat/hls.c b/libavformat/hls.c
index fc45719d1c..f709f0c890 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -2343,7 +2343,7 @@ static const AVOption hls_options[] = {
  {"m3u8_hold_counters", "The maximum number of times to load m3u8 when it 
refreshes without new segments",
  OFFSET(m3u8_hold_counters), AV_OPT_TYPE_INT, {.i64 = 1000}, 0, 
INT_MAX, FLAGS},
  {"http_persistent", "Use persistent HTTP connections",
-OFFSET(http_persistent), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FLAGS },
+OFFSET(http_persistent), AV_OPT_TYPE_BOOL, {.i64 = !CONFIG_SCHANNEL}, 
0, 1, FLAGS },
  {"http_multiple", "Use multiple HTTP connections for fetching segments",
  OFFSET(http_multiple), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, FLAGS},
  {"http_seekable", "Use HTTP partial requests, 0 = disable, 1 = enable, -1 = 
auto",



Whilst I'm not against a stop-gap change for this, did you already open 
a ticket for this? I think it would be good to track it.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] tools: fix const specifier for AVInputFormat

2020-04-29 Thread Josh de Kock
Signed-off-by: Josh de Kock 
---
 tools/probetest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

 Small fix for compiler warning caused by my earlier change.

diff --git a/tools/probetest.c b/tools/probetest.c
index cfa309cabd..6f0e002b74 100644
--- a/tools/probetest.c
+++ b/tools/probetest.c
@@ -66,7 +66,7 @@ static void probe(AVProbeData *pd, int type, int p, int size)
 static void print_times(void)
 {
 int i = 0;
-AVInputFormat *fmt = NULL;
+const AVInputFormat *fmt = NULL;
 void *fmt_opaque = NULL;
 
 while ((fmt = av_demuxer_iterate(_opaque))) {
-- 
2.26.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH v3] libavcodec/libx264: fix reference frame computation based on level

2020-04-28 Thread Josh de Kock

On 26/04/2020 12:46, Josh Brewster wrote:

I only made sure that the level was positive because its initial
value was -1.


else if (x4->params.i_level_idc >= 0) {
Let me know if I need to reject 0 too. It seemed like premature optimization
as the level simply wouldn't be present in x264_levels.


I'd say yes, level_idc = 0 is possible but invalid by PARSE_X264_OPT(), which 
seems
make no sense to calculate refs from x264_levels[] table.

-   Linjie


Changed to > 0, thanks.


Hi, is there anything else I need to do to have this merged?


From a precursory look at what x264 and we're doing here your patch is 
correct. It doesn't break from a quick test, and looks OK to me. Would 
rather someone else has a look at it too but I will again in a couple 
days if no one does.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] Complete rewrite of the "fps" video filter section. More accurate.

2020-04-28 Thread Josh de Kock

On 27/04/2020 07:17, list+ffmpeg-...@jdlh.com wrote:

From: Jim DeLaHunt 

This is a complete rewrite of the documentation for the "fps" video
filter. It describes the filter's behaviour more clearly and accurately.
I based the rewrite on reading the source code in vf_fps.c closely.

No code, or other documentation files, are touched by this change.

Signed-off-by: Jim DeLaHunt 
---
  doc/filters.texi | 167 ++-
  1 file changed, 149 insertions(+), 18 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 71a6787289..bd4a1ad2a9 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -11139,27 +11139,34 @@ format=pix_fmts=yuv420p|yuv444p|yuv410p
  @anchor{fps}
  @section fps
  
-Convert the video to specified constant frame rate by duplicating or dropping

-frames as necessary.
+Generate a video, having the specified constant frame rate, from the frames of
+the input video, by copying or duplicating or dropping input frames based on
+their input presentation time stamps (PTSs). The output video has new PTSs. You


Should just be `PTS'.


+can choose the method for rounding from input PTS to output PTS.
  
  It accepts the following parameters:

  @table @option
  
  @item fps

-The desired output frame rate. The default is @code{25}.
+The output frame rate, as a number of frames per second. This value can be an
+integer, real, or rational number, or an abbreviation. The default is 
@code{25}.
  


I don't think this change adds any value here.


  @item start_time
-Assume the first PTS should be the given value, in seconds. This allows for
-padding/trimming at the start of stream. By default, no assumption is made
-about the first frame's expected PTS, so no padding or trimming is done.
-For example, this could be set to 0 to pad the beginning with duplicates of
-the first frame if a video stream starts after the audio stream or to trim any
-frames with a negative PTS.
+The time, in seconds from the start of the input stream, which is converted to
+an input starting PTS value and an output starting PTS value.
+If set, @var{fps} drops input frames
+which have PTS values less than the input starting PTS. If not set, the input
+and output starting PTS values are zero, but @var{fps} drops no input frames 
based
+on PTS.
+(See details below.)
  
  @item round

-Timestamp (PTS) rounding method.
+Rounding method to use when calculating output Presentation Timestamp
+(PTS) integer values from input PTS values. If the calculated output PTS value
+is not exactly an integer, then the method determines which of the two
+neighbouring integer values to choose.
  
-Possible values are:

+Possible method names are:


They are still just values for the option.


  @table @option
  @item zero
  round towards 0
@@ -11170,43 +11177,167 @@ round towards -infinity
  @item up
  round towards +infinity
  @item near
-round to nearest
+round to nearest (and if exactly at midpoint, away from 0)
  @end table
  The default is @code{near}.
  
  @item eof_action

-Action performed when reading the last frame.
+Action which @var{fps} takes with the final input frame. The input video passes
+in an ending input PTS, which @var{fps} converts to an ending output PTS.
+@var{fps} drops any input frames with a PTS at or after this ending PTS.
  
  Possible values are:

  @table @option
  @item round
-Use same timestamp rounding method as used for other frames.
+Use same rounding method as for other frames, to convert the ending input PTS
+to output PTS.
+
  @item pass
-Pass through last frame if input duration has not been reached yet.
+Round the ending input PTS using @code{up}. This can have the effect of passing
+through one last input frame.
  @end table
+
  The default is @code{round}.
  
  @end table
  
-Alternatively, the options can be specified as a flat string:

+Alternatively, the options may be specified as a flat string:
  @var{fps}[:@var{start_time}[:@var{round}]].
  
+@var{fps} generates an output video with integer Presentation Time Stamp (PTS)


You already specify what PTS is above.


+values which increment by one each output frame, and with a time base set to
+the inverse of the given frame rate. @var{fps} copies, duplicates, or drops
+input frames, in sequence, to the output video. It does so according to their
+input PTS values, as converted to seconds (via the input time base), then
+rounded to output PTS values.
+
+@var{fps} sets output PTS values in terms of a time line which starts at
+zero. The integer PTS value multipled by the output time base gives a point


multiplied


+in seconds of that output frame on that timeline. If the @var{start_time}
+parameter is not set, or is zero, the first output frame's PTS value is zero.
+Otherwise, the first PTS value is the output starting PTS value calculated
+from the @var{start_time} parameter.
+
+@var{fps} interprets input PTS values in terms of the same time line. It
+multiplies the input PTS value by the input time 

Re: [FFmpeg-devel] [PATCH] Add general_assembly_bootstrap.pl

2020-04-24 Thread Josh de Kock

On 24/04/2020 11:29, Nicolas George wrote:

Josh de Kock (12020-04-24):

This script aims to extract contributors who are eligible for the
general assembly.

Signed-off-by: Josh de Kock 
---

  Better late than never, this patch will continue to put in place the
  voting systems for FFmpeg discussed at VDD 2019 and FOSDEM 2020.
  There is probably a better way to do this, but the aim is just to
  'bootstrap' and kickstart the process and commitees.


Since it is only useful once, is there a point in having it in the tree?

There is no particular need for it to stay in the tree. Regardless, I 
wanted to send it to the mailing list to avoid any complications vs if I 
had just sent the output of the script (so that it can be reviewed and 
tested by others).


My suggestion would be to actually commit it and then remove it later 
when we have another system properly setup so that it is in git history.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] Add general_assembly_bootstrap.pl

2020-04-24 Thread Josh de Kock
This script aims to extract contributors who are eligible for the
general assembly.

Signed-off-by: Josh de Kock 
---

 Better late than never, this patch will continue to put in place the
 voting systems for FFmpeg discussed at VDD 2019 and FOSDEM 2020.
 There is probably a better way to do this, but the aim is just to
 'bootstrap' and kickstart the process and commitees.

 tools/general_assembly_bootstrap.pl | 48 +
 1 file changed, 48 insertions(+)
 create mode 100755 tools/general_assembly_bootstrap.pl

diff --git a/tools/general_assembly_bootstrap.pl 
b/tools/general_assembly_bootstrap.pl
new file mode 100755
index 00..320fe76992
--- /dev/null
+++ b/tools/general_assembly_bootstrap.pl
@@ -0,0 +1,48 @@
+#!/usr/bin/env perl
+
+use warnings;
+use strict;
+
+use Encode qw(decode);
+use List::MoreUtils qw(uniq);
+# cpan List::MoreUtils
+use JSON::MaybeXS;
+# cpan JSON::MaybeXS
+
+use Data::Dumper;
+
+sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };
+
+my @shortlog = split /\n/, decode('UTF-8', `git shortlog -sne --since="last 36 
months"`, Encode::FB_CROAK);
+
+my %assembly = ();
+
+foreach my $line (@shortlog) {
+my ($count, $name, $email) = $line =~ m/^ *(\d+) *(.*?) <(.*?)>/;
+
+if ($count < 20) {
+next;
+}
+
+# make sure name is trimmed
+$name = trim $name;
+
+# assume people with 50 commits have at least 20 source commits
+if ($count < 50) {
+my $true = 0;
+my @commits = split /(^|\n)commit [a-z0-9]{40}(\n|$)/, decode('UTF-8', 
`git log --name-only --use-mailmap --author="$email" --since="last 36 months"`, 
Encode::FB_CROAK);
+foreach my $commit (@commits) {
+if ($commit =~ /\n[\w\/]+\.(c|h|S|asm)/) {
+$true++;
+}
+}
+
+if ($true < 20) {
+next;
+}
+}
+
+$assembly{$name} = $email;
+}
+
+print encode_json(\%assembly);
-- 
2.24.1 (Apple Git-126)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] cmdutils: stop using deprecated av_codec_next()

2020-04-20 Thread Josh de Kock

On 14/04/2020 13:37, Josh de Kock wrote:

On Tue, Apr 14, 2020, at 9:09 AM, Anton Khirnov wrote:

---
  fftools/cmdutils.c | 33 +++--
  1 file changed, 19 insertions(+), 14 deletions(-)

[...]


LGTM, thanks. I will apply this a bit later after my set (or you can if you 
want it sooner).


Applied.

--
Josh

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 3/3] tools: stop using deprecated av_codec_next()

2020-04-20 Thread Josh de Kock

On 14/04/2020 13:38, Josh de Kock wrote:

Signed-off-by: Josh de Kock 
---
  tools/enum_options.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/enum_options.c b/tools/enum_options.c
index 28631d1a6b..548e427b7a 100644
--- a/tools/enum_options.c
+++ b/tools/enum_options.c
@@ -113,13 +113,14 @@ static void show_format_opts(void)
  
  static void show_codec_opts(void)

  {
+void *iter = NULL;
  AVCodec *c = NULL;
  
  printf("@section Generic codec AVOptions\n");

  show_opts(avcodec_get_class());
  
  printf("@section Codec-specific AVOptions\n");

-while ((c = av_codec_next(c))) {
+while ((c = av_codec_iterate())) {
  if (!c->priv_class)
  continue;
  printf("@subsection %s AVOptions\n", c->priv_class->class_name);



Set applied.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH v2] configure: fix clang on macOS 10.15

2020-04-15 Thread Josh de Kock
On Wed, Apr 15, 2020, at 3:54 PM, Jan Ekström wrote:
> [...]
> 
> Thank you, LGTM from me.
> 
> Jan

Pushed.

-- 
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH v2] configure: fix clang on macOS 10.15

2020-04-15 Thread Josh de Kock
Works around a bug in the newer Xcode 11's clang with -fstack-check
emitting bad code with misaligned call instructions.

This fixes Trac #8073
---
 configure | 5 +
 1 file changed, 5 insertions(+)

diff --git a/configure b/configure
index 4d4c429be9..2ede4e7163 100755
--- a/configure
+++ b/configure
@@ -5358,6 +5358,11 @@ case $target_os in
 fi
 version_script='-exported_symbols_list'
 VERSION_SCRIPT_POSTPROCESS_CMD='tr " " "\n" | sed -n 
/global:/,/local:/p | grep ";" | tr ";" "\n" | sed -E "s/(.+)/_\1/g" | sed -E 
"s/(.+[^*])/\1*/"'
+# Workaround for Xcode 11 -fstack-check bug
+if enabled clang; then
+clang_version=$($cc -dumpversion)
+test ${clang_version%%.*} -eq 11 && add_cflags -fno-stack-check
+fi
 ;;
 msys*)
 die "Native MSYS builds are discouraged, please use the MINGW 
environment."
-- 
2.24.1 (Apple Git-126)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] configure: fix clang on macOS 10.15

2020-04-14 Thread Josh de Kock
Works around a bug in the newer Xcode 11's clang with -fstack-check
emitting bad code with misaligned call instructions.
---
 configure | 5 +
 1 file changed, 5 insertions(+)

diff --git a/configure b/configure
index 4d4c429be9..c872a2932d 100755
--- a/configure
+++ b/configure
@@ -5358,6 +5358,11 @@ case $target_os in
 fi
 version_script='-exported_symbols_list'
 VERSION_SCRIPT_POSTPROCESS_CMD='tr " " "\n" | sed -n 
/global:/,/local:/p | grep ";" | tr ";" "\n" | sed -E "s/(.+)/_\1/g" | sed -E 
"s/(.+[^*])/\1*/"'
+# Workaround for Xcode 11 -fstack-check bug
+if enabled clang; then
+clang_version=$($cc -dumpversion)
+test ${clang_version%%.*} -ge 11 && add_cflags -fno-stack-check
+fi
 ;;
 msys*)
 die "Native MSYS builds are discouraged, please use the MINGW 
environment."
-- 
2.24.1 (Apple Git-126)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH 2/3] lavf/utils: stop using deprecated av_codec_next()

2020-04-14 Thread Josh de Kock
Signed-off-by: Josh de Kock 
---
 libavformat/utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index a58e47fabc..4f777ba849 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -222,7 +222,8 @@ static const AVCodec *find_probe_decoder(AVFormatContext 
*s, const AVStream *st,
 
 if (codec->capabilities & AV_CODEC_CAP_AVOID_PROBING) {
 const AVCodec *probe_codec = NULL;
-while (probe_codec = av_codec_next(probe_codec)) {
+void *iter = NULL;
+while ((probe_codec = av_codec_iterate())) {
 if (probe_codec->id == codec_id &&
 av_codec_is_decoder(probe_codec) &&
 !(probe_codec->capabilities & (AV_CODEC_CAP_AVOID_PROBING 
| AV_CODEC_CAP_EXPERIMENTAL))) {
-- 
2.24.1 (Apple Git-126)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH 3/3] tools: stop using deprecated av_codec_next()

2020-04-14 Thread Josh de Kock
Signed-off-by: Josh de Kock 
---
 tools/enum_options.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/enum_options.c b/tools/enum_options.c
index 28631d1a6b..548e427b7a 100644
--- a/tools/enum_options.c
+++ b/tools/enum_options.c
@@ -113,13 +113,14 @@ static void show_format_opts(void)
 
 static void show_codec_opts(void)
 {
+void *iter = NULL;
 AVCodec *c = NULL;
 
 printf("@section Generic codec AVOptions\n");
 show_opts(avcodec_get_class());
 
 printf("@section Codec-specific AVOptions\n");
-while ((c = av_codec_next(c))) {
+while ((c = av_codec_iterate())) {
 if (!c->priv_class)
 continue;
 printf("@subsection %s AVOptions\n", c->priv_class->class_name);
-- 
2.24.1 (Apple Git-126)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH 1/3] lavc: stop using deprecated av_codec_next()

2020-04-14 Thread Josh de Kock
Signed-off-by: Josh de Kock 
---
 libavcodec/options.c | 5 +++--
 libavcodec/tests/utils.c | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/libavcodec/options.c b/libavcodec/options.c
index 35e8ac9313..babab599fc 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -55,15 +55,16 @@ static void *codec_child_next(void *obj, void *prev)
 
 static const AVClass *codec_child_class_next(const AVClass *prev)
 {
+void *iter = NULL;
 AVCodec *c = NULL;
 
 /* find the codec that corresponds to prev */
-while (prev && (c = av_codec_next(c)))
+while (prev && (c = av_codec_iterate()))
 if (c->priv_class == prev)
 break;
 
 /* find next codec with priv options */
-while (c = av_codec_next(c))
+while (c = av_codec_iterate())
 if (c->priv_class)
 return c->priv_class;
 return NULL;
diff --git a/libavcodec/tests/utils.c b/libavcodec/tests/utils.c
index f6ba7fe66e..5041a4085e 100644
--- a/libavcodec/tests/utils.c
+++ b/libavcodec/tests/utils.c
@@ -19,10 +19,11 @@
 #include "libavcodec/avcodec.h"
 
 int main(void){
+void *iter = NULL;
 AVCodec *codec = NULL;
 int ret = 0;
 
-while (codec = av_codec_next(codec)) {
+while (codec = av_codec_iterate()) {
 if (av_codec_is_encoder(codec)) {
 if (codec->type == AVMEDIA_TYPE_AUDIO) {
 if (!codec->sample_fmts) {
-- 
2.24.1 (Apple Git-126)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] cmdutils: stop using deprecated av_codec_next()

2020-04-14 Thread Josh de Kock
On Tue, Apr 14, 2020, at 9:09 AM, Anton Khirnov wrote:
> ---
>  fftools/cmdutils.c | 33 +++--
>  1 file changed, 19 insertions(+), 14 deletions(-)
> 
> [...]

LGTM, thanks. I will apply this a bit later after my set (or you can if you 
want it sooner).

-- 
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH v3] lavfi: add new iteration API

2020-04-14 Thread Josh de Kock
Hi,

On Mon, Apr 13, 2020, at 10:32 PM, Josh Allmann wrote:
> Hi,
> 
> On Sat, 24 Mar 2018 at 14:40, Josh de Kock  wrote:
> >
> > Signed-off-by: Josh de Kock 
> > ---
> >  configure|  29 +-
> >  doc/APIchanges   |   4 +
> >  doc/writing_filters.txt  |   6 +-
> >  libavfilter/allfilters.c | 823 
> > +--
> >  libavfilter/avfilter.c   |  50 +--
> >  libavfilter/avfilter.h   |  29 +-
> >  libavfilter/version.h|   3 +
> >  7 files changed, 489 insertions(+), 455 deletions(-)
> >
> 
> This is a couple years too late, but wanted to drop a note that this
> particular API change was breaking : it made avfilter_register a
> no-op. The consequence is that it's much more difficult to maintain
> filters out-of-tree; preserving the old behavior without changes to
> user code requires a special build of ffmpeg that has the filter
> configured/compiled in. The recommended workaround of using
> avfilter_graph_alloc_filter requires more effort to wire the filter in
> explicitly. It also doesn't allow for conveniences such as using
> avfilter_graph_parse, since there doesn't seem to be a way to make
> filters accessible via avfilter_get_by_name outside of ffmpeg compile
> time.
> 
> If there is another workaround that I'm missing, please let me know,
> or if there's some deeper rationale for the decision to disable this
> feature.

This was actually an intentional change, there was some trouble with how
external codecs/filters/etc should be handled.

Since this was an unsupported use-case which was quite sensitive to ABI the
change was there to explicitly prevent people (ab)using the API like this.  It
was also to prepare for potentially a new API to implement this in a proper
fashion (but as you can see this was never completed).

I did begin working on this again a little while back but due to an unfortunate
data-loss I will have to start from scratch to continue working on it (yes, yes
'where's your backup?' I know). It's likely to be something I will be working
on in the future since I will be doing FFmpeg stuff again soon.

There is also the discussion of 'do we want this?' from a more ideological
perspective which we will have to re-discuss, maybe something like gstreamer is
more suited for the majority of the use-cases (?).

-- 
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] REMOTE JOB POST: FFMPEG EXPERT

2020-03-04 Thread Josh de Kock
On Tue, Mar 3, 2020, at 12:55 PM, sumaklos rembert wrote:
> We are hiring a remote FFMPEG engineer
>
> [...]

You already posted this a week ago, there is no need to spam the
list with the same job multiple times.

-- 
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] Add .mailmap

2020-02-26 Thread Josh de Kock
On Mon, Feb 24, 2020, at 11:19 AM, Thilo Borgmann wrote:
> Am 23.02.20 um 21:40 schrieb Josh de Kock:
> > On Sun, Feb 23, 2020, at 4:07 PM, Thilo Borgmann wrote:
> >> [...]
> >>
> >> How is it automatically generated?
> > 
> > I wrote a small script to parse author names/emails and group
> > emails together based on names. In the future, additions should
> > be added manually.
> 
> Having that script in tools/ shouldn't hurt, manual updates can get out of 
> sync.
> Also authors might be unaware of or forgetting about .mailmap.
> 
> If you scriptify the group of people for a general assembly like 
> specified during some earlier meeting, that should be committed, 
> too.
> 
> .mailmap patch itself LGTM.

Pushed.

I will send a patch to add the script to compute the general assembly soon.

-- 
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] Add .mailmap

2020-02-26 Thread Josh de Kock
Hi Steven,

On Mon, Feb 24, 2020, at 2:03 AM, Steven Liu wrote:
> [...]
> How can I get the script :D
> 
> Thanks
> 
> Steven

I won't be looking to upstream this script (the other one yes), but I will
share it here for you. You'll have to excuse my poor scripting :)

-- 
Josh

#!/usr/bin/env perl

use warnings;
use strict;

# cpan List::MoreUtils JSON
use Encode qw(decode);
use List::MoreUtils qw(uniq);

sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };

my @shortlog = split /\n/, decode('UTF-8', `git shortlog -sne --since="last 36 
months"`, Encode::FB_CROAK);

my %assembly = ();
my %developers = ();

foreach my $line (@shortlog) {
my ($count, $name, $email) = $line =~ m/^ *(\d+) *(.*?) <(.*?)>/;

# ignore
$email =~ s/ at /@/;
$name = trim $name;

if (exists($developers{$name})) {
$developers{$name}{commit_count} += $count;

push @{$developers{$name}{email}}, $email;
} else {
$developers{$name} = {
commit_count => $count,
email => [$email],
};
}
}

foreach my $key (keys %developers) {
# many people with different emails, only care about frequent committers
if ($developers{$key}{commit_count} >= 20) {
$developers{$key}{email} = [uniq @{$developers{$key}{email}}];
if (scalar @{$developers{$key}{email}} > 1) {
foreach my $email (@{$developers{$key}{email}}) {
print "$email ";
}
print "\n";
}
}
}
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] Add .mailmap

2020-02-23 Thread Josh de Kock
On Sun, Feb 23, 2020, at 4:07 PM, Thilo Borgmann wrote:
> [...]
> 
> How is it automatically generated?

I wrote a small script to parse author names/emails and group
emails together based on names. In the future, additions should
be added manually.

-- 
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] Add .mailmap

2020-02-23 Thread Josh de Kock
On Sun, Feb 23, 2020, at 2:36 PM, James Darnley wrote:
> [...]
> 
> What is "preferred email" when you have 2 roles?  My commits on the job
> get obe.tv (or are supposed to) and ones made in my own time get
> gmail.com (or are supposed to).
> 
> Is it: when you screw up what email should you be shouted at on?
> 
> I guess since I probably send more discussion email from gmail.com,
> maybe it is that one.

It's if you want your two emails to be associated. If you don't
associate them and you don't get >20 commits in the last 36
months on either individually then you won't be eligible for the
general assembly. You can still see which commits are on each
email (since this is important for copyright reasons).

It is just a visual thing: I will swap your association to show
your gmail email first.
-- 
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] Add .mailmap

2020-02-23 Thread Josh de Kock
On Sun, Feb 23, 2020, at 2:12 PM, Jean-Baptiste Kempf wrote:
> [...]
>
> I think this is a good idea.
> But are you sure all of those are in the right order? (aka preferred 
> email is shown)

It looks mostly right to me, of course individuals will need to manually
verify it for themselves (but it can always be changed later).

-- 
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] Add .mailmap

2020-02-22 Thread Josh de Kock
This allows for easy shortlog/log parsing, useful in determining
eligible members of the general assembly for the new FFmpeg voting
system.

Signed-off-by: Josh de Kock 
---

This list was automatically generated based off of commits from
people with the same names. If you want this adjusted/your
mapping added in this commit then please comment.

 .mailmap | 16 
 1 file changed, 16 insertions(+)
 create mode 100644 .mailmap

diff --git a/.mailmap b/.mailmap
new file mode 100644
index 00..347d3f1a9d
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1,16 @@
+ 
+ 
+ 
+ 
+  
+ 
+ 
+  
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
-- 
2.21.1 (Apple Git-122.3)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] Followup: FOSDEM meeting

2020-02-21 Thread Josh de Kock
Hi all,

Firstly, I want to thank j-b for his organisation of the meeting at
FOSDEM, I think the meeting itself was productive and the outcome was
good.

Unfortunately, there is one issue: So far no one has shared a copy of
the notes or a picture of the blackboard after the meeting. I was silly
to assuming that someone else had recorded it and not taking a photo was
my mistake.

Did anyone keep a note of the results of the meeting at FOSDEM (or can
at least recall them, my memory is not so good)? If not, this makes it
difficult to begin the process of enacting the various votes which were
discussed.

I will make sure to take notes in any future meetings. I think that this
is the best way to ensure that it properly gets done by holding myself,
rather than others, accountable.

-- 
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] AVWriter API

2020-01-12 Thread Josh de Kock

Hi,

I have very little time to work on FFmpeg lately but this thread caught
my interest.

Nicolas George writes:
> Anton Khirnov (12020-01-07):
>> And most importantly - strings are simple. Every C programmer (worth the
>> name) understands strings. But now you'd be forcing every API user to
>> understand and remember this new API.
>
> [...]
>
> We will not play the game of reinventing yet another data structure for
> strings, but let us not play the game of pretending the issue does not
> exist: it only makes the problem more stinging.

I think this is really important, AVWriter allows the user to make use
of whichever implementation of strings their application already uses
and not have to deal with yet-another-string-type.

> Who wants a mallocated char pointer, really? Who things it is a good
> idea for a string?
>
> Not applications that use another allocator than malloc(), obviously.

Not relevant to this thread but: How would an application not using the
traditional malloc() allocator work use FFmpeg at all if it didn't 'just
work' by setting MALLOC_PREFIX?

> [...]
>
> Etc. I hope you see my point and I do not need to add Java and PHP to
> these examples.

It's an issue that everyone is making their own string type, we do
definitely not want to do this (one of the reasons I think this API is
in the right direction).

> By returning a mallocated char *, you are saying to the authors of these
> applications "screw you, I don't care about your use case". If you don't
> care about most applications' use cases, don't design public APIs.

I guess the argument against this would be 'well, you can just copy it
to whichever string implementation you need', which maybe isn't ideal
but it 'works' currently.

> This AVWriter API addresses all that. If the caller wants a mallocated
> char *, they can get it, with almost no extra code. But if they want
> something else, they can get it.

Important that we won't lose any functionality with this new API.

> And even if it is used only for a mallocated char *, this code still
> brings the benefit of factoring error checks. Error checks are "not to
> be avoided", but they are not to be littered all over the code either:
> they are often tricky, with the risk of leaks or double frees, and they
> are almost never tested. Any change that centralizes them is good to
> take, and this one of the things AVWriter does, centralize error checks.

Deferring error checks properly and centralising them means they can be
better handled by a user. This is a good approach.

> As for the extra complexity. Yes, there is some. There is some
> significant complexity in the implementation, of course. If it is
> anybody's problem, it's mine.
>
> There is a little complexity for the caller. Look at the code: very very
> little complexity. Much less than what is required learning to use any
> FFmpeg API anyway.
>
> There is no complexity for the callee. If anything, using AVWriter makes
> the callee code simpler.

I don't think the complexity is a big issue here.

> I understand that you may be reluctant to embrace creative APIs, but
> please try to go beyond that reluctance to see the actual benefits and
> costs.

For the most part I think the concept is good, and it definitely solves
a problem which exists but the million dollar question is:

Are strings a big enough issue at the moment that we should introduce a
new API to fix them?

Though I guess if someone is willing to implement a fix, then the answer
to this doesn't even matter at all, and should always be 'yes'--you have
my support for this set, at least.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH vFINAL] fate: add api-h264-slice test

2018-10-26 Thread Josh de Kock

On 24/10/2018 19:02, jos...@ob-encoder.com wrote:

From: Josh de Kock 

This test ensures that you are able to send N number of slice NALUs in slice 
threaded mode to be decoded simultaneously
---

  tests/api/Makefile  |   1 +
  tests/api/api-h264-slice-test.c | 221 +++
  tests/fate/api.mak  |   4 +
  tests/ref/fate/api-h264-slice   | 309 
  4 files changed, 535 insertions(+)
  create mode 100644 tests/api/api-h264-slice-test.c
  create mode 100644 tests/ref/fate/api-h264-slice

[...]


Pushed.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v4] fate: add api-h264-slice test

2018-10-22 Thread Josh de Kock

On 16/10/2018 12:33, Michael Niedermayer wrote:

On Mon, Oct 15, 2018 at 01:32:03PM +0100, jos...@ob-encoder.com wrote:

From: Josh de Kock 

This test ensures that you are able to send N number of slice NALUs in slice 
threaded mode to be decoded simultaneously
---
  Tested on Linux 32/64, MinGW + WINE 32/64.


fails on qemu arm

i suspect you are missing some condition on threads being enabled

[h264 @ 0x130e080] Warning: not compiled with thread support, using thread 
emulation
Couldn't activate slice threading: 0

[...]



Well it obviously doesn't make sense to test this without threading, so 
how would I make sure that the test is only run with threading enabled?


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [RFC] New build system

2018-06-14 Thread Josh de Kock

Hi,

The current build system is a rather large, and complex monolithic build 
system. The configure script takes a sizeable amount of time to execute, 
making improving, and modifying it a pain. It is completely written 
custom from scratch, while this may not sound terrible it definitely 
makes maintaining it more difficult than it needs to be (there have been 
23 emails, or about 5% of the ML volume, regarding configure since the 
start of the month). As you all probably know, there are many issues 
with building on Windows, some include the configure script taking 
considerably longer than on other platforms. A new build system could 
solve most of these issues if done correctly, as well as having other 
added benefits.


As such, I'd like to propose adopting a new build system to FFmpeg, 
namely Meson[1]. There has already been a fair amount of work (not by 
me) put into this, producing something which builds a fully working 
static configuration (configurable options are not implemented yet), on 
Linux, Windows and macOS[2]. If you would like to try it out, it 
currently requires Meson from master. VLC will also likely be switching 
to Meson, which is another reason to consider it.


I remember JEEB and atomnuker potentially being interested in this, but 
unsure if they still are.


What's working?
- Working Windows support
- Working Linux support
- Working macOS support
- Non-FATE tests

What's left to do?
- Assembler extensions (mmx etc..)
- Porting the FATE test suite
- Continue going over the configure script and importing various
  bits of logic
- Exposing options, for now everything is automatically enabled
- Compatibility ./configure shell script

[1] https://github.com/mesonbuild/meson
[2] https://github.com/MathieuDuponchelle/FFmpeg

Any comments, and thoughts on a new build system would be much 
appreciated including concerns regarding it.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [RFC][PATCH][Type 2] Revert "doc/developer.texi: Add a code of conduct"

2018-06-10 Thread Josh de Kock

On 2018/05/14 17:50, Derek Buitenhuis wrote:

It was never enforced, and there is no documented way to enforce it,
rendering it useless.

[...]


I think this is the best thing to do first. We could always re-add a 
more 'proper' CoC later, but for now there's no point creating more 
confusion. I stated this on IRC but saying this on the ML so it is 
documented more publicly.


Also, it has been more than a month since this was posted with no 
resolution, when do you intend to take, or expect others to take, actual 
action with regards to this?


--
Josh

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] flvenc: Fix sequence header update timestamps

2018-05-04 Thread Josh de Kock

> On 4 May 2018, at 12:26, Michael Niedermayer  wrote:
> 
>> On Fri, May 04, 2018 at 11:03:20AM +0800, Steven Liu wrote:
>> 
>> 
>>> On 4 May 2018, at 02:00, Jan Ekström  wrote:
>>> 
>>> On Thu, May 3, 2018 at 8:58 PM, Jan Ekström  wrote:
 On Thu, May 3, 2018 at 7:50 PM, Alex Converse  
 wrote:
> [...]
> 
>> Will apply.
> 
> I think Alex Converse has a git write account, so he can push himself if you
> prefer
> 
> thx
> 
> [...]
> -- 
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> In a rich man's house there is no place to spit but his face.
> -- Diogenes of Sinope

Hold off on pushing this for a day or two, I think Jan had some extra comments 
(he said he was unable to reply until later as he is busy right now).

Thanks,
-- 
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: deprecate libpostproc and pp filter

2018-04-26 Thread Josh de Kock

On 2018/04/27 0:38, Carl Eugen Hoyos wrote:

2018-04-27 1:28 GMT+02:00, Josh de Kock <j...@itanimul.li>:

On 2018/04/27 0:19, Carl Eugen Hoyos wrote:

2018-04-27 1:08 GMT+02:00, Josh de Kock <j...@itanimul.li>:

The postproc library is only used in a single filter


Is libswscale used in more filters? Are you planning to
deprecate it?


No, libswscale does not suffer from the same issue of being a secondary
filter library. See for example how libavresample is the secondary
resampling library, which has been deprecated for being regarded as
worse than libswscale. libpostproc is just another filtering library
(which was shoved into lavfi instead of its filters being moved into
lavfi). Some of the postproc filters seemingly have equivalents in lavfi
(just going off of names), so I think removal of postproc while making
sure equivalent filters will be available is the best way to solve this.


I am a little surprised:
Could you explain which filters in libavfilter are the equivalents for the
functionality of libpostproc?


deblocking filters -> vf_deblock
deinterlacing filters -> vf_yadif
autolevels -> eq (with some auto-value code)

But as I said, 'some' 'seemingly' 'going off names'. There was just a 
discussion on irc to just use 
http://git.videolan.org/?p=libpostproc.git;a=summary as an external 
library and drop in-tree postproc (this still requires deprecation of 
postproc in-tree however afaik).


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: deprecate libpostproc and pp filter

2018-04-26 Thread Josh de Kock

On 2018/04/27 0:15, James Almer wrote:

On 4/26/2018 8:08 PM, Josh de Kock wrote:

The postproc library is only used in a single filter, so should be moved into 
the filter itself if the filter was to stay, but the filter has all of its 
internal filters now in lavfi itself. (Also it's a bit weird to have a separate 
library of filters which is used in a filter in the filter library).


If libpostproc can't be merged into the filter (or nobody bothers to do
it), then it could be moved to a separate repository, much like the
nvidia headers.



This is another 'solution', though I think it would just be better to 
redirect users to existing equivalent functionality in lavfi itself (see 
my other mail replying to carl).



[...]
  enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non 
pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are 
on x86"
  enabled avresample && warn "Building with deprecated library libavresample"
+enabled postproc && warn "Building with deprecated library libpostproc"
+enabled pp_filter && warn "Building with deprecated filter pp"


Superfluous warning, the first one is enough. You don't see a warning
for resample_filter below the one for libavresample.



Fair, I had it like that initially, was unsure if they should be separate.

  
  if test $target_os = "haiku"; then

  disable memalign



--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: deprecate libpostproc and pp filter

2018-04-26 Thread Josh de Kock

On 2018/04/27 0:19, Carl Eugen Hoyos wrote:

2018-04-27 1:08 GMT+02:00, Josh de Kock <j...@itanimul.li>:

The postproc library is only used in a single filter


Is libswscale used in more filters? Are you planning to
deprecate it?


No, libswscale does not suffer from the same issue of being a secondary 
filter library. See for example how libavresample is the secondary 
resampling library, which has been deprecated for being regarded as 
worse than libswscale. libpostproc is just another filtering library 
(which was shoved into lavfi instead of its filters being moved into 
lavfi). Some of the postproc filters seemingly have equivalents in lavfi 
(just going off of names), so I think removal of postproc while making 
sure equivalent filters will be available is the best way to solve this.



Seriously: The library is needed for compliance with
multimedia standards, it should not be deprecated.


I'm unsure of which multimedia standards you refer to.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] configure: deprecate libpostproc and pp filter

2018-04-26 Thread Josh de Kock
The postproc library is only used in a single filter, so should be moved into 
the filter itself if the filter was to stay, but the filter has all of its 
internal filters now in lavfi itself. (Also it's a bit weird to have a separate 
library of filters which is used in a filter in the filter library).
---
 configure | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 9fa1665496..1e00c3e7a4 100755
--- a/configure
+++ b/configure
@@ -130,7 +130,7 @@ Component options:
   --disable-avformat   disable libavformat build
   --disable-swresample disable libswresample build
   --disable-swscaledisable libswscale build
-  --disable-postproc   disable libpostproc build
+  --enable-postprocdisable libpostproc build (deprecated) [no]
   --disable-avfilter   disable libavfilter build
   --enable-avresample  enable libavresample build (deprecated) [no]
   --disable-pthreads   disable pthreads [autodetect]
@@ -3529,7 +3529,7 @@ intrinsics="none"
 enable $PROGRAM_LIST
 enable $DOCUMENT_LIST
 enable $EXAMPLE_LIST
-enable $(filter_out avresample $LIBRARY_LIST)
+enable $(filter_out postproc $(filter_out avresample $LIBRARY_LIST))
 enable stripping
 
 enable asm
@@ -6674,6 +6674,8 @@ check_deps $CONFIG_LIST   \
 
 enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non 
pthread threading without atomics not supported, try adding --enable-pthreads 
or --cpu=i486 or higher if you are on x86"
 enabled avresample && warn "Building with deprecated library libavresample"
+enabled postproc && warn "Building with deprecated library libpostproc"
+enabled pp_filter && warn "Building with deprecated filter pp"
 
 if test $target_os = "haiku"; then
 disable memalign
-- 
2.15.1 (Apple Git-101)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec: remove duplicate prores decoder

2018-04-26 Thread Josh de Kock

On 2018/04/26 14:14, Paul B Mahol wrote:

Removed slower one, couldn't figure out why it is slower.

Signed-off-by: Paul B Mahol 
---
[...]


I agree with this patch in principle (no need to have two decoders which 
do the same thing), though it might be nice to show some numbers in the 
commit message.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] avcodec: remove anatoliy prores encoder

2018-04-26 Thread Josh de Kock

On 2018/04/26 12:26, Carl Eugen Hoyos wrote:

2018-04-26 13:17 GMT+02:00, Josh de Kock <j...@itanimul.li>:

On 2017/06/26 15:09, Paul B Mahol wrote:

Rationale:
- Slower then other encoder
- Less configurable
- Does not support alpha profile
- Does not set interlaced flag
- Worse output quality
- No need for 2 encoders

Signed-off-by: Paul B Mahol <one...@gmail.com>


Is there any reason this was not pushed?
I can't seem to see any argument against it.


It was shown in the past that this encoder is faster,
more efficient and produces better quality.

I don't know when this has changed.



Ok, there was some discussion on IRC, so I was unsure. I will look into 
it again.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] github

2018-04-26 Thread Josh de Kock

> On 26 Apr 2018, at 12:15, Daniel Oberhoff  
> wrote:
> 
> Hello,
> 
> I was wondering if there is any chance to move development to github? I.e. 
> not just mirror, but as primary development repo, with issues and pull 
> requests? Would make collaboration a *lot* easier (think of submitting a pr 
> instead of having to generate/format/split patches).

While I wouldn't be against it, I think most other developers would be very 
strongly against it. And to that end, I would say there is no or an extremely 
small chance that we would move to github

Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] avcodec: remove anatoliy prores encoder

2018-04-26 Thread Josh de Kock

On 2017/06/26 15:09, Paul B Mahol wrote:

Rationale:
- Slower then other encoder
- Less configurable
- Does not support alpha profile
- Does not set interlaced flag
- Worse output quality
- No need for 2 encoders

Signed-off-by: Paul B Mahol 

Is there any reason this was not pushed? I can't seem to see any 
argument against it.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [GSoC] FFserver further development direction

2018-04-26 Thread Josh de Kock

On 2018/04/26 11:56, Nicolas George wrote:

Josh de Kock (2018-04-26):

Generally, adding more things to public API is a bad move


I do not accept this statement as is. Please justify it.



What I mean by this is making private fields public is generally a bad 
move. They were initially made private for a reason, and if you suddenly 
need to modify them outside then you must ask: What does this new code 
do differently to all the other code which makes it require a private 
field?


It's a matter of consistency, if some new code could be written without 
requiring a private field to become public then this is better.
It's also a matter of complexity, the API is less complex if there are 
less public field. If it wasn't better then please submit a patch which 
makes all private fields public. Of course, this doesn't apply to 
everything sometimes there are genuine reasons for new API fields to be 
added but *generally* a smaller API leads to a better experience. I did 
say that in this case I was unsure.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [GSoC] FFserver further development direction

2018-04-26 Thread Josh de Kock

On 2018/04/24 22:33, Stephan Holljes wrote:

Hi all,

I've discussed this on IRC a bit, but I don't want to exclude those
views that are not present there.

The consensus seems to be that there are more disadvantages in using
the http server of libavformat than there are advantages.


I honestly think that it was misguided to add an HTTP server in its 
current form to FFmpeg and this isn't a job for libavformat.



This arose partly out of the discussion that there is no way to get a
connected peer's address through the public API (as the filedescriptor
is hidden in private structs).


Generally, adding more things to public API is a bad move, but I am 
unsure in this case (how would it work cross-platform anyway?)



The alternatives that were discussed were libmicrohttpd or writing the
whole project as an nginx module.


There is already an nginx module (with a more permissive 2-Clause BSD 
license, see: https://github.com/arut/nginx-rtmp-module) which seemingly 
does most of what you would want from a streaming server:


- RTMP/HLS/MPEG-DASH live streaming
- Stream relay support for distributed streaming: push & pull models
- Online transcoding with FFmpeg
- Recording streams


Both have their share of advantages and disadvantages. While I have
started to read the documentation on both of these, I can't clearly
point out which is the better choice.


It may be a good idea to make a list (or point me to one you've already 
made if I have missed it) which highlights all the features which an 
ideal FFserver would have, then look again at both of these options. 
Check how far this ideal is from the current nginx module.



Most people (including my mentor) spoke out in favor of utilizing nginx
As others have pointed out before, this, of course, excludes users who 
would like to use something like Apache, or even not run a separate 
web-server at all--however, how many users this affect and the actual 
impact not directly supporting those would have is debatable. There are 
already guides on how to use the nginx-rtmp module + Apache together in 
a streaming setup, for those whose setups are so large they must 
continue to use Apache.



I'd like to know what the rest of the developers think is best for the
project. Any pointers to good alternatives to look at or things to
think of we are missing are appreciated!


My suggestion would be to revisit all the current HTTP code in FFmpeg, 
and evaluate how much of it *actually* needs to be within the libraries, 
and how much of it can be delegated to good external libraries. (Someone 
recently made me aware of https://github.com/nodejs/http-parser it may 
be useful in some regards).



I am already not sure how to incorporate rtp into an nginx module
(since it is one of the goals on the roadmap). Maybe someone knows how
to either work around it or knows a project where that was done?


There doesn't seem to be any current project which implemented RTSP as a 
nginx module, but remember that nginx is a reverse proxy in itself and 
if it cannot be done within nginx as a module then you could implement a 
RTSP server which is then sent through nginx (I'm unsure why RTSP 
couldn't be implemented as a module though, but whatever). As for how to 
write an nginx module to do it, I honestly have no idea, but I would be 
happy to learn and support you along with your official mentor if you wish.


--
Josh

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [GSoC] FFserver further development direction

2018-04-26 Thread Josh de Kock

On 2018/04/25 23:18, Nicolas George wrote:

Josh de Kock (2018-04-25):

  If anything, this should have never been added and a suitable
external library should have been picked.


This opinion should have been expressed three years ago. It was decided
then that lavf deserved a HTTP server. It is done.



If I was part of this project three years ago, I most certainly would 
have done so. It's also not impossible, nor irrational to be removing 
code which doesn't fit or could be written better if an alternative is 
provided, the need was never there or removal can otherwise be justified.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [GSoC] FFserver further development direction

2018-04-25 Thread Josh de Kock

On 2018/04/24 22:46, Nicolas George wrote:

Stephan Holljes (2018-04-24):

The consensus seems to be that there are more disadvantages in using
the http server of libavformat than there are advantages.


I completely disagree. There is no point in having the HTTP server in
libavformat if it cannot be used to implement exactly that kind of
thing. Implementing ffserver with it is just the test bed that it
requires to become mature.

The HTTP server in libavformat was accepted three years ago, and you
worked hard for it. Do not let people tell you it was for nothing. They
had their chance to discuss this three years ago.



I do not think that using code for that sake of using it is a good way 
to look at it. If anything, this should have never been added and a 
suitable external library should have been picked. Though, I will reply 
to the larger issue at hand later today.



This arose partly out of the discussion that there is no way to get a
connected peer's address through the public API (as the filedescriptor
is hidden in private structs).


Well, then, let us add the functions that are needed in the public API.
It does not seem that difficult to design.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Add IRC nicknames to MAINTAINERS?

2018-04-25 Thread Josh de Kock

On 2018/04/25 9:35, Paul B Mahol wrote:

On 4/25/18, Tomas Haerdin  wrote:

[...]

I'll push this this some time later this week if I don't hear any
objections


What is point of it if there is only one nickname?


There are two nicknames.

--
Josh

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] doc/developer: remove merge request method of contributing

2018-04-06 Thread Josh de Kock

On 2018/04/05 19:17, Lou Logan wrote:

This seems to confuse Github users into thinking that we may accept pull
requests. We do not accept pull requests.

Sending patches to the ffmpeg-devel mailing list is our preferred method
for users to contribute code.

Signed-off-by: Lou Logan 
---
  doc/developer.texi | 6 ++
  1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/doc/developer.texi b/doc/developer.texi
index 0fc9c3f21c..a0eeefe242 100644
--- a/doc/developer.texi
+++ b/doc/developer.texi
@@ -30,13 +30,11 @@ consult @url{https://ffmpeg.org/legal.html}.
  
  @chapter Contributing
  
-There are 3 ways by which code gets into FFmpeg.

+There are 2 ways by which code gets into FFmpeg:
  @itemize @bullet
-@item Submitting patches to the main developer mailing list.
+@item Submitting patches to the ffmpeg-devel mailing list.
See @ref{Submitting patches} for details.
  @item Directly committing changes to the main tree.
-@item Committing changes to a git clone, for example on github.com or
-  gitorious.org. And asking us to merge these changes.
  @end itemize
  
  Whichever way, changes should be reviewed by the maintainer of the code




Consider removing 'Directly committing changes to the main tree.' as 
well. I'm not sure how often this is done, but certainly new 
contributors shouldn't be doing this.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavfi, lavd: add gitignore for generated static component lists

2018-04-05 Thread Josh de Kock

On 2018/04/05 22:34, Hendrik Leppkes wrote:

On Thu, Apr 5, 2018 at 11:09 PM, Josh de Kock <j...@itanimul.li> wrote:

Signed-off-by: Josh de Kock <j...@itanimul.li>
---
  libavdevice/.gitignore | 2 ++
  libavfilter/.gitignore | 1 +
  2 files changed, 3 insertions(+)
  create mode 100644 libavdevice/.gitignore
  create mode 100644 libavfilter/.gitignore

diff --git a/libavdevice/.gitignore b/libavdevice/.gitignore
new file mode 100644
index 00..08ac3eb86a
--- /dev/null
+++ b/libavdevice/.gitignore
@@ -0,0 +1,2 @@
+/indev_list.c
+/outdev_list.c
diff --git a/libavfilter/.gitignore b/libavfilter/.gitignore
new file mode 100644
index 00..26bddebc93
--- /dev/null
+++ b/libavfilter/.gitignore
@@ -0,0 +1 @@
+/filter_list.c
--


LGTM, thanks.


Pushed.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] lavfi, lavd: add gitignore for generated static component lists

2018-04-05 Thread Josh de Kock
Signed-off-by: Josh de Kock <j...@itanimul.li>
---
 libavdevice/.gitignore | 2 ++
 libavfilter/.gitignore | 1 +
 2 files changed, 3 insertions(+)
 create mode 100644 libavdevice/.gitignore
 create mode 100644 libavfilter/.gitignore

diff --git a/libavdevice/.gitignore b/libavdevice/.gitignore
new file mode 100644
index 00..08ac3eb86a
--- /dev/null
+++ b/libavdevice/.gitignore
@@ -0,0 +1,2 @@
+/indev_list.c
+/outdev_list.c
diff --git a/libavfilter/.gitignore b/libavfilter/.gitignore
new file mode 100644
index 00..26bddebc93
--- /dev/null
+++ b/libavfilter/.gitignore
@@ -0,0 +1 @@
+/filter_list.c
-- 
2.14.3 (Apple Git-98)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/1] Add Sega FILM muxer

2018-04-05 Thread Josh de Kock

On 2018/04/02 18:53, mi...@brew.sh wrote:

segafilm muxer


Thanks, pushed. I also clarified with wm4 on IRC that while he was 
against it he wasn't blocking the muxer if someone else pushes it.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Changelog: add entry for new iteration API

2018-04-02 Thread Josh de Kock

> On 2 Apr 2018, at 14:16, James Almer <jamr...@gmail.com> wrote:
> 
>> On 4/2/2018 10:13 AM, Josh de Kock wrote:
>> ---
>> Changelog | 2 ++
>> 1 file changed, 2 insertions(+)
>> 
>> diff --git a/Changelog b/Changelog
>> index 200866d873..f0b51ad1ee 100644
>> --- a/Changelog
>> +++ b/Changelog
>> @@ -52,6 +52,8 @@ version :
>> - E-AC-3 dependent frames support
>> - bitstream filter for extracting E-AC-3 core
>> - Haivision SRT protocol via libsrt
>> +- Deprecated _next API for iterating components
>> +- Iteration API for filters, codecs, codec parsers, muxers, and demuxers
> 
> No, API changes don't go to Changelog. They go only to doc/APIChanges.

Ok my bad. I wasn’t entirely sure.

-- 
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] Changelog: add entry for new iteration API

2018-04-02 Thread Josh de Kock
---
 Changelog | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Changelog b/Changelog
index 200866d873..f0b51ad1ee 100644
--- a/Changelog
+++ b/Changelog
@@ -52,6 +52,8 @@ version :
 - E-AC-3 dependent frames support
 - bitstream filter for extracting E-AC-3 core
 - Haivision SRT protocol via libsrt
+- Deprecated _next API for iterating components
+- Iteration API for filters, codecs, codec parsers, muxers, and demuxers
 
 
 version 3.4:
-- 
2.14.3 (Apple Git-98)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/1] Add Sega FILM muxer

2018-04-02 Thread Josh de Kock

On 2018/04/02 3:56, mi...@brew.sh wrote:

From: Misty De Meo 

[...]
--- /dev/null
+++ b/libavformat/segafilmenc.c
@@ -0,0 +1,397 @@
+/*
+ * Sega FILM Format (CPK) Muxer
+ * Copyright (C) 2003 The FFmpeg project

I assume you copied the demuxer but shouldn't you be here as well?


+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
[...]
+codec_id = format_context->streams[pkt->stream_index]->codecpar->codec_id;
+
+/* Sega Cinepak has an extra two-byte header; write dummy data there,
+ * then adjust the cvid header to accommodate for the extra size */
+if (codec_id == AV_CODEC_ID_CINEPAK) {
+encoded_buf_size = AV_RB24(>data[1]);
+// Already Sega Cinepak, so no need to reformat the packets
+if (encoded_buf_size != pkt->size && (pkt->size % encoded_buf_size) != 
0) {
+avio_write(pb, pkt->data, pkt->size);
+} else {
+/* In Sega Cinepak, the reported size in the Cinepak header is
+ * 8 bytes too short. However, the size in the STAB section of the 
header
+ * is correct, taking into account the extra two bytes. */
I honestly think your comment style (i.e. C vs C++) should be consistent 
throughout the file, but that's just me.



[...]


Generally, I'm ok with this patch. I don't think we're losing much by 
adding a small muxer for a format we already have a demuxer for. If it 
were some insanely complex muxer then I might have a different opinion.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/6] lavf/allformats: remove left-over index decrement

2018-04-01 Thread Josh de Kock

On 2018/04/02 2:40, wm4 wrote:

On Sun,  1 Apr 2018 03:39:40 +0100
Josh de Kock <j...@itanimul.li> wrote:


Signed-off-by: Josh de Kock <j...@itanimul.li>
---
  libavformat/allformats.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 2a20548c95..cf430a9680 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -493,7 +493,7 @@ const AVOutputFormat *av_muxer_iterate(void **opaque)
  uintptr_t i = (uintptr_t)*opaque;
  const AVOutputFormat *f = NULL;
  
-if (i < size - 1) {

+if (i < size) {
  f = muxer_list[i];
  } else if (indev_list) {
  f = outdev_list[i - size];


Patches 2, 4, 5, 6 should be OK too (if they were tested and work).
Only had a cosmetic comment about patch 2.


Pushed with the cosmetic change in patch 2.

--
Josh

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/6] lavf/allformats: remove left-over index decrement

2018-04-01 Thread Josh de Kock

On 2018/04/01 3:39, Josh de Kock wrote:

Signed-off-by: Josh de Kock <j...@itanimul.li>
---
  libavformat/allformats.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 2a20548c95..cf430a9680 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -493,7 +493,7 @@ const AVOutputFormat *av_muxer_iterate(void **opaque)
  uintptr_t i = (uintptr_t)*opaque;
  const AVOutputFormat *f = NULL;
  
-if (i < size - 1) {

+if (i < size) {
  f = muxer_list[i];
  } else if (indev_list) {
  f = outdev_list[i - size];



This is a tiny fix, I don't consider this to need review.

Pushed.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/6] lavf: move avpriv function definition to internal.h

2018-04-01 Thread Josh de Kock

On 2018/04/01 16:14, James Almer wrote:

[...]

>

LGTM.


Pushed.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] cmdutils: fix new API break the "ffmpeg -muxers/demuxers"

2018-04-01 Thread Josh de Kock

On 2018/04/02 0:07, Jun Zhao wrote:

[...]


Thanks, pushed. I thought I had checked this, obviously not.

--
Josh

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 3/6] lavf: move avpriv function definition to internal.h

2018-03-31 Thread Josh de Kock
Signed-off-by: Josh de Kock <j...@itanimul.li>
---
 libavdevice/alldevices.c | 1 +
 libavformat/allformats.c | 1 +
 libavformat/avformat.h   | 2 --
 libavformat/internal.h   | 1 +
 4 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index ebf95f8a81..adde749ce1 100644
--- a/libavdevice/alldevices.c
+++ b/libavdevice/alldevices.c
@@ -20,6 +20,7 @@
 
 #include "config.h"
 #include "libavutil/thread.h"
+#include "libavformat/internal.h"
 #include "avdevice.h"
 
 /* devices */
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index cf430a9680..d8d733735a 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -20,6 +20,7 @@
  */
 
 #include "libavutil/thread.h"
+#include "libavformat/internal.h"
 #include "avformat.h"
 #include "rtp.h"
 #include "rdt.h"
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index ec4e5f45f5..a2fe7c6bb2 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -3060,8 +3060,6 @@ int avformat_transfer_internal_stream_timing_info(const 
AVOutputFormat *ofmt,
  */
 AVRational av_stream_get_codec_timebase(const AVStream *st);
 
-
-void avpriv_register_devices(const AVOutputFormat * const o[], const 
AVInputFormat * const i[]);
 /**
  * @}
  */
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 619063097f..23eb7e8a7c 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -731,4 +731,5 @@ int ff_unlock_avformat(void);
  */
 void ff_format_set_url(AVFormatContext *s, char *url);
 
+void avpriv_register_devices(const AVOutputFormat * const o[], const 
AVInputFormat * const i[]);
 #endif /* AVFORMAT_INTERNAL_H */
-- 
2.14.3 (Apple Git-98)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 5/6] Revert "avformat/format: temporarily use old next api"

2018-03-31 Thread Josh de Kock
This reverts commit 909e00ae816df9b6a05b1c4d0cafb794d4d0ca28.

There is no need to use the old API anymore as the new API now
behaves in the same way (treating devices as formats when loaded).

Signed-off-by: Josh de Kock <j...@itanimul.li>
---
 libavformat/format.c | 19 ---
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/libavformat/format.c b/libavformat/format.c
index 123f5faf6c..1b2ce22e25 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -51,10 +51,9 @@ int av_match_ext(const char *filename, const char 
*extensions)
 AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
 const char *mime_type)
 {
-AVOutputFormat *fmt = NULL, *fmt_found;
-#if !FF_API_NEXT
+const AVOutputFormat *fmt = NULL;
+AVOutputFormat *fmt_found = NULL;
 void *i = 0;
-#endif
 int score_max, score;
 
 /* specific test for image sequences */
@@ -66,15 +65,8 @@ AVOutputFormat *av_guess_format(const char *short_name, 
const char *filename,
 }
 #endif
 /* Find the proper file type. */
-fmt_found = NULL;
 score_max = 0;
-#if FF_API_NEXT
-FF_DISABLE_DEPRECATION_WARNINGS
-while ((fmt = av_oformat_next(fmt)))
-#else
-while ((fmt = av_muxer_iterate()))
-#endif
- {
+while ((fmt = av_muxer_iterate())) {
 score = 0;
 if (fmt->name && short_name && av_match_name(short_name, fmt->name))
 score += 100;
@@ -86,12 +78,9 @@ FF_DISABLE_DEPRECATION_WARNINGS
 }
 if (score > score_max) {
 score_max = score;
-fmt_found = fmt;
+fmt_found = (AVOutputFormat*)fmt;
 }
 }
-#if FF_API_NEXT
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 return fmt_found;
 }
 
-- 
2.14.3 (Apple Git-98)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 4/6] lav*, tests: remove several register_all calls

2018-03-31 Thread Josh de Kock
avdevice_register_all() is still required to register devices into
lavf (this is required due to lavd being somewhat of a hack).

Signed-off-by: Josh de Kock <j...@itanimul.li>
---
 doc/examples/filter_audio.c  | 2 --
 doc/examples/filtering_audio.c   | 2 --
 doc/examples/filtering_video.c   | 2 --
 doc/examples/transcoding.c   | 2 --
 fftools/ffmpeg.c | 3 ---
 fftools/ffplay.c | 4 
 fftools/ffprobe.c| 1 -
 libavcodec/tests/utils.c | 1 -
 libavdevice/lavfi.c  | 2 --
 libavfilter/lavfutils.c  | 2 --
 libavfilter/src_movie.c  | 2 --
 libavfilter/tests/filtfmts.c | 2 --
 libavformat/tests/movenc.c   | 2 --
 libavformat/tests/seek.c | 3 ---
 tests/api/api-band-test.c| 2 --
 tests/api/api-codec-param-test.c | 2 --
 tests/api/api-flac-test.c| 2 --
 tests/api/api-h264-test.c| 2 --
 tests/api/api-seek-test.c| 2 --
 tools/aviocat.c  | 1 -
 tools/enum_options.c | 2 --
 tools/graph2dot.c| 2 --
 tools/ismindex.c | 2 --
 tools/pktdumper.c| 3 ---
 tools/probetest.c| 3 ---
 tools/seek_print.c   | 1 -
 tools/sidxindex.c| 2 --
 tools/uncoded_frame.c| 2 --
 28 files changed, 58 deletions(-)

diff --git a/doc/examples/filter_audio.c b/doc/examples/filter_audio.c
index 7467c21c30..1611e3d952 100644
--- a/doc/examples/filter_audio.c
+++ b/doc/examples/filter_audio.c
@@ -289,8 +289,6 @@ int main(int argc, char *argv[])
 return 1;
 }
 
-avfilter_register_all();
-
 /* Allocate the frame we will be using to store the data. */
 frame  = av_frame_alloc();
 if (!frame) {
diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c
index 73a00e814c..b109dbcb96 100644
--- a/doc/examples/filtering_audio.c
+++ b/doc/examples/filtering_audio.c
@@ -228,8 +228,6 @@ int main(int argc, char **argv)
 exit(1);
 }
 
-avfilter_register_all();
-
 if ((ret = open_input_file(argv[1])) < 0)
 goto end;
 if ((ret = init_filters(filter_descr)) < 0)
diff --git a/doc/examples/filtering_video.c b/doc/examples/filtering_video.c
index 01d6644620..ed4e7bbd81 100644
--- a/doc/examples/filtering_video.c
+++ b/doc/examples/filtering_video.c
@@ -222,8 +222,6 @@ int main(int argc, char **argv)
 exit(1);
 }
 
-avfilter_register_all();
-
 if ((ret = open_input_file(argv[1])) < 0)
 goto end;
 if ((ret = init_filters(filter_descr)) < 0)
diff --git a/doc/examples/transcoding.c b/doc/examples/transcoding.c
index ed1fd6411b..a83fa3a185 100644
--- a/doc/examples/transcoding.c
+++ b/doc/examples/transcoding.c
@@ -517,8 +517,6 @@ int main(int argc, char **argv)
 return 1;
 }
 
-avfilter_register_all();
-
 if ((ret = open_input_file(argv[1])) < 0)
 goto end;
 if ((ret = open_output_file(argv[2])) < 0)
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 4724f62fff..d8cca752cc 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -4775,12 +4775,9 @@ int main(int argc, char **argv)
 argv++;
 }
 
-avcodec_register_all();
 #if CONFIG_AVDEVICE
 avdevice_register_all();
 #endif
-avfilter_register_all();
-av_register_all();
 avformat_network_init();
 
 show_banner(argc, argv, options);
diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index f2028d4b13..bc9ddb8885 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -3655,10 +3655,6 @@ int main(int argc, char **argv)
 #if CONFIG_AVDEVICE
 avdevice_register_all();
 #endif
-#if CONFIG_AVFILTER
-avfilter_register_all();
-#endif
-av_register_all();
 avformat_network_init();
 
 init_opts();
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index a4ac6972a2..2582649fd3 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -3567,7 +3567,6 @@ int main(int argc, char **argv)
 
 options = real_options;
 parse_loglevel(argc, argv, options);
-av_register_all();
 avformat_network_init();
 init_opts();
 #if CONFIG_AVDEVICE
diff --git a/libavcodec/tests/utils.c b/libavcodec/tests/utils.c
index e2891fb389..f6ba7fe66e 100644
--- a/libavcodec/tests/utils.c
+++ b/libavcodec/tests/utils.c
@@ -21,7 +21,6 @@
 int main(void){
 AVCodec *codec = NULL;
 int ret = 0;
-avcodec_register_all();
 
 while (codec = av_codec_next(codec)) {
 if (av_codec_is_encoder(codec)) {
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 6f2ae958dc..ca8f05f3f7 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -130,8 +130,6 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
 if (!pix_fmts)
 FAIL(AVERROR(ENOMEM));
 
-avfilter_register_all();
-
 buffersink = avfilter_get_by_name("buffersink");
 abuffersink = avfilter_get_by_name("abuffersink");
 
diff -

[FFmpeg-devel] [PATCH 6/6] lavf/format: use const AVInputFormat for iteration

2018-03-31 Thread Josh de Kock
Signed-off-by: Josh de Kock <j...@itanimul.li>
---
 libavformat/format.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavformat/format.c b/libavformat/format.c
index 1b2ce22e25..1c66afb7e6 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -117,11 +117,11 @@ enum AVCodecID av_guess_codec(AVOutputFormat *fmt, const 
char *short_name,
 
 AVInputFormat *av_find_input_format(const char *short_name)
 {
-AVInputFormat *fmt = NULL;
+const AVInputFormat *fmt = NULL;
 void *i = 0;
 while ((fmt = av_demuxer_iterate()))
 if (av_match_name(short_name, fmt->name))
-return fmt;
+return (AVInputFormat*)fmt;
 return NULL;
 }
 
@@ -129,7 +129,8 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int 
is_opened,
   int *score_ret)
 {
 AVProbeData lpd = *pd;
-AVInputFormat *fmt1 = NULL, *fmt;
+const AVInputFormat *fmt1 = NULL;
+AVInputFormat *fmt = NULL;
 int score, score_max = 0;
 void *i = 0;
 const static uint8_t zerobuffer[AVPROBE_PADDING_SIZE];
@@ -156,7 +157,6 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int 
is_opened,
 nodat = ID3_GREATER_PROBE;
 }
 
-fmt = NULL;
 while ((fmt1 = av_demuxer_iterate())) {
 if (!is_opened == !(fmt1->flags & AVFMT_NOFILE) && strcmp(fmt1->name, 
"image2"))
 continue;
@@ -191,7 +191,7 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int 
is_opened,
 }
 if (score > score_max) {
 score_max = score;
-fmt   = fmt1;
+fmt   = (AVInputFormat*)fmt1;
 } else if (score == score_max)
 fmt = NULL;
 }
-- 
2.14.3 (Apple Git-98)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 2/6] lavf/img2dec: use new iteration API

2018-03-31 Thread Josh de Kock
Signed-off-by: Josh de Kock <j...@itanimul.li>
---
 libavformat/img2dec.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index f3f52c83b3..5fda850e7d 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -323,7 +323,8 @@ int ff_img_read_header(AVFormatContext *s1)
 if (s1->pb) {
 int probe_buffer_size = 2048;
 uint8_t *probe_buffer = av_realloc(NULL, probe_buffer_size + 
AVPROBE_PADDING_SIZE);
-AVInputFormat *fmt = NULL;
+const AVInputFormat *fmt = NULL;
+void *opaque = NULL;
 AVProbeData pd = { 0 };
 
 if (!probe_buffer)
@@ -340,7 +341,7 @@ int ff_img_read_header(AVFormatContext *s1)
 pd.buf_size = probe_buffer_size;
 pd.filename = s1->url;
 
-while ((fmt = av_iformat_next(fmt))) {
+while ((fmt = av_demuxer_iterate())) {
 if (fmt->read_header != ff_img_read_header ||
 !fmt->read_probe ||
 (fmt->flags & AVFMT_NOFILE) ||
-- 
2.14.3 (Apple Git-98)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/6] lavf/allformats: remove left-over index decrement

2018-03-31 Thread Josh de Kock
Signed-off-by: Josh de Kock <j...@itanimul.li>
---
 libavformat/allformats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 2a20548c95..cf430a9680 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -493,7 +493,7 @@ const AVOutputFormat *av_muxer_iterate(void **opaque)
 uintptr_t i = (uintptr_t)*opaque;
 const AVOutputFormat *f = NULL;
 
-if (i < size - 1) {
+if (i < size) {
 f = muxer_list[i];
 } else if (indev_list) {
 f = outdev_list[i - size];
-- 
2.14.3 (Apple Git-98)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 3/4] lavf: move avpriv function definition to internal.h

2018-03-31 Thread Josh de Kock
Signed-off-by: Josh de Kock <j...@itanimul.li>
---
 libavformat/avformat.h | 2 --
 libavformat/internal.h | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index ec4e5f45f5..a2fe7c6bb2 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -3060,8 +3060,6 @@ int avformat_transfer_internal_stream_timing_info(const 
AVOutputFormat *ofmt,
  */
 AVRational av_stream_get_codec_timebase(const AVStream *st);
 
-
-void avpriv_register_devices(const AVOutputFormat * const o[], const 
AVInputFormat * const i[]);
 /**
  * @}
  */
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 619063097f..23eb7e8a7c 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -731,4 +731,5 @@ int ff_unlock_avformat(void);
  */
 void ff_format_set_url(AVFormatContext *s, char *url);
 
+void avpriv_register_devices(const AVOutputFormat * const o[], const 
AVInputFormat * const i[]);
 #endif /* AVFORMAT_INTERNAL_H */
-- 
2.14.3 (Apple Git-98)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 4/4] lav*, tests: remove several register_all calls

2018-03-31 Thread Josh de Kock
avdevice_register_all() is still required to register devices into
lavf (this is required due to lavd being somewhat of a hack).

Signed-off-by: Josh de Kock <j...@itanimul.li>
---
 doc/examples/filter_audio.c  | 2 --
 doc/examples/filtering_audio.c   | 2 --
 doc/examples/filtering_video.c   | 2 --
 doc/examples/transcoding.c   | 2 --
 fftools/ffmpeg.c | 3 ---
 fftools/ffplay.c | 4 
 fftools/ffprobe.c| 1 -
 libavcodec/tests/utils.c | 1 -
 libavdevice/lavfi.c  | 2 --
 libavfilter/lavfutils.c  | 2 --
 libavfilter/src_movie.c  | 2 --
 libavfilter/tests/filtfmts.c | 2 --
 libavformat/tests/movenc.c   | 2 --
 libavformat/tests/seek.c | 3 ---
 tests/api/api-band-test.c| 2 --
 tests/api/api-codec-param-test.c | 2 --
 tests/api/api-flac-test.c| 2 --
 tests/api/api-h264-test.c| 2 --
 tests/api/api-seek-test.c| 2 --
 tools/aviocat.c  | 1 -
 tools/enum_options.c | 2 --
 tools/graph2dot.c| 2 --
 tools/ismindex.c | 2 --
 tools/pktdumper.c| 3 ---
 tools/probetest.c| 3 ---
 tools/seek_print.c   | 1 -
 tools/sidxindex.c| 2 --
 tools/uncoded_frame.c| 4 
 28 files changed, 60 deletions(-)

diff --git a/doc/examples/filter_audio.c b/doc/examples/filter_audio.c
index 7467c21c30..1611e3d952 100644
--- a/doc/examples/filter_audio.c
+++ b/doc/examples/filter_audio.c
@@ -289,8 +289,6 @@ int main(int argc, char *argv[])
 return 1;
 }
 
-avfilter_register_all();
-
 /* Allocate the frame we will be using to store the data. */
 frame  = av_frame_alloc();
 if (!frame) {
diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c
index 73a00e814c..b109dbcb96 100644
--- a/doc/examples/filtering_audio.c
+++ b/doc/examples/filtering_audio.c
@@ -228,8 +228,6 @@ int main(int argc, char **argv)
 exit(1);
 }
 
-avfilter_register_all();
-
 if ((ret = open_input_file(argv[1])) < 0)
 goto end;
 if ((ret = init_filters(filter_descr)) < 0)
diff --git a/doc/examples/filtering_video.c b/doc/examples/filtering_video.c
index 01d6644620..ed4e7bbd81 100644
--- a/doc/examples/filtering_video.c
+++ b/doc/examples/filtering_video.c
@@ -222,8 +222,6 @@ int main(int argc, char **argv)
 exit(1);
 }
 
-avfilter_register_all();
-
 if ((ret = open_input_file(argv[1])) < 0)
 goto end;
 if ((ret = init_filters(filter_descr)) < 0)
diff --git a/doc/examples/transcoding.c b/doc/examples/transcoding.c
index ed1fd6411b..a83fa3a185 100644
--- a/doc/examples/transcoding.c
+++ b/doc/examples/transcoding.c
@@ -517,8 +517,6 @@ int main(int argc, char **argv)
 return 1;
 }
 
-avfilter_register_all();
-
 if ((ret = open_input_file(argv[1])) < 0)
 goto end;
 if ((ret = open_output_file(argv[2])) < 0)
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 4724f62fff..d8cca752cc 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -4775,12 +4775,9 @@ int main(int argc, char **argv)
 argv++;
 }
 
-avcodec_register_all();
 #if CONFIG_AVDEVICE
 avdevice_register_all();
 #endif
-avfilter_register_all();
-av_register_all();
 avformat_network_init();
 
 show_banner(argc, argv, options);
diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index f2028d4b13..bc9ddb8885 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -3655,10 +3655,6 @@ int main(int argc, char **argv)
 #if CONFIG_AVDEVICE
 avdevice_register_all();
 #endif
-#if CONFIG_AVFILTER
-avfilter_register_all();
-#endif
-av_register_all();
 avformat_network_init();
 
 init_opts();
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index a4ac6972a2..2582649fd3 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -3567,7 +3567,6 @@ int main(int argc, char **argv)
 
 options = real_options;
 parse_loglevel(argc, argv, options);
-av_register_all();
 avformat_network_init();
 init_opts();
 #if CONFIG_AVDEVICE
diff --git a/libavcodec/tests/utils.c b/libavcodec/tests/utils.c
index e2891fb389..f6ba7fe66e 100644
--- a/libavcodec/tests/utils.c
+++ b/libavcodec/tests/utils.c
@@ -21,7 +21,6 @@
 int main(void){
 AVCodec *codec = NULL;
 int ret = 0;
-avcodec_register_all();
 
 while (codec = av_codec_next(codec)) {
 if (av_codec_is_encoder(codec)) {
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 6f2ae958dc..ca8f05f3f7 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -130,8 +130,6 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
 if (!pix_fmts)
 FAIL(AVERROR(ENOMEM));
 
-avfilter_register_all();
-
 buffersink = avfilter_get_by_name("buffersink");
 abuffersink = avfilter_get_by_name("abuffersink");
 
diff -

[FFmpeg-devel] [PATCH 1/4] lavf/img2dec: use new iteration API

2018-03-31 Thread Josh de Kock
Signed-off-by: Josh de Kock <j...@itanimul.li>
---
 libavformat/img2dec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index f3f52c83b3..159617f046 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -324,6 +324,7 @@ int ff_img_read_header(AVFormatContext *s1)
 int probe_buffer_size = 2048;
 uint8_t *probe_buffer = av_realloc(NULL, probe_buffer_size + 
AVPROBE_PADDING_SIZE);
 AVInputFormat *fmt = NULL;
+void *opaque = NULL;
 AVProbeData pd = { 0 };
 
 if (!probe_buffer)
@@ -340,7 +341,7 @@ int ff_img_read_header(AVFormatContext *s1)
 pd.buf_size = probe_buffer_size;
 pd.filename = s1->url;
 
-while ((fmt = av_iformat_next(fmt))) {
+while ((fmt = av_demuxer_iterate())) {
 if (fmt->read_header != ff_img_read_header ||
 !fmt->read_probe ||
 (fmt->flags & AVFMT_NOFILE) ||
-- 
2.14.3 (Apple Git-98)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 2/4] Revert "avformat/format: temporarily use old next api"

2018-03-31 Thread Josh de Kock
This reverts commit 909e00ae816df9b6a05b1c4d0cafb794d4d0ca28.

There is no need to use the old API anymore as the new API now
behaves in the same way (treating devices as formats when loaded).

Signed-off-by: Josh de Kock <j...@itanimul.li>
---
 libavformat/format.c | 13 +
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/libavformat/format.c b/libavformat/format.c
index 123f5faf6c..608af1b692 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -52,9 +52,7 @@ AVOutputFormat *av_guess_format(const char *short_name, const 
char *filename,
 const char *mime_type)
 {
 AVOutputFormat *fmt = NULL, *fmt_found;
-#if !FF_API_NEXT
 void *i = 0;
-#endif
 int score_max, score;
 
 /* specific test for image sequences */
@@ -68,13 +66,7 @@ AVOutputFormat *av_guess_format(const char *short_name, 
const char *filename,
 /* Find the proper file type. */
 fmt_found = NULL;
 score_max = 0;
-#if FF_API_NEXT
-FF_DISABLE_DEPRECATION_WARNINGS
-while ((fmt = av_oformat_next(fmt)))
-#else
-while ((fmt = av_muxer_iterate()))
-#endif
- {
+while ((fmt = av_muxer_iterate())) {
 score = 0;
 if (fmt->name && short_name && av_match_name(short_name, fmt->name))
 score += 100;
@@ -89,9 +81,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
 fmt_found = fmt;
 }
 }
-#if FF_API_NEXT
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 return fmt_found;
 }
 
-- 
2.14.3 (Apple Git-98)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 0/5] Add lavfi api & remove device iteration

2018-03-31 Thread Josh de Kock

On 2018/03/25 13:53, Josh de Kock wrote:

On 2018/03/23 20:48, Josh de Kock wrote:

This set is an alternative to the previous set I posted, it makes
it so that the current behaviour is kept (devices are returned in
by the iteration functions but must be loaded in manually). It
is a compromise between what Nicolas George suggested and a full
rewrite.

I personally would like to just 'get this done', and I feel other
than completely rewriting the API from scratch (and the previous
set I posted), merging lavf and lavd is the only other option.



Just as a side-note, I am planning to push this on the 1st of April. If 
you have any objections, comments, or related proposals please make them 
before then so that I can either further delay it or we can resolve them 
beforehand.




Pushed, as there were no further comments.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v4 3/7] cmdutils: use new iteration APIs

2018-03-25 Thread Josh de Kock

On 2018/03/25 16:21, Michael Niedermayer wrote:

On Fri, Mar 23, 2018 at 11:05:22AM +0100, Nicolas George wrote:

Josh de Kock (2018-03-22):

move lavd avinputformats and avoutputformats into lavf

delete lavd


Possibly ok in principle for me, but see below.


write new lavd aimed at actual devices


There are already such libraries, we do not need another. The basic
devices with a (de)muxer API are quite right to give many extra features
with little extra cost.

But why are we discussing this? It seems to me that the discussion went
approximately like this:

"Darn, the faucet I just bought to fix the leaky one does not fit the
pipes. Well, I guess I will have to redo the whole plumbing to make it
fit."

The correct way of addressing the problem is to buy a new faucet with
the correct size. And cut the losses if the first one cannot be
refunded. I feel like the discussion is largely fueled by the cognitive
bias known as "sunk cost fallacy": due to efforts invested in a
solution, become attached emotionally to it and fail to see when it
proves to cause more costs than benefits.

Can we at least REALLY CONSIDER this:

1. Acknowledge that this issue about lavd, on top of Michael's early
concerns about registering external components, has proven that the
all-static approach, while elegant in many ways, is not practical.




2. Agree to revert the API as it is and discuss a better solution.


iam in favor of reverting the API, there is apparently discussion going
on now here to design a different, better API and IMHO its better not to
introduce a new API now if there is active work going on to change it.


Sure, if someone else reverts, designs, write, integrates, deals with 
the never-ending bikeshedding, fixes issues around lavf/lavd's broken 
shit, why not? But that's not going to happen, let's be real. If anyone 
actually cared enough, then it would be fixed already. It's been broken 
since version 0.5, the only reason people care now is because they're 
scared of change. It may not be the 'best' API, but if everything was 
designed the 'best' then we wouldn't have to deal with stuff like this.



People would just start to switch to the current API only to have it
deprecated in the release after that and having to replace it again

If the new API stays then I will most likely have to submit some ugly
hack to workaround
the size explosion issue for static linking with the current API.


What size explosion?


And that for each lib not just avcodec.
Thats to allow the ffmpeg ossfuzz code to grow and test more things
quickly within the available resources.
I honestly would like to be an idealist here, but it's much more 
practical to just be real here. Nothing happens in this project unless 
the conversation begins with a patch (and even then, stuff barely 
happens). So in the words of others on the list:


You forgot to attach your patch.

--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 0/5] Add lavfi api & remove device iteration

2018-03-25 Thread Josh de Kock

On 2018/03/23 20:48, Josh de Kock wrote:

This set is an alternative to the previous set I posted, it makes
it so that the current behaviour is kept (devices are returned in
by the iteration functions but must be loaded in manually). It
is a compromise between what Nicolas George suggested and a full
rewrite.

I personally would like to just 'get this done', and I feel other
than completely rewriting the API from scratch (and the previous
set I posted), merging lavf and lavd is the only other option.



Just as a side-note, I am planning to push this on the 1st of April. If 
you have any objections, comments, or related proposals please make them 
before then so that I can either further delay it or we can resolve them 
beforehand.


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH v3] lavfi: add new iteration API

2018-03-24 Thread Josh de Kock
Signed-off-by: Josh de Kock <j...@itanimul.li>
---
 configure|  29 +-
 doc/APIchanges   |   4 +
 doc/writing_filters.txt  |   6 +-
 libavfilter/allfilters.c | 823 +--
 libavfilter/avfilter.c   |  50 +--
 libavfilter/avfilter.h   |  29 +-
 libavfilter/version.h|   3 +
 7 files changed, 489 insertions(+), 455 deletions(-)

diff --git a/configure b/configure
index cc3edeb80f..c1efefb61e 100755
--- a/configure
+++ b/configure
@@ -3561,15 +3561,6 @@ for v in "$@"; do
 FFMPEG_CONFIGURATION="${FFMPEG_CONFIGURATION# } ${l}${r}"
 done
 
-find_things(){
-thing=$1
-pattern=$2
-file=$source_path/$3
-sed -n "s/^[^#]*$pattern.*([^,]*, *\([^,]*\)\(,.*\)*).*/\1_$thing/p" 
"$file"
-}
-
-FILTER_LIST=$(find_things   filter   FILTER   libavfilter/allfilters.c)
-
 find_things_extern(){
 thing=$1
 pattern=$2
@@ -3578,6 +3569,13 @@ find_things_extern(){
 sed -n "s/^[^#]*extern.*$pattern *ff_\([^ ]*\)_$thing;/\1_$out/p" "$file"
 }
 
+find_filters_extern(){
+file=$source_path/$1
+#sed -n "s/^extern AVFilter 
ff_\([avfsinkrc]\{2,5\}\)_\(\w\+\);/\2_filter/p" $file
+sed -E -n "s/^extern AVFilter 
ff_([avfsinkrc]{2,5})_([a-zA-Z0-9_]+);/\2_filter/p" $file
+}
+
+FILTER_LIST=$(find_filters_extern libavfilter/allfilters.c)
 OUTDEV_LIST=$(find_things_extern muxer AVOutputFormat libavdevice/alldevices.c 
outdev)
 INDEV_LIST=$(find_things_extern demuxer AVInputFormat libavdevice/alldevices.c 
indev)
 MUXER_LIST=$(find_things_extern muxer AVOutputFormat libavformat/allformats.c)
@@ -7088,6 +7086,10 @@ echo "#endif /* AVUTIL_AVCONFIG_H */" >> $TMPH
 
 cp_if_changed $TMPH libavutil/avconfig.h
 
+full_filter_name(){
+sed -n "s/^extern AVFilter ff_\([avfsinkrc]\{2,5\}\)_$1;/\1_$1/p" 
$source_path/libavfilter/allfilters.c
+}
+
 # generate the lists of enabled components
 print_enabled_components(){
 file=$1
@@ -7098,6 +7100,9 @@ print_enabled_components(){
 for c in $*; do
 if enabled $c; then
 case $name in
+filter_list)
+c=$(full_filter_name $(remove_suffix _filter $c))
+;;
 indev_list)
 c=$(add_suffix _demuxer $(remove_suffix _indev $c))
 ;;
@@ -7108,10 +7113,16 @@ print_enabled_components(){
 printf "_%s,\n" $c >> $TMPH
 fi
 done
+if [ "$name" == "filter_list" ]; then
+for c in asrc_abuffer vsrc_buffer asink_abuffer vsink_buffer; do
+printf "_%s,\n" $c >> $TMPH
+done
+fi
 echo "NULL };" >> $TMPH
 cp_if_changed $TMPH $file
 }
 
+print_enabled_components libavfilter/filter_list.c AVFilter filter_list 
$FILTER_LIST
 print_enabled_components libavcodec/codec_list.c AVCodec codec_list $CODEC_LIST
 print_enabled_components libavcodec/parser_list.c AVCodecParser parser_list 
$PARSER_LIST
 print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter 
bitstream_filters $BSF_LIST
diff --git a/doc/APIchanges b/doc/APIchanges
index d410bcdd75..4052988f59 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,10 @@ libavutil: 2017-10-21
 
 API changes, most recent first:
 
+2018-xx-xx - xxx - lavc 7.13.100 - avcodec.h
+  Deprecate use of avfilter_register(), avfilter_register_all(),
+  avfilter_next(). Add av_filter_iterate().
+
 2018-03-21 - xxx - lavc 58.15.100 - avcodec.h
   Add av_packet_make_writable().
 
diff --git a/doc/writing_filters.txt b/doc/writing_filters.txt
index 5cd4ecd6a4..98b9c6f3d2 100644
--- a/doc/writing_filters.txt
+++ b/doc/writing_filters.txt
@@ -31,10 +31,8 @@ If everything went right, you should get a foobar.png with 
Lena edge-detected.
 That's it, your new playground is ready.
 
 Some little details about what's going on:
-libavfilter/allfilters.c:avfilter_register_all() is called at runtime to create
-a list of the available filters, but it's important to know that this file is
-also parsed by the configure script, which in turn will define variables for
-the build system and the C:
+libavfilter/allfilters.c:this file is parsed by the configure script, which in 
turn
+will define variables for the build system and the C:
 
 --- after running configure ---
 
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 3f67e321bf..b6a193a8f0 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -23,410 +23,455 @@
 #include "avfilter.h"
 #include "config.h"
 
+extern AVFilter ff_af_abench;
+extern AVFilter ff_af_acompressor;
+extern AVFilter ff_af_acontrast;
+extern AVFilter ff_af_acopy;
+extern AVFilter ff_af_acrossfade;
+extern AVFilter ff_af_acrusher;
+extern AVFilter ff_af_adelay;
+extern AVFilter ff_af_aecho;
+extern AVFilter ff_af_aemphasis;

Re: [FFmpeg-devel] [PATCH] libavfilter: Add OpenCL convolution filter v0.2: add name

2018-03-23 Thread Josh de Kock

On 2018/03/23 13:22, Danil Iashchenko wrote:

Thanks, fixed!

---
  libavfilter/opencl/convolution.cl   | 2 ++
  libavfilter/vf_convolution_opencl.c | 2 ++
  2 files changed, 4 insertions(+)


When you update patches you should send the same patch again (yes the 
whole patch) with the required changes, and a version in the email 
subject (i.e. [PATCH v2] libavfilter: Add OpenCL convolution filter).


--
Josh
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH v2 2/5] lavfi: add new iteration API

2018-03-23 Thread Josh de Kock
Signed-off-by: Josh de Kock <j...@itanimul.li>
---
 configure|  24 +-
 doc/APIchanges   |   4 +
 doc/writing_filters.txt  |   6 +-
 libavfilter/allfilters.c | 820 +--
 libavfilter/avfilter.c   |  50 +--
 libavfilter/avfilter.h   |  29 +-
 libavfilter/version.h|   3 +
 7 files changed, 481 insertions(+), 455 deletions(-)

diff --git a/configure b/configure
index cc3edeb80f..9966ae3c10 100755
--- a/configure
+++ b/configure
@@ -3561,15 +3561,6 @@ for v in "$@"; do
 FFMPEG_CONFIGURATION="${FFMPEG_CONFIGURATION# } ${l}${r}"
 done
 
-find_things(){
-thing=$1
-pattern=$2
-file=$source_path/$3
-sed -n "s/^[^#]*$pattern.*([^,]*, *\([^,]*\)\(,.*\)*).*/\1_$thing/p" 
"$file"
-}
-
-FILTER_LIST=$(find_things   filter   FILTER   libavfilter/allfilters.c)
-
 find_things_extern(){
 thing=$1
 pattern=$2
@@ -3578,6 +3569,13 @@ find_things_extern(){
 sed -n "s/^[^#]*extern.*$pattern *ff_\([^ ]*\)_$thing;/\1_$out/p" "$file"
 }
 
+find_filters_extern(){
+file=$source_path/$1
+#sed -n "s/^extern AVFilter 
ff_\([avfsinkrc]\{2,5\}\)_\(\w\+\);/\2_filter/p" $file
+sed -E -n "s/^extern AVFilter 
ff_([avfsinkrc]{2,5})_([a-zA-Z0-9_]+);/\2_filter/p" $file
+}
+
+FILTER_LIST=$(find_filters_extern libavfilter/allfilters.c)
 OUTDEV_LIST=$(find_things_extern muxer AVOutputFormat libavdevice/alldevices.c 
outdev)
 INDEV_LIST=$(find_things_extern demuxer AVInputFormat libavdevice/alldevices.c 
indev)
 MUXER_LIST=$(find_things_extern muxer AVOutputFormat libavformat/allformats.c)
@@ -7088,6 +7086,10 @@ echo "#endif /* AVUTIL_AVCONFIG_H */" >> $TMPH
 
 cp_if_changed $TMPH libavutil/avconfig.h
 
+full_filter_name(){
+sed -n "s/^extern AVFilter ff_\([avfsinkrc]\{2,5\}\)_$1;/\1_$1/p" 
$source_path/libavfilter/allfilters.c
+}
+
 # generate the lists of enabled components
 print_enabled_components(){
 file=$1
@@ -7098,6 +7100,9 @@ print_enabled_components(){
 for c in $*; do
 if enabled $c; then
 case $name in
+filter_list)
+c=$(full_filter_name $(remove_suffix _filter $c))
+;;
 indev_list)
 c=$(add_suffix _demuxer $(remove_suffix _indev $c))
 ;;
@@ -7112,6 +7117,7 @@ print_enabled_components(){
 cp_if_changed $TMPH $file
 }
 
+print_enabled_components libavfilter/filter_list.c AVFilter filter_list 
$FILTER_LIST
 print_enabled_components libavcodec/codec_list.c AVCodec codec_list $CODEC_LIST
 print_enabled_components libavcodec/parser_list.c AVCodecParser parser_list 
$PARSER_LIST
 print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter 
bitstream_filters $BSF_LIST
diff --git a/doc/APIchanges b/doc/APIchanges
index d410bcdd75..4052988f59 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,10 @@ libavutil: 2017-10-21
 
 API changes, most recent first:
 
+2018-xx-xx - xxx - lavc 7.13.100 - avcodec.h
+  Deprecate use of avfilter_register(), avfilter_register_all(),
+  avfilter_next(). Add av_filter_iterate().
+
 2018-03-21 - xxx - lavc 58.15.100 - avcodec.h
   Add av_packet_make_writable().
 
diff --git a/doc/writing_filters.txt b/doc/writing_filters.txt
index 5cd4ecd6a4..98b9c6f3d2 100644
--- a/doc/writing_filters.txt
+++ b/doc/writing_filters.txt
@@ -31,10 +31,8 @@ If everything went right, you should get a foobar.png with 
Lena edge-detected.
 That's it, your new playground is ready.
 
 Some little details about what's going on:
-libavfilter/allfilters.c:avfilter_register_all() is called at runtime to create
-a list of the available filters, but it's important to know that this file is
-also parsed by the configure script, which in turn will define variables for
-the build system and the C:
+libavfilter/allfilters.c:this file is parsed by the configure script, which in 
turn
+will define variables for the build system and the C:
 
 --- after running configure ---
 
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 3f67e321bf..2c63f02a54 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -23,410 +23,452 @@
 #include "avfilter.h"
 #include "config.h"
 
+extern AVFilter ff_af_abench;
+extern AVFilter ff_af_acompressor;
+extern AVFilter ff_af_acontrast;
+extern AVFilter ff_af_acopy;
+extern AVFilter ff_af_acrossfade;
+extern AVFilter ff_af_acrusher;
+extern AVFilter ff_af_adelay;
+extern AVFilter ff_af_aecho;
+extern AVFilter ff_af_aemphasis;
+extern AVFilter ff_af_aeval;
+extern AVFilter ff_af_afade;
+extern AVFilter ff_af_afftfilt;
+extern AVFilter ff_af_afir;
+extern AVFilter ff_af_aformat;
+extern AVFilter ff_af_agate;
+extern AVFilter ff_af_aiir;
+extern AVFilter ff_af_ainterleave;
+extern AVFilter ff_af_alimiter;
+extern AVFilter ff_af_allpass;
+extern AVFilter ff_af_aloop;
+extern AVFilt

[FFmpeg-devel] [PATCH 4/5] lavd: remove linked lists

2018-03-23 Thread Josh de Kock
---
 configure| 23 +++--
 libavdevice/alldevices.c | 87 ++--
 libavformat/allformats.c | 78 +--
 libavformat/avformat.h   |  2 ++
 4 files changed, 120 insertions(+), 70 deletions(-)

diff --git a/configure b/configure
index 0bb789cae4..3a99f46c87 100755
--- a/configure
+++ b/configure
@@ -3561,21 +3561,12 @@ for v in "$@"; do
 FFMPEG_CONFIGURATION="${FFMPEG_CONFIGURATION# } ${l}${r}"
 done
 
-find_things(){
-thing=$1
-pattern=$2
-file=$source_path/$3
-sed -n "s/^[^#]*$pattern.*([^,]*, *\([^,]*\)\(,.*\)*).*/\1_$thing/p" 
"$file"
-}
-
-OUTDEV_LIST=$(find_things   outdev   OUTDEV   libavdevice/alldevices.c)
-INDEV_LIST=$(find_thingsindev_IN  libavdevice/alldevices.c)
-
 find_things_extern(){
 thing=$1
 pattern=$2
 file=$source_path/$3
-sed -n "s/^[^#]*extern.*$pattern *ff_\([^ ]*\)_$thing;/\1_$thing/p" "$file"
+out=${4:-$thing}
+sed -n "s/^[^#]*extern.*$pattern *ff_\([^ ]*\)_$thing;/\1_$out/p" "$file"
 }
 
 find_filters_extern(){
@@ -3585,6 +3576,8 @@ find_filters_extern(){
 }
 
 FILTER_LIST=$(find_filters_extern libavfilter/allfilters.c)
+OUTDEV_LIST=$(find_things_extern muxer AVOutputFormat libavdevice/alldevices.c 
outdev)
+INDEV_LIST=$(find_things_extern demuxer AVInputFormat libavdevice/alldevices.c 
indev)
 MUXER_LIST=$(find_things_extern muxer AVOutputFormat libavformat/allformats.c)
 DEMUXER_LIST=$(find_things_extern demuxer AVInputFormat 
libavformat/allformats.c)
 ENCODER_LIST=$(find_things_extern encoder AVCodec libavcodec/allcodecs.c)
@@ -7110,6 +7103,12 @@ print_enabled_components(){
 filter_list)
 c=$(full_filter_name $(remove_suffix _filter $c))
 ;;
+indev_list)
+c=$(add_suffix _demuxer $(remove_suffix _indev $c))
+;;
+outdev_list)
+c=$(add_suffix _muxer $(remove_suffix _outdev $c))
+;;
 esac
 printf "_%s,\n" $c >> $TMPH
 fi
@@ -7124,6 +7123,8 @@ print_enabled_components libavcodec/parser_list.c 
AVCodecParser parser_list $PAR
 print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter 
bitstream_filters $BSF_LIST
 print_enabled_components libavformat/demuxer_list.c AVInputFormat demuxer_list 
$DEMUXER_LIST
 print_enabled_components libavformat/muxer_list.c AVOutputFormat muxer_list 
$MUXER_LIST
+print_enabled_components libavdevice/indev_list.c AVInputFormat indev_list 
$INDEV_LIST
+print_enabled_components libavdevice/outdev_list.c AVOutputFormat outdev_list 
$OUTDEV_LIST
 print_enabled_components libavformat/protocol_list.c URLProtocol url_protocols 
$PROTOCOL_LIST
 
 # Settings for pkg-config files
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index b767b6a718..ebf95f8a81 100644
--- a/libavdevice/alldevices.c
+++ b/libavdevice/alldevices.c
@@ -22,57 +22,48 @@
 #include "libavutil/thread.h"
 #include "avdevice.h"
 
-#define REGISTER_OUTDEV(X, x)   \
-{   \
-extern AVOutputFormat ff_##x##_muxer;   \
-if (CONFIG_##X##_OUTDEV)\
-av_register_output_format(_##x##_muxer); \
-}
+/* devices */
+extern AVInputFormat  ff_alsa_demuxer;
+extern AVOutputFormat ff_alsa_muxer;
+extern AVInputFormat  ff_android_camera_demuxer;
+extern AVInputFormat  ff_avfoundation_demuxer;
+extern AVInputFormat  ff_bktr_demuxer;
+extern AVOutputFormat ff_caca_muxer;
+extern AVInputFormat  ff_decklink_demuxer;
+extern AVOutputFormat ff_decklink_muxer;
+extern AVInputFormat  ff_libndi_newtek_demuxer;
+extern AVOutputFormat ff_libndi_newtek_muxer;
+extern AVInputFormat  ff_dshow_demuxer;
+extern AVInputFormat  ff_fbdev_demuxer;
+extern AVOutputFormat ff_fbdev_muxer;
+extern AVInputFormat  ff_gdigrab_demuxer;
+extern AVInputFormat  ff_iec61883_demuxer;
+extern AVInputFormat  ff_jack_demuxer;
+extern AVInputFormat  ff_kmsgrab_demuxer;
+extern AVInputFormat  ff_lavfi_demuxer;
+extern AVInputFormat  ff_openal_demuxer;
+extern AVOutputFormat ff_opengl_muxer;
+extern AVInputFormat  ff_oss_demuxer;
+extern AVOutputFormat ff_oss_muxer;
+extern AVInputFormat  ff_pulse_demuxer;
+extern AVOutputFormat ff_pulse_muxer;
+extern AVOutputFormat ff_sdl2_muxer;
+extern AVInputFormat  ff_sndio_demuxer;
+extern AVOutputFormat ff_sndio_muxer;
+extern AVInputFormat  ff_v4l2_demuxer;
+extern AVOutputFormat ff_v4l2_muxer;
+extern AVInputFormat  ff_vfwcap_demuxer;
+extern AVInputFormat  ff_xcbgrab_demuxer;
+extern AVOutputFormat ff_xv_muxer;
 
-#define REGISTER_INDEV(X, x)\
-{   \
-extern AVInputFormat ff_##x##_demuxer;   

[FFmpeg-devel] [PATCH 3/5] Revert "lavd: add new API for iterating input and output devices"

2018-03-23 Thread Josh de Kock
This reverts commit 0fd475704e871ef3a535947596a012894bae3cbd.

Revert "lavd: fix iterating of input and output devices"

This reverts commit ce1d77a5e7cebce11074bf6f9e38ad6da37338ff.
---
 Makefile |   3 +-
 configure|  23 +++---
 doc/APIchanges   |   5 --
 libavdevice/.gitignore   |   2 -
 libavdevice/alldevices.c | 179 ---
 libavdevice/avdevice.c   |  46 
 libavdevice/avdevice.h   |  28 
 libavdevice/version.h|   4 --
 libavformat/allformats.c |  42 +--
 libavformat/format.c |   8 ---
 libavformat/internal.h   |   7 --
 11 files changed, 103 insertions(+), 244 deletions(-)
 delete mode 100644 libavdevice/.gitignore

diff --git a/Makefile b/Makefile
index bb93b69f89..0cd0a1d6f2 100644
--- a/Makefile
+++ b/Makefile
@@ -144,8 +144,7 @@ distclean:: clean
version.h libavutil/ffversion.h libavcodec/codec_names.h \
libavcodec/bsf_list.c libavformat/protocol_list.c \
libavcodec/codec_list.c libavcodec/parser_list.c \
-   libavformat/muxer_list.c libavformat/demuxer_list.c \
-   libavdevice/indev_list.c libavdevice/outdev_list.c
+   libavformat/muxer_list.c libavformat/demuxer_list.c
 ifeq ($(SRC_LINK),src)
$(RM) src
 endif
diff --git a/configure b/configure
index 2dedee79c2..0bb789cae4 100755
--- a/configure
+++ b/configure
@@ -3561,12 +3561,21 @@ for v in "$@"; do
 FFMPEG_CONFIGURATION="${FFMPEG_CONFIGURATION# } ${l}${r}"
 done
 
+find_things(){
+thing=$1
+pattern=$2
+file=$source_path/$3
+sed -n "s/^[^#]*$pattern.*([^,]*, *\([^,]*\)\(,.*\)*).*/\1_$thing/p" 
"$file"
+}
+
+OUTDEV_LIST=$(find_things   outdev   OUTDEV   libavdevice/alldevices.c)
+INDEV_LIST=$(find_thingsindev_IN  libavdevice/alldevices.c)
+
 find_things_extern(){
 thing=$1
 pattern=$2
 file=$source_path/$3
-out=${4:-$thing}
-sed -n "s/^[^#]*extern.*$pattern *ff_\([^ ]*\)_$thing;/\1_$out/p" "$file"
+sed -n "s/^[^#]*extern.*$pattern *ff_\([^ ]*\)_$thing;/\1_$thing/p" "$file"
 }
 
 find_filters_extern(){
@@ -3576,8 +3585,6 @@ find_filters_extern(){
 }
 
 FILTER_LIST=$(find_filters_extern libavfilter/allfilters.c)
-OUTDEV_LIST=$(find_things_extern muxer AVOutputFormat libavdevice/alldevices.c 
outdev)
-INDEV_LIST=$(find_things_extern demuxer AVInputFormat libavdevice/alldevices.c 
indev)
 MUXER_LIST=$(find_things_extern muxer AVOutputFormat libavformat/allformats.c)
 DEMUXER_LIST=$(find_things_extern demuxer AVInputFormat 
libavformat/allformats.c)
 ENCODER_LIST=$(find_things_extern encoder AVCodec libavcodec/allcodecs.c)
@@ -7103,12 +7110,6 @@ print_enabled_components(){
 filter_list)
 c=$(full_filter_name $(remove_suffix _filter $c))
 ;;
-indev_list)
-c=$(add_suffix _demuxer $(remove_suffix _indev $c))
-;;
-outdev_list)
-c=$(add_suffix _muxer $(remove_suffix _outdev $c))
-;;
 esac
 printf "_%s,\n" $c >> $TMPH
 fi
@@ -7121,8 +7122,6 @@ print_enabled_components libavfilter/filter_list.c 
AVFilter filter_list $FILTER_
 print_enabled_components libavcodec/codec_list.c AVCodec codec_list $CODEC_LIST
 print_enabled_components libavcodec/parser_list.c AVCodecParser parser_list 
$PARSER_LIST
 print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter 
bitstream_filters $BSF_LIST
-print_enabled_components libavdevice/indev_list.c AVInputFormat indev_list 
$INDEV_LIST
-print_enabled_components libavdevice/outdev_list.c AVOutputFormat outdev_list 
$OUTDEV_LIST
 print_enabled_components libavformat/demuxer_list.c AVInputFormat demuxer_list 
$DEMUXER_LIST
 print_enabled_components libavformat/muxer_list.c AVOutputFormat muxer_list 
$MUXER_LIST
 print_enabled_components libavformat/protocol_list.c URLProtocol url_protocols 
$PROTOCOL_LIST
diff --git a/doc/APIchanges b/doc/APIchanges
index 4052988f59..8078f028d3 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -49,11 +49,6 @@ API changes, most recent first:
 2018-02-xx - xxx - lavc 58.11.100 - avcodec.h
   Add AVCodecContext.extra_hw_frames.
 
-2018-02-06 - 0fd475704e - lavd 58.1.100 - avdevice.h
-  Deprecate use of av_input_audio_device_next(), av_input_video_device_next(),
-  av_output_audio_device_next(), av_output_video_device_next().
-  Add av_indev_iterate(), and av_outdev_iterate().
-
 2018-xx-xx - xxx - lavf 58.9.100 - avformat.h
   Deprecate use of av_register_input_format(), av_register_output_format(),
   av_register_all(), av_iformat_next(), av_oformat_next().
diff --git a/libavdevice/.gitignore b/libavdevice/.gitignore
deleted file mode 100644
index 08ac3eb86a..00
--- a/libavdevice/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/indev_list.c
-/outdev_list.c
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index 

[FFmpeg-devel] [PATCH 5/5] cmdutils: use new APIs

2018-03-23 Thread Josh de Kock
---
 fftools/cmdutils.c | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index c0ddf0b287..a6cf002fd0 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -1259,8 +1259,10 @@ static int is_device(const AVClass *avclass)
 
 static int show_formats_devices(void *optctx, const char *opt, const char 
*arg, int device_only, int muxdemuxers)
 {
-AVInputFormat *ifmt  = NULL;
-AVOutputFormat *ofmt = NULL;
+void *ifmt_opaque = NULL;
+const AVInputFormat *ifmt  = NULL;
+void *ofmt_opaque = NULL;
+const AVOutputFormat *ofmt = NULL;
 const char *last_name;
 int is_dev;
 
@@ -1276,7 +1278,8 @@ static int show_formats_devices(void *optctx, const char 
*opt, const char *arg,
 const char *long_name = NULL;
 
 if (muxdemuxers !=SHOW_DEMUXERS) {
-while ((ofmt = av_oformat_next(ofmt))) {
+ifmt_opaque = NULL;
+while ((ofmt = av_muxer_iterate(_opaque))) {
 is_dev = is_device(ofmt->priv_class);
 if (!is_dev && device_only)
 continue;
@@ -1289,7 +1292,8 @@ static int show_formats_devices(void *optctx, const char 
*opt, const char *arg,
 }
 }
 if (muxdemuxers != SHOW_MUXERS) {
-while ((ifmt = av_iformat_next(ifmt))) {
+ofmt_opaque = NULL;
+while ((ifmt = av_demuxer_iterate(_opaque))) {
 is_dev = is_device(ifmt->priv_class);
 if (!is_dev && device_only)
 continue;
@@ -1629,6 +1633,7 @@ int show_filters(void *optctx, const char *opt, const 
char *arg)
 #if CONFIG_AVFILTER
 const AVFilter *filter = NULL;
 char descr[64], *descr_cur;
+void *opaque = NULL;
 int i, j;
 const AVFilterPad *pad;
 
@@ -1640,7 +1645,7 @@ int show_filters(void *optctx, const char *opt, const 
char *arg)
"  V = Video input/output\n"
"  N = Dynamic number and/or type of input/output\n"
"  | = Source or sink filter\n");
-while ((filter = avfilter_next(filter))) {
+while ((filter = av_filter_iterate())) {
 descr_cur = descr;
 for (i = 0; i < 2; i++) {
 if (i) {
-- 
2.14.3 (Apple Git-98)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/5] checkasm/Makefile: add EXTRALIBS-libavformat

2018-03-23 Thread Josh de Kock
---
 tests/checkasm/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile
index 0520e264e2..ae7e810d25 100644
--- a/tests/checkasm/Makefile
+++ b/tests/checkasm/Makefile
@@ -61,7 +61,7 @@ tests/checkasm/checkasm.o: CFLAGS += -Umain
 CHECKASM := tests/checkasm/checkasm$(EXESUF)
 
 $(CHECKASM): $(CHECKASMOBJS) $(FF_STATIC_DEP_LIBS)
-   $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(CHECKASMOBJS) 
$(FF_STATIC_DEP_LIBS) $(EXTRALIBS-avcodec) $(EXTRALIBS-avfilter) 
$(EXTRALIBS-avutil) $(EXTRALIBS-swresample) $(EXTRALIBS)
+   $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(CHECKASMOBJS) 
$(FF_STATIC_DEP_LIBS) $(EXTRALIBS-avcodec) $(EXTRALIBS-avfilter) 
$(EXTRALIBS-avformat) $(EXTRALIBS-avutil) $(EXTRALIBS-swresample) $(EXTRALIBS)
 
 checkasm: $(CHECKASM)
 
-- 
2.14.3 (Apple Git-98)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


  1   2   3   4   >