Re: [FFmpeg-devel] [PATCH] configure: Fix case of static libmp3lame

2017-12-19 Thread James Almer
On 12/16/2017 12:50 PM, Stefan Pöschel wrote:
> Fixes #6918.
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index d5bbb5b..20ca792 100755
> --- a/configure
> +++ b/configure
> @@ -5853,7 +5853,7 @@ enabled libkvazaar&& require_pkg_config 
> libkvazaar "kvazaar >= 0.8.1" kv
>  enabled libmfx&& { check_pkg_config libmfx libmfx 
> "mfx/mfxvideo.h" MFXInit ||
> { require libmfx "mfx/mfxvideo.h" MFXInit 
> "-llibmfx $advapi32_extralibs" && warn "using libmfx without pkg-config"; } }
>  enabled libmodplug&& require_pkg_config libmodplug libmodplug 
> libmodplug/modplug.h ModPlug_Load
> -enabled libmp3lame&& require "libmp3lame >= 3.98.3" lame/lame.h 
> lame_set_VBR_quality -lmp3lame
> +enabled libmp3lame&& require "libmp3lame >= 3.98.3" lame/lame.h 
> lame_set_VBR_quality -lmp3lame -lm
>  enabled libmysofa && require libmysofa "mysofa.h" mysofa_load 
> -lmysofa $zlib_extralibs
>  enabled libnpp&& { check_lib libnpp npp.h nppGetLibVersion 
> -lnppig -lnppicc -lnppc ||
> check_lib libnpp npp.h nppGetLibVersion 
> -lnppi -lnppc ||
> 

Fixed to add -lm only when required and pushed. Thanks.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc/vaapi_encode: give a debug message if attrs unsupported.

2017-12-19 Thread Jun Zhao


On 2017/12/20 7:11, Mark Thompson wrote:
> On 19/12/17 06:25, Jun Zhao wrote:
>> From 8400fa85b7af47c3cff6abd87fdc392ac7891e35 Mon Sep 17 00:00:00 2001
>> From: Jun Zhao 
>> Date: Tue, 19 Dec 2017 14:13:58 +0800
>> Subject: [PATCH] lavc/vaapi_encode: give a debug message if attrs 
>> unsupported.
>>
>> Give a debug message when query attribute get VA_ATTRIB_NOT_SUPPORTED,
>> it's will help to trace and debug some issue.
>>
>> Signed-off-by: Jun Zhao 
>> ---
>>  libavcodec/vaapi_encode.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c
>> index 1d3cb4db83..9bc9c89d3b 100644
>> --- a/libavcodec/vaapi_encode.c
>> +++ b/libavcodec/vaapi_encode.c
>> @@ -1048,6 +1048,8 @@ static av_cold int 
>> vaapi_encode_config_attributes(AVCodecContext *avctx)
>>  // Unfortunately we have to treat this as "don't know" and hope
>>  // for the best, because the Intel MJPEG encoder returns this
>>  // for all the interesting attributes.
>> +av_log(avctx, AV_LOG_DEBUG, "Attribute (%d) is not 
>> supported.\n",
>> +   attr[i].type);
>>  continue;
>>  }
>>  switch (attr[i].type) {
>> -- 
>> 2.14.1
>>
> LGTM, applied.
>
> On 19/12/17 07:02, Jun Zhao wrote:
>> On 2017/12/19 14:29, 刘歧 wrote:
 On 19 Dec 2017, at 14:25, Jun Zhao  wrote:

 <0001-lavc-vaapi_encode-give-a-debug-message-if-attrs-unsu.patch>
>>> I saw you using AV_LOG_DEBUG, What about use AV_LOG_WARNING? Because that 
>>> message is tell user attrs unsupported.
>>>
>>> Thanks
>> I don't ensure user like the message as "Attribute 35 is not supported"
>> this style. And I guess Mark just want to become silent in this case in
>> original code.
> See the comment above the message.  We get:
>
> [mjpeg_vaapi @ 0x5654cf1bb520] Attribute (5) is not supported.
> [mjpeg_vaapi @ 0x5654cf1bb520] Attribute (13) is not supported.
>
> helpfully telling us that rate control isn't available for JPEG.  (A driver 
> could in theory implement something other than CQP, but I don't think there 
> is much reason to.)
>
> Thanks,
Yes, it's will telling us the attributes is or isn't available for
AVC/HEVC/MJPEG/..., and I've
consider use constchar*vaConfigAttribTypeStr(VAConfigAttribType
configAttribType) in this message, but this function can't work before
VA-API 2.1
>
> - Mark
> ___
> 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] [PATCHv2] configure: fix pkg-config check for libtls

2017-12-19 Thread Carl Eugen Hoyos
2017-12-20 0:49 GMT+01:00 James Almer :
> On 12/19/2017 8:32 PM, Carl Eugen Hoyos wrote:
>> 2017-12-19 18:28 GMT+01:00 James Almer :
>>> On 12/19/2017 2:13 PM, Stefan _ wrote:
 Last patch had a minor issue, fixed version attached.
>>>
>>> Applied.
>>>
>>> The fallback check for that matter should be removed. It's pointless
>>> since every supported version of the library ships a .pc file
>>
>> Which is completely unrelated to the fact that less common
>> toolchains do not provide pkg-config.
>>
>> It is sadly impossible now to test on aix, I still believe it
>> would make sense to support as many systems as possible.
>
> A quick google search suggest pkg-config can be compiled in AIX, and
> that even some pre packaged binaries are available for download.

The aix issue - that configure takes two and a half hours now
on a system where compilation takes much less than ten
minutes - is not pkg-config related. It makes running a bisect
a little difficult.

Apart from that, I still believe testing with vanilla toolchains
makes much more sense from a user perspective.

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


Re: [FFmpeg-devel] [PATCHv2] configure: fix pkg-config check for libtls

2017-12-19 Thread Hendrik Leppkes
On Wed, Dec 20, 2017 at 12:32 AM, Carl Eugen Hoyos  wrote:
> 2017-12-19 18:28 GMT+01:00 James Almer :
>> On 12/19/2017 2:13 PM, Stefan _ wrote:
>>> Last patch had a minor issue, fixed version attached.
>>
>> Applied.
>>
>> The fallback check for that matter should be removed. It's pointless
>> since every supported version of the library ships a .pc file
>
> Which is completely unrelated to the fact that less common
> toolchains do not provide pkg-config.

We should not have to maintain the dependency lists of external
libraries (which can even change when the library changes without us
knowing when the API remains the same), especially when a standard
tool exists to handle this for us. pkg-config was specifically
designed for this.
Changes are that such fallback cases are notoriously broken due to any
mainstream system not ever reaching them, so its best to encourage
everyone to use the mainstream option as well.

>
> It is sadly impossible now to test on aix, I still believe it
> would make sense to support as many systems as possible.
>

There is pkg-config for AIX in third-party repos (which is probably
where you get most AIX stuff, since its otherwise a proprietary OS).

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


Re: [FFmpeg-devel] [PATCHv2] configure: fix pkg-config check for libtls

2017-12-19 Thread James Almer
On 12/19/2017 8:32 PM, Carl Eugen Hoyos wrote:
> 2017-12-19 18:28 GMT+01:00 James Almer :
>> On 12/19/2017 2:13 PM, Stefan _ wrote:
>>> Last patch had a minor issue, fixed version attached.
>>
>> Applied.
>>
>> The fallback check for that matter should be removed. It's pointless
>> since every supported version of the library ships a .pc file
> 
> Which is completely unrelated to the fact that less common
> toolchains do not provide pkg-config.
> 
> It is sadly impossible now to test on aix, I still believe it
> would make sense to support as many systems as possible.

A quick google search suggest pkg-config can be compiled in AIX, and
that even some pre packaged binaries are available for download.

If you're building ffmpeg, libressl and probably other needed
dependencies for such a system, you can also build pkg-config.

> 
> Carl Eugen
> ___
> 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] [PATCHv2] configure: fix pkg-config check for libtls

2017-12-19 Thread Carl Eugen Hoyos
2017-12-19 18:28 GMT+01:00 James Almer :
> On 12/19/2017 2:13 PM, Stefan _ wrote:
>> Last patch had a minor issue, fixed version attached.
>
> Applied.
>
> The fallback check for that matter should be removed. It's pointless
> since every supported version of the library ships a .pc file

Which is completely unrelated to the fact that less common
toolchains do not provide pkg-config.

It is sadly impossible now to test on aix, I still believe it
would make sense to support as many systems as possible.

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


Re: [FFmpeg-devel] [PATCH] lavc/vaapi_encode: give a debug message if attrs unsupported.

2017-12-19 Thread Mark Thompson
On 19/12/17 06:25, Jun Zhao wrote:
> From 8400fa85b7af47c3cff6abd87fdc392ac7891e35 Mon Sep 17 00:00:00 2001
> From: Jun Zhao 
> Date: Tue, 19 Dec 2017 14:13:58 +0800
> Subject: [PATCH] lavc/vaapi_encode: give a debug message if attrs unsupported.
> 
> Give a debug message when query attribute get VA_ATTRIB_NOT_SUPPORTED,
> it's will help to trace and debug some issue.
> 
> Signed-off-by: Jun Zhao 
> ---
>  libavcodec/vaapi_encode.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c
> index 1d3cb4db83..9bc9c89d3b 100644
> --- a/libavcodec/vaapi_encode.c
> +++ b/libavcodec/vaapi_encode.c
> @@ -1048,6 +1048,8 @@ static av_cold int 
> vaapi_encode_config_attributes(AVCodecContext *avctx)
>  // Unfortunately we have to treat this as "don't know" and hope
>  // for the best, because the Intel MJPEG encoder returns this
>  // for all the interesting attributes.
> +av_log(avctx, AV_LOG_DEBUG, "Attribute (%d) is not supported.\n",
> +   attr[i].type);
>  continue;
>  }
>  switch (attr[i].type) {
> -- 
> 2.14.1
> 

LGTM, applied.

On 19/12/17 07:02, Jun Zhao wrote:
> On 2017/12/19 14:29, 刘歧 wrote:
>>> On 19 Dec 2017, at 14:25, Jun Zhao  wrote:
>>>
>>> <0001-lavc-vaapi_encode-give-a-debug-message-if-attrs-unsu.patch>
>> I saw you using AV_LOG_DEBUG, What about use AV_LOG_WARNING? Because that 
>> message is tell user attrs unsupported.
>>
>> Thanks
> 
> I don't ensure user like the message as "Attribute 35 is not supported"
> this style. And I guess Mark just want to become silent in this case in
> original code.

See the comment above the message.  We get:

[mjpeg_vaapi @ 0x5654cf1bb520] Attribute (5) is not supported.
[mjpeg_vaapi @ 0x5654cf1bb520] Attribute (13) is not supported.

helpfully telling us that rate control isn't available for JPEG.  (A driver 
could in theory implement something other than CQP, but I don't think there is 
much reason to.)

Thanks,

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


Re: [FFmpeg-devel] [RFC] avcodec/avcodec.h: Add encryption info side data

2017-12-19 Thread wm4
On Tue, 19 Dec 2017 14:20:38 -0800
Jacob Trimble  wrote:

> > You pretty much did. Side data is an ffmpeg internal concept, and if
> > your hypothetical streaming protocol needs special support for side
> > data, it's automatically relying on ffmpeg internals.  
> 
> I thought side data was public data?  Doesn't it contain public info
> like display info and required decoder info?  So if someone wants to
> decode frames without using the demuxers, they'll need to reconstruct
> the side data so the decoder can still work.

Side data is ffmpeg API, but it's a ffmpeg specific concept, and
tightly bound to its internal workings. Using it for a streaming
protocol would essentially mean both client and server have to be
ffmpeg. That doesn't make for a good (standardizable) protocol.

> > On that note, I wonder if we should add an AVPacket reserved field for
> > this, just so we don't have to wait for the next ABI bump.  
> 
> I would much prefer to have this in AVPacket since it is in no way
> "optional".  Having the info in the packet ensures a custom app can
> see the info and is less likely to get confused on why their packets
> aren't decoding.  I did this as side-data since it would have less ABI
> impact and I thought it would cause less conflict.  But having it as
> another field on AVPacket would allow more control over memory so the
> dynamic fields don't cause problems anymore.

I was talking about making a new side data API, which could handle
cases like this much better, instead of just being byte arrays. I don't
think we should add anything specific to encryption directly to
AVPacket, it's an too obscure use case. (The whole point of side data
was to avoid adding new fields for obscure use cases to top level
structs. Just look how many weird fields AVCodecContext has.)

> > I don't think this is sane. So far, side data could simply be copied
> > with memcpy, and having pointers to non-static data in side data would
> > break this completely  
> 
> Then how about storing the data like it is now (the encryption info
> followed by the subsample array), but not have a pointer?  Then there
> will be several helper methods to get the subsample array from the
> side-data.  For example,
> av_encryption_info_get_subsamples(AVPacketEncryptionInfo*) or
> av_encryption_info_get_subsamples(AVPacket*) (since there will only be
> one instance of it).

I guess that would work? Not particularly fond of the idea anyway. I
think the functions would probably work on the side data byte array,
maybe.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] vf_zscale: Add more supported input properties

2017-12-19 Thread James Almer
On 11/28/2017 3:57 PM, Vittorio Giovara wrote:
> Signed-off-by: Vittorio Giovara 
> ---
> This version should be more complete.
> Regarding configure changes, this library is not packaged by any distribution
> that I could find, so users will just need to use zimg HEAD or any stable
> snapshot (2.6.2).
> Vittorio

Most if not all of the new enum values are not in the actual 2.6.2
release, nor in 2.6.3 which is the latest. They are in git master only,
where the version number is no different than the stable release branch.

This should probably be reverted, or an extra configure check added to
make sure these are available until 2.7.x is tagged and the current
check can be updated.

> 
>  libavfilter/vf_zscale.c | 51 
> +
>  1 file changed, 51 insertions(+)
> 
> diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c
> index 972f720ee6..865910bd87 100644
> --- a/libavfilter/vf_zscale.c
> +++ b/libavfilter/vf_zscale.c
> @@ -353,16 +353,26 @@ static int convert_matrix(enum AVColorSpace colorspace)
>  return ZIMG_MATRIX_709;
>  case AVCOL_SPC_UNSPECIFIED:
>  return ZIMG_MATRIX_UNSPECIFIED;
> +case AVCOL_SPC_FCC:
> +return ZIMG_MATRIX_FCC;
>  case AVCOL_SPC_BT470BG:
>  return ZIMG_MATRIX_470BG;
>  case AVCOL_SPC_SMPTE170M:
>  return ZIMG_MATRIX_170M;
> +case AVCOL_SPC_SMPTE240M:
> +return ZIMG_MATRIX_240M;
>  case AVCOL_SPC_YCGCO:
>  return ZIMG_MATRIX_YCGCO;
>  case AVCOL_SPC_BT2020_NCL:
>  return ZIMG_MATRIX_2020_NCL;
>  case AVCOL_SPC_BT2020_CL:
>  return ZIMG_MATRIX_2020_CL;
> +case AVCOL_SPC_CHROMA_DERIVED_NCL:
> +return ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL;
> +case AVCOL_SPC_CHROMA_DERIVED_CL:
> +return ZIMG_MATRIX_CHROMATICITY_DERIVED_CL;
> +case AVCOL_SPC_ICTCP:
> +return ZIMG_MATRIX_ICTCP;
>  }
>  return ZIMG_MATRIX_UNSPECIFIED;
>  }
> @@ -374,10 +384,22 @@ static int convert_trc(enum 
> AVColorTransferCharacteristic color_trc)
>  return ZIMG_TRANSFER_UNSPECIFIED;
>  case AVCOL_TRC_BT709:
>  return ZIMG_TRANSFER_709;
> +case AVCOL_TRC_GAMMA22:
> +return ZIMG_TRANSFER_470_M;
> +case AVCOL_TRC_GAMMA28:
> +return ZIMG_TRANSFER_470_BG;
>  case AVCOL_TRC_SMPTE170M:
>  return ZIMG_TRANSFER_601;
> +case AVCOL_TRC_SMPTE240M:
> +return ZIMG_TRANSFER_240M;
>  case AVCOL_TRC_LINEAR:
>  return ZIMG_TRANSFER_LINEAR;
> +case AVCOL_TRC_LOG:
> +return ZIMG_TRANSFER_LOG_100;
> +case AVCOL_TRC_LOG_SQRT:
> +return ZIMG_TRANSFER_LOG_316;
> +case AVCOL_TRC_IEC61966_2_4:
> +return ZIMG_TRANSFER_IEC_61966_2_4;
>  case AVCOL_TRC_BT2020_10:
>  return ZIMG_TRANSFER_2020_10;
>  case AVCOL_TRC_BT2020_12:
> @@ -399,14 +421,26 @@ static int convert_primaries(enum AVColorPrimaries 
> color_primaries)
>  return ZIMG_PRIMARIES_UNSPECIFIED;
>  case AVCOL_PRI_BT709:
>  return ZIMG_PRIMARIES_709;
> +case AVCOL_PRI_BT470M:
> +return ZIMG_PRIMARIES_470_M;
> +case AVCOL_PRI_BT470BG:
> +return ZIMG_PRIMARIES_470_BG;
>  case AVCOL_PRI_SMPTE170M:
>  return ZIMG_PRIMARIES_170M;
>  case AVCOL_PRI_SMPTE240M:
>  return ZIMG_PRIMARIES_240M;
> +case AVCOL_PRI_FILM:
> +return ZIMG_PRIMARIES_FILM;
>  case AVCOL_PRI_BT2020:
>  return ZIMG_PRIMARIES_2020;
> +case AVCOL_PRI_SMPTE428:
> +return ZIMG_PRIMARIES_ST428;
> +case AVCOL_PRI_SMPTE431:
> +return ZIMG_PRIMARIES_ST431_2;
>  case AVCOL_PRI_SMPTE432:
>  return ZIMG_PRIMARIES_ST432_1;
> +case AVCOL_PRI_JEDEC_P22:
> +return ZIMG_PRIMARIES_EBU3213_E;
>  }
>  return ZIMG_PRIMARIES_UNSPECIFIED;
>  }
> @@ -745,10 +779,16 @@ static const AVOption zscale_options[] = {
>  { "2020", 0,   0, AV_OPT_TYPE_CONST, 
> {.i64 = ZIMG_PRIMARIES_2020},0, 0, FLAGS, "primaries" },
>  { "unknown",  0,   0, AV_OPT_TYPE_CONST, 
> {.i64 = ZIMG_PRIMARIES_UNSPECIFIED}, 0, 0, FLAGS, "primaries" },
>  { "bt709",0,   0, AV_OPT_TYPE_CONST, 
> {.i64 = ZIMG_PRIMARIES_709}, 0, 0, FLAGS, "primaries" },
> +{ "bt470m",   0,   0, AV_OPT_TYPE_CONST, 
> {.i64 = ZIMG_PRIMARIES_470_M},   0, 0, FLAGS, "primaries" },
> +{ "bt470bg",  0,   0, AV_OPT_TYPE_CONST, 
> {.i64 = ZIMG_PRIMARIES_470_BG},  0, 0, FLAGS, "primaries" },
>  { "smpte170m",0,   0, AV_OPT_TYPE_CONST, 
> {.i64 = ZIMG_PRIMARIES_170M},0, 0, FLAGS, "primaries" },
>  { "smpte240m",0,   0, AV_OPT_TYPE_CONST, 
> {.i64 = ZIMG_PRIMARIES_240M},0, 0, FLAGS, "primaries" },
> +{ "film", 0,   0,

Re: [FFmpeg-devel] avfilter/vf_interlace : add checkasm for lowpass_line and AVX2 version

2017-12-19 Thread Thomas Mundt
2017-12-19 22:57 GMT+01:00 James Almer :

> On 12/19/2017 6:40 PM, Martin Vignali wrote:
> > 2017-12-19 21:59 GMT+01:00 James Almer :
> >
> >> On 12/19/2017 5:16 PM, Martin Vignali wrote:
> 
>  LGTM, thanks.
> 
> >>>
> >>> Pushed, thanks
> >>
> >> This broke several interlace fate tests, including the new checkasm one
> >> you added.
> >>
> >> Sorry forget to run fate after AVX2 patch (only test with checkasm)
> >
> > For the checkasm fail, i can't reproduce it (on x86_64)
>
> I can reproduce it on mingw (x86_64), but not on Linux 86_64.
>

Sorry, I also should have run fate before saying LGTM.
Can´t reproduce the checkasm fail on msys2 x86_32. Only got this machine
atm.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [RFC] avcodec/avcodec.h: Add encryption info side data

2017-12-19 Thread Jacob Trimble
> You pretty much did. Side data is an ffmpeg internal concept, and if
> your hypothetical streaming protocol needs special support for side
> data, it's automatically relying on ffmpeg internals.

I thought side data was public data?  Doesn't it contain public info
like display info and required decoder info?  So if someone wants to
decode frames without using the demuxers, they'll need to reconstruct
the side data so the decoder can still work.

> On that note, I wonder if we should add an AVPacket reserved field for
> this, just so we don't have to wait for the next ABI bump.

I would much prefer to have this in AVPacket since it is in no way
"optional".  Having the info in the packet ensures a custom app can
see the info and is less likely to get confused on why their packets
aren't decoding.  I did this as side-data since it would have less ABI
impact and I thought it would cause less conflict.  But having it as
another field on AVPacket would allow more control over memory so the
dynamic fields don't cause problems anymore.

> I don't think this is sane. So far, side data could simply be copied
> with memcpy, and having pointers to non-static data in side data would
> break this completely

Then how about storing the data like it is now (the encryption info
followed by the subsample array), but not have a pointer?  Then there
will be several helper methods to get the subsample array from the
side-data.  For example,
av_encryption_info_get_subsamples(AVPacketEncryptionInfo*) or
av_encryption_info_get_subsamples(AVPacket*) (since there will only be
one instance of it).
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avfilter/vf_interlace : add checkasm for lowpass_line and AVX2 version

2017-12-19 Thread James Almer
On 12/19/2017 6:40 PM, Martin Vignali wrote:
> 2017-12-19 21:59 GMT+01:00 James Almer :
> 
>> On 12/19/2017 5:16 PM, Martin Vignali wrote:

 LGTM, thanks.

>>>
>>> Pushed, thanks
>>
>> This broke several interlace fate tests, including the new checkasm one
>> you added.
>>
>> Sorry forget to run fate after AVX2 patch (only test with checkasm)
> 
> For the checkasm fail, i can't reproduce it (on x86_64)

I can reproduce it on mingw (x86_64), but not on Linux 86_64.

> 
> If you can, revert the patchset.
> I can't take a look into this soon.

Ok, will revert the avx2 patches and the checkasm test.

> 
> Martin
> ___
> 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] avfilter/vf_interlace : add checkasm for lowpass_line and AVX2 version

2017-12-19 Thread Martin Vignali
2017-12-19 21:59 GMT+01:00 James Almer :

> On 12/19/2017 5:16 PM, Martin Vignali wrote:
> >>
> >> LGTM, thanks.
> >>
> >
> > Pushed, thanks
>
> This broke several interlace fate tests, including the new checkasm one
> you added.
>
> Sorry forget to run fate after AVX2 patch (only test with checkasm)

For the checkasm fail, i can't reproduce it (on x86_64)

If you can, revert the patchset.
I can't take a look into this soon.

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


Re: [FFmpeg-devel] avfilter/vf_interlace : add checkasm for lowpass_line and AVX2 version

2017-12-19 Thread James Almer
On 12/19/2017 5:16 PM, Martin Vignali wrote:
>>
>> LGTM, thanks.
>>
> 
> Pushed, thanks

This broke several interlace fate tests, including the new checkasm one
you added.

http://fate.ffmpeg.org/report.cgi?time=20171219201300&slot=x86_64-archlinux-gcc-threads-2
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avfilter/vf_interlace : add checkasm for lowpass_line and AVX2 version

2017-12-19 Thread Martin Vignali
>
> LGTM, thanks.
>

Pushed, thanks

Do you think, that the complex low pass filter could also be improved that
> way?
>
>
>
Yes, probably. I will take a look.


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


Re: [FFmpeg-devel] [PATCH] configure: Fix detection of vp9 decoder/encoder

2017-12-19 Thread Felix Matouschek
Am 19.12.2017 um 21:19 schrieb James Almer :
> 
> Pushed.
> 
> Wouldn't this need to be done for vp8 as well, for that matter?
> 

At least on Android using libvpx 1.6.1 it was not needed for vp8, only for vp9.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avfilter/x86/vf_hflip : make macro and add AVX2

2017-12-19 Thread Martin Vignali
Pushed, using vpermq (faster for me)
and add "%if HAVE_AVX2_EXTERNAL" around INIT YMM...

Thanks

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


Re: [FFmpeg-devel] [PATCH] configure: Fix detection of vp9 decoder/encoder

2017-12-19 Thread James Almer
On 12/12/2017 11:53 AM, Felix Matouschek wrote:
> Am 12.12.2017 15:37, schrieb James Almer:
>> No, this is not correct. If anything has to be added here, it would be
>> $libm_extralibs. -lm is not needed/available on some systems.
> 
> Ok, changed it.
> 
>> Also, you should be using pkg-config. Its job is to make sure all the
>> cflags and ldflags are correct for your system.
>> This shitty fallback shouldn't be here in the first place, but some
>> people are too stubborn about it.
> 
> The Android NDK has no pkg-config so it is somehow useful.
> 
> 0001-configure-Fix-detection-of-vp9-decoder-encoder.patch
> 
> 
> From b2f30f087aaf7d1284ebe08a09adc478df80ba22 Mon Sep 17 00:00:00 2001
> From: Felix Matouschek 
> Date: Tue, 12 Dec 2017 10:42:40 +0100
> Subject: [PATCH] configure: Fix detection of vp9 decoder/encoder
> To: ffmpeg-devel@ffmpeg.org
> 
> At least on Android the vp9 decoder/encoder needs $libm_extralibs
> to successfully link, it was missing in the check_lib calls for vp9
> 
> Signed-off-by: Felix Matouschek 
> ---
>  configure | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index 8cf48ae1cf..df149024d3 100755
> --- a/configure
> +++ b/configure
> @@ -5918,11 +5918,11 @@ enabled libvpx&& {
>  }
>  enabled libvpx_vp9_decoder && {
>  check_pkg_config libvpx_vp9_decoder "vpx >= 1.4.0" 
> "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx ||
> -check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" 
> "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" -lvpx
> +check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" 
> "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" -lvpx $libm_extralibs
>  }
>  enabled libvpx_vp9_encoder && {
>  check_pkg_config libvpx_vp9_encoder "vpx >= 1.4.0" 
> "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx ||
> -check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" 
> "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" -lvpx
> +check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" 
> "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" -lvpx $libm_extralibs
>  }
>  if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder 
> libvpx_vp9_encoder; then
>  die "libvpx enabled but no supported decoders found"
> -- 2.14.1.windows.1

Pushed.

Wouldn't this need to be done for vp8 as well, for that matter?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] tests/audiomatch: Refine the code.

2017-12-19 Thread Michael Niedermayer
On Mon, Dec 18, 2017 at 09:41:08AM +0800, Jun Zhao wrote:
> 

>  audiomatch.c |   34 +-
>  1 file changed, 17 insertions(+), 17 deletions(-)
> 731bb5fb6d343903e65d5f1336b6393527bfa780  
> 0002-tests-audiomatch-Refine-the-code.patch
> From d2e3ba49180883dc71eb0eb0f5fa228368b4c9d5 Mon Sep 17 00:00:00 2001
> From: Jun Zhao 
> Date: Mon, 18 Dec 2017 09:16:52 +0800
> Subject: [PATCH 2/2] tests/audiomatch: Refine the code.
> 
> Refine the coding style and change to use sizeof date type.
> 
> Signed-off-by: Jun Zhao 
> ---
>  tests/audiomatch.c | 34 +-
>  1 file changed, 17 insertions(+), 17 deletions(-)

will apply without the data type change, as it would duplicate the type


thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.


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


Re: [FFmpeg-devel] [PATCH 1/2] tests/audiomatch: Add return value check for fread.

2017-12-19 Thread Michael Niedermayer
On Mon, Dec 18, 2017 at 09:41:00AM +0800, Jun Zhao wrote:
> 

>  audiomatch.c |6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
> f7cd009b9c616d48223793eeab8d135329a23f69  
> 0001-tests-audiomatch-Add-return-value-check-for-fread.patch
> From a89964e88080d1cc6e01c99bf8640a1020465762 Mon Sep 17 00:00:00 2001
> From: Jun Zhao 
> Date: Mon, 18 Dec 2017 08:59:58 +0800
> Subject: [PATCH 1/2] tests/audiomatch: Add return value check for fread.
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> 
> Check fread return value to fix build warning as "ignoring
> return value of ‘fread’"
> 
> Signed-off-by: Jun Zhao 
> ---
>  tests/audiomatch.c | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)

will apply

thanks

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

Elect your leaders based on what they did after the last election, not
based on what they say before an election.



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


Re: [FFmpeg-devel] [PATCH] configure: Fix detection of vp9 decoder/encoder

2017-12-19 Thread Felix Matouschek
Any chance this could get merged?

> Am 12.12.2017 um 15:53 schrieb Felix Matouschek :
> 
> Am 12.12.2017 15:37, schrieb James Almer:
>> No, this is not correct. If anything has to be added here, it would be
>> $libm_extralibs. -lm is not needed/available on some systems.
> 
> Ok, changed it.
> 
>> Also, you should be using pkg-config. Its job is to make sure all the
>> cflags and ldflags are correct for your system.
>> This shitty fallback shouldn't be here in the first place, but some
>> people are too stubborn about it.
> 
> The Android NDK has no pkg-config so it is somehow 
> useful.<0001-configure-Fix-detection-of-vp9-decoder-encoder.patch>___
> 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] Add android_capture indev

2017-12-19 Thread Felix Matouschek
Hello Michael,

could you take a look at the patch?

Felix

> Am 30.11.2017 um 18:15 schrieb Michael Niedermayer :
> 
> On Thu, Nov 30, 2017 at 10:15:48AM +0100, Felix Matouschek wrote:
>> Sorry, my mail client swallowed the attachment, sent it again.
>> 
> 
>> Changelog|1 
>> MAINTAINERS  |1 
>> configure|6 
>> doc/indevs.texi  |   40 ++
>> libavdevice/Makefile |1 
>> libavdevice/alldevices.c |1 
>> libavdevice/android_camera.c |  816 
>> +++
>> libavdevice/version.h|2 
>> 8 files changed, 867 insertions(+), 1 deletion(-)
>> 2fea6cb3990aed83c3a3c492aa482f619a885ed7  
>> 0001-avdevice-add-android_camera-indev.patch
>> From b70da28e33e07b4565daffc94c8ffe3c8df747ff Mon Sep 17 00:00:00 2001
>> From: Felix Matouschek 
>> Date: Thu, 30 Nov 2017 10:03:54 +0100
>> Subject: [PATCH] avdevice: add android_camera indev
>> To: ffmpeg-devel@ffmpeg.org
>> 
>> This commit adds an indev for Android devices on API level 24+ which
>> uses the Android NDK Camera2 API to capture video from builtin cameras
>> 
>> Signed-off-by: Felix Matouschek 
>> ---
>> Changelog|   1 +
>> MAINTAINERS  |   1 +
>> configure|   6 +
>> doc/indevs.texi  |  40 +++
>> libavdevice/Makefile |   1 +
>> libavdevice/alldevices.c |   1 +
>> libavdevice/android_camera.c | 816 
>> +++
>> libavdevice/version.h|   2 +-
>> 8 files changed, 867 insertions(+), 1 deletion(-)
>> create mode 100644 libavdevice/android_camera.c
>> 
>> diff --git a/Changelog b/Changelog
>> index 6592d868da..f58cd810e0 100644
>> --- a/Changelog
>> +++ b/Changelog
>> @@ -6,6 +6,7 @@ version :
>> - Dropped support for OpenJPEG versions 2.0 and below. Using OpenJPEG now
>>   requires 2.1 (or later) and pkg-config.
>> - VDA dropped (use VideoToolbox instead)
>> +- Add android_camera indev
>> 
>> 
>> version 3.4:
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 1d2ff78b0e..d6cb135964 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -281,6 +281,7 @@ libavdevice
>> 
>> 
>>   avfoundation.mThilo Borgmann
>> +  android_camera.c  Felix Matouschek
>>   decklink* Marton Balint
>>   dshow.c   Roger Pack (CC rogerdp...@gmail.com)
>>   fbdev_enc.c   Lukasz Marek
>> diff --git a/configure b/configure
>> index 7a53bc76c7..d52b18fab3 100755
>> --- a/configure
>> +++ b/configure
>> @@ -3068,6 +3068,8 @@ xmv_demuxer_select="riffdec"
>> xwma_demuxer_select="riffdec"
>> 
>> # indevs / outdevs
>> +android_camera_indev_deps="android camera2ndk mediandk pthreads"
>> +android_camera_indev_extralibs="-landroid -lcamera2ndk -lmediandk"
>> alsa_indev_deps="alsa"
>> alsa_outdev_deps="alsa"
>> avfoundation_indev_deps="avfoundation corevideo coremedia pthreads"
>> @@ -5836,6 +5838,10 @@ check_lib shell32  "windows.h shellapi.h" 
>> CommandLineToArgvW   -lshell32
>> check_lib wincrypt "windows.h wincrypt.h" CryptGenRandom   -ladvapi32
>> check_lib psapi"windows.h psapi.h"GetProcessMemoryInfo -lpsapi
>> 
>> +check_lib android android/native_window.h ANativeWindow_acquire -landroid
>> +check_lib mediandk "stdint.h media/NdkImage.h" AImage_delete -lmediandk
>> +check_lib camera2ndk "stdbool.h stdint.h camera/NdkCameraManager.h" 
>> ACameraManager_create -lcamera2ndk
>> +
>> enabled appkit   && check_apple_framework AppKit
>> enabled audiotoolbox && check_apple_framework AudioToolbox
>> enabled avfoundation && check_apple_framework AVFoundation
>> diff --git a/doc/indevs.texi b/doc/indevs.texi
>> index d308bbf7de..07056d762e 100644
>> --- a/doc/indevs.texi
>> +++ b/doc/indevs.texi
>> @@ -63,6 +63,46 @@ Set the number of channels. Default is 2.
>> 
>> @end table
>> 
>> +@section android_camera
>> +
>> +Android camera input device.
>> +
>> +This input devices uses the Android Camera2 NDK API which is
>> +available on devices with API level 24+. The availability of
>> +android_camera is autodetected during configuration.
>> +
>> +This device allows capturing from all cameras on an Android device,
>> +which are integrated into the Camera2 NDK API.
>> +
>> +The available cameras are enumerated internally and can be selected
>> +with the @var{camera_index} parameter. The input file string is
>> +discarded.
>> +
>> +Generally the back facing camera has index 0 while the front facing
>> +camera has index 1.
>> +
>> +@subsection Options
>> +
>> +@table @option
>> +
>> +@item video_size
>> +Set the video size given as a string such as 640x480 or hd720.
>> +Falls back to the first available configuration reported by
>> +Android if requested video size is not available or by default.
>> +
>> +@item framerate
>> +Set the video framerate.
>> +Falls back to the first available configuration reported by
>> +Android

Re: [FFmpeg-devel] [PATCH v8 2/3] avcodec/libx264:setting profile and level in avcodec context

2017-12-19 Thread Michael Niedermayer
On Tue, Dec 19, 2017 at 11:39:24AM +0530, vdi...@akamai.com wrote:
> From: Vishwanath Dixit 
> 
> ---
>  libavcodec/libx264.c | 20 +++-
>  1 file changed, 15 insertions(+), 5 deletions(-)
> 
> diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
> index e2455e1..0285213 100644
> --- a/libavcodec/libx264.c
> +++ b/libavcodec/libx264.c
> @@ -19,11 +19,13 @@
>   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
> USA
>   */
>  
> +#include "libavutil/avassert.h"
>  #include "libavutil/eval.h"
>  #include "libavutil/internal.h"
>  #include "libavutil/opt.h"
>  #include "libavutil/mem.h"
>  #include "libavutil/pixdesc.h"
> +#include "libavutil/reverse.h"
>  #include "libavutil/stereo3d.h"
>  #include "libavutil/intreadwrite.h"
>  #include "avcodec.h"
> @@ -454,6 +456,9 @@ static av_cold int X264_init(AVCodecContext *avctx)
>  X264Context *x4 = avctx->priv_data;
>  AVCPBProperties *cpb_props;
>  int sw,sh;
> +x264_nal_t *nal;
> +uint8_t *p;
> +int nnal, s, i;
>  
>  if (avctx->global_quality > 0)
>  av_log(avctx, AV_LOG_WARNING, "-qscale is ignored, -crf is 
> recommended.\n");
> @@ -799,12 +804,17 @@ FF_ENABLE_DEPRECATION_WARNINGS
>  if (!x4->enc)
>  return AVERROR_EXTERNAL;
>  
> -if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
> -x264_nal_t *nal;
> -uint8_t *p;
> -int nnal, s, i;
> +s = x264_encoder_headers(x4->enc, &nal, &nnal);
> +// Assert for NAL start code and SPS unit type
> +av_assert0((nal->p_payload[0] | nal->p_payload[1] | nal->p_payload[2]) 
> == 0 && nal->p_payload[3] == 1);
> +av_assert0((nal->p_payload[4] & 0x1F) == 7);

> +// bits 0-7 LSB for profile. bits 8-11 for constrained set flags.
> +if (avctx->profile == FF_PROFILE_UNKNOWN)
> +avctx->profile = ((uint32_t)nal->p_payload[5]) | 
> ((uint32_t)ff_reverse[nal->p_payload[6]] << 8);
> +if (avctx->level == FF_LEVEL_UNKNOWN)
> +avctx->level = nal->p_payload[7];

As long as the API in avcodec.h specifies these as "encoding: Set by user",
its not allowed to set them from libavcodec.

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

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire


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


Re: [FFmpeg-devel] order T-shirts

2017-12-19 Thread Kyle Swanson
Hi,

Yeah, got mine too! Arrived safely in the USA. Thanks Thilo!

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


Re: [FFmpeg-devel] [PATCH] configure: remove libtls fallback check

2017-12-19 Thread James Almer
On 12/19/2017 2:51 PM, Stefan _ wrote:
> On 19.12.2017 at 18:28 James Almer wrote:
>> On 12/19/2017 2:13 PM, Stefan _ wrote:
>>> Last patch had a minor issue, fixed version attached.
>> Applied.
> Thanks.
>>
>> The fallback check for that matter should be removed. It's pointless
>> since every supported version of the library ships a .pc file, and it's
>> pretty much guaranteed to not work with static builds.
> 
> Sounds reasonable, corresponding patch is attached.

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


Re: [FFmpeg-devel] [PATCH v3 2/2] libavcodec/hevcdec: implement skip_frame

2017-12-19 Thread Stefan _
On 07.12.2017 at 20:56 Stefan _ wrote:
> On 07.12.2017 at 17:41 Michael Niedermayer wrote:
>> The move and the functional change should be in seperate patches
>> that keeps changes easy to read and understand
>>
>> [...]

bump

(Previous patch in same series was merged. This one wasn't and hasn't 
received any comments either.)

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


Re: [FFmpeg-devel] [PATCH] configure: remove libtls fallback check

2017-12-19 Thread Stefan _
On 19.12.2017 at 18:28 James Almer wrote:
> On 12/19/2017 2:13 PM, Stefan _ wrote:
>> Last patch had a minor issue, fixed version attached.
> Applied.
Thanks.
>
> The fallback check for that matter should be removed. It's pointless
> since every supported version of the library ships a .pc file, and it's
> pretty much guaranteed to not work with static builds.

Sounds reasonable, corresponding patch is attached.

From 0224270196ea9329dada21b86848a899c995cc74 Mon Sep 17 00:00:00 2001
From: sfan5 
Date: Tue, 19 Dec 2017 18:45:27 +0100
Subject: [PATCH] configure: remove libtls fallback check

This check is not needed for any supported version of libtls
and causes issues with static builds (libtls links to -lssl -lcrypto).

Signed-off-by: sfan5 
---
 configure | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/configure b/configure
index c01f414f9a..1b07dc2ce7 100755
--- a/configure
+++ b/configure
@@ -5894,8 +5894,7 @@ enabled libssh&& require_pkg_config libssh libssh libssh/sftp.h sftp
 enabled libspeex  && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
 enabled libtesseract  && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
 enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
-enabled libtls&& { check_pkg_config libtls libtls tls.h tls_configure ||
-   require libtls tls.h tls_configure -ltls; }
+enabled libtls&& require_pkg_config libtls libtls tls.h tls_configure
 enabled libtwolame&& require libtwolame twolame.h twolame_init -ltwolame &&
  { check_lib libtwolame twolame.h twolame_encode_buffer_float32_interleaved -ltwolame ||
die "ERROR: libtwolame must be installed and version must be >= 0.3.10"; }
-- 
2.15.1

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


Re: [FFmpeg-devel] [PATCHv2] configure: fix pkg-config check for libtls

2017-12-19 Thread James Almer
On 12/19/2017 2:13 PM, Stefan _ wrote:
> Last patch had a minor issue, fixed version attached.

Applied.

The fallback check for that matter should be removed. It's pointless
since every supported version of the library ships a .pc file, and it's
pretty much guaranteed to not work with static builds.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCHv2] configure: fix pkg-config check for libtls

2017-12-19 Thread Stefan _
Last patch had a minor issue, fixed version attached.
From 6f6bcf77ce2aaf6a84858d34112f61128e779fda Mon Sep 17 00:00:00 2001
From: sfan5 
Date: Tue, 19 Dec 2017 17:33:26 +0100
Subject: [PATCH] configure: fix pkg-config check for libtls

This was not accounted for during merge and is required due to
the refactor in commit 93ccba96df6340249b0db227d5bc3297010797a4.

Signed-off-by: sfan5 
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 2f7db05faa..c01f414f9a 100755
--- a/configure
+++ b/configure
@@ -5894,7 +5894,7 @@ enabled libssh&& require_pkg_config libssh libssh libssh/sftp.h sftp
 enabled libspeex  && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
 enabled libtesseract  && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
 enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
-enabled libtls&& { use_pkg_config libtls libtls tls.h tls_configure ||
+enabled libtls&& { check_pkg_config libtls libtls tls.h tls_configure ||
require libtls tls.h tls_configure -ltls; }
 enabled libtwolame&& require libtwolame twolame.h twolame_init -ltwolame &&
  { check_lib libtwolame twolame.h twolame_encode_buffer_float32_interleaved -ltwolame ||
-- 
2.15.1

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


[FFmpeg-devel] [PATCH] configure: fix pkg-config check for libtls

2017-12-19 Thread Stefan _
Hi,

Attached patch fixes an issue with the LibreSSL pkg-config check in 
configure.

Between the creation of my libtls patchset and the date it was pushed, a 
refactor had changed all invocations of use_pkg_config to 
require_pkg_config, resulting in pkg-config never working.

From 0afe7b4257f55ccfd00d65861c33ff693d2d19b3 Mon Sep 17 00:00:00 2001
From: sfan5 
Date: Tue, 19 Dec 2017 17:33:26 +0100
Subject: [PATCH] configure: fix pkg-config check for libtls

This was not accounted for during merge and is required due to
the refactor in commit 93ccba96df6340249b0db227d5bc3297010797a4.

Signed-off-by: sfan5 
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 2f7db05faa..99f6147ba7 100755
--- a/configure
+++ b/configure
@@ -5894,7 +5894,7 @@ enabled libssh&& require_pkg_config libssh libssh libssh/sftp.h sftp
 enabled libspeex  && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
 enabled libtesseract  && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
 enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
-enabled libtls&& { use_pkg_config libtls libtls tls.h tls_configure ||
+enabled libtls&& { require_pkg_config libtls libtls tls.h tls_configure ||
require libtls tls.h tls_configure -ltls; }
 enabled libtwolame&& require libtwolame twolame.h twolame_init -ltwolame &&
  { check_lib libtwolame twolame.h twolame_encode_buffer_float32_interleaved -ltwolame ||
-- 
2.15.1

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


Re: [FFmpeg-devel] [PATCH] libvmaf: exit gracefully if the library fails.

2017-12-19 Thread Ronald S. Bultje
Hi,

On Mon, Dec 18, 2017 at 11:55 PM, James Almer  wrote:

> On 12/8/2017 10:35 PM, Ronald S. Bultje wrote:
> > Fixes trac issue #6884 and Netflix/vmaf issue #124.
> > ---
> >  libavfilter/vf_libvmaf.c | 28 ++--
> >  1 file changed, 22 insertions(+), 6 deletions(-)
> >
> > diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c
> > index 7670c51..d628b95 100644
> > --- a/libavfilter/vf_libvmaf.c
> > +++ b/libavfilter/vf_libvmaf.c
> > @@ -61,6 +61,7 @@ typedef struct LIBVMAFContext {
> >  int ssim;
> >  int ms_ssim;
> >  char *pool;
> > +int error;
> >  } LIBVMAFContext;
> >
> >  #define OFFSET(x) offsetof(LIBVMAFContext, x)
> > @@ -158,17 +159,24 @@ static void compute_vmaf_score(LIBVMAFContext *s)
> >
> >  format = (char *) s->desc->name;
> >
> > -s->vmaf_score = compute_vmaf(format, s->width, s->height,
> read_frame, s,
> > - s->model_path, s->log_path,
> s->log_fmt, 0, 0,
> > - s->enable_transform, s->phone_model,
> s->psnr,
> > - s->ssim, s->ms_ssim, s->pool);
> > +s->error = compute_vmaf(&s->vmaf_score, format, s->width, s->height,
>
> This is an awful API break. It broke compilation for everyone using the
> latest stable release of libvmaf. See ticket #6921.
> How hard was for them to add a new function instead?
> compute_vmaf_score() or whatever. You can't just go and change a public
> function signature like this...
>
> This can still implement this properly before a new release is tagged,
> for that matter. Could you suggest that to them?


Both requests made in https://github.com/Netflix/vmaf/issues/124.

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


Re: [FFmpeg-devel] DVD subtitles hacking

2017-12-19 Thread Clément Bœsch
On Fri, Dec 15, 2017 at 09:16:02AM -0600, Matt Zagrabelny wrote:
> On Thu, Dec 14, 2017 at 8:06 PM, Carl Eugen Hoyos 
> wrote:
> 
> >
> > You could implement a hack (similar to what the CC code does)
> > that allows processing the subs but it is likely that the patch
> > would be rejected because actual subtitle support for libavfilter
> > is needed.
> >
> 
> What would it take to add subtitle support to libavfilter?
> 

http://ffmpeg.org/pipermail/ffmpeg-devel/2016-November/202152.html

Something like that

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: Fix a memory leak when http_persistent is 1

2017-12-19 Thread 刘歧

> On 19 Dec 2017, at 14:58, Karthick J  wrote:
> 
> From: Karthick Jeyapal 
> 
> ---
> libavformat/hlsenc.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index e3442c3..5ee28ea 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -1918,6 +1918,8 @@ static int hls_write_trailer(struct AVFormatContext *s)
> av_freep(&vs->baseurl);
> }
> 
> +ff_format_io_close(s, &hls->m3u8_out);
> +ff_format_io_close(s, &hls->sub_m3u8_out);
> av_freep(&hls->key_basename);
> av_freep(&hls->var_streams);
> av_freep(&hls->master_m3u8_url);
> -- 
> 1.9.1
> 
> 


LGTM

Thanks

Steven

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


Re: [FFmpeg-devel] [PATCH v7 1/3] avformat/hlsenc:addition of #EXT-X-MEDIA tag and AUDIO attribute

2017-12-19 Thread Vishwanath Dixit



On 12/19/17 9:23 AM, 刘歧 wrote:

On 18 Dec 2017, at 20:52, vdi...@akamai.com wrote:

From: Vishwanath Dixit 

---
doc/muxers.texi   | 12 +
libavformat/dashenc.c |  3 ++-
libavformat/hlsenc.c  | 62 ---
libavformat/hlsplaylist.c |  4 ++-
libavformat/hlsplaylist.h |  2 +-
5 files changed, 77 insertions(+), 6 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 3d0c7bf..93db549 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -834,6 +834,18 @@ be a video only stream with video bitrate 1000k, the 
second variant stream will
be an audio only stream with bitrate 64k and the third variant stream will be a
video only stream with bitrate 256k. Here, three media playlist with file names
out_1.m3u8, out_2.m3u8 and out_3.m3u8 will be created.
+@example
+ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k -b:v:1 3000k  \
+  -map 0:a -map 0:a -map 0:v -map 0:v -f hls \
+  -var_stream_map "a:0,agroup:aud_low a:1,agroup:aud_high v:0,agroup:aud_low 
v:1,agroup:aud_high" \
+  -master_pl_name master.m3u8 \
+  http://example.com/live/out.m3u8
+@end example
+This example creates two audio only and two video only variant streams. In
+addition to the #EXT-X-STREAM-INF tag for each variant stream in the master
+playlist, #EXT-X-MEDIA tag is also added for the two audio only variant streams
+and they are mapped to the two video only variant streams with audio group 
names
+'aud_low' and 'aud_high'.

By default, a single hls variant containing all the encoded streams is created.

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 5687530..f363418 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -759,7 +759,8 @@ static int write_manifest(AVFormatContext *s, int final)
 char playlist_file[64];
 AVStream *st = s->streams[i];
 get_hls_playlist_name(playlist_file, sizeof(playlist_file), NULL, 
i);
-ff_hls_write_stream_info(st, out, st->codecpar->bit_rate, 
playlist_file);
+ff_hls_write_stream_info(st, out, st->codecpar->bit_rate,
+playlist_file, NULL);
 }
 avio_close(out);
 if (use_rename)
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index e3442c3..2903e4e 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -144,6 +144,7 @@ typedef struct VariantStream {
 AVStream **streams;
 unsigned int nb_streams;
 int m3u8_created; /* status of media play-list creation */
+char *agroup; /* audio group name */
 char *baseurl;
} VariantStream;

@@ -1085,7 +1086,7 @@ static int create_master_playlist(AVFormatContext *s,
   VariantStream * const input_vs)
{
 HLSContext *hls = s->priv_data;
-VariantStream *vs;
+VariantStream *vs, *temp_vs;
 AVStream *vid_st, *aud_st;
 AVDictionary *options = NULL;
 unsigned int i, j;
@@ -1117,6 +1118,34 @@ static int create_master_playlist(AVFormatContext *s,

 ff_hls_write_playlist_version(hls->m3u8_out, hls->version);

+/* For audio only variant streams add #EXT-X-MEDIA tag with attributes*/
+for (i = 0; i < hls->nb_varstreams; i++) {
+vs = &(hls->var_streams[i]);
+
+if (vs->has_video || vs->has_subtitle || !vs->agroup)
+continue;
+
+m3u8_name_size = strlen(vs->m3u8_name) + 1;
+m3u8_rel_name = av_malloc(m3u8_name_size);
+if (!m3u8_rel_name) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
+av_strlcpy(m3u8_rel_name, vs->m3u8_name, m3u8_name_size);
+ret = get_relative_url(hls->master_m3u8_url, vs->m3u8_name,
+   m3u8_rel_name, m3u8_name_size);
+if (ret < 0) {
+av_log(s, AV_LOG_ERROR, "Unable to find relative URL\n");
+goto fail;
+}
+
+avio_printf(hls->m3u8_out, 
"#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=\"group_%s\"",
+vs->agroup);
+avio_printf(hls->m3u8_out, 
",NAME=\"audio_0\",DEFAULT=YES,URI=\"%s\"\n",
+m3u8_rel_name);
+av_freep(&m3u8_rel_name);
+}
+
 /* For variant streams with video add #EXT-X-STREAM-INF tag with 
attributes*/
 for (i = 0; i < hls->nb_varstreams; i++) {
 vs = &(hls->var_streams[i]);
@@ -1149,6 +1178,25 @@ static int create_master_playlist(AVFormatContext *s,
 continue;
 }

+/**
+ * Traverse through the list of audio only rendition streams and find
+ * the rendition which has highest bitrate in the same audio group
+ */
+if (vs->agroup) {
+for (j = 0; j < hls->nb_varstreams; j++) {
+temp_vs = &(hls->var_streams[j]);
+if (!temp_vs->has_video && !temp_vs->has_subtitle &&
+temp_vs->agroup &&
+!strcmp(temp_vs->agroup, vs->agroup)) {

Why don’t use av_strcasecmp,

+if (!aud_st)
+  

Re: [FFmpeg-devel] [PATCH] libavformat/opensrt: add Haivision Open SRT protocol

2017-12-19 Thread nablet developer


> On 13 Dec 2017, at 15:31, Nablet Developer  wrote:
> 
> The protocol is used by thousands of Haivision customers since 2013,
> in extremely sensitive medical, military and enterprise applications
> with FIPS compliant encryption requirements. Since April 2017, the protocol
> is Open Source and meanwhile >50 partners joined the SRT Alliance 
> (srtalliance.org).
> GStreamer already integrated the protocol and VLC has already accepted the 
> pull
> request for adding the SRT protocol to VLC. We see a dramatic adoption of the
> protocol in the market and a lot of our partners are asking us frequently on a
> ffmpeg integration.
> 
> Nablet Developer (1):
>  avformat/opensrt: add Haivision Open SRT protocol
> 
> configure   |  10 +
> doc/protocols.texi  | 116 +
> libavformat/Makefile|   1 +
> libavformat/opensrt.c   | 622 
> libavformat/protocols.c |   1 +
> 5 files changed, 750 insertions(+)
> create mode 100644 libavformat/opensrt.c
> 
> -- 
> 2.7.4
> 

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