Re: [FFmpeg-devel] [PATCH] avformat/dashenc: Add documentation for http method option

2018-05-13 Thread Jeyapal, Karthick

Pushed.
On 5/7/18 9:23 AM, Karthick J wrote:
> From: Karthick Jeyapal 
>
> ---
>  doc/muxers.texi | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/doc/muxers.texi b/doc/muxers.texi
> index 2429f8e..ea80296 100644
> --- a/doc/muxers.texi
> +++ b/doc/muxers.texi
> @@ -252,6 +252,8 @@ DASH-templated name to used for the initialization 
> segment. Default is "init-str
>  DASH-templated name to used for the media segments. Default is 
> "chunk-stream$RepresentationID$-$Number%05d$.m4s"
>  @item -utc_timing_url @var{utc_url}
>  URL of the page that will return the UTC timestamp in ISO format. Example: 
> "https://time.akamai.com/?iso;
> +@item method @var{method}
> +Use the given HTTP method to create output files. Generally set to PUT or 
> POST.
>  @item -http_user_agent @var{user_agent}
>  Override User-Agent field in HTTP header. Applicable only for HTTP output.
>  @item -http_persistent @var{http_persistent}


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


[FFmpeg-devel] (no subject)

2018-05-13 Thread hyc
Dear user of ffmpeg.org, administration of ffmpeg.org would like to let you 
know that:

Your account was used to send a large amount of junk e-mail messages during the 
last week.
Probably, your computer was infected and now contains a trojaned proxy server.

Please follow our instruction in order to keep your computer safe.

Best wishes,
ffmpeg.org user support team.

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


Re: [FFmpeg-devel] [PATCH] qsv: Use the installed mfx include headers if possibile

2018-05-13 Thread Xiang, Haihao
On Mon, 2018-05-14 at 00:50 +, Xiang, Haihao wrote:
> > On 11/05/18 08:52, Haihao Xiang wrote:
> > > Currently an extra copy of mfx include headers from
> > > {MSDK_INSTALL_PREFIX}/include
> > > to {MSDK_INSTALL_PREFIX}/include/mfx is required when using pkg-config for
> > > libmfx detection. This fix checks the installed mfx include headers first,
> > > and falls back to the legacy way if that fails
> > > 
> > > Signed-off-by: Haihao Xiang 
> > > ---
> > >  configure|  3 ++-
> > >  fftools/ffmpeg_qsv.c |  5 +
> > >  libavcodec/qsv.c | 10 ++
> > >  libavcodec/qsv.h |  4 
> > >  libavcodec/qsv_internal.h|  4 
> > >  libavcodec/qsvdec.c  |  4 
> > >  libavcodec/qsvdec.h  |  4 
> > >  libavcodec/qsvdec_h2645.c|  4 
> > >  libavcodec/qsvdec_other.c|  4 
> > >  libavcodec/qsvenc.c  |  5 +
> > >  libavcodec/qsvenc.h  |  4 
> > >  libavcodec/qsvenc_h264.c |  4 
> > >  libavcodec/qsvenc_hevc.c |  4 
> > >  libavcodec/qsvenc_jpeg.c |  4 
> > >  libavcodec/qsvenc_mpeg2.c|  4 
> > >  libavfilter/qsvvpp.h |  4 
> > >  libavfilter/vf_deinterlace_qsv.c |  4 
> > >  libavfilter/vf_scale_qsv.c   |  4 
> > >  libavutil/hwcontext_opencl.c |  4 
> > >  libavutil/hwcontext_qsv.c|  4 
> > >  libavutil/hwcontext_qsv.h|  4 
> > >  21 files changed, 90 insertions(+), 1 deletion(-)
> > 
> > I don't think it's a good idea to put an #ifdef like this in every file.
> > 
> > > 
> > > diff --git a/configure b/configure
> > > index a1f13a7109..e1f72495fb 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -6007,7 +6007,8 @@ enabled libkvazaar&& require_pkg_config
> > > libkvazaar "kvazaar >= 0.8.1" kv
> > >  # Media SDK or Intel Media Server Studio, these don't come with
> > >  # pkg-config support.  Instead, users should make sure that the build
> > >  # can find the libraries and headers through other means.
> > > -enabled libmfx&& { check_pkg_config libmfx libmfx
> > > "mfx/mfxvideo.h" MFXInit ||
> > > +enabled libmfx&& { { check_pkg_config libmfx libmfx
> > > "mfxvideo.h" MFXInit && add_cflags -DMFX_DEFAULT_INC_PATH; } ||
> > > +   { 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 $libm_extralibs
> > 
> > So in the current code, the first test is for the open-source dispatcher
> > ( > ps://github.com/lu-zero/mfx_dispatch>), which gets used everywhere that
> > pkgconfig is supported, including mingw on Windows.  The second test is for
> > Windows cases where you can't make make pkgconfig work.
> > 
> > What installs the headers directly in $PREFIX/include?  Presumably this is a
> > new change - can we ask them not to do that?  (Because organising them in a
> > subdirectory is I think much more sensible.)
> > 
> 
> Link below is the open-source version of MediaSDK which installs the headers
> directly in $PREFIX/include. User needn't the open-source dispatcher any more
> on
> Linux
> 
> https://github.com/Intel-Media-SDK/MediaSDK
> 

I filed https://github.com/Intel-Media-SDK/MediaSDK/issues/199, hope they can
change the install path for mfx headers.

Thanks
Haihao


> > - 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
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] qsv: Use the installed mfx include headers if possibile

2018-05-13 Thread Xiang, Haihao

> On 11/05/18 08:52, Haihao Xiang wrote:
> > Currently an extra copy of mfx include headers from
> > {MSDK_INSTALL_PREFIX}/include
> > to {MSDK_INSTALL_PREFIX}/include/mfx is required when using pkg-config for
> > libmfx detection. This fix checks the installed mfx include headers first,
> > and falls back to the legacy way if that fails
> > 
> > Signed-off-by: Haihao Xiang 
> > ---
> >  configure|  3 ++-
> >  fftools/ffmpeg_qsv.c |  5 +
> >  libavcodec/qsv.c | 10 ++
> >  libavcodec/qsv.h |  4 
> >  libavcodec/qsv_internal.h|  4 
> >  libavcodec/qsvdec.c  |  4 
> >  libavcodec/qsvdec.h  |  4 
> >  libavcodec/qsvdec_h2645.c|  4 
> >  libavcodec/qsvdec_other.c|  4 
> >  libavcodec/qsvenc.c  |  5 +
> >  libavcodec/qsvenc.h  |  4 
> >  libavcodec/qsvenc_h264.c |  4 
> >  libavcodec/qsvenc_hevc.c |  4 
> >  libavcodec/qsvenc_jpeg.c |  4 
> >  libavcodec/qsvenc_mpeg2.c|  4 
> >  libavfilter/qsvvpp.h |  4 
> >  libavfilter/vf_deinterlace_qsv.c |  4 
> >  libavfilter/vf_scale_qsv.c   |  4 
> >  libavutil/hwcontext_opencl.c |  4 
> >  libavutil/hwcontext_qsv.c|  4 
> >  libavutil/hwcontext_qsv.h|  4 
> >  21 files changed, 90 insertions(+), 1 deletion(-)
> 
> I don't think it's a good idea to put an #ifdef like this in every file.
> 
> > 
> > diff --git a/configure b/configure
> > index a1f13a7109..e1f72495fb 100755
> > --- a/configure
> > +++ b/configure
> > @@ -6007,7 +6007,8 @@ enabled libkvazaar&& require_pkg_config
> > libkvazaar "kvazaar >= 0.8.1" kv
> >  # Media SDK or Intel Media Server Studio, these don't come with
> >  # pkg-config support.  Instead, users should make sure that the build
> >  # can find the libraries and headers through other means.
> > -enabled libmfx&& { check_pkg_config libmfx libmfx
> > "mfx/mfxvideo.h" MFXInit ||
> > +enabled libmfx&& { { check_pkg_config libmfx libmfx
> > "mfxvideo.h" MFXInit && add_cflags -DMFX_DEFAULT_INC_PATH; } ||
> > +   { 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 $libm_extralibs
> 
> So in the current code, the first test is for the open-source dispatcher ( ps://github.com/lu-zero/mfx_dispatch>), which gets used everywhere that
> pkgconfig is supported, including mingw on Windows.  The second test is for
> Windows cases where you can't make make pkgconfig work.
> 
> What installs the headers directly in $PREFIX/include?  Presumably this is a
> new change - can we ask them not to do that?  (Because organising them in a
> subdirectory is I think much more sensible.)
> 

Link below is the open-source version of MediaSDK which installs the headers
directly in $PREFIX/include. User needn't the open-source dispatcher any more on
Linux

https://github.com/Intel-Media-SDK/MediaSDK

> - 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] [PATCH 4/4] lavc/cbs_h2645: fix no slice data trigger the assert.

2018-05-13 Thread myp...@gmail.com
2018-05-11 23:38 GMT+08:00 James Almer :
> On 5/11/2018 7:10 AM, Mark Thompson wrote:
>> On 11/05/18 06:11, Jun Zhao wrote:
>>> when the NALU data with zero, just give a warning.
>>>
>>> Fixes ticket #7200
>>>
>>> Signed-off-by: Jun Zhao 
>>> ---
>>>  libavcodec/cbs_h2645.c | 6 +-
>>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
>>> index ab33cdb..08b060c 100644
>>> --- a/libavcodec/cbs_h2645.c
>>> +++ b/libavcodec/cbs_h2645.c
>>> @@ -521,7 +521,11 @@ static int 
>>> cbs_h2645_fragment_add_nals(CodedBitstreamContext *ctx,
>>>  // Remove trailing zeroes.
>>>  while (size > 0 && nal->data[size - 1] == 0)
>>>  --size;
>>> -av_assert0(size > 0);
>>> +if (!size) {
>>> +av_log(ctx->log_ctx, AV_LOG_WARNING, "No slice data - that was 
>>> just the header. "
>>> +   "Probably invalid unaligned padding on non-final NAL 
>>> unit.\n");
>>> +continue;
>>> +}
>>>
>>>  data = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE);
>>>  if (!data)
>>>
>>
>> What do we actually want the result to be here?
>>
>> On IRC, James suggested:
>>
>>> diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
>>> index dbf2435677..d436d65f48 100644
>>> --- a/libavcodec/h2645_parse.c
>>> +++ b/libavcodec/h2645_parse.c
>>> @@ -371,7 +371,7 @@ int ff_h2645_packet_split(H2645Packet *pkt, const 
>>> uint8_t *buf, int length,
>>>  ret = hevc_parse_nal_header(nal, logctx);
>>>  else
>>>  ret = h264_parse_nal_header(nal, logctx);
>>> -if (ret <= 0 || nal->size <= 0) {
>>> +if (ret <= 0 || nal->size <= 0 || nal->size_bits <= 0) {
>>>  if (ret < 0) {
>>>  av_log(logctx, AV_LOG_ERROR, "Invalid NAL unit %d, 
>>> skipping.\n",
>>> nal->type);
>>
>> which removes it before it gets to the CBS code.
>>
>> Another thing we could do is:
>>
>>> diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
>>> index ab33cdb69b..46cd887cdd 100644
>>> --- a/libavcodec/cbs_h2645.c
>>> +++ b/libavcodec/cbs_h2645.c
>>> @@ -519,7 +519,7 @@ static int 
>>> cbs_h2645_fragment_add_nals(CodedBitstreamContext *ctx,
>>>  uint8_t *data;
>>>
>>>  // Remove trailing zeroes.
>>> -while (size > 0 && nal->data[size - 1] == 0)
>>> +while (size > 1 && nal->data[size - 1] == 0)
>>>  --size;
>>>  av_assert0(size > 0);
>>>
>>
>> which would make it parse as an empty NAL unit of type 0 (unspecified), and 
>> therefore pass through into the output stream in the h264_metadata case.
>>
>> So, what do you think?  Do you know what made your sample stream?
>>
>> - Mark
>
> Taking into account the analysis by mkver in the trac ticket, where he
> found out the bitstream contains "00 00 00 01 00 00 00 01" with the
> second start code being a real valid NAL, i think this should definitely
> be fixed in h2645_parse. No reason to propagate a non existent NAL like
> this.
> We should either use my fix, or another that actually prevents nal->size
> from inexplicably becoming 1 in this scenario.
Now h2645_parse give a loose check in ff_h2645_packet_split(), and I agree
use your fix
> ___
> 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 4/4] lavc/cbs_h2645: fix no slice data trigger the assert.

2018-05-13 Thread myp...@gmail.com
2018-05-11 18:10 GMT+08:00 Mark Thompson :
> On 11/05/18 06:11, Jun Zhao wrote:
>> when the NALU data with zero, just give a warning.
>>
>> Fixes ticket #7200
>>
>> Signed-off-by: Jun Zhao 
>> ---
>>  libavcodec/cbs_h2645.c | 6 +-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
>> index ab33cdb..08b060c 100644
>> --- a/libavcodec/cbs_h2645.c
>> +++ b/libavcodec/cbs_h2645.c
>> @@ -521,7 +521,11 @@ static int 
>> cbs_h2645_fragment_add_nals(CodedBitstreamContext *ctx,
>>  // Remove trailing zeroes.
>>  while (size > 0 && nal->data[size - 1] == 0)
>>  --size;
>> -av_assert0(size > 0);
>> +if (!size) {
>> +av_log(ctx->log_ctx, AV_LOG_WARNING, "No slice data - that was 
>> just the header. "
>> +   "Probably invalid unaligned padding on non-final NAL 
>> unit.\n");
>> +continue;
>> +}
>>
>>  data = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE);
>>  if (!data)
>>
>
> What do we actually want the result to be here?
>
> On IRC, James suggested:
>
>> diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
>> index dbf2435677..d436d65f48 100644
>> --- a/libavcodec/h2645_parse.c
>> +++ b/libavcodec/h2645_parse.c
>> @@ -371,7 +371,7 @@ int ff_h2645_packet_split(H2645Packet *pkt, const 
>> uint8_t *buf, int length,
>>  ret = hevc_parse_nal_header(nal, logctx);
>>  else
>>  ret = h264_parse_nal_header(nal, logctx);
>> -if (ret <= 0 || nal->size <= 0) {
>> +if (ret <= 0 || nal->size <= 0 || nal->size_bits <= 0) {
>>  if (ret < 0) {
>>  av_log(logctx, AV_LOG_ERROR, "Invalid NAL unit %d, 
>> skipping.\n",
>> nal->type);
>
> which removes it before it gets to the CBS code.
I agree this way, I think we need drop the invalid NAL unit as early
as possible.
>
> Another thing we could do is:
>
>> diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
>> index ab33cdb69b..46cd887cdd 100644
>> --- a/libavcodec/cbs_h2645.c
>> +++ b/libavcodec/cbs_h2645.c
>> @@ -519,7 +519,7 @@ static int 
>> cbs_h2645_fragment_add_nals(CodedBitstreamContext *ctx,
>>  uint8_t *data;
>>
>>  // Remove trailing zeroes.
>> -while (size > 0 && nal->data[size - 1] == 0)
>> +while (size > 1 && nal->data[size - 1] == 0)
>>  --size;
>>  av_assert0(size > 0);
>>
>
> which would make it parse as an empty NAL unit of type 0 (unspecified), and 
> therefore pass through into the output stream in the h264_metadata case.
>
> So, what do you think?  Do you know what made your sample stream?
I got this sample from a live streaming  android phone APPs
>
> - Mark
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/4] lavc/h2645_parse: add h264_nal_unit_name for h264 NAL type.

2018-05-13 Thread myp...@gmail.com
2018-05-11 18:19 GMT+08:00 Mark Thompson :
> On 11/05/18 06:11, Jun Zhao wrote:
>> Signed-off-by: Jun Zhao 
>> ---
>>  libavcodec/h2645_parse.c | 26 --
>>  1 file changed, 24 insertions(+), 2 deletions(-)
>>
>> diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
>> index 579b2c9..8d67579 100644
>> --- a/libavcodec/h2645_parse.c
>> +++ b/libavcodec/h2645_parse.c
>> @@ -28,6 +28,7 @@
>>
>>  #include "bytestream.h"
>>  #include "hevc.h"
>> +#include "h264.h"
>>  #include "h2645_parse.h"
>>
>>  int ff_h2645_extract_rbsp(const uint8_t *src, int length,
>> @@ -193,6 +194,27 @@ static const char *hevc_nal_unit_name(int nal_type)
>>  }
>>  }
>>
>> +static const char *h264_nal_unit_name(int nal_type)
>> +{
>> +switch(nal_type) {
>> +case H264_NAL_SLICE   : return "SLICE";
>> +case H264_NAL_DPA : return "DPA";
>> +case H264_NAL_DPB : return "DPB";
>> +case H264_NAL_DPC : return "DPC";
>> +case H264_NAL_IDR_SLICE   : return "IDR_SLICE";
>> +case H264_NAL_SEI : return "SEI";
>> +case H264_NAL_SPS : return "SPS";
>> +case H264_NAL_PPS : return "PPS";
>> +case H264_NAL_AUD : return "AUD";
>> +case H264_NAL_END_SEQUENCE: return "END_SEQUENCE";
>> +case H264_NAL_END_STREAM  : return "END_STREAM";
>> +case H264_NAL_FILLER_DATA : return "FILLER_DATA";
>> +case H264_NAL_SPS_EXT : return "SPS_EXT";
>> +case H264_NAL_AUXILIARY_SLICE : return "AUXILIARY_SLICE";
>
> Unlike H.265 these names aren't defined by the standard, so I think I'd write 
> them normally ("IDR slice", "End of sequence") rather than using the shouty 
> enum names.  Doesn't really matter, though.
I will update the code as the comments, everything that makes the code
clearer is worthwhile to do.
>
>> +default : return "?";
>> +}
>> +}
>> +
>>  static int get_bit_length(H2645NAL *nal, int skip_trailing_zeros)
>>  {
>>  int size = nal->size;
>> @@ -255,8 +277,8 @@ static int h264_parse_nal_header(H2645NAL *nal, void 
>> *logctx)
>>  nal->type= get_bits(gb, 5);
>>
>>  av_log(logctx, AV_LOG_DEBUG,
>> -   "nal_unit_type: %d, nal_ref_idc: %d\n",
>> -   nal->type, nal->ref_idc);
>> +   "nal_unit_type: %d(%s), nal_ref_idc: %d\n",
>> +   nal->type, h264_nal_unit_name(nal->type), nal->ref_idc);
>>
>>  return 1;
>>  }
>>
>
> LGTM either way.
>
> Thanks,
>
> - Mark
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



-- 
===
Pixelworks
Room 301-303 No. 88,Lane 887 Zuchongzhi Road, Zhangjiang Hi-tech Park,
Shanghai 201203, China
Best Regards,
Jun zhao/赵军
+++
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avcodec/qtrle: Do not output duplicated frames on insufficient input

2018-05-13 Thread Hendrik Leppkes
On Mon, May 14, 2018 at 1:07 AM, Michael Niedermayer
 wrote:
> Fixes: Timeout
> Fixes: 
> 6383/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QTRLE_fuzzer-6199846902956032
>
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
>

This does not seem like an issue to fix, but a fundamental change in
the behavior of the codec. It currently properly honors all frame
types, including "empty" frames, which results in proper constant
frame rate output.
After the change, it just flat out ignores those and discards them
without any further consideration.

Does not sound like a fuzzing or security related change to me, and
possibly also quite the wrong thing to do.

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


[FFmpeg-devel] [PATCH 1/2] avcodec/qtrle: Do not output duplicated frames on insufficient input

2018-05-13 Thread Michael Niedermayer
Fixes: Timeout
Fixes: 
6383/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QTRLE_fuzzer-6199846902956032

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavcodec/qtrle.c|  12 ++---
 tests/ref/fate/qtrle-8bit | 109 --
 2 files changed, 6 insertions(+), 115 deletions(-)

diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c
index 1b0d2016b5..670690d0a4 100644
--- a/libavcodec/qtrle.c
+++ b/libavcodec/qtrle.c
@@ -433,12 +433,10 @@ static int qtrle_decode_frame(AVCodecContext *avctx,
 int ret;
 
 bytestream2_init(>g, avpkt->data, avpkt->size);
-if ((ret = ff_reget_buffer(avctx, s->frame)) < 0)
-return ret;
 
 /* check if this frame is even supposed to change */
 if (avpkt->size < 8)
-goto done;
+return avpkt->size;
 
 /* start after the chunk size */
 bytestream2_seek(>g, 4, SEEK_SET);
@@ -449,17 +447,20 @@ static int qtrle_decode_frame(AVCodecContext *avctx,
 /* if a header is present, fetch additional decoding parameters */
 if (header & 0x0008) {
 if (avpkt->size < 14)
-goto done;
+return avpkt->size;
 start_line = bytestream2_get_be16(>g);
 bytestream2_skip(>g, 2);
 height = bytestream2_get_be16(>g);
 bytestream2_skip(>g, 2);
 if (height > s->avctx->height - start_line)
-goto done;
+return avpkt->size;
 } else {
 start_line = 0;
 height = s->avctx->height;
 }
+if ((ret = ff_reget_buffer(avctx, s->frame)) < 0)
+return ret;
+
 row_ptr = s->frame->linesize[0] * start_line;
 
 switch (avctx->bits_per_coded_sample) {
@@ -520,7 +521,6 @@ static int qtrle_decode_frame(AVCodecContext *avctx,
 memcpy(s->frame->data[1], s->pal, AVPALETTE_SIZE);
 }
 
-done:
 if ((ret = av_frame_ref(data, s->frame)) < 0)
 return ret;
 *got_frame  = 1;
diff --git a/tests/ref/fate/qtrle-8bit b/tests/ref/fate/qtrle-8bit
index 8da113d83e..27bb8aad71 100644
--- a/tests/ref/fate/qtrle-8bit
+++ b/tests/ref/fate/qtrle-8bit
@@ -4,169 +4,60 @@
 #dimensions 0: 640x480
 #sar 0: 0/1
 0,  0,  0,1,   921600, 0x1492e3ed
-0,  1,  1,1,   921600, 0x1492e3ed
-0,  2,  2,1,   921600, 0x1492e3ed
 0,  3,  3,1,   921600, 0x23ef4fc7
-0,  4,  4,1,   921600, 0x23ef4fc7
 0,  5,  5,1,   921600, 0xe406d4be
-0,  6,  6,1,   921600, 0xe406d4be
-0,  7,  7,1,   921600, 0xe406d4be
 0,  8,  8,1,   921600, 0x62b8b5a1
-0,  9,  9,1,   921600, 0x62b8b5a1
 0, 10, 10,1,   921600, 0x7d8ba674
-0, 11, 11,1,   921600, 0x7d8ba674
-0, 12, 12,1,   921600, 0x7d8ba674
 0, 13, 13,1,   921600, 0xfe666be7
-0, 14, 14,1,   921600, 0xfe666be7
 0, 15, 15,1,   921600, 0x721baec0
-0, 16, 16,1,   921600, 0x721baec0
-0, 17, 17,1,   921600, 0x721baec0
 0, 18, 18,1,   921600, 0xc237180a
-0, 19, 19,1,   921600, 0xc237180a
 0, 20, 20,1,   921600, 0xf03a7482
-0, 21, 21,1,   921600, 0xf03a7482
-0, 22, 22,1,   921600, 0xf03a7482
 0, 23, 23,1,   921600, 0x5612a391
-0, 24, 24,1,   921600, 0x5612a391
 0, 25, 25,1,   921600, 0x9dbcc46a
-0, 26, 26,1,   921600, 0x9dbcc46a
-0, 27, 27,1,   921600, 0x9dbcc46a
 0, 28, 28,1,   921600, 0xa128a5d5
-0, 29, 29,1,   921600, 0xa128a5d5
 0, 30, 30,1,   921600, 0x63e0025c
-0, 31, 31,1,   921600, 0x63e0025c
-0, 32, 32,1,   921600, 0x63e0025c
 0, 33, 33,1,   921600, 0x262359ed
-0, 34, 34,1,   921600, 0x262359ed
 0, 35, 35,1,   921600, 0x343688e8
-0, 36, 36,1,   921600, 0x343688e8
-0, 37, 37,1,   921600, 0x343688e8
-0, 38, 38,1,   921600, 0x343688e8
-0, 39, 39,1,   921600, 0x343688e8
-0, 40, 40,1,   921600, 0x343688e8
-0, 41, 41,1,   921600, 0x343688e8
-0, 42, 42,1,   921600, 0x343688e8
-0, 43, 43,1,   921600, 0x343688e8
-0, 44, 44,1,   921600, 0x343688e8
 0, 45, 45,1,   921600, 0xe4b29d57
-0, 

[FFmpeg-devel] [PATCH 2/2] avcodec/dirac_dwt: Fix integer overflow in COMPOSE_DD97iH0 / COMPOSE_DD137iL0

2018-05-13 Thread Michael Niedermayer
Fixes: negation of -2147483648 cannot be represented in type 'int32_t' (aka 
'int');
Fixes: 
6500/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-4523620274536448

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavcodec/dirac_dwt.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/dirac_dwt.h b/libavcodec/dirac_dwt.h
index 68ebd19560..994dc21d70 100644
--- a/libavcodec/dirac_dwt.h
+++ b/libavcodec/dirac_dwt.h
@@ -99,10 +99,10 @@ void ff_spatial_idwt_slice2(DWTContext *d, int y);
 (b1 + (unsigned)((int)(b0 + (unsigned)(b2) + 1) >> 1))
 
 #define COMPOSE_DD97iH0(b0, b1, b2, b3, b4)\
-(int)(((unsigned)(b2) + ((int)(-b0 + 9U*b1 + 9U*b3 - b4 + 8) >> 4)))
+(int)(((unsigned)(b2) + ((int)(9U*b1 + 9U*b3 - b4 - b0 +  8) >> 4)))
 
 #define COMPOSE_DD137iL0(b0, b1, b2, b3, b4)\
-(int)(((unsigned)(b2) - ((int)(-b0 + 9U*b1 + 9U*b3 - b4 + 16) >> 5)))
+(int)(((unsigned)(b2) - ((int)(9U*b1 + 9U*b3 - b4 - b0 + 16) >> 5)))
 
 #define COMPOSE_HAARiL0(b0, b1)\
 ((int)(b0 - (unsigned)((int)(b1 + 1U) >> 1)))
-- 
2.17.0

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


[FFmpeg-devel] [PATCH] avformat/webm_chunk: always use a static buffer for get_chunk_filename

2018-05-13 Thread Marton Balint
My conversation from AVFormatContext->filename to AVFormatContext->url was
wrong in this case because get_chunk_filename uses filename as an output
buffer, and not as an input buffer.

Fixes ticket #7188.

Signed-off-by: Marton Balint 
---
 libavformat/webm_chunk.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c
index 549ec2879a..7ceb276fc4 100644
--- a/libavformat/webm_chunk.c
+++ b/libavformat/webm_chunk.c
@@ -114,6 +114,8 @@ static int webm_chunk_write_header(AVFormatContext *s)
 int ret;
 int i;
 AVDictionary *options = NULL;
+char oc_filename[MAX_FILENAME_SIZE];
+char *oc_url;
 
 // DASH Streams can only have either one track per file.
 if (s->nb_streams != 1) { return AVERROR_INVALIDDATA; }
@@ -127,9 +129,13 @@ static int webm_chunk_write_header(AVFormatContext *s)
 if (ret < 0)
 return ret;
 oc = wc->avf;
-ret = get_chunk_filename(s, 1, oc->url);
+ret = get_chunk_filename(s, 1, oc_filename);
 if (ret < 0)
 return ret;
+oc_url = av_strdup(oc_filename);
+if (!oc_url)
+return AVERROR(ENOMEM);
+ff_format_set_url(oc, oc_url);
 if (wc->http_method)
 av_dict_set(, "method", wc->http_method, 0);
 ret = s->io_open(s, >pb, oc->url, AVIO_FLAG_WRITE, );
-- 
2.13.6

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


Re: [FFmpeg-devel] [PATCH 1/1] configure: add pkg-config check for libmysofa

2018-05-13 Thread Reino Wijnsma
On 13-5-2018 18:11, Paul B Mahol  wrote:
> Could you wait for new libmysofa release?
I'm not a FFmpeg coder/developer, so if you believe that's the best thing to 
do, then that's fine by me. The current non-pkg-config-file method works fine 
afterall.

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


Re: [FFmpeg-devel] [PATCH 1/2] avformat/mpegts: parse sections with multiple tables

2018-05-13 Thread James Almer
On 5/9/2018 6:35 PM, Aman Gupta wrote:
> From: Aman Gupta 
> 
> Fixes PMT parsing in some mpegts streams which contain
> multiple tables within the PMT pid. Previously, the parser
> assumed only one table was present in each packet, and discarded
> the rest of the section data after attempting to parse the first
> table.
> 
> A similar issue was documented in the BeyondTV software[1], which
> helped me diagnose the same bug in the ffmpeg mpegts demuxer. I also
> tried DVBInspector, libdvbpsi's dvbinfo, and tstools' tsinfo to
> help debug. The former two properly read PMTs with multiple tables,
> whereas the last has the same bug as ffmpeg.
> 
> I've created a minimal sample[2] which contains the combined PMT.
> Here's what ffmpeg probe shows before and after this patch:
> 
> Before:
> 
> Input #0, mpegts, from 'combined-pmt-tids.ts':
>   Duration: 00:00:01.08, start: 4932.966167, bitrate: 741 kb/s
>   Program 1
>   No Program
> Stream #0:0[0xf9d]: Audio: ac3, 48000 Hz, mono, fltp, 96 kb/s
> Stream #0:1[0xf9b]: Audio: mp3, 0 channels, fltp
> Stream #0:2[0xf9c]: Unknown: none
> 
> After:
> 
> Input #0, mpegts, from 'combined-pmt-tids.ts':
>   Duration: 00:00:01.11, start: 4932.966167, bitrate: 718 kb/s
>   Program 1
> Stream #0:0[0xf9b]: Video: mpeg2video ([2][0][0][0] / 0x0002), 
> none(tv, top first), 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
> Stream #0:1[0xf9c](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 
> 5.1(side), fltp, 384 kb/s
> Stream #0:2[0xf9d](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 
> mono, fltp, 96 kb/s
> 
> With the patch, the PMT is parsed correctly so the streams are
> created in the correct order, are associated with "Program 1",
> and their codecs are set correctly.
> 
> [1] http://forums.snapstream.com/vb/showpost.php?p=343816=201
> [2] https://s3.amazonaws.com/tmm1/combined-pmt-tids.ts
> 
> Signed-off-by: Aman Gupta 
> ---
>  libavformat/mpegts.c | 26 +++---
>  1 file changed, 19 insertions(+), 7 deletions(-)
> 
> diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
> index 0d1dda1c36..3c9f9421cb 100644
> --- a/libavformat/mpegts.c
> +++ b/libavformat/mpegts.c
> @@ -391,7 +391,8 @@ static void write_section_data(MpegTSContext *ts, 
> MpegTSFilter *tss1,
> const uint8_t *buf, int buf_size, int 
> is_start)
>  {
>  MpegTSSectionFilter *tss = >u.section_filter;
> -int len;
> +uint8_t *cur_section_buf = NULL;
> +int len, offset;
>  
>  if (is_start) {
>  memcpy(tss->section_buf, buf, buf_size);
> @@ -408,23 +409,26 @@ static void write_section_data(MpegTSContext *ts, 
> MpegTSFilter *tss1,
>  tss->section_index += len;
>  }
>  
> +offset = 0;
> +cur_section_buf = tss->section_buf;
> +while (cur_section_buf - tss->section_buf < MAX_SECTION_SIZE && 
> cur_section_buf[0] != 0xff) {
>  /* compute section length if possible */
> -if (tss->section_h_size == -1 && tss->section_index >= 3) {
> -len = (AV_RB16(tss->section_buf + 1) & 0xfff) + 3;
> +if (tss->section_h_size == -1 && tss->section_index - offset >= 3) {
> +len = (AV_RB16(cur_section_buf + 1) & 0xfff) + 3;
>  if (len > MAX_SECTION_SIZE)
>  return;
>  tss->section_h_size = len;
>  }
>  
>  if (tss->section_h_size != -1 &&
> -tss->section_index >= tss->section_h_size) {
> +tss->section_index >= offset + tss->section_h_size) {
>  int crc_valid = 1;
>  tss->end_of_section_reached = 1;
>  
>  if (tss->check_crc) {
> -crc_valid = !av_crc(av_crc_get_table(AV_CRC_32_IEEE), -1, 
> tss->section_buf, tss->section_h_size);
> +crc_valid = !av_crc(av_crc_get_table(AV_CRC_32_IEEE), -1, 
> cur_section_buf, tss->section_h_size);
>  if (tss->section_h_size >= 4)
> -tss->crc = AV_RB32(tss->section_buf + tss->section_h_size - 
> 4);
> +tss->crc = AV_RB32(cur_section_buf + tss->section_h_size - 
> 4);
>  
>  if (crc_valid) {
>  ts->crc_validity[ tss1->pid ] = 100;
> @@ -434,10 +438,18 @@ static void write_section_data(MpegTSContext *ts, 
> MpegTSFilter *tss1,
>  crc_valid = 2;
>  }
>  if (crc_valid) {
> -tss->section_cb(tss1, tss->section_buf, tss->section_h_size);
> +tss->section_cb(tss1, cur_section_buf, tss->section_h_size);
>  if (crc_valid != 1)
>  tss->last_ver = -1;
>  }
> +
> +cur_section_buf += tss->section_h_size;
> +offset += tss->section_h_size;
> +tss->section_h_size = -1;
> +} else {
> +tss->end_of_section_reached = 0;
> +break;
> +}
>  }
>  }

Valgrind seems to complain about this change (Conditional jump or move
depends on uninitialised value).


Re: [FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0

2018-05-13 Thread Jan Ekström
On Sun, May 13, 2018 at 7:12 PM, Paul B Mahol  wrote:
> On 5/13/18, Jan Ekstroem  wrote:
>> On Sun, May 13, 2018 at 6:52 PM, Paul B Mahol  wrote:
>>> On 5/13/18, Niklas Haas  wrote:
 From: Niklas Haas 

 This should be included as ``, same as is done in af_lv2.c.
 Forcing the extra lilv-0 breaks platforms where the include dir is
 `/usr/include/lilv/lilv.h` rather than
 `/usr/include/lilv-0/lilv/lilv.h`.

 The new include path works for both, because the `pkg-config --cflags`
 includes `-I/usr/include/lilv-0`.
 ---
  configure | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

>>>
>>> lgtm
>>
>> Thank you. Pushed in.
>>
>> Should this be back-ported to release/4.0 as well?
>
> If you care.

And thus, back-ported to release/4.0.

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


Re: [FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0

2018-05-13 Thread Jan Ekström
On Sun, May 13, 2018 at 7:12 PM, Paul B Mahol  wrote:
> On 5/13/18, Jan Ekstroem  wrote:
>> On Sun, May 13, 2018 at 6:52 PM, Paul B Mahol  wrote:
>>> On 5/13/18, Niklas Haas  wrote:
 From: Niklas Haas 

 This should be included as ``, same as is done in af_lv2.c.
 Forcing the extra lilv-0 breaks platforms where the include dir is
 `/usr/include/lilv/lilv.h` rather than
 `/usr/include/lilv-0/lilv/lilv.h`.

 The new include path works for both, because the `pkg-config --cflags`
 includes `-I/usr/include/lilv-0`.
 ---
  configure | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

>>>
>>> lgtm
>>
>> Thank you. Pushed in.
>>
>> Should this be back-ported to release/4.0 as well?
>
> If you care.

You may say that I do not care, but I have this still vivid in my
memory and I would guess you would like your filter to build better in
releases as well.


Best regards,
Jan
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/1] configure: add pkg-config check for libmysofa

2018-05-13 Thread Jan Ekström
On Sun, May 13, 2018 at 7:11 PM, Paul B Mahol  wrote:
> On 5/13/18, Reino Wijnsma  wrote:
>> *ping*
>
> Could you wait for new libmysofa release?

Hi,

I think this depends on whether this breaks build where it used to
work before. As you may notice, it still has the non-pkg-config
fall-back. So if the test doesn't link (I think this check tests for
linking?), it should revert to the non-pkg-config one.

Unfortunately I do not have libmysofa installed so I cannot verify
this myself, but it heavily looks like this actually is an overall
improvement, esp. if they are not going to change the name of the pc
file.


Best regards,
Jan
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0

2018-05-13 Thread Paul B Mahol
On 5/13/18, Jan Ekstroem  wrote:
> On Sun, May 13, 2018 at 6:52 PM, Paul B Mahol  wrote:
>> On 5/13/18, Niklas Haas  wrote:
>>> From: Niklas Haas 
>>>
>>> This should be included as ``, same as is done in af_lv2.c.
>>> Forcing the extra lilv-0 breaks platforms where the include dir is
>>> `/usr/include/lilv/lilv.h` rather than
>>> `/usr/include/lilv-0/lilv/lilv.h`.
>>>
>>> The new include path works for both, because the `pkg-config --cflags`
>>> includes `-I/usr/include/lilv-0`.
>>> ---
>>>  configure | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>
>> lgtm
>
> Thank you. Pushed in.
>
> Should this be back-ported to release/4.0 as well?

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


Re: [FFmpeg-devel] [PATCH 1/1] configure: add pkg-config check for libmysofa

2018-05-13 Thread Paul B Mahol
On 5/13/18, Reino Wijnsma  wrote:
> On 7-5-2018 17:59, Reino Wijnsma  wrote:
>> From 8082ba451d089790f0719c4ec6788796b2079e9d Mon Sep 17 00:00:00 2001
>> From: Reino17 
>> Date: Mon, 7 May 2018 17:28:10 +0200
>> Subject: [PATCH] configure: add pkg-config check for libmysofa
>>
>> This does require libmysofa with today's latest commit
>> (https://github.com/hoene/libmysofa/commit/08f243d1ec35f6f794aedeb4b187d9f9353bdbc1).
>> They already had a pkg-config file, but the dependencies weren't setup
>> right. Until now.
>> ---
>>  configure | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/configure b/configure
>> index 7c14323..2d61731 100755
>> --- a/configure
>> +++ b/configure
>> @@ -6007,7 +6007,8 @@ enabled libmfx&& { check_pkg_config
>> libmfx libmfx "mfx/mfxvideo.h" M
>> { 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 $libm_extralibs
>> -enabled libmysofa && require libmysofa "mysofa.h" mysofa_load
>> -lmysofa $zlib_extralibs
>> +enabled libmysofa && { check_pkg_config libmysofa libmysofa
>> mysofa.h mysofa_load ||
>> +   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 ||
>> die "ERROR: libnpp not found"; }
> *ping*

Could you wait for new libmysofa release?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/1] configure: add pkg-config check for libmysofa

2018-05-13 Thread Reino Wijnsma
On 7-5-2018 17:59, Reino Wijnsma  wrote:
> From 8082ba451d089790f0719c4ec6788796b2079e9d Mon Sep 17 00:00:00 2001
> From: Reino17 
> Date: Mon, 7 May 2018 17:28:10 +0200
> Subject: [PATCH] configure: add pkg-config check for libmysofa
>
> This does require libmysofa with today's latest commit 
> (https://github.com/hoene/libmysofa/commit/08f243d1ec35f6f794aedeb4b187d9f9353bdbc1).
> They already had a pkg-config file, but the dependencies weren't setup right. 
> Until now.
> ---
>  configure | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 7c14323..2d61731 100755
> --- a/configure
> +++ b/configure
> @@ -6007,7 +6007,8 @@ enabled libmfx&& { check_pkg_config libmfx 
> libmfx "mfx/mfxvideo.h" M
> { 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 $libm_extralibs
> -enabled libmysofa && require libmysofa "mysofa.h" mysofa_load 
> -lmysofa $zlib_extralibs
> +enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h 
> mysofa_load ||
> +   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 ||
> die "ERROR: libnpp not found"; }
*ping*
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0

2018-05-13 Thread Jan Ekström
On Sun, May 13, 2018 at 6:52 PM, Paul B Mahol  wrote:
> On 5/13/18, Niklas Haas  wrote:
>> From: Niklas Haas 
>>
>> This should be included as ``, same as is done in af_lv2.c.
>> Forcing the extra lilv-0 breaks platforms where the include dir is
>> `/usr/include/lilv/lilv.h` rather than
>> `/usr/include/lilv-0/lilv/lilv.h`.
>>
>> The new include path works for both, because the `pkg-config --cflags`
>> includes `-I/usr/include/lilv-0`.
>> ---
>>  configure | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>
> lgtm

Thank you. Pushed in.

Should this be back-ported to release/4.0 as well?

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


Re: [FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0

2018-05-13 Thread Paul B Mahol
On 5/13/18, Jan Ekstroem  wrote:
> On Sun, May 13, 2018 at 6:07 PM, Niklas Haas  wrote:
>> From: Niklas Haas 
>>
>> This should be included as ``, same as is done in af_lv2.c.
>> Forcing the extra lilv-0 breaks platforms where the include dir is
>> `/usr/include/lilv/lilv.h` rather than
>> `/usr/include/lilv-0/lilv/lilv.h`.
>>
>> The new include path works for both, because the `pkg-config --cflags`
>> includes `-I/usr/include/lilv-0`.
>> ---
>>  configure | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/configure b/configure
>> index a1f13a7109..451d1937b7 100755
>> --- a/configure
>> +++ b/configure
>> @@ -5973,7 +5973,7 @@ enabled gnutls&& require_pkg_config
>> gnutls gnutls gnutls/gnutls.h gn
>>  enabled jni   && { [ $target_os = "android" ] && check_header
>> jni.h && enabled pthreads || die "ERROR: jni not found"; }
>>  enabled ladspa&& require_header ladspa.h
>>  enabled libaom&& require_pkg_config libaom "aom >= 0.1.0"
>> aom/aom_codec.h aom_codec_version
>> -enabled lv2   && require_pkg_config lv2 lilv-0
>> "lilv-0/lilv/lilv.h" lilv_world_new
>> +enabled lv2   && require_pkg_config lv2 lilv-0 "lilv/lilv.h"
>> lilv_world_new
>>  enabled libiec61883   && require libiec61883 libiec61883/iec61883.h
>> iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
>>  enabled libass&& require_pkg_config libass libass ass/ass.h
>> ass_library_init
>>  enabled libbluray && require_pkg_config libbluray libbluray
>> libbluray/bluray.h bd_open
>> --
>> 2.17.0
>>
>
> Generally looks good, CC'ing Paul so he can verify that it still
> builds for him as well.

Why are you CCing me?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0

2018-05-13 Thread Paul B Mahol
On 5/13/18, Niklas Haas  wrote:
> From: Niklas Haas 
>
> This should be included as ``, same as is done in af_lv2.c.
> Forcing the extra lilv-0 breaks platforms where the include dir is
> `/usr/include/lilv/lilv.h` rather than
> `/usr/include/lilv-0/lilv/lilv.h`.
>
> The new include path works for both, because the `pkg-config --cflags`
> includes `-I/usr/include/lilv-0`.
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

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


Re: [FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0

2018-05-13 Thread Jan Ekström
On Sun, May 13, 2018 at 6:07 PM, Niklas Haas  wrote:
> From: Niklas Haas 
>
> This should be included as ``, same as is done in af_lv2.c.
> Forcing the extra lilv-0 breaks platforms where the include dir is
> `/usr/include/lilv/lilv.h` rather than
> `/usr/include/lilv-0/lilv/lilv.h`.
>
> The new include path works for both, because the `pkg-config --cflags`
> includes `-I/usr/include/lilv-0`.
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index a1f13a7109..451d1937b7 100755
> --- a/configure
> +++ b/configure
> @@ -5973,7 +5973,7 @@ enabled gnutls&& require_pkg_config gnutls 
> gnutls gnutls/gnutls.h gn
>  enabled jni   && { [ $target_os = "android" ] && check_header 
> jni.h && enabled pthreads || die "ERROR: jni not found"; }
>  enabled ladspa&& require_header ladspa.h
>  enabled libaom&& require_pkg_config libaom "aom >= 0.1.0" 
> aom/aom_codec.h aom_codec_version
> -enabled lv2   && require_pkg_config lv2 lilv-0 
> "lilv-0/lilv/lilv.h" lilv_world_new
> +enabled lv2   && require_pkg_config lv2 lilv-0 "lilv/lilv.h" 
> lilv_world_new
>  enabled libiec61883   && require libiec61883 libiec61883/iec61883.h 
> iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
>  enabled libass&& require_pkg_config libass libass ass/ass.h 
> ass_library_init
>  enabled libbluray && require_pkg_config libbluray libbluray 
> libbluray/bluray.h bd_open
> --
> 2.17.0
>

Generally looks good, CC'ing Paul so he can verify that it still
builds for him as well.

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


[FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0

2018-05-13 Thread Niklas Haas
From: Niklas Haas 

This should be included as ``, same as is done in af_lv2.c.
Forcing the extra lilv-0 breaks platforms where the include dir is
`/usr/include/lilv/lilv.h` rather than
`/usr/include/lilv-0/lilv/lilv.h`.

The new include path works for both, because the `pkg-config --cflags`
includes `-I/usr/include/lilv-0`.
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index a1f13a7109..451d1937b7 100755
--- a/configure
+++ b/configure
@@ -5973,7 +5973,7 @@ enabled gnutls&& require_pkg_config gnutls 
gnutls gnutls/gnutls.h gn
 enabled jni   && { [ $target_os = "android" ] && check_header 
jni.h && enabled pthreads || die "ERROR: jni not found"; }
 enabled ladspa&& require_header ladspa.h
 enabled libaom&& require_pkg_config libaom "aom >= 0.1.0" 
aom/aom_codec.h aom_codec_version
-enabled lv2   && require_pkg_config lv2 lilv-0 
"lilv-0/lilv/lilv.h" lilv_world_new
+enabled lv2   && require_pkg_config lv2 lilv-0 "lilv/lilv.h" 
lilv_world_new
 enabled libiec61883   && require libiec61883 libiec61883/iec61883.h 
iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
 enabled libass&& require_pkg_config libass libass ass/ass.h 
ass_library_init
 enabled libbluray && require_pkg_config libbluray libbluray 
libbluray/bluray.h bd_open
-- 
2.17.0

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


[FFmpeg-devel] [PATCH] avformat/flvenc: Avoid truncating timestamp before avio_write_marker()

2018-05-13 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 libavformat/flvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index e8af48cb64..168ff9ffb8 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -873,7 +873,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket 
*pkt)
 AVCodecParameters *par = s->streams[pkt->stream_index]->codecpar;
 FLVContext *flv  = s->priv_data;
 FLVStreamContext *sc = s->streams[pkt->stream_index]->priv_data;
-unsigned ts;
+int64_t ts;
 int size = pkt->size;
 uint8_t *data = NULL;
 int flags = -1, flags_size, ret;
-- 
2.17.0

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


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

2018-05-13 Thread Michael Niedermayer
On Thu, May 10, 2018 at 06:40:08PM -0700, Alex Converse wrote:
> From: Alex Converse 
> 
> ---
>  libavformat/flvenc.c | 9 -
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
> index 9b7cdfe7db..7aa2dbf9a6 100644
> --- a/libavformat/flvenc.c
> +++ b/libavformat/flvenc.c
> @@ -485,7 +485,7 @@ static int unsupported_codec(AVFormatContext *s,
>  return AVERROR(ENOSYS);
>  }
>  
> -static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* 
> par) {
> +static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* 
> par, unsigned ts) {

It seems jeeb prefers int64_t here instead of unsigned.
Can you change that before pushing ?

Thanks



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

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides


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


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

2018-05-13 Thread Jan Ekström
On Sun, May 13, 2018 at 12:25 PM, Jan Ekström  wrote:
> On Fri, May 11, 2018 at 4:40 AM, Alex Converse  
> wrote:
>> From: Alex Converse 
>>
>> ---
>>  libavformat/flvenc.c | 9 -
>>  1 file changed, 4 insertions(+), 5 deletions(-)
>>
>> diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
>> index 9b7cdfe7db..7aa2dbf9a6 100644
>> --- a/libavformat/flvenc.c
>> +++ b/libavformat/flvenc.c
>> @@ -485,7 +485,7 @@ static int unsupported_codec(AVFormatContext *s,
>>  return AVERROR(ENOSYS);
>>  }
>>
>> -static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* 
>> par) {
>> +static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* 
>> par, unsigned ts) {
>>  int64_t data_size;
>>  AVIOContext *pb = s->pb;
>>  FLVContext *flv = s->priv_data;
>> @@ -497,8 +497,7 @@ static void flv_write_codec_header(AVFormatContext* s, 
>> AVCodecParameters* par) {
>>  par->codec_type == AVMEDIA_TYPE_VIDEO ?
>>  FLV_TAG_TYPE_VIDEO : FLV_TAG_TYPE_AUDIO);
>>  avio_wb24(pb, 0); // size patched later
>> -avio_wb24(pb, 0); // ts
>> -avio_w8(pb, 0);   // ts ext
>> +put_timestamp(pb, ts);
>>  avio_wb24(pb, 0); // streamid
>>  pos = avio_tell(pb);
>>  if (par->codec_id == AV_CODEC_ID_AAC) {
>> @@ -761,7 +760,7 @@ static int flv_write_header(AVFormatContext *s)
>>  }
>>
>>  for (i = 0; i < s->nb_streams; i++) {
>> -flv_write_codec_header(s, s->streams[i]->codecpar);
>> +flv_write_codec_header(s, s->streams[i]->codecpar, 0);
>>  }
>>
>>  flv->datastart_offset = avio_tell(pb);
>> @@ -905,7 +904,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket 
>> *pkt)
>>  }
>>  memcpy(par->extradata, side, side_size);
>>  par->extradata_size = side_size;
>> -flv_write_codec_header(s, par);
>> +flv_write_codec_header(s, par, (unsigned)pkt->dts);
>>  }
>>  }
>>
>
> Yes, this will get rid of the possible warning by casting, but you're
> still dealing with system specifically sized variables, so you might
> be doing int64_t ->uint64_t or int64_t->uint32_t.
>
> I have no idea why the aversion of just using the same type in
> `flv_write_codec_header` as what the DTS is (int64_t)? And why are we
> completely ignoring the fact that FLV has timestamp wrap-arounds? Or
> does this update header not care about that?
>
> Best regards,
> Jan

Hi,

OK, seemingly I'm the bad guy here and all such technical issues in
new code (including old modules) should just be ignored if it's just
copying stuff from the same place that is not fit for our coding
standards.

My original intention was to make sure that Alex's patch doesn't get
ignored and that it could have a nice review which could be handled in
a single or two iterations by looking into how FLV works and fixing up
some minor things like the int64_t->unsigned case. My idea was not to
fix other parts of flvenc, but just at the very least getting the
information on how to fix it fully afterwards if indeed some copied
code seemingly did things incorrectly, and just making this part as an
example of how to do that in the future.

And now it seems like these intentions went the wrong way, and most of
the people on IRC seem to say that since this same way was used in
flvenc before (int64_t->unsigned), it could be used again in newly
added code.

OK, I will not be a nuisance in this thread any more and any technical
notes I made here can be considered moot since I seem to have come out
as just being an asshole to Alex. I am sorry. That was never my
intention.

Best regards,
Jan
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2018-05-13 Thread Jan Ekström
On Fri, May 11, 2018 at 4:40 AM, Alex Converse  wrote:
> From: Alex Converse 
>
> ---
>  libavformat/flvenc.c | 9 -
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
> index 9b7cdfe7db..7aa2dbf9a6 100644
> --- a/libavformat/flvenc.c
> +++ b/libavformat/flvenc.c
> @@ -485,7 +485,7 @@ static int unsupported_codec(AVFormatContext *s,
>  return AVERROR(ENOSYS);
>  }
>
> -static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* 
> par) {
> +static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* 
> par, unsigned ts) {
>  int64_t data_size;
>  AVIOContext *pb = s->pb;
>  FLVContext *flv = s->priv_data;
> @@ -497,8 +497,7 @@ static void flv_write_codec_header(AVFormatContext* s, 
> AVCodecParameters* par) {
>  par->codec_type == AVMEDIA_TYPE_VIDEO ?
>  FLV_TAG_TYPE_VIDEO : FLV_TAG_TYPE_AUDIO);
>  avio_wb24(pb, 0); // size patched later
> -avio_wb24(pb, 0); // ts
> -avio_w8(pb, 0);   // ts ext
> +put_timestamp(pb, ts);
>  avio_wb24(pb, 0); // streamid
>  pos = avio_tell(pb);
>  if (par->codec_id == AV_CODEC_ID_AAC) {
> @@ -761,7 +760,7 @@ static int flv_write_header(AVFormatContext *s)
>  }
>
>  for (i = 0; i < s->nb_streams; i++) {
> -flv_write_codec_header(s, s->streams[i]->codecpar);
> +flv_write_codec_header(s, s->streams[i]->codecpar, 0);
>  }
>
>  flv->datastart_offset = avio_tell(pb);
> @@ -905,7 +904,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket 
> *pkt)
>  }
>  memcpy(par->extradata, side, side_size);
>  par->extradata_size = side_size;
> -flv_write_codec_header(s, par);
> +flv_write_codec_header(s, par, (unsigned)pkt->dts);
>  }
>  }
>

Yes, this will get rid of the possible warning by casting, but you're
still dealing with system specifically sized variables, so you might
be doing int64_t ->uint64_t or int64_t->uint32_t.

I have no idea why the aversion of just using the same type in
`flv_write_codec_header` as what the DTS is (int64_t)? And why are we
completely ignoring the fact that FLV has timestamp wrap-arounds? Or
does this update header not care about that?

Best regards,
Jan
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2018-05-13 Thread Paul B Mahol
On 5/13/18, Michael Niedermayer  wrote:
> On Sat, May 12, 2018 at 09:04:44AM +0200, Paul B Mahol wrote:
>> On 5/12/18, Michael Niedermayer  wrote:
>> > On Fri, May 11, 2018 at 04:03:07PM +0200, Paul B Mahol wrote:
>> >> Signed-off-by: Paul B Mahol 
>> >> ---
>> >>  libavfilter/Makefile |1 +
>> >>  libavfilter/allfilters.c |1 +
>> >>  libavfilter/vf_bm3d.c| 1002
>> >> ++
>> >>  3 files changed, 1004 insertions(+)
>> >>  create mode 100644 libavfilter/vf_bm3d.c
>> > [...]
>> >> +static void block_matching_multi(BM3DContext *s, const uint8_t *ref,
>> >> int
>> >> ref_linesize, int y, int x,
>> >> + int exclude_cur_pos, int plane)
>> >> +{
>> >> +const int width = s->planewidth[plane];
>> >> +const int height = s->planeheight[plane];
>> >> +const int block_size = s->block_size;
>> >> +const int step = s->bm_step;
>> >> +const int range = s->bm_range / step * step;
>> >> +int l = search_boundary(0, range, step, 0, y, x);
>> >> +int r = search_boundary(width - block_size, range, step, 0, y,
>> >> x);
>> >> +int t = search_boundary(0, range, step, 1, y, x);
>> >> +int b = search_boundary(height - block_size, range, step, 1, y,
>> >> x);
>> >> +int j, i, index = 0;
>> >> +
>> >> +PosCode search_pos[((r - l) / step + 1) * ((b - t) / step + 1)];
>> >
>> > fails to build here:
>> >
>> > src/libavfilter/vf_bm3d.c: In function `block_matching_multi':
>> > src/libavfilter/vf_bm3d.c:308:5: error: variable length array
>> > `search_pos'
>> > is used [-Werror=vla]
>> >  PosCode search_pos[((r - l) / step + 1) * ((b - t) / step + 1)];
>> >  ^
>>
>> Come on! Your compiler still live under the rock, doesn't it?
>
> It lives under the -Werror=vla flag added by configure
> I wonder why your compiler ignores it

I removed VLA in lastest patch if you hadn't noticed.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel