Re: [FFmpeg-devel] [PATCH] avformat/avio: check input URLContext value NULL

2017-12-27 Thread 刘歧

> On 28 Dec 2017, at 07:04, Michael Niedermayer  wrote:
> 
> On Mon, Nov 20, 2017 at 03:58:59PM +0800, Steven Liu wrote:
>> fix ticket id: #6846
>> 
>> Signed-off-by: Steven Liu 
>> ---
>> libavformat/avio.c | 10 ++
>> 1 file changed, 6 insertions(+), 4 deletions(-)
> 
> LGTM
> 
> thx


Pushed

Thanks
Steven
> 
> [...]
> -- 
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> Rewriting code that is poorly written but fully understood is good.
> Rewriting code that one doesnt understand is a sign that one is less smart
> then the original author, trying to rewrite it will not make it better.
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



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


Re: [FFmpeg-devel] [PATCH] avfilter/vidstab: set bytesPerPixel only for packed formats.

2017-12-27 Thread Gyan Doshi

On 12/24/2017 10:36 AM, Gyan Doshi wrote:


On 12/23/2017 4:39 PM, Gyan Doshi wrote:

Patch for ticket #6736.


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


Re: [FFmpeg-devel] [PATCH]lavc/jpeg2000dec: Support reading 64-bit atom size.

2017-12-27 Thread Carl Eugen Hoyos
2017-12-28 1:51 GMT+01:00 Michael Niedermayer :
> On Wed, Dec 27, 2017 at 11:29:33PM +0100, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> Attached patch fixes ticket #6935 for me, files with actual atom size
>> >= 2^32 cannot be read by the current bytestream system afaict.
>>
>> Please comment, Carl Eugen
>
>>  jpeg2000dec.c |   11 ++-
>>  1 file changed, 10 insertions(+), 1 deletion(-)
>> ed0d56505f018b8e24594cd14584b6b7ee55ec5b  
>> 0001-lavc-jpeg2000dec-Support-reading-64-bit-atom-size.patch
>> From db1010aec864cb963fac243907565fdd8c8a1636 Mon Sep 17 00:00:00 2001
>> From: Carl Eugen Hoyos 
>> Date: Wed, 27 Dec 2017 23:18:58 +0100
>> Subject: [PATCH] lavc/jpeg2000dec: Support reading 64-bit atom size.
>>
>> Fixes ticket #6935.
>> ---
>>  libavcodec/jpeg2000dec.c |   11 ++-
>>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> LGTM

Patch applied.

Thank you, Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]lavc/jpeg2000dec: Support reading 64-bit atom size.

2017-12-27 Thread Michael Niedermayer
On Wed, Dec 27, 2017 at 11:29:33PM +0100, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch fixes ticket #6935 for me, files with actual atom size
> >= 2^32 cannot be read by the current bytestream system afaict.
> 
> Please comment, Carl Eugen

>  jpeg2000dec.c |   11 ++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> ed0d56505f018b8e24594cd14584b6b7ee55ec5b  
> 0001-lavc-jpeg2000dec-Support-reading-64-bit-atom-size.patch
> From db1010aec864cb963fac243907565fdd8c8a1636 Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos 
> Date: Wed, 27 Dec 2017 23:18:58 +0100
> Subject: [PATCH] lavc/jpeg2000dec: Support reading 64-bit atom size.
> 
> Fixes ticket #6935.
> ---
>  libavcodec/jpeg2000dec.c |   11 ++-
>  1 file changed, 10 insertions(+), 1 deletion(-)

LGTM

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] h264: add AVOption to set x264_build default

2017-12-27 Thread Carl Eugen Hoyos
2017-12-28 1:35 GMT+01:00 James Almer :
> On 12/27/2017 9:31 PM, Carl Eugen Hoyos wrote:
>> 2017-12-28 0:58 GMT+01:00 wm4 :
>>> On Thu, 28 Dec 2017 00:56:05 +0100
>>> Carl Eugen Hoyos  wrote:
>>>
 2017-12-26 3:02 GMT+01:00 wm4 :
> On Sat, 23 Dec 2017 03:14:49 +0100
> wm4  wrote:
>
>> This provides a generic way to the API user to deal with files that
>> either lack this SEI, or which have the SEI only in packets not passed
>> to the decoder (such as the common case of the SEI being in the very
>> firsat video packet, but decoding is started somewhere in the middle of
>> the file). Bugs like 840b41b2a643fc8f0617c0370125a19c02c6b586 make this
>> somewhat of a necessity.
>>
>> This intentionally uses the version in the SEI instead, if any is found.
>> ---
>> A bit crappy. Better than other workarounds I've thought of. And at
>> least it doesn't require the API user to guess which x264 versions
>> trigger which bugs.
>> ---
>>  libavcodec/h264dec.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
>> index 1e98765439..8c9c6d9f3b 100644
>> --- a/libavcodec/h264dec.c
>> +++ b/libavcodec/h264dec.c
>> @@ -315,7 +315,6 @@ static int h264_init_context(AVCodecContext *avctx, 
>> H264Context *h)
>>  h->flags = avctx->flags;
>>  h->poc.prev_poc_msb  = 1 << 16;
>>  h->recovery_frame= -1;
>> -h->x264_build= -1;
>>  h->frame_recovered   = 0;
>>  h->poc.prev_frame_num= -1;
>>  h->sei.frame_packing.arrangement_cancel_flag = -1;
>> @@ -1037,6 +1036,7 @@ static const AVOption h264_options[] = {
>>  { "is_avc", "is avc", OFFSET(is_avc), AV_OPT_TYPE_BOOL, {.i64 = 0}, 
>> 0, 1, 0 },
>>  { "nal_length_size", "nal_length_size", OFFSET(nal_length_size), 
>> AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, 0 },
>>  { "enable_er", "Enable error resilience on damaged frames 
>> (unsafe)", OFFSET(enable_er), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD 
>> },
>> +{ "x264_build", "Assume this x264 version if no x264 version found 
>> in any SEI", OFFSET(x264_build), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 
>> INT_MAX, VD },
>>  { NULL },
>>  };
>>
>
> Pushed.

 That's a new low even for your standards.
>>>
>>> What is it now again that you're once again so obnoxious and insulting?
>>
>> Is there really no way to stop you?
>
> I don't know what's gotten into you right now, but antagonizing people

> out of nowhere without being provoked is not a welcome behavior at all.

That doesn't sound correct to me.

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


Re: [FFmpeg-devel] [PATCH] h264: add AVOption to set x264_build default

2017-12-27 Thread James Almer
On 12/27/2017 9:31 PM, Carl Eugen Hoyos wrote:
> 2017-12-28 0:58 GMT+01:00 wm4 :
>> On Thu, 28 Dec 2017 00:56:05 +0100
>> Carl Eugen Hoyos  wrote:
>>
>>> 2017-12-26 3:02 GMT+01:00 wm4 :
 On Sat, 23 Dec 2017 03:14:49 +0100
 wm4  wrote:

> This provides a generic way to the API user to deal with files that
> either lack this SEI, or which have the SEI only in packets not passed
> to the decoder (such as the common case of the SEI being in the very
> firsat video packet, but decoding is started somewhere in the middle of
> the file). Bugs like 840b41b2a643fc8f0617c0370125a19c02c6b586 make this
> somewhat of a necessity.
>
> This intentionally uses the version in the SEI instead, if any is found.
> ---
> A bit crappy. Better than other workarounds I've thought of. And at
> least it doesn't require the API user to guess which x264 versions
> trigger which bugs.
> ---
>  libavcodec/h264dec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
> index 1e98765439..8c9c6d9f3b 100644
> --- a/libavcodec/h264dec.c
> +++ b/libavcodec/h264dec.c
> @@ -315,7 +315,6 @@ static int h264_init_context(AVCodecContext *avctx, 
> H264Context *h)
>  h->flags = avctx->flags;
>  h->poc.prev_poc_msb  = 1 << 16;
>  h->recovery_frame= -1;
> -h->x264_build= -1;
>  h->frame_recovered   = 0;
>  h->poc.prev_frame_num= -1;
>  h->sei.frame_packing.arrangement_cancel_flag = -1;
> @@ -1037,6 +1036,7 @@ static const AVOption h264_options[] = {
>  { "is_avc", "is avc", OFFSET(is_avc), AV_OPT_TYPE_BOOL, {.i64 = 0}, 
> 0, 1, 0 },
>  { "nal_length_size", "nal_length_size", OFFSET(nal_length_size), 
> AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, 0 },
>  { "enable_er", "Enable error resilience on damaged frames (unsafe)", 
> OFFSET(enable_er), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD },
> +{ "x264_build", "Assume this x264 version if no x264 version found 
> in any SEI", OFFSET(x264_build), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 
> INT_MAX, VD },
>  { NULL },
>  };
>

 Pushed.
>>>
>>> That's a new low even for your standards.
>>
>> What is it now again that you're once again so obnoxious and insulting?
> 
> Is there really no way to stop you?

I don't know what's gotten into you right now, but antagonizing people
out of nowhere without being provoked is not a welcome behavior at all.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] h264: add AVOption to set x264_build default

2017-12-27 Thread Carl Eugen Hoyos
2017-12-28 0:58 GMT+01:00 wm4 :
> On Thu, 28 Dec 2017 00:56:05 +0100
> Carl Eugen Hoyos  wrote:
>
>> 2017-12-26 3:02 GMT+01:00 wm4 :
>> > On Sat, 23 Dec 2017 03:14:49 +0100
>> > wm4  wrote:
>> >
>> >> This provides a generic way to the API user to deal with files that
>> >> either lack this SEI, or which have the SEI only in packets not passed
>> >> to the decoder (such as the common case of the SEI being in the very
>> >> firsat video packet, but decoding is started somewhere in the middle of
>> >> the file). Bugs like 840b41b2a643fc8f0617c0370125a19c02c6b586 make this
>> >> somewhat of a necessity.
>> >>
>> >> This intentionally uses the version in the SEI instead, if any is found.
>> >> ---
>> >> A bit crappy. Better than other workarounds I've thought of. And at
>> >> least it doesn't require the API user to guess which x264 versions
>> >> trigger which bugs.
>> >> ---
>> >>  libavcodec/h264dec.c | 2 +-
>> >>  1 file changed, 1 insertion(+), 1 deletion(-)
>> >>
>> >> diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
>> >> index 1e98765439..8c9c6d9f3b 100644
>> >> --- a/libavcodec/h264dec.c
>> >> +++ b/libavcodec/h264dec.c
>> >> @@ -315,7 +315,6 @@ static int h264_init_context(AVCodecContext *avctx, 
>> >> H264Context *h)
>> >>  h->flags = avctx->flags;
>> >>  h->poc.prev_poc_msb  = 1 << 16;
>> >>  h->recovery_frame= -1;
>> >> -h->x264_build= -1;
>> >>  h->frame_recovered   = 0;
>> >>  h->poc.prev_frame_num= -1;
>> >>  h->sei.frame_packing.arrangement_cancel_flag = -1;
>> >> @@ -1037,6 +1036,7 @@ static const AVOption h264_options[] = {
>> >>  { "is_avc", "is avc", OFFSET(is_avc), AV_OPT_TYPE_BOOL, {.i64 = 0}, 
>> >> 0, 1, 0 },
>> >>  { "nal_length_size", "nal_length_size", OFFSET(nal_length_size), 
>> >> AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, 0 },
>> >>  { "enable_er", "Enable error resilience on damaged frames (unsafe)", 
>> >> OFFSET(enable_er), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD },
>> >> +{ "x264_build", "Assume this x264 version if no x264 version found 
>> >> in any SEI", OFFSET(x264_build), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 
>> >> INT_MAX, VD },
>> >>  { NULL },
>> >>  };
>> >>
>> >
>> > Pushed.
>>
>> That's a new low even for your standards.
>
> What is it now again that you're once again so obnoxious and insulting?

Is there really no way to stop you?

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


Re: [FFmpeg-devel] [PATCH]lavfi/minterpolate: Split struct Pixel to allow higher resolutions

2017-12-27 Thread Carl Eugen Hoyos
2017-12-05 1:43 GMT+01:00 Michael Niedermayer :
> On Mon, Dec 04, 2017 at 09:26:15PM +0100, Carl Eugen Hoyos wrote:
>> 2017-12-04 19:03 GMT+01:00 Michael Niedermayer :
>> > On Sun, Dec 03, 2017 at 05:30:32AM +0100, Carl Eugen Hoyos wrote:
>> >> Hi!
>> >>
>> >> Attached patch should fix ticket #6795, only tested with one filter
>> >> chain (bitexact): testsrc2=r=5:d=10,minterpolate=10
>> >>
>> >> Please comment, Carl Eugen
>> >
>> > Does this affect speed ? there are more pointers after the patch
>>
>> Yes (I had not tested before):
>> The following filter chain has a higher performance here on x86_64
>> with vanilla gcc 6.3 with the patch applied:
>> testsrc2=s=hd1080,minterpolate=50
>
> if its faster then LGTM

Patch applied.

Thank you, Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [RFC][PATCH] simple_idct: Template functions to support an input bitdepth parameter

2017-12-27 Thread Michael Niedermayer
On Wed, Dec 27, 2017 at 10:27:25PM +, Kieran Kunhya wrote:
> On Wed, 27 Dec 2017 at 19:53 Michael Niedermayer 
> wrote:
> 
> > please call the functions ff_simple_idct_int16_10bit or something that
> > makes it
> > clear what the 2 numbers mean.
> >
> 
> done
> 
> > [...]
> 
> is that faster than checking row 4-7 for 0 with sparse matrixes as occuring
> > in
> > video data ?
> >
> 
> added.
> 
> New patch attached.

>  bit_depth_template.c   |   17 -
>  idctdsp.c  |   18 +-
>  me_cmp.c   |2 +-
>  simple_idct.c  |   15 ---
>  simple_idct.h  |   24 ++--
>  simple_idct_template.c |   44 +---
>  tests/dct.c|6 +++---
>  vc1.c  |4 ++--
>  8 files changed, 86 insertions(+), 44 deletions(-)
> 1148a19f22faf958da521dbdaa4f621e47e1c629  
> 0001-simple_idct-Template-functions-to-support-an-input-b.patch
> From ae01a17ed048343e57173fd496a23ca64a95ef3f Mon Sep 17 00:00:00 2001
> From: Kieran Kunhya 
> Date: Wed, 27 Dec 2017 01:08:39 +
> Subject: [PATCH] simple_idct: Template functions to support an input bitdepth
>  parameter
[...]
> diff --git a/libavcodec/tests/dct.c b/libavcodec/tests/dct.c
> index b44c66f..c09f5ca 100644
> --- a/libavcodec/tests/dct.c
> +++ b/libavcodec/tests/dct.c
> @@ -82,9 +82,9 @@ static void ff_prores_idct_wrap(int16_t *dst){
>  static const struct algo idct_tab[] = {
>  { "REF-DBL", ff_ref_idct,  FF_IDCT_PERM_NONE },
>  { "INT", ff_j_rev_dct, FF_IDCT_PERM_LIBMPEG2 },
> -{ "SIMPLE-C",ff_simple_idct_8, FF_IDCT_PERM_NONE },
> -{ "SIMPLE-C10",  ff_simple_idct_10,FF_IDCT_PERM_NONE },
> -{ "SIMPLE-C12",  ff_simple_idct_12,FF_IDCT_PERM_NONE, 0, 1 },

> +{ "SIMPLE-C",ff_simple_idct_int16_8bit, FF_IDCT_PERM_NONE },
> +{ "SIMPLE-C10",  ff_simple_idct_int16_10bit,FF_IDCT_PERM_NONE },
> +{ "SIMPLE-C12",  ff_simple_idct_16_12,FF_IDCT_PERM_NONE, 0, 1 },

you missed renaming the 3rd of these

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] h264: add AVOption to set x264_build default

2017-12-27 Thread wm4
On Thu, 28 Dec 2017 00:56:05 +0100
Carl Eugen Hoyos  wrote:

> 2017-12-26 3:02 GMT+01:00 wm4 :
> > On Sat, 23 Dec 2017 03:14:49 +0100
> > wm4  wrote:
> >  
> >> This provides a generic way to the API user to deal with files that
> >> either lack this SEI, or which have the SEI only in packets not passed
> >> to the decoder (such as the common case of the SEI being in the very
> >> firsat video packet, but decoding is started somewhere in the middle of
> >> the file). Bugs like 840b41b2a643fc8f0617c0370125a19c02c6b586 make this
> >> somewhat of a necessity.
> >>
> >> This intentionally uses the version in the SEI instead, if any is found.
> >> ---
> >> A bit crappy. Better than other workarounds I've thought of. And at
> >> least it doesn't require the API user to guess which x264 versions
> >> trigger which bugs.
> >> ---
> >>  libavcodec/h264dec.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
> >> index 1e98765439..8c9c6d9f3b 100644
> >> --- a/libavcodec/h264dec.c
> >> +++ b/libavcodec/h264dec.c
> >> @@ -315,7 +315,6 @@ static int h264_init_context(AVCodecContext *avctx, 
> >> H264Context *h)
> >>  h->flags = avctx->flags;
> >>  h->poc.prev_poc_msb  = 1 << 16;
> >>  h->recovery_frame= -1;
> >> -h->x264_build= -1;
> >>  h->frame_recovered   = 0;
> >>  h->poc.prev_frame_num= -1;
> >>  h->sei.frame_packing.arrangement_cancel_flag = -1;
> >> @@ -1037,6 +1036,7 @@ static const AVOption h264_options[] = {
> >>  { "is_avc", "is avc", OFFSET(is_avc), AV_OPT_TYPE_BOOL, {.i64 = 0}, 
> >> 0, 1, 0 },
> >>  { "nal_length_size", "nal_length_size", OFFSET(nal_length_size), 
> >> AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, 0 },
> >>  { "enable_er", "Enable error resilience on damaged frames (unsafe)", 
> >> OFFSET(enable_er), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD },
> >> +{ "x264_build", "Assume this x264 version if no x264 version found in 
> >> any SEI", OFFSET(x264_build), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, 
> >> VD },
> >>  { NULL },
> >>  };
> >>  
> >
> > Pushed.  
> 
> That's a new low even for your standards.

What is it now again that you're once again so obnoxious and insulting?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] h264: add AVOption to set x264_build default

2017-12-27 Thread Carl Eugen Hoyos
2017-12-26 3:02 GMT+01:00 wm4 :
> On Sat, 23 Dec 2017 03:14:49 +0100
> wm4  wrote:
>
>> This provides a generic way to the API user to deal with files that
>> either lack this SEI, or which have the SEI only in packets not passed
>> to the decoder (such as the common case of the SEI being in the very
>> firsat video packet, but decoding is started somewhere in the middle of
>> the file). Bugs like 840b41b2a643fc8f0617c0370125a19c02c6b586 make this
>> somewhat of a necessity.
>>
>> This intentionally uses the version in the SEI instead, if any is found.
>> ---
>> A bit crappy. Better than other workarounds I've thought of. And at
>> least it doesn't require the API user to guess which x264 versions
>> trigger which bugs.
>> ---
>>  libavcodec/h264dec.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
>> index 1e98765439..8c9c6d9f3b 100644
>> --- a/libavcodec/h264dec.c
>> +++ b/libavcodec/h264dec.c
>> @@ -315,7 +315,6 @@ static int h264_init_context(AVCodecContext *avctx, 
>> H264Context *h)
>>  h->flags = avctx->flags;
>>  h->poc.prev_poc_msb  = 1 << 16;
>>  h->recovery_frame= -1;
>> -h->x264_build= -1;
>>  h->frame_recovered   = 0;
>>  h->poc.prev_frame_num= -1;
>>  h->sei.frame_packing.arrangement_cancel_flag = -1;
>> @@ -1037,6 +1036,7 @@ static const AVOption h264_options[] = {
>>  { "is_avc", "is avc", OFFSET(is_avc), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 
>> 1, 0 },
>>  { "nal_length_size", "nal_length_size", OFFSET(nal_length_size), 
>> AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, 0 },
>>  { "enable_er", "Enable error resilience on damaged frames (unsafe)", 
>> OFFSET(enable_er), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD },
>> +{ "x264_build", "Assume this x264 version if no x264 version found in 
>> any SEI", OFFSET(x264_build), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, VD 
>> },
>>  { NULL },
>>  };
>>
>
> Pushed.

That's a new low even for your standards.

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


Re: [FFmpeg-devel] [PATCH] avformat/avio: check input URLContext value NULL

2017-12-27 Thread Michael Niedermayer
On Mon, Nov 20, 2017 at 03:58:59PM +0800, Steven Liu wrote:
> fix ticket id: #6846
> 
> Signed-off-by: Steven Liu 
> ---
>  libavformat/avio.c | 10 ++
>  1 file changed, 6 insertions(+), 4 deletions(-)

LGTM

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH]lavc/jpeg2000dec: Support reading 64-bit atom size.

2017-12-27 Thread Carl Eugen Hoyos
Hi!

Attached patch fixes ticket #6935 for me, files with actual atom size
>= 2^32 cannot be read by the current bytestream system afaict.

Please comment, Carl Eugen
From db1010aec864cb963fac243907565fdd8c8a1636 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos 
Date: Wed, 27 Dec 2017 23:18:58 +0100
Subject: [PATCH] lavc/jpeg2000dec: Support reading 64-bit atom size.

Fixes ticket #6935.
---
 libavcodec/jpeg2000dec.c |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 8071dc3..01fe4b3 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -2009,7 +2009,16 @@ static int jp2_find_codestream(Jpeg2000DecoderContext *s)
bytestream2_get_bytes_left(>g) >= 8) {
 atom_size = bytestream2_get_be32u(>g);
 atom  = bytestream2_get_be32u(>g);
-atom_end  = bytestream2_tell(>g) + atom_size - 8;
+if (atom_size == 1) {
+if (bytestream2_get_be32u(>g)) {
+avpriv_request_sample(s->avctx, "Huge atom");
+return 0;
+}
+atom_size = bytestream2_get_be32u(>g);
+atom_end  = bytestream2_tell(>g) + atom_size - 16;
+} else {
+atom_end  = bytestream2_tell(>g) + atom_size -  8;
+}
 
 if (atom == JP2_CODESTREAM)
 return 1;
-- 
1.7.10.4

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


Re: [FFmpeg-devel] Licensing question.

2017-12-27 Thread Carl Eugen Hoyos
2017-12-27 20:48 GMT+01:00 Lewis Hornsby :
> Hey there, I saw on your facebook page that you were giving out this
> email address for enquiries regarding FFMPEG licensing.

To whoever takes care of our facebook page:
Please redirect license questions to the user mailing list.

> I am developing a closed source application in NW.JS. It is a Wordpress
> theme builder. There is a part of my application that lets people browse
> their available media. I would like to know if for something as simple as
> playback of an mp4 file in this context, I would need a licence.  The
> application does not nor ever will convert files.

(How does the application play files back without converting them?)

As Lou wrote, the FFmpeg license does not cover "playback" or
"conversion", it only covers distribution.

You don't "need" a license, FFmpeg can only be legally distributed under
the terms of the LGPL or GPL.

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


Re: [FFmpeg-devel] [RFC][PATCH] simple_idct: Template functions to support an input bitdepth parameter

2017-12-27 Thread Kieran Kunhya
On Wed, 27 Dec 2017 at 19:53 Michael Niedermayer 
wrote:

> please call the functions ff_simple_idct_int16_10bit or something that
> makes it
> clear what the 2 numbers mean.
>

done

> [...]

is that faster than checking row 4-7 for 0 with sparse matrixes as occuring
> in
> video data ?
>

added.

New patch attached.


0001-simple_idct-Template-functions-to-support-an-input-b.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/5] mpeg: add experimental support for PSMF audio.

2017-12-27 Thread Michael Niedermayer
On Tue, Dec 26, 2017 at 04:06:49PM +0800, mi...@brew.sh wrote:
> From: Maxim Poliakovski 
> 
> Changes by Misty De Meo :
> 
> atrac3plus_parser: remove return statements for invalid data
> 
> atrac3plus_parser: use libavcodec's oma
> 
> Signed-off-by: Misty De Meo 
> ---
>  libavcodec/Makefile|   1 +
>  libavcodec/allcodecs.c |   1 +
>  libavcodec/atrac3plus_parser.c | 150 
> +
>  libavformat/mpeg.c |  27 +++-
>  4 files changed, 178 insertions(+), 1 deletion(-)
>  create mode 100644 libavcodec/atrac3plus_parser.c

This breaks playback of atrac3p (atrac3p\ phase\ inv\ 2.at3)

Ive not investigated, but i doubt very much that simply removing the
error returns will work. Every single error path must be handled
appropriately and you should ensure that its all correct.
Not loosing or corrupting data on any error path and not doing
anything else bad or undefined ...

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter: add entropy filter

2017-12-27 Thread Tomas Härdin
ons 2017-12-27 klockan 19:21 +0100 skrev Paul B Mahol:
> > 
> +static int filter_frame(AVFilterLink *inlink, AVFrame *in)
> +{
> +AVFilterContext *ctx = inlink->dst;
> +AVFilterLink *outlink = ctx->outputs[0];
> +EntropyContext *s = ctx->priv;
> +int plane, y, x;
> +
> +for (plane = 0; plane < s->nb_planes; plane++) {
> +int cidx = s->is_rgb ? s->rgba_map[plane] : plane;
> +uint8_t *src = in->data[plane];
> +float total = s->planewidth[plane] * s->planeheight[plane];

Are 0x0 pictures possible? I think there's a check somewhere, but I'm
not 100% sure

/Tomas

signature.asc
Description: This is a digitally signed message part
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Licensing question.

2017-12-27 Thread Lou Logan
On Wed, 27 Dec 2017 19:48:52 +
Lewis Hornsby  wrote:

> Hey there, I saw on your facebook page that you were giving out this
> email address for enquiries regarding FFMPEG licensing.
> 
> I am developing a closed source application in NW.JS. It is a
> Wordpress theme builder. There is a part of my application that lets
> people browse their available media. I would like to know if for
> something as simple as playback of an mp4 file in this context, I
> would need a licence.   The application does not nor ever will
> convert files.
> 
> Many thanks, Lewis Hornsby. 

Are you distributing anything from FFmpeg? How is FFmpeg involved in
your application?

CCing as you are not currently subscribed. Check archives for possible
other replies:

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


Re: [FFmpeg-devel] [PATCH] AIFF fix in case of ANNO

2017-12-27 Thread Moritz Barsnick
On Wed, Dec 27, 2017 at 08:56:17 +, Eduard Sinelnikov wrote:

> Subject: [PATCH] AIFF fix in case of ANNO

You should be a bit more precise as to what was wrong and how it was
fixed. Also please use the prefix "avformat/aiffdec: ", see other
commits in the repo.

> From: Ubuntu 

I'm certain that this email address will not be accepted as a
committer. You should set up a proper address in your git config. (Your
git client should have warned you about this.)

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


[FFmpeg-devel] Licensing question.

2017-12-27 Thread Lewis Hornsby
Hey there, I saw on your facebook page that you were giving out this email 
address for enquiries regarding FFMPEG licensing.

I am developing a closed source application in NW.JS. It is a Wordpress theme 
builder. There is a part of my application that lets people browse their 
available media. I would like to know if for something as simple as playback of 
an mp4 file in this context, I would need a licence.   The application does not 
nor ever will convert files.

Many thanks, Lewis Hornsby. 
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] AIFF fix in case of ANNO

2017-12-27 Thread Eduard Sinelnikov
From: Ubuntu 

---
 libavformat/aiffdec.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 99e05c7..20decc5 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -81,11 +81,10 @@ static void get_meta(AVFormatContext *s, const char *key, 
int size)
 av_free(str);
 return;
 }
-size += (size&1)-res;
+size -= res;
 str[res] = 0;
 av_dict_set(>metadata, key, str, AV_DICT_DONT_STRDUP_VAL);
-}else
-size+= size&1;
+}
 
 avio_skip(s->pb, size);
 }
-- 
2.7.4

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


Re: [FFmpeg-devel] [PATCH] Add android_capture indev

2017-12-27 Thread Felix Matouschek
Ping

> Am 22.12.2017 um 21:36 schrieb Felix Matouschek :
> 
> Am 22.12.2017 20:50, schrieb Lou Logan:
>> I think you forgot to attach the patch.
> 
> Sorry, flaky mail client... attached it again.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v2 4/4] avformat/hls: enable http_multiple only for http/1.1 servers

2017-12-27 Thread Michael Niedermayer
On Wed, Dec 27, 2017 at 07:39:12PM +, Aman Gupta wrote:
> On Wed, Dec 27, 2017 at 11:35 AM Michael Niedermayer 
> wrote:
> 
> > On Mon, Dec 25, 2017 at 09:23:01PM -0800, Aman Gupta wrote:
> > > From: Aman Gupta 
> > >
> > > Signed-off-by: Aman Gupta 
> > > ---
> > >  doc/demuxers.texi |  2 +-
> > >  libavformat/hls.c | 13 ++---
> > >  2 files changed, 11 insertions(+), 4 deletions(-)
> >
> > segfaults fate-filter-hls
> 
> 
> I applied an updated version of this patchset to master yesterday which
> passes fate.

ohh, ok, didnt do a pull since a few hours

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"I am not trying to be anyone's saviour, I'm trying to think about the
 future and not be sad" - Elon Musk



signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [RFC][PATCH] simple_idct: Template functions to support an input bitdepth parameter

2017-12-27 Thread Michael Niedermayer
On Wed, Dec 27, 2017 at 01:11:56AM +, Kieran Kunhya wrote:
> For MPEG-4 Simple Studio Profile, I need to be able to support int32_t
> input coeffcients to the IDCT functions. I have attempted to implement this
> with the attached patch.
> Any comments would be appreciated, I'm pretty sure it is not optimal as-is.
> 
> Regards,
> Kieran Kunhya

>  bit_depth_template.c   |   17 -
>  idctdsp.c  |   18 +-
>  me_cmp.c   |2 +-
>  simple_idct.c  |   15 ---
>  simple_idct.h  |   24 ++--
>  simple_idct_template.c |   43 ---
>  vc1.c  |4 ++--
>  7 files changed, 82 insertions(+), 41 deletions(-)
> b69afd1419eafb71e999874a220369b08c01d931  
> 0001-simple_idct-Template-functions-to-support-an-input-b.patch
> From 9675ff0714df15e433dbe78d6e40c2430c21b519 Mon Sep 17 00:00:00 2001
> From: Kieran Kunhya 
> Date: Wed, 27 Dec 2017 01:08:39 +
> Subject: [PATCH] simple_idct: Template functions to support an input bitdepth
>  parameter
> 
> ---
>  libavcodec/bit_depth_template.c   | 17 +++-
>  libavcodec/idctdsp.c  | 18 
>  libavcodec/me_cmp.c   |  2 +-
>  libavcodec/simple_idct.c  | 15 +++---
>  libavcodec/simple_idct.h  | 24 +-
>  libavcodec/simple_idct_template.c | 43 
> +--
>  libavcodec/vc1.c  |  4 ++--
>  7 files changed, 82 insertions(+), 41 deletions(-)
> 
> diff --git a/libavcodec/bit_depth_template.c b/libavcodec/bit_depth_template.c
> index 8018489..bd7237f 100644
> --- a/libavcodec/bit_depth_template.c
> +++ b/libavcodec/bit_depth_template.c
> @@ -29,6 +29,7 @@
>  #   undef pixel2
>  #   undef pixel4
>  #   undef dctcoef
> +#   undef idctin
>  #   undef INIT_CLIP
>  #   undef no_rnd_avg_pixel4
>  #   undef rnd_avg_pixel4
> @@ -53,6 +54,16 @@
>  #   define pixel4 uint64_t
>  #   define dctcoef int32_t
>  
> +#ifdef IN_IDCT_DEPTH
> +#if IN_IDCT_DEPTH == 32
> +#   define idctin int32_t
> +#else
> +#   define idctin int16_t
> +#endif
> +#else
> +#   define idctin int16_t
> +#endif
> +
>  #   define INIT_CLIP
>  #   define no_rnd_avg_pixel4 no_rnd_avg64
>  #   definernd_avg_pixel4rnd_avg64
> @@ -71,6 +82,7 @@
>  #   define pixel2 uint16_t
>  #   define pixel4 uint32_t
>  #   define dctcoef int16_t
> +#   define idctin  int16_t
>  
>  #   define INIT_CLIP
>  #   define no_rnd_avg_pixel4 no_rnd_avg32
> @@ -87,7 +99,10 @@
>  #   define CLIP(a) av_clip_uint8(a)
>  #endif
>  
> -#define FUNC3(a, b, c)  a ## _ ## b ## c
> +#define FUNC3(a, b, c)  a ## _ ## b ##  c
>  #define FUNC2(a, b, c)  FUNC3(a, b, c)
>  #define FUNC(a)  FUNC2(a, BIT_DEPTH,)
>  #define FUNCC(a) FUNC2(a, BIT_DEPTH, _c)
> +#define FUNC4(a, b, c)  a ## _ ## b ## _ ## c
> +#define FUNC5(a, b, c)  FUNC4(a, b, c)
> +#define FUNC6(a)  FUNC5(a, IN_IDCT_DEPTH, BIT_DEPTH)
> \ No newline at end of file
> diff --git a/libavcodec/idctdsp.c b/libavcodec/idctdsp.c
> index 0ff74d8..16703aa 100644
> --- a/libavcodec/idctdsp.c
> +++ b/libavcodec/idctdsp.c
> @@ -256,14 +256,14 @@ av_cold void ff_idctdsp_init(IDCTDSPContext *c, 
> AVCodecContext *avctx)
>  c->perm_type = FF_IDCT_PERM_NONE;
>  } else {
>  if (avctx->bits_per_raw_sample == 10 || avctx->bits_per_raw_sample 
> == 9) {
> -c->idct_put  = ff_simple_idct_put_10;
> -c->idct_add  = ff_simple_idct_add_10;
> -c->idct  = ff_simple_idct_10;
> +c->idct_put  = ff_simple_idct_put_16_10;
> +c->idct_add  = ff_simple_idct_add_16_10;
> +c->idct  = ff_simple_idct_16_10;

please call the functions ff_simple_idct_int16_10bit or something that makes it
clear what the 2 numbers mean.


[...]
> diff --git a/libavcodec/simple_idct_template.c 
> b/libavcodec/simple_idct_template.c
> index f532313..8d60b50 100644
> --- a/libavcodec/simple_idct_template.c
> +++ b/libavcodec/simple_idct_template.c
> @@ -77,6 +77,10 @@
>  #define ROW_SHIFT 13
>  #define COL_SHIFT 18
>  #define DC_SHIFT  1
> +#   elif IN_IDCT_DEPTH == 32
> +#define ROW_SHIFT 13
> +#define COL_SHIFT 21
> +#define DC_SHIFT  2
>  #   else
>  #define ROW_SHIFT 12
>  #define COL_SHIFT 19
> @@ -109,11 +113,12 @@
>  #ifdef EXTRA_SHIFT
>  static inline void FUNC(idctRowCondDC_extrashift)(int16_t *row, int 
> extra_shift)
>  #else
> -static inline void FUNC(idctRowCondDC)(int16_t *row, int extra_shift)
> +static inline void FUNC6(idctRowCondDC)(idctin *row, int extra_shift)
>  #endif
>  {
>  SUINT a0, a1, a2, a3, b0, b1, b2, b3;
>  
> +#if IN_IDCT_DEPTH == 16
>  #if HAVE_FAST_64BIT
>  #define ROW0_MASK (0xLL << 48 * HAVE_BIGENDIAN)
>  if (((AV_RN64A(row) & ~ROW0_MASK) | AV_RN64A(row+4)) == 0) {
> @@ -148,6 +153,7 @@ static inline void 

Re: [FFmpeg-devel] [PATCH v2 4/4] avformat/hls: enable http_multiple only for http/1.1 servers

2017-12-27 Thread Aman Gupta
On Wed, Dec 27, 2017 at 11:35 AM Michael Niedermayer 
wrote:

> On Mon, Dec 25, 2017 at 09:23:01PM -0800, Aman Gupta wrote:
> > From: Aman Gupta 
> >
> > Signed-off-by: Aman Gupta 
> > ---
> >  doc/demuxers.texi |  2 +-
> >  libavformat/hls.c | 13 ++---
> >  2 files changed, 11 insertions(+), 4 deletions(-)
>
> segfaults fate-filter-hls


I applied an updated version of this patchset to master yesterday which
passes fate.

Also confirmed your f.m3u test case passes, as well as simplehttpd.py.

Aman



>
> #0  0x703259a4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
> #1  0x00697b7c in read_data (opaque=0x21d2fc0, buf=0x21e3240 "",
> buf_size=32768) at libavformat/hls.c:1472
> #2  0x0065657c in read_packet_wrapper (s=0x21d3fc0, buf=0x21e3240
> "", size=32768) at libavformat/aviobuf.c:533
> #3  0x0065680a in fill_buffer (s=0x21d3fc0) at
> libavformat/aviobuf.c:583
> #4  0x00656bc3 in avio_read (s=0x21d3fc0, buf=0x21d5ef0
> "\330.Z\360\377\177", size=2048) at libavformat/aviobuf.c:676
> #5  0x00687e11 in av_probe_input_buffer2 (pb=0x21d3fc0,
> fmt=0x7fffdaa0, filename=0x21d53a0 "tests/data/hls-out-000.ts",
> logctx=0x0, offset=0, max_probe_size=1048576) at libavformat/format.c:314
> #6  0x00687fe6 in av_probe_input_buffer (pb=0x21d3fc0,
> fmt=0x7fffdaa0, filename=0x21d53a0 "tests/data/hls-out-000.ts",
> logctx=0x0, offset=0, max_probe_size=0) at libavformat/format.c:368
> #7  0x00698e1f in hls_read_header (s=0x21d2580) at
> libavformat/hls.c:1920
> #8  0x007c434c in avformat_open_input (ps=0x7fffdbd0,
> filename=0x7fffe68c "tests/data/hls-list.m3u8", fmt=0x0,
> options=0x21d1d18) at libavformat/utils.c:613
> #9  0x0041528f in open_input_file (o=0x7fffdcd0,
> filename=0x7fffe68c "tests/data/hls-list.m3u8") at
> fftools/ffmpeg_opt.c:1070
> #10 0x0041efd1 in open_files (l=0x21d1d58, inout=0x1202377
> "input", open_file=0x414943 ) at fftools/ffmpeg_opt.c:3297
> #11 0x0041f163 in ffmpeg_parse_options (argc=19,
> argv=0x7fffe2e8) at fftools/ffmpeg_opt.c:3337
> #12 0x0043d3b0 in main (argc=19, argv=0x7fffe2e8) at
> fftools/ffmpeg.c:4816
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The misfortune of the wise is better than the prosperity of the fool.
> -- Epicurus
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v2 4/4] avformat/hls: enable http_multiple only for http/1.1 servers

2017-12-27 Thread Michael Niedermayer
On Mon, Dec 25, 2017 at 09:23:01PM -0800, Aman Gupta wrote:
> From: Aman Gupta 
> 
> Signed-off-by: Aman Gupta 
> ---
>  doc/demuxers.texi |  2 +-
>  libavformat/hls.c | 13 ++---
>  2 files changed, 11 insertions(+), 4 deletions(-)

segfaults fate-filter-hls

#0  0x703259a4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00697b7c in read_data (opaque=0x21d2fc0, buf=0x21e3240 "", 
buf_size=32768) at libavformat/hls.c:1472
#2  0x0065657c in read_packet_wrapper (s=0x21d3fc0, buf=0x21e3240 "", 
size=32768) at libavformat/aviobuf.c:533
#3  0x0065680a in fill_buffer (s=0x21d3fc0) at libavformat/aviobuf.c:583
#4  0x00656bc3 in avio_read (s=0x21d3fc0, buf=0x21d5ef0 
"\330.Z\360\377\177", size=2048) at libavformat/aviobuf.c:676
#5  0x00687e11 in av_probe_input_buffer2 (pb=0x21d3fc0, 
fmt=0x7fffdaa0, filename=0x21d53a0 "tests/data/hls-out-000.ts", logctx=0x0, 
offset=0, max_probe_size=1048576) at libavformat/format.c:314
#6  0x00687fe6 in av_probe_input_buffer (pb=0x21d3fc0, 
fmt=0x7fffdaa0, filename=0x21d53a0 "tests/data/hls-out-000.ts", logctx=0x0, 
offset=0, max_probe_size=0) at libavformat/format.c:368
#7  0x00698e1f in hls_read_header (s=0x21d2580) at 
libavformat/hls.c:1920
#8  0x007c434c in avformat_open_input (ps=0x7fffdbd0, 
filename=0x7fffe68c "tests/data/hls-list.m3u8", fmt=0x0, options=0x21d1d18) 
at libavformat/utils.c:613
#9  0x0041528f in open_input_file (o=0x7fffdcd0, 
filename=0x7fffe68c "tests/data/hls-list.m3u8") at fftools/ffmpeg_opt.c:1070
#10 0x0041efd1 in open_files (l=0x21d1d58, inout=0x1202377 "input", 
open_file=0x414943 ) at fftools/ffmpeg_opt.c:3297
#11 0x0041f163 in ffmpeg_parse_options (argc=19, argv=0x7fffe2e8) 
at fftools/ffmpeg_opt.c:3337
#12 0x0043d3b0 in main (argc=19, argv=0x7fffe2e8) at 
fftools/ffmpeg.c:4816

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avfilter: add entropy filter

2017-12-27 Thread Paul B Mahol
Signed-off-by: Paul B Mahol 
---
 doc/filters.texi |   4 ++
 libavfilter/Makefile |   1 +
 libavfilter/allfilters.c |   1 +
 libavfilter/vf_entropy.c | 174 +++
 4 files changed, 180 insertions(+)
 create mode 100644 libavfilter/vf_entropy.c

diff --git a/doc/filters.texi b/doc/filters.texi
index f651f1234d..0e3f4cd78d 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -8220,6 +8220,10 @@ Set pal8 output pixel format. This option does not work 
with codebook
 length greater than 256.
 @end table
 
+@section entropy
+
+Measure graylevel entropy in histogram of color channels of video frames.
+
 @section fade
 
 Apply a fade-in/out effect to the input video.
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 8bde542163..7d9f2330ca 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -184,6 +184,7 @@ OBJS-$(CONFIG_DRAWGRID_FILTER)   += vf_drawbox.o
 OBJS-$(CONFIG_DRAWTEXT_FILTER)   += vf_drawtext.o
 OBJS-$(CONFIG_EDGEDETECT_FILTER) += vf_edgedetect.o
 OBJS-$(CONFIG_ELBG_FILTER)   += vf_elbg.o
+OBJS-$(CONFIG_ENTROPY_FILTER)+= vf_entropy.o
 OBJS-$(CONFIG_EQ_FILTER) += vf_eq.o
 OBJS-$(CONFIG_EROSION_FILTER)+= vf_neighbor.o
 OBJS-$(CONFIG_EXTRACTPLANES_FILTER)  += vf_extractplanes.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 67c073091f..7635a8a583 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -194,6 +194,7 @@ static void register_all(void)
 REGISTER_FILTER(DRAWTEXT,   drawtext,   vf);
 REGISTER_FILTER(EDGEDETECT, edgedetect, vf);
 REGISTER_FILTER(ELBG,   elbg,   vf);
+REGISTER_FILTER(ENTROPY,entropy,vf);
 REGISTER_FILTER(EQ, eq, vf);
 REGISTER_FILTER(EROSION,erosion,vf);
 REGISTER_FILTER(EXTRACTPLANES,  extractplanes,  vf);
diff --git a/libavfilter/vf_entropy.c b/libavfilter/vf_entropy.c
new file mode 100644
index 00..4c622127f5
--- /dev/null
+++ b/libavfilter/vf_entropy.c
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2017 Paul B Mahol
+ *
+ * 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/imgutils.h"
+#include "libavutil/opt.h"
+#include "libavutil/pixdesc.h"
+#include "avfilter.h"
+#include "drawutils.h"
+#include "formats.h"
+#include "internal.h"
+#include "video.h"
+
+typedef struct EntropyContext {
+const AVClass *class;
+
+int nb_planes;
+int planeheight[4];
+int planewidth[4];
+int depth;
+int is_rgb;
+uint8_t rgba_map[4];
+char planenames[4];
+uint64_t *histogram;
+} EntropyContext;
+
+static int query_formats(AVFilterContext *ctx)
+{
+static const enum AVPixelFormat pixfmts[] = {
+AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, 
AV_PIX_FMT_YUV411P,
+AV_PIX_FMT_YUV440P,
+AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ420P, 
AV_PIX_FMT_YUVJ411P,
+AV_PIX_FMT_YUVJ440P,
+AV_PIX_FMT_YUV444P9, AV_PIX_FMT_YUV422P9, AV_PIX_FMT_YUV420P9,
+AV_PIX_FMT_YUV444P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV420P10,
+AV_PIX_FMT_YUV440P10,
+AV_PIX_FMT_YUV444P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV420P12,
+AV_PIX_FMT_YUV440P12,
+AV_PIX_FMT_YUV444P14, AV_PIX_FMT_YUV422P14, AV_PIX_FMT_YUV420P14,
+AV_PIX_FMT_YUV444P16, AV_PIX_FMT_YUV422P16, AV_PIX_FMT_YUV420P16,
+AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
+AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
+AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, 
AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
+AV_PIX_FMT_NONE
+};
+
+AVFilterFormats *formats = ff_make_format_list(pixfmts);
+if (!formats)
+return AVERROR(ENOMEM);
+return ff_set_common_formats(ctx, formats);
+}
+
+static int config_input(AVFilterLink *inlink)
+{
+const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
+AVFilterContext *ctx = inlink->dst;
+EntropyContext *s = ctx->priv;
+
+s->nb_planes = desc->nb_components;
+
+s->planeheight[1] = 

Re: [FFmpeg-devel] [RFC][PATCH] simple_idct: Template functions to support an input bitdepth parameter

2017-12-27 Thread Michael Niedermayer
On Wed, Dec 27, 2017 at 01:11:56AM +, Kieran Kunhya wrote:
> For MPEG-4 Simple Studio Profile, I need to be able to support int32_t
> input coeffcients to the IDCT functions. I have attempted to implement this
> with the attached patch.
> Any comments would be appreciated, I'm pretty sure it is not optimal as-is.
> 
> Regards,
> Kieran Kunhya

>  bit_depth_template.c   |   17 -
>  idctdsp.c  |   18 +-
>  me_cmp.c   |2 +-
>  simple_idct.c  |   15 ---
>  simple_idct.h  |   24 ++--
>  simple_idct_template.c |   43 ---
>  vc1.c  |4 ++--
>  7 files changed, 82 insertions(+), 41 deletions(-)
> b69afd1419eafb71e999874a220369b08c01d931  
> 0001-simple_idct-Template-functions-to-support-an-input-b.patch
> From 9675ff0714df15e433dbe78d6e40c2430c21b519 Mon Sep 17 00:00:00 2001
> From: Kieran Kunhya 
> Date: Wed, 27 Dec 2017 01:08:39 +
> Subject: [PATCH] simple_idct: Template functions to support an input bitdepth
>  parameter

this breaks build of 
make distclean ; ./configure && make -j12  testprogs

CC  libavcodec/tests/dct.o
libavcodec/tests/dct.c:85:22: error: ‘ff_simple_idct_8’ undeclared here (not in 
a function)
 { "SIMPLE-C",ff_simple_idct_8, FF_IDCT_PERM_NONE },
  ^
libavcodec/tests/dct.c:86:22: error: ‘ff_simple_idct_10’ undeclared here (not 
in a function)
 { "SIMPLE-C10",  ff_simple_idct_10,FF_IDCT_PERM_NONE },
  ^
libavcodec/tests/dct.c:87:22: error: ‘ff_simple_idct_12’ undeclared here (not 
in a function)
 { "SIMPLE-C12",  ff_simple_idct_12,FF_IDCT_PERM_NONE, 0, 1 },
  ^
make: *** [libavcodec/tests/dct.o] Error 1
make: Target `testprogs' not remade because of errors.

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"I am not trying to be anyone's saviour, I'm trying to think about the
 future and not be sad" - Elon Musk



signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Adding mkdir option for img2enc (2nd attempt)

2017-12-27 Thread Derek Buitenhuis
Hi,

On 12/27/2017 12:27 PM, Dr Alan Barclay wrote:
> Resending the two (git format-patch) patches, without the top lines 
> removed (which I thought I needed to do as some patch emails didn't seem 
> to have them).
> 
> All comments and help appreciated.

[...]

> Subject: [PATCH 1/2] Move mkdir_p (renamed ff_mkdir_p) from hlsenc.c to
>  utils.c.
> 
> ---
>  libavformat/hlsenc.c   | 35 +--
>  libavformat/internal.h |  7 +++
>  libavformat/utils.c| 33 +
>  3 files changed, 41 insertions(+), 34 deletions(-)

On a technical level, this patch looks OK.

> Subject: [PATCH 2/2] Adding mkdir option for img2enc.
> 
> ---
>  libavformat/img2enc.c | 8 
>  1 file changed, 8 insertions(+)

I'm not sure how others feel about the premise (mkdir in img2enc).
I personally don't mind - though, maybe it should be default instead
of an option? (Maybe a bad idea.)

> +if (img->use_mkdir) {
> +char *temp_filename = av_strdup(filename);
> +const char *temp_path = av_dirname(temp_filename);
> +ff_mkdir_p(temp_path);
> +av_free(temp_filename);
> +}

This lacks error checks for av_strdup and ff_mkdir_p.

- Derek

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


Re: [FFmpeg-devel] [PATCH] added reitnerlace filter

2017-12-27 Thread Nicolas George
Vasile Toncu (2017-12-27):
> It is because of licencing issues. I wanted the new filter to be LGPL.

Thanks for the explanation. That is a valid reason.

But as is, it would result would be duplicated code for people who do
not worry about licensing.

Are there any features that tinterlace has and this new filter has not?
If not, then I think it would be better to just replace tinterlace
entirely.

I can answer myself: tinterlace has asm optimizations. This is not for
me only to decide, but I am rather against having duplicated features
just for licensing reasons.

In this particular instance, I think you could use the GPL asm
optimizations while having the filter itself LGPL.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] added reitnerlace filter

2017-12-27 Thread Vasile Toncu
> > The reinterlace filter does various interlace/interleave/merge operations
> > between consecutive frames of a video. It tries too behave just like
> > tinterlace filter, including some new modes.

Why not add the new modes to the tinterlace filter, then?
>

It is because of licencing issues. I wanted the new filter to be LGPL.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] added reitnerlace filter

2017-12-27 Thread Nicolas George
Vasile Toncu (2017-12-27):
> The reinterlace filter does various interlace/interleave/merge operations
> between consecutive frames of a video. It tries too behave just like
> tinterlace filter, including some new modes.

Why not add the new modes to the tinterlace filter, then?

> On Wed, Dec 27, 2017 at 2:50 PM, Paul B Mahol  wrote:

Please remember that top-posting is forbidden on this mailing-list. If
you do not know what it means, look it up.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] added reitnerlace filter

2017-12-27 Thread Vasile Toncu
Hello,

The reinterlace filter does various interlace/interleave/merge operations
between consecutive frames of a video. It tries too behave just like
tinterlace filter, including some new modes.

On Wed, Dec 27, 2017 at 2:50 PM, Paul B Mahol  wrote:

> Hi,
>
> On 12/27/17, Vasile Toncu  wrote:
> > ---
> >  doc/filters.texi |  87 ++-
> >  libavfilter/Makefile |   2 +
> >  libavfilter/allfilters.c |   2 +
> >  libavfilter/reinterlace.h| 130 ++
> >  libavfilter/vf_reinterlace.c | 597
> > +++
> >  5 files changed, 812 insertions(+), 6 deletions(-)
> >  create mode 100644 libavfilter/reinterlace.h
> >  create mode 100644 libavfilter/vf_reinterlace.c
> >
>
> Its not obvious from code and documentation what this does.
>
> Why is this needed? At least provide some scenario where this is useful.
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] added reitnerlace filter

2017-12-27 Thread Nicolas George
Thanks for the patch. Initial comments below.

Vasile Toncu (2017-12-27):
> ---
>  doc/filters.texi |  87 ++-
>  libavfilter/Makefile |   2 +
>  libavfilter/allfilters.c |   2 +
>  libavfilter/reinterlace.h| 130 ++
>  libavfilter/vf_reinterlace.c | 597 
> +++
>  5 files changed, 812 insertions(+), 6 deletions(-)
>  create mode 100644 libavfilter/reinterlace.h
>  create mode 100644 libavfilter/vf_reinterlace.c
> 
> diff --git a/doc/filters.texi b/doc/filters.texi
> index 68f54f1..370be9b 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -564,13 +564,13 @@ select RIAA.
>  @item cd
>  select Compact Disc (CD).
>  @item 50fm

> -select 50µs (FM).
> +select 50µs (FM).

Your editor seems to have broken UTF-8 text. Same at a few places below.

>  @item 75fm
> -select 75µs (FM).
> +select 75µs (FM).
>  @item 50kf
> -select 50µs (FM-KF).
> +select 50µs (FM-KF).
>  @item 75kf
> -select 75µs (FM-KF).
> +select 75µs (FM-KF).
>  @end table
>  @end table
>  
> @@ -7346,7 +7346,7 @@ If not set, the filter will use the QP from the video 
> stream (if available).
>  @item strength
>  Set filter strength. It accepts an integer in range -15 to 32. Lower values 
> mean
>  more details but also more artifacts, while higher values make the image 
> smoother
> -but also blurrier. Default value is @code{0} − PSNR optimal.
> +but also blurrier. Default value is @code{0} − PSNR optimal.
>  
>  @item use_bframe_qp
>  Enable the use of the QP from the B-Frames if set to @code{1}. Using this
> @@ -13191,6 +13191,81 @@ pixel format "yuv422p" @var{hsub} is 2 and 
> @var{vsub} is 1.
>  @table @option
>  @end table
>  
> +@section reinterlace
> +Reinterlace filter does various interlace operations with the frames of a 
> video.
> +
> +@table @option
> +
> +@item mode
> +The mode of the filter
> +
> +The permitted values for @var{mode} are:
> +
> +@table @samp
> +@item merge, 0
> +Merges lines of two consecutive frames. Skips even frames. The output has 
> half frame rate of the input.
> +
> +@item drop_even, 1
> +Drops even frames. The output has half frame rate of the input.
> +
> +@item drop_odd, 2
> +Drop odd frames. The output has half frame rate of the input.
> +
> +@item pad, 3
> +Merges all the frames with a black frame. The output has the same frame rate 
> as as the input.
> +
> +
> +@item interleave_top, 4
> +Interleaves lines of two consecutive frames. Skips even frames. The output 
> has half frame rate of the input.
> +
> +@item interleave_bottom, 5
> +Interleaves lines of two consecutive frames. Skips even frames. The output 
> has half frame rate of the input.
> +
> +@item interlacex2, 6
> +For every frames in the input frame adds another one which is obtaining by 
> the interlace of two consecutive frames. 
> +The output has double frame rate of the input.
> +
> +@item mergex2, 7
> +Merge every frame with the next frame. The output has the same frame rate as 
> as the input.
> +
> +@item merge_tff, 8
> +Merges the frames of the input considering also the parity and the 
> top_filed_first information of the frames.
> +
> +The rules for the @var{merge_tff} are the folowng: 
> +
> +1. ensure the odd frame metadata indicates a top field, @*
> +2. ensure the even frame metadata indicates a bottom field, @*
> +3. move the odd frame into the upper field of the new image, @*
> +4. move the even frame into the lower field of the new image, @*
> +5. if frames are out of order (bottom field then top field), drop the 
> first field @*
> +6. if frames are duplicates (top field then top field), drop the first 
> field @*
> +7. if frames don't have interlace metadata, merge as if they were in the 
> right order @*
> +
> +
> +@item merge_bff, 9
> +Merges the frames of the input considering also the parity and the 
> top_filed_first information of the frames.
> +
> +The rules for the @var{merge_bff} are similar with those for 
> @var{merge_tff}, albeit inverted appropriately.
> +
> +@end table
> +
> +Default mode is @code{merge, 0}.
> +
> +@item flags
> +One can add various flags to the reitnerlace filter.
> +
> +The permitted values for @var{flags} are:
> +
> +@table @option
> +@item low_pass_filter, 1
> +Before copying a line of a frame, it gots filtered using a simple low pass 
> filter with the upper and lowwer frame lines.
> +
> +Vertical low-pass filtering can only be enabled for @option{mode}
> +@var{interleave_top} and @var{interleave_bottom}.
> +
> +@end table
> +@end table
> +
>  @c man end VIDEO FILTERS
>  
>  @chapter Video Sources
> @@ -15897,4 +15972,4 @@ movie=dvd.vob:s=v:0+#0x81 [video] [audio]
>  @end example
>  @end itemize
>  
> -@c man end MULTIMEDIA SOURCES

> +@c man end MULTIMEDIA SOURCES
> \ No newline at end of file

This looks spurious.

> diff --git a/libavfilter/Makefile b/libavfilter/Makefile
> index 8916588..606dfe0 100644
> --- a/libavfilter/Makefile
> +++ b/libavfilter/Makefile
> @@ 

Re: [FFmpeg-devel] [PATCH] added reitnerlace filter

2017-12-27 Thread Paul B Mahol
Hi,

On 12/27/17, Vasile Toncu  wrote:
> ---
>  doc/filters.texi |  87 ++-
>  libavfilter/Makefile |   2 +
>  libavfilter/allfilters.c |   2 +
>  libavfilter/reinterlace.h| 130 ++
>  libavfilter/vf_reinterlace.c | 597
> +++
>  5 files changed, 812 insertions(+), 6 deletions(-)
>  create mode 100644 libavfilter/reinterlace.h
>  create mode 100644 libavfilter/vf_reinterlace.c
>

Its not obvious from code and documentation what this does.

Why is this needed? At least provide some scenario where this is useful.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] added reitnerlace filter

2017-12-27 Thread Vasile Toncu
---
 doc/filters.texi |  87 ++-
 libavfilter/Makefile |   2 +
 libavfilter/allfilters.c |   2 +
 libavfilter/reinterlace.h| 130 ++
 libavfilter/vf_reinterlace.c | 597 +++
 5 files changed, 812 insertions(+), 6 deletions(-)
 create mode 100644 libavfilter/reinterlace.h
 create mode 100644 libavfilter/vf_reinterlace.c

diff --git a/doc/filters.texi b/doc/filters.texi
index 68f54f1..370be9b 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -564,13 +564,13 @@ select RIAA.
 @item cd
 select Compact Disc (CD).
 @item 50fm
-select 50µs (FM).
+select 50µs (FM).
 @item 75fm
-select 75µs (FM).
+select 75µs (FM).
 @item 50kf
-select 50µs (FM-KF).
+select 50µs (FM-KF).
 @item 75kf
-select 75µs (FM-KF).
+select 75µs (FM-KF).
 @end table
 @end table
 
@@ -7346,7 +7346,7 @@ If not set, the filter will use the QP from the video 
stream (if available).
 @item strength
 Set filter strength. It accepts an integer in range -15 to 32. Lower values 
mean
 more details but also more artifacts, while higher values make the image 
smoother
-but also blurrier. Default value is @code{0} − PSNR optimal.
+but also blurrier. Default value is @code{0} − PSNR optimal.
 
 @item use_bframe_qp
 Enable the use of the QP from the B-Frames if set to @code{1}. Using this
@@ -13191,6 +13191,81 @@ pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} 
is 1.
 @table @option
 @end table
 
+@section reinterlace
+Reinterlace filter does various interlace operations with the frames of a 
video.
+
+@table @option
+
+@item mode
+The mode of the filter
+
+The permitted values for @var{mode} are:
+
+@table @samp
+@item merge, 0
+Merges lines of two consecutive frames. Skips even frames. The output has half 
frame rate of the input.
+
+@item drop_even, 1
+Drops even frames. The output has half frame rate of the input.
+
+@item drop_odd, 2
+Drop odd frames. The output has half frame rate of the input.
+
+@item pad, 3
+Merges all the frames with a black frame. The output has the same frame rate 
as as the input.
+
+
+@item interleave_top, 4
+Interleaves lines of two consecutive frames. Skips even frames. The output has 
half frame rate of the input.
+
+@item interleave_bottom, 5
+Interleaves lines of two consecutive frames. Skips even frames. The output has 
half frame rate of the input.
+
+@item interlacex2, 6
+For every frames in the input frame adds another one which is obtaining by the 
interlace of two consecutive frames. 
+The output has double frame rate of the input.
+
+@item mergex2, 7
+Merge every frame with the next frame. The output has the same frame rate as 
as the input.
+
+@item merge_tff, 8
+Merges the frames of the input considering also the parity and the 
top_filed_first information of the frames.
+
+The rules for the @var{merge_tff} are the folowng: 
+
+1. ensure the odd frame metadata indicates a top field, @*
+2. ensure the even frame metadata indicates a bottom field, @*
+3. move the odd frame into the upper field of the new image, @*
+4. move the even frame into the lower field of the new image, @*
+5. if frames are out of order (bottom field then top field), drop the 
first field @*
+6. if frames are duplicates (top field then top field), drop the first 
field @*
+7. if frames don't have interlace metadata, merge as if they were in the 
right order @*
+
+
+@item merge_bff, 9
+Merges the frames of the input considering also the parity and the 
top_filed_first information of the frames.
+
+The rules for the @var{merge_bff} are similar with those for @var{merge_tff}, 
albeit inverted appropriately.
+
+@end table
+
+Default mode is @code{merge, 0}.
+
+@item flags
+One can add various flags to the reitnerlace filter.
+
+The permitted values for @var{flags} are:
+
+@table @option
+@item low_pass_filter, 1
+Before copying a line of a frame, it gots filtered using a simple low pass 
filter with the upper and lowwer frame lines.
+
+Vertical low-pass filtering can only be enabled for @option{mode}
+@var{interleave_top} and @var{interleave_bottom}.
+
+@end table
+@end table
+
 @c man end VIDEO FILTERS
 
 @chapter Video Sources
@@ -15897,4 +15972,4 @@ movie=dvd.vob:s=v:0+#0x81 [video] [audio]
 @end example
 @end itemize
 
-@c man end MULTIMEDIA SOURCES
+@c man end MULTIMEDIA SOURCES
\ No newline at end of file
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 8916588..606dfe0 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -286,6 +286,8 @@ OBJS-$(CONFIG_TESTSRC2_FILTER)   += 
vsrc_testsrc.o
 
 OBJS-$(CONFIG_NULLSINK_FILTER)   += vsink_nullsink.o
 
+OBJS-$(CONFIG_REINTERLACE_FILTER)+= vf_reinterlace.o
+
 # multimedia filters
 OBJS-$(CONFIG_ADRAWGRAPH_FILTER) += f_drawgraph.o
 OBJS-$(CONFIG_AHISTOGRAM_FILTER) += avf_ahistogram.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index fa7d304..fa3c3d1 100644
--- 

Re: [FFmpeg-devel] [PATCH] Adding mkdir option for img2enc (2nd attempt)

2017-12-27 Thread Dr Alan Barclay

Hi,

Resending the two (git format-patch) patches, without the top lines 
removed (which I thought I needed to do as some patch emails didn't seem 
to have them).


All comments and help appreciated.

Thanks and Regards,
Alan.


On 27/12/17 01:41, Michael Niedermayer wrote:

On Tue, Dec 26, 2017 at 10:44:31PM +, Dr Alan Barclay wrote:

Hi All,

Please would someone with an interest in img2enc take a look at my revised
patches for a minor feature addition and consider committing it to the main
line for me.

Example:
ffmpeg -i ~/trailer.mp4 -strftime 1 -mkdir 1 %Y/%m/%d/out_%H-%M-%S.jpg

Without the new mkdir option, this command will fail if the directory
hierarchy for the jpg files does not already exist, which can be difficult
to predict for time-stamped directories.

This patch adds a mkdir option to img2enc which invites it to make whatever
directory hierarchy is necessary for each output file. When used in
conjunction with the strftime then the jpg files will be located in a newly
created (time-stamped) directory as processing progresses.

My typical usage scenario is capturing a long-running live video feed
(perhaps time-lapsed) and storing the resulting images in a time-stamped
directory hierarchy fashion, rather than as a numbered sequence of files in
a single directory.

If you look at the code you will see that only a half dozen lines of code
were required in img2enc. The function for creating directories already
existed in hlsenc.c but I've moved into utils.c as I presumed that was a
more generic location for it.

All comments appreciated.

Thanks ad Regards,
Alan.


On 17/12/17 22:46, Carl Eugen Hoyos wrote:

2017-12-17 23:41 GMT+01:00 Dr Alan Barclay :


Please would someone with an interest in img2enc take a look
at my minor feature addition and consider committing it to the
main line for me.

To be acceptable, the patch has to be split in two and please
move the definition into internal.h

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

  hlsenc.c   |   35 +--
  internal.h |7 +++
  utils.c|   33 +
  3 files changed, 41 insertions(+), 34 deletions(-)
9560fd03958f79f77b01c0e02c55d98e3dc7b937  
0001-Move-mkdir_p-renamed-ff_mkdir_p-from-hlsenc.c-to-uti.patch
---
  libavformat/hlsenc.c   | 35 +--
  libavformat/internal.h |  7 +++
  libavformat/utils.c| 33 +
  3 files changed, 41 insertions(+), 34 deletions(-)

these patches are missing commit messages
patches should be genrated with git format-patch or git send-email


[...]


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


>From 70675348150c43f898ee97466c123fbf7ff65bcb Mon Sep 17 00:00:00 2001
From: "Dr. Alan Barclay" 
Date: Tue, 26 Dec 2017 22:17:59 +
Subject: [PATCH 1/2] Move mkdir_p (renamed ff_mkdir_p) from hlsenc.c to
 utils.c.

---
 libavformat/hlsenc.c   | 35 +--
 libavformat/internal.h |  7 +++
 libavformat/utils.c| 33 +
 3 files changed, 41 insertions(+), 34 deletions(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index bbc2742dc7..633ddc309e 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -208,39 +208,6 @@ typedef struct HLSContext {
 AVIOContext *sub_m3u8_out;
 } HLSContext;
 
-static int mkdir_p(const char *path) {
-int ret = 0;
-char *temp = av_strdup(path);
-char *pos = temp;
-char tmp_ch = '\0';
-
-if (!path || !temp) {
-return -1;
-}
-
-if (!strncmp(temp, "/", 1) || !strncmp(temp, "\\", 1)) {
-pos++;
-} else if (!strncmp(temp, "./", 2) || !strncmp(temp, ".\\", 2)) {
-pos += 2;
-}
-
-for ( ; *pos != '\0'; ++pos) {
-if (*pos == '/' || *pos == '\\') {
-tmp_ch = *pos;
-*pos = '\0';
-ret = mkdir(temp, 0755);
-*pos = tmp_ch;
-}
-}
-
-if ((*(pos - 1) != '/') || (*(pos - 1) != '\\')) {
-ret = mkdir(temp, 0755);
-}
-
-av_free(temp);
-return ret;
-}
-
 static int is_http_proto(char *filename) {
 const char *proto = avio_find_protocol_name(filename);
 return proto ? (!av_strcasecmp(proto, "http") || !av_strcasecmp(proto, "https")) : 0;
@@ -1407,7 +1374,7 @@ static int hls_start(AVFormatContext *s, VariantStream *vs)
 return AVERROR(ENOMEM);
 }
 dir = av_dirname(fn_copy);
-if (mkdir_p(dir) == -1 && errno != EEXIST) {
+if (ff_mkdir_p(dir) == -1 && errno != EEXIST) {
 av_log(oc, AV_LOG_ERROR, "Could not create directory %s with use_localtime_mkdir\n", dir);