[FFmpeg-devel] [PATCH] Add FITS Decoder

2017-07-02 Thread Paras Chadha
Made all the changes suggested
Added a new function which reads a header FITS line safely. It also makes it 
more modular
Added an option for the user to enter the value to be used in place of BLANK 
pixels
Refactored code using macros to make it short

Signed-off-by: Paras Chadha 
---
 Changelog   |   1 +
 doc/general.texi|   2 +
 libavcodec/Makefile |   1 +
 libavcodec/allcodecs.c  |   1 +
 libavcodec/avcodec.h|   1 +
 libavcodec/codec_desc.c |   8 +
 libavcodec/fitsdec.c| 505 
 libavcodec/version.h|   4 +-
 libavformat/img2.c  |   1 +
 9 files changed, 522 insertions(+), 2 deletions(-)
 create mode 100644 libavcodec/fitsdec.c

diff --git a/Changelog b/Changelog
index a8726c6..2c2bdec 100644
--- a/Changelog
+++ b/Changelog
@@ -26,6 +26,7 @@ version :
   --x86asmexe=yasm to configure to restore the old behavior.
 - additional frame format support for Interplay MVE movies
 - support for decoding through D3D11VA in ffmpeg
+- FITS demuxer and decoder

 version 3.3:
 - CrystalHD decoder moved to new decode API
diff --git a/doc/general.texi b/doc/general.texi
index 8f582d5..c00ce32 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -591,6 +591,8 @@ following image formats are supported:
 @tab Digital Picture Exchange
 @item EXR  @tab   @tab X
 @tab OpenEXR
+@item FITS @tab   @tab X
+@tab Flexible Image Transport System
 @item JPEG @tab X @tab X
 @tab Progressive JPEG is not supported.
 @item JPEG 2000@tab X @tab X
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index b440a00..729e95e 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -291,6 +291,7 @@ OBJS-$(CONFIG_FFV1_DECODER)+= ffv1dec.o ffv1.o
 OBJS-$(CONFIG_FFV1_ENCODER)+= ffv1enc.o ffv1.o
 OBJS-$(CONFIG_FFWAVESYNTH_DECODER) += ffwavesynth.o
 OBJS-$(CONFIG_FIC_DECODER) += fic.o
+OBJS-$(CONFIG_FITS_DECODER)+= fitsdec.o
 OBJS-$(CONFIG_FLAC_DECODER)+= flacdec.o flacdata.o flac.o
 OBJS-$(CONFIG_FLAC_ENCODER)+= flacenc.o flacdata.o flac.o 
vorbis_data.o
 OBJS-$(CONFIG_FLASHSV_DECODER) += flashsv.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 0243f47..a4cfd80 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -192,6 +192,7 @@ static void register_all(void)
 REGISTER_ENCDEC (FFV1,  ffv1);
 REGISTER_ENCDEC (FFVHUFF,   ffvhuff);
 REGISTER_DECODER(FIC,   fic);
+REGISTER_DECODER(FITS,  fits);
 REGISTER_ENCDEC (FLASHSV,   flashsv);
 REGISTER_ENCDEC (FLASHSV2,  flashsv2);
 REGISTER_DECODER(FLIC,  flic);
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index b697afa..8eba460 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -447,6 +447,7 @@ enum AVCodecID {
 AV_CODEC_ID_SRGC,
 AV_CODEC_ID_SVG,
 AV_CODEC_ID_GDV,
+AV_CODEC_ID_FITS,

 /* various PCM "codecs" */
 AV_CODEC_ID_FIRST_AUDIO = 0x1, ///< A dummy id pointing at the 
start of audio codecs
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index cf1246e..0112517 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -1464,6 +1464,14 @@ static const AVCodecDescriptor codec_descriptors[] = {
  AV_CODEC_PROP_LOSSLESS,
 },
 {
+.id= AV_CODEC_ID_FITS,
+.type  = AVMEDIA_TYPE_VIDEO,
+.name  = "fits",
+.long_name = NULL_IF_CONFIG_SMALL("Flexible Image Transport System"),
+.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY |
+ AV_CODEC_PROP_LOSSLESS,
+},
+{
 .id= AV_CODEC_ID_GIF,
 .type  = AVMEDIA_TYPE_VIDEO,
 .name  = "gif",
diff --git a/libavcodec/fitsdec.c b/libavcodec/fitsdec.c
new file mode 100644
index 000..4efc675
--- /dev/null
+++ b/libavcodec/fitsdec.c
@@ -0,0 +1,505 @@
+/*
+ * FITS image decoder
+ * Copyright (c) 2017 Paras Chadha
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * FITS image decoder
+ *
+ * Specification: https://fits.gsfc.nasa.gov/fits_standard.html V

Re: [FFmpeg-devel] [PATCH] Add FITS Decoder

2017-07-02 Thread Paras Chadha
On Fri, Jun 30, 2017 at 6:38 PM, Nicolas George  wrote:

> Hi. A few technical / cosmetic remarks below. I do not know the FITS
> format itself more than in passing.
>
> Le duodi 12 messidor, an CCXXV, Paras Chadha a écrit :
> > Made the changes suggested above
> >
> > Signed-off-by: Paras Chadha 
> > ---
> >  Changelog   |   1 +
> >  doc/general.texi|   2 +
> >  libavcodec/Makefile |   1 +
> >  libavcodec/allcodecs.c  |   1 +
> >  libavcodec/avcodec.h|   1 +
> >  libavcodec/codec_desc.c |   8 +
> >  libavcodec/fitsdec.c| 580 ++
> ++
> >  libavcodec/version.h|   4 +-
> >  libavformat/img2.c  |   1 +
> >  9 files changed, 597 insertions(+), 2 deletions(-)
> >  create mode 100644 libavcodec/fitsdec.c
> >
> > diff --git a/Changelog b/Changelog
> > index a8726c6..2c2bdec 100644
> > --- a/Changelog
> > +++ b/Changelog
> > @@ -26,6 +26,7 @@ version :
> >--x86asmexe=yasm to configure to restore the old behavior.
> >  - additional frame format support for Interplay MVE movies
> >  - support for decoding through D3D11VA in ffmpeg
> > +- FITS demuxer and decoder
> >
> >  version 3.3:
> >  - CrystalHD decoder moved to new decode API
> > diff --git a/doc/general.texi b/doc/general.texi
> > index 8f582d5..c00ce32 100644
> > --- a/doc/general.texi
> > +++ b/doc/general.texi
> > @@ -591,6 +591,8 @@ following image formats are supported:
> >  @tab Digital Picture Exchange
> >  @item EXR  @tab   @tab X
> >  @tab OpenEXR
> > +@item FITS @tab   @tab X
> > +@tab Flexible Image Transport System
> >  @item JPEG @tab X @tab X
> >  @tab Progressive JPEG is not supported.
> >  @item JPEG 2000@tab X @tab X
> > diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> > index b440a00..729e95e 100644
> > --- a/libavcodec/Makefile
> > +++ b/libavcodec/Makefile
> > @@ -291,6 +291,7 @@ OBJS-$(CONFIG_FFV1_DECODER)+= ffv1dec.o
> ffv1.o
> >  OBJS-$(CONFIG_FFV1_ENCODER)+= ffv1enc.o ffv1.o
> >  OBJS-$(CONFIG_FFWAVESYNTH_DECODER) += ffwavesynth.o
> >  OBJS-$(CONFIG_FIC_DECODER) += fic.o
> > +OBJS-$(CONFIG_FITS_DECODER)+= fitsdec.o
> >  OBJS-$(CONFIG_FLAC_DECODER)+= flacdec.o flacdata.o flac.o
> >  OBJS-$(CONFIG_FLAC_ENCODER)+= flacenc.o flacdata.o flac.o
> vorbis_data.o
> >  OBJS-$(CONFIG_FLASHSV_DECODER) += flashsv.o
> > diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> > index 0243f47..a4cfd80 100644
> > --- a/libavcodec/allcodecs.c
> > +++ b/libavcodec/allcodecs.c
> > @@ -192,6 +192,7 @@ static void register_all(void)
> >  REGISTER_ENCDEC (FFV1,  ffv1);
> >  REGISTER_ENCDEC (FFVHUFF,   ffvhuff);
> >  REGISTER_DECODER(FIC,   fic);
> > +REGISTER_DECODER(FITS,  fits);
> >  REGISTER_ENCDEC (FLASHSV,   flashsv);
> >  REGISTER_ENCDEC (FLASHSV2,  flashsv2);
> >  REGISTER_DECODER(FLIC,  flic);
> > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> > index b697afa..8eba460 100644
> > --- a/libavcodec/avcodec.h
> > +++ b/libavcodec/avcodec.h
> > @@ -447,6 +447,7 @@ enum AVCodecID {
> >  AV_CODEC_ID_SRGC,
> >  AV_CODEC_ID_SVG,
> >  AV_CODEC_ID_GDV,
> > +AV_CODEC_ID_FITS,
> >
> >  /* various PCM "codecs" */
> >  AV_CODEC_ID_FIRST_AUDIO = 0x1, ///< A dummy id pointing at
> the start of audio codecs
> > diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
> > index cf1246e..0112517 100644
> > --- a/libavcodec/codec_desc.c
> > +++ b/libavcodec/codec_desc.c
> > @@ -1464,6 +1464,14 @@ static const AVCodecDescriptor
> codec_descriptors[] = {
> >   AV_CODEC_PROP_LOSSLESS,
> >  },
> >  {
> > +.id= AV_CODEC_ID_FITS,
> > +.type  = AVMEDIA_TYPE_VIDEO,
> > +.name  = "fits",
> > +.long_name = NULL_IF_CONFIG_SMALL("Flexible Image Transport
> System"),
> > +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY |
> > + AV_CODEC_PROP_LOSSLESS,
> > +},
> > +{
> >  .id= AV_CODEC_ID_GIF,
> >  .type  = AVMEDIA_TYPE_VIDEO,
> >  .name  = "gif",
> > diff --git a/libavcodec/fitsdec.c b/libavcodec/fitsdec.c
> > new file mode 100644
> > index 000..4eaf3c8
> > --- /dev/null
> > +++ b/libavcodec/fitsdec.c
> > @@ -0,0 +1,580 @@
> > +/*
> > + * FITS image decoder
> > + * Copyright (c) 2017 Paras Chadha
> > + *
> > + * This file is part of FFmpeg.
> > + *
> > + * FFmpeg is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU Lesser General Public
> > + * License as published by the Free Software Foundation; either
> > + * version 2.1 of the License, or (at your option) any later version.
> > + *
> > + * FFmpeg is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the impli

Re: [FFmpeg-devel] [PATCH] avcodec/htmlsubtitles: Be a bit more picky on syntax

2017-07-02 Thread wm4
On Sun,  2 Jul 2017 00:09:42 +0200
Michael Niedermayer  wrote:

> This reduces the number of strstr() calls per byte
> This diasalows empty tags like '< >' as well as '<' in tags like ''
> 
> Fixes timeout
> Fixes: 1817/clusterfuzz-testcase-minimized-5104230530547712
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/htmlsubtitles.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/htmlsubtitles.c b/libavcodec/htmlsubtitles.c
> index be5c9316ca..67abc94085 100644
> --- a/libavcodec/htmlsubtitles.c
> +++ b/libavcodec/htmlsubtitles.c
> @@ -110,13 +110,13 @@ int ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, 
> const char *in)
>  case '<':
>  tag_close = in[1] == '/';
>  len = 0;
> -if (sscanf(in+tag_close+1, "%127[^>]>%n", buffer, &len) >= 1 && 
> len > 0) {
> +if (sscanf(in+tag_close+1, "%127[^<>]>%n", buffer, &len) >= 1 && 
> len > 0) {
>  const char *tagname = buffer;
>  while (*tagname == ' ')
>  tagname++;
>  if ((param = strchr(tagname, ' ')))
>  *param++ = 0;
> -if ((!tag_close && sptr < FF_ARRAY_ELEMS(stack)) ||
> +if ((!tag_close && sptr < FF_ARRAY_ELEMS(stack) && *tagname) 
> ||
>  ( tag_close && sptr > 0 && !strcmp(stack[sptr-1].tag, 
> tagname))) {
>  int i, j, unknown = 0;
>  in += len + tag_close;

Invalid syntax is not unusual in SRT files. Are you sure this doesn't
make the output worse in files that do not use the syntax correctly?

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


Re: [FFmpeg-devel] [PATCH 1/3] avcodec/aacdec_template: Fix undefined integer overflow in apply_tns()

2017-07-02 Thread wm4
On Sun,  2 Jul 2017 04:28:54 +0200
Michael Niedermayer  wrote:

> Fixes: runtime error: signed integer overflow: -2147483648 - 1202286525 
> cannot be represented in type 'int'
> Fixes: 2071/clusterfuzz-testcase-minimized-6036414271586304
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/aac_defines.h | 2 ++
>  libavcodec/aacdec_template.c | 5 +++--
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/aac_defines.h b/libavcodec/aac_defines.h
> index 3c79a8a4a1..ee4c73a87d 100644
> --- a/libavcodec/aac_defines.h
> +++ b/libavcodec/aac_defines.h
> @@ -35,6 +35,7 @@
>  #define AAC_RENAME(x)   x ## _fixed
>  #define AAC_RENAME_32(x)x ## _fixed_32
>  typedef int INTFLOAT;
> +typedef unsignedSUINTFLOAT;
>  typedef int64_t INT64FLOAT;
>  typedef int16_t SHORTFLOAT;
>  typedef SoftFloat   AAC_FLOAT;
> @@ -83,6 +84,7 @@ typedef int AAC_SIGNE;
>  #define AAC_RENAME(x)   x
>  #define AAC_RENAME_32(x)x
>  typedef float   INTFLOAT;
> +typedef float   SUINTFLOAT;

Not more of this damn shit.

>  typedef float   INT64FLOAT;
>  typedef float   SHORTFLOAT;
>  typedef float   AAC_FLOAT;
> diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
> index 4b98142536..add333e862 100644
> --- a/libavcodec/aacdec_template.c
> +++ b/libavcodec/aacdec_template.c
> @@ -2389,7 +2389,7 @@ static int decode_extension_payload(AACContext *ac, 
> GetBitContext *gb, int cnt,
>   * @param   decode  1 if tool is used normally, 0 if tool is used in LTP.
>   * @param   coefspectral coefficients
>   */
> -static void apply_tns(INTFLOAT coef[1024], TemporalNoiseShaping *tns,
> +static void apply_tns(INTFLOAT coef_param[1024], TemporalNoiseShaping *tns,
>IndividualChannelStream *ics, int decode)
>  {
>  const int mmm = FFMIN(ics->tns_max_bands, ics->max_sfb);
> @@ -2397,6 +2397,7 @@ static void apply_tns(INTFLOAT coef[1024], 
> TemporalNoiseShaping *tns,
>  int bottom, top, order, start, end, size, inc;
>  INTFLOAT lpc[TNS_MAX_ORDER];
>  INTFLOAT tmp[TNS_MAX_ORDER+1];
> +SUINTFLOAT *coef = coef_param;
>  
>  for (w = 0; w < ics->num_windows; w++) {
>  bottom = ics->num_swb;
> @@ -2426,7 +2427,7 @@ static void apply_tns(INTFLOAT coef[1024], 
> TemporalNoiseShaping *tns,
>  // ar filter
>  for (m = 0; m < size; m++, start += inc)
>  for (i = 1; i <= FFMIN(m, order); i++)
> -coef[start] -= AAC_MUL26(coef[start - i * inc], 
> lpc[i - 1]);
> +coef[start] -= AAC_MUL26((INTFLOAT)coef[start - i * 
> inc], lpc[i - 1]);
>  } else {
>  // ma filter
>  for (m = 0; m < size; m++, start += inc) {

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


Re: [FFmpeg-devel] [PATCH 1/3] avcodec/aacdec_template: Fix undefined integer overflow in apply_tns()

2017-07-02 Thread Michael Niedermayer
On Sun, Jul 02, 2017 at 01:14:31PM +0200, wm4 wrote:
> On Sun,  2 Jul 2017 04:28:54 +0200
> Michael Niedermayer  wrote:
> 
> > Fixes: runtime error: signed integer overflow: -2147483648 - 1202286525 
> > cannot be represented in type 'int'
> > Fixes: 2071/clusterfuzz-testcase-minimized-6036414271586304
> > 
> > Found-by: continuous fuzzing process 
> > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  libavcodec/aac_defines.h | 2 ++
> >  libavcodec/aacdec_template.c | 5 +++--
> >  2 files changed, 5 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libavcodec/aac_defines.h b/libavcodec/aac_defines.h
> > index 3c79a8a4a1..ee4c73a87d 100644
> > --- a/libavcodec/aac_defines.h
> > +++ b/libavcodec/aac_defines.h
> > @@ -35,6 +35,7 @@
> >  #define AAC_RENAME(x)   x ## _fixed
> >  #define AAC_RENAME_32(x)x ## _fixed_32
> >  typedef int INTFLOAT;
> > +typedef unsignedSUINTFLOAT;
> >  typedef int64_t INT64FLOAT;
> >  typedef int16_t SHORTFLOAT;
> >  typedef SoftFloat   AAC_FLOAT;
> > @@ -83,6 +84,7 @@ typedef int AAC_SIGNE;
> >  #define AAC_RENAME(x)   x
> >  #define AAC_RENAME_32(x)x
> >  typedef float   INTFLOAT;
> > +typedef float   SUINTFLOAT;
> 
> Not more of this damn shit.

i dont think i understand your comment

The code is templated and uses largely the INTFLOAT data type
which is either signed int or float depending on if the code is build
for the fixed point or floating point decoder

to fix the undefined behavior in the fixed point decoder a type which
is unsigned int is the obvious choice.
Such type must be float in the floating point decoder.

This patch adds such type.

do you object to fixing the issue ?
do you want to suggest a different solution ?

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato


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


Re: [FFmpeg-devel] [PATCH] avcodec/htmlsubtitles: Be a bit more picky on syntax

2017-07-02 Thread Michael Niedermayer
On Sun, Jul 02, 2017 at 01:14:00PM +0200, wm4 wrote:
> On Sun,  2 Jul 2017 00:09:42 +0200
> Michael Niedermayer  wrote:
> 
> > This reduces the number of strstr() calls per byte
> > This diasalows empty tags like '< >' as well as '<' in tags like 
> > ''
> > 
> > Fixes timeout
> > Fixes: 1817/clusterfuzz-testcase-minimized-5104230530547712
> > 
> > Found-by: continuous fuzzing process 
> > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  libavcodec/htmlsubtitles.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libavcodec/htmlsubtitles.c b/libavcodec/htmlsubtitles.c
> > index be5c9316ca..67abc94085 100644
> > --- a/libavcodec/htmlsubtitles.c
> > +++ b/libavcodec/htmlsubtitles.c
> > @@ -110,13 +110,13 @@ int ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint 
> > *dst, const char *in)
> >  case '<':
> >  tag_close = in[1] == '/';
> >  len = 0;
> > -if (sscanf(in+tag_close+1, "%127[^>]>%n", buffer, &len) >= 1 
> > && len > 0) {
> > +if (sscanf(in+tag_close+1, "%127[^<>]>%n", buffer, &len) >= 1 
> > && len > 0) {
> >  const char *tagname = buffer;
> >  while (*tagname == ' ')
> >  tagname++;
> >  if ((param = strchr(tagname, ' ')))
> >  *param++ = 0;
> > -if ((!tag_close && sptr < FF_ARRAY_ELEMS(stack)) ||
> > +if ((!tag_close && sptr < FF_ARRAY_ELEMS(stack) && 
> > *tagname) ||
> >  ( tag_close && sptr > 0 && !strcmp(stack[sptr-1].tag, 
> > tagname))) {
> >  int i, j, unknown = 0;
> >  in += len + tag_close;
> 
> Invalid syntax is not unusual in SRT files. Are you sure this doesn't
> make the output worse in files that do not use the syntax correctly?

I do not know if this makes the output worse for files with invalid syntax
I also do not know if this makes the output better for files with invalid
syntax

i dont have a large library of (real world invalid syntax) srt files
whith which to find cases where it makes a difference.

You seem to know alot about srt, maybe you can pick some srt files
and add fate tests, so we have better coverage of odd and nasty cases

about this patch specifically, what do you suggest ?
should i try to fix this while maintaining existing behavior for
invalid syntax exactly? (i dont know how that code would look)

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

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.


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


Re: [FFmpeg-devel] [PATCH 3/3] avcodec/aacpsdsp_template: Fixes integer overflow in ps_add_squares_c()

2017-07-02 Thread Rostislav Pehlivanov
On 2 July 2017 at 03:28, Michael Niedermayer  wrote:

> Fixes: runtime error: signed integer overflow: 1965219850 + 995792909
> cannot be represented in type 'int'
> Fixes: part of 2096/clusterfuzz-testcase-minimized-4901566068817920
>
> Found-by: continuous fuzzing process https://github.com/google/oss-
> fuzz/tree/master/projects/ffmpeg
> Signed-off-by
> :
> Michael Niedermayer 
> ---
>  libavcodec/aacpsdsp_template.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/aacpsdsp_template.c b/libavcodec/aacpsdsp_
> template.c
> index 9e1a95c1a1..2c0afd4512 100644
> --- a/libavcodec/aacpsdsp_template.c
> +++ b/libavcodec/aacpsdsp_template.c
> @@ -26,9 +26,10 @@
>  #include "libavutil/attributes.h"
>  #include "aacpsdsp.h"
>
> -static void ps_add_squares_c(INTFLOAT *dst, const INTFLOAT (*src)[2], int
> n)
> +static void ps_add_squares_c(INTFLOAT *dst_param, const INTFLOAT
> (*src)[2], int n)
>  {
>  int i;
> +SUINTFLOAT *dst = dst_param;
>  for (i = 0; i < n; i++)
>  dst[i] += AAC_MADD28(src[i][0], src[i][0], src[i][1], src[i][1]);
>  }
>
>
What's the issue with just _not_ fixing it here? It only occurs on fuzzed
inputs, doesn't crash on any known platform ever, makes the code uglier and
why? Because some fuzzer is super pedantic.
Why not fix the fuzzer? Why not just mark this as a false positive, since
fixing it is pointless from the standpoint of security (you can't exploit
overflows in transforms or functions like this), and all developers hate it.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/alsdec: properly allocate raw_buffer

2017-07-02 Thread Thilo Borgmann
Am 01.07.17 um 03:38 schrieb Paul B Mahol:
> This also reverts 18f94df8.
> 
> Fixes #5297.
> 
> Signed-off-by: Paul B Mahol 
> ---
>  libavcodec/alsdec.c | 7 +--
>  1 file changed, 1 insertion(+), 6 deletions(-)
> [...]
> @@ -2062,7 +2057,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
>  channel_size  = sconf->frame_length + sconf->max_order;
>  
>  ctx->prev_raw_samples = av_malloc_array(sconf->max_order, 
> sizeof(*ctx->prev_raw_samples));
> -ctx->raw_buffer   = av_mallocz_array(avctx->channels * channel_size, 
> sizeof(*ctx->raw_buffer));
> +ctx->raw_buffer   = av_mallocz_array(avctx->channels * channel_size 
> + sconf->max_order, sizeof(*ctx->raw_buffer));
>  ctx->raw_samples  = av_malloc_array(avctx->channels, 
> sizeof(*ctx->raw_samples));

This looks like guessing only about a needed overhead to the raw buffer. What is
needed and actually done, is an overhead of max_order and that is already added
to the buffer length three lines above the proposed change. So this is nothing
more than guessing an overhead of 2*max_order should be enough but it does not
resolve knowingly any cause of the bug.

Therefore no, this still does not get applied until the actual reason of the bug
is found and properly fixed. I've got less time than I thought today and I could
not dive in as deep as I want. I cannot predict if there will be more time for
me to do it soon. So Paul, I'd appreciate if you could solve this bug but I will
only accept a proper patch and no guesswork.

-Thilo

p.s. I have the original pred.wav used by the ticket author and for me both
rm22rev2 and rm23 of the reference codec fail to decode pred.mp4 properly. Does
anyone else have the same problem with the reference codecs?

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


Re: [FFmpeg-devel] [PATCH] avcodec/mlz: simplify

2017-07-02 Thread Thilo Borgmann
Am 01.07.17 um 19:03 schrieb Paul B Mahol:
> On 7/1/17, Thilo Borgmann  wrote:
>> Am 01.07.17 um 14:42 schrieb Paul B Mahol:
>>> On 7/1/17, Michael Niedermayer  wrote:
 On Sat, Jul 01, 2017 at 02:18:17PM +0200, Paul B Mahol wrote:
> On 7/1/17, Michael Niedermayer  wrote:
>> On Sat, Jul 01, 2017 at 12:05:52PM +0200, Paul B Mahol wrote:
>>> Signed-off-by: Paul B Mahol 
>>> ---
>>>  libavcodec/mlz.c | 7 +--
>>>  1 file changed, 1 insertion(+), 6 deletions(-)
>>>
>>> diff --git a/libavcodec/mlz.c b/libavcodec/mlz.c
>>> index ebce796..715ea5c 100644
>>> --- a/libavcodec/mlz.c
>>> +++ b/libavcodec/mlz.c
>>> @@ -112,12 +112,7 @@ static int decode_string(MLZ* mlz, unsigned char
>>> *buff, int string_code, int *fi
>>>  }
>>>
>>>  static int input_code(GetBitContext* gb, int len) {
>>> -int tmp_code = 0;
>>> -int i;
>>> -for (i = 0; i < len; ++i) {
>>> -tmp_code |= get_bits1(gb) << i;
>>> -}
>>> -return tmp_code;
>>> +return get_bitsz(gb, len);
>>
>> have you tested this ? (seems not triggered in fate, i ve only found
>> fuzzed samples that trigger this with len >= 1 quickly)
>> isnt this the opposite endianness ?
>
> I created file with 22rev2 als encoder and decoding produce same hash,
> before and after this patch.
>
> ALS uses big endian bit reader.

 ok, but please change the commit message then as the code before and
 afterwards dont read in the same endianness so this is not a
 simplification but a bugfix then
>>>
>>> Hmm, on second look you are probably right.
>>> They changed to this in R23 version and I failed to create file that
>>> triggers this path.
>>> So I will not apply this mostly because R23 support needs more work.
>>
>> Do I understand correctly, this patch works with RM22 only and fails on
>> RM23?
> 
> Probably. I can not confirm because I failed to create sample with
> path that triggers this code.

Well it should get applied only if it could properly be tested for both
endianness cases.

-Thilo

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


Re: [FFmpeg-devel] [PATCH] avcodec/als: use planar sample formats

2017-07-02 Thread Thilo Borgmann
Am 01.07.17 um 22:23 schrieb Paul B Mahol:
> This is native layout of this codec.

From where is that definition?

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


Re: [FFmpeg-devel] [PATCH] avcodec/alsdec: properly allocate raw_buffer

2017-07-02 Thread Paul B Mahol
On 7/2/17, Thilo Borgmann  wrote:
> Am 01.07.17 um 03:38 schrieb Paul B Mahol:
>> This also reverts 18f94df8.
>>
>> Fixes #5297.
>>
>> Signed-off-by: Paul B Mahol 
>> ---
>>  libavcodec/alsdec.c | 7 +--
>>  1 file changed, 1 insertion(+), 6 deletions(-)
>> [...]
>> @@ -2062,7 +2057,7 @@ static av_cold int decode_init(AVCodecContext
>> *avctx)
>>  channel_size  = sconf->frame_length + sconf->max_order;
>>
>>  ctx->prev_raw_samples = av_malloc_array(sconf->max_order,
>> sizeof(*ctx->prev_raw_samples));
>> -ctx->raw_buffer   = av_mallocz_array(avctx->channels *
>> channel_size, sizeof(*ctx->raw_buffer));
>> +ctx->raw_buffer   = av_mallocz_array(avctx->channels *
>> channel_size + sconf->max_order, sizeof(*ctx->raw_buffer));
>>  ctx->raw_samples  = av_malloc_array(avctx->channels,
>> sizeof(*ctx->raw_samples));
>
> This looks like guessing only about a needed overhead to the raw buffer.
> What is
> needed and actually done, is an overhead of max_order and that is already
> added
> to the buffer length three lines above the proposed change. So this is
> nothing
> more than guessing an overhead of 2*max_order should be enough but it does
> not
> resolve knowingly any cause of the bug.
>
> Therefore no, this still does not get applied until the actual reason of the
> bug
> is found and properly fixed. I've got less time than I thought today and I
> could
> not dive in as deep as I want. I cannot predict if there will be more time
> for
> me to do it soon. So Paul, I'd appreciate if you could solve this bug but I
> will
> only accept a proper patch and no guesswork.

This is not guesswork, The raw buffers needs this enough bytes.

See this line:
ctx->raw_samples[0] = ctx->raw_buffer + sconf->max_order;

>
> -Thilo
>
> p.s. I have the original pred.wav used by the ticket author and for me both
> rm22rev2 and rm23 of the reference codec fail to decode pred.mp4 properly.
> Does
> anyone else have the same problem with the reference codecs?

Reference code crashes all the time.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] avcodec/alsdec: call correct function for multi-channel coding

2017-07-02 Thread Thilo Borgmann
Am 01.07.17 um 22:23 schrieb Paul B Mahol:
> Fixes #5942.
> 
> Signed-off-by: Paul B Mahol 
> ---
>  libavcodec/alsdec.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

OK if tested.

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


Re: [FFmpeg-devel] [PATCH] avcodec/alsdec: properly allocate raw_buffer

2017-07-02 Thread Thilo Borgmann
Am 02.07.17 um 16:13 schrieb Paul B Mahol:
> On 7/2/17, Thilo Borgmann  wrote:
>> Am 01.07.17 um 03:38 schrieb Paul B Mahol:
>>> This also reverts 18f94df8.
>>>
>>> Fixes #5297.
>>>
>>> Signed-off-by: Paul B Mahol 
>>> ---
>>>  libavcodec/alsdec.c | 7 +--
>>>  1 file changed, 1 insertion(+), 6 deletions(-)
>>> [...]
>>> @@ -2062,7 +2057,7 @@ static av_cold int decode_init(AVCodecContext
>>> *avctx)
>>>  channel_size  = sconf->frame_length + sconf->max_order;
>>>
>>>  ctx->prev_raw_samples = av_malloc_array(sconf->max_order,
>>> sizeof(*ctx->prev_raw_samples));
>>> -ctx->raw_buffer   = av_mallocz_array(avctx->channels *
>>> channel_size, sizeof(*ctx->raw_buffer));
>>> +ctx->raw_buffer   = av_mallocz_array(avctx->channels *
>>> channel_size + sconf->max_order, sizeof(*ctx->raw_buffer));
>>>  ctx->raw_samples  = av_malloc_array(avctx->channels,
>>> sizeof(*ctx->raw_samples));
>>
>> This looks like guessing only about a needed overhead to the raw buffer.
>> What is
>> needed and actually done, is an overhead of max_order and that is already
>> added
>> to the buffer length three lines above the proposed change. So this is
>> nothing
>> more than guessing an overhead of 2*max_order should be enough but it does
>> not
>> resolve knowingly any cause of the bug.
>>
>> Therefore no, this still does not get applied until the actual reason of the
>> bug
>> is found and properly fixed. I've got less time than I thought today and I
>> could
>> not dive in as deep as I want. I cannot predict if there will be more time
>> for
>> me to do it soon. So Paul, I'd appreciate if you could solve this bug but I
>> will
>> only accept a proper patch and no guesswork.
> 
> This is not guesswork, The raw buffers needs this enough bytes.
> 
> See this line:
> ctx->raw_samples[0] = ctx->raw_buffer + sconf->max_order;

No. The first max_order samples in the raw_buffer are used and the additional
size needed for them is already accounted for in calculation of channel_size
some lines above the allocation.
This leads to raw_samples[0][0] is max_order sample values after the beginning
of the buffer so that negative indices of raw_samples[0] work properly.

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


Re: [FFmpeg-devel] [PATCH] avcodec/als: use planar sample formats

2017-07-02 Thread Paul B Mahol
On 7/2/17, Thilo Borgmann  wrote:
> Am 01.07.17 um 22:23 schrieb Paul B Mahol:
>> This is native layout of this codec.
>
> From where is that definition?

See how samples are stored in raw buffers.

Many codecs do not do interleaving and that work is left to another library.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/mlz: simplify

2017-07-02 Thread Paul B Mahol
On 7/2/17, Thilo Borgmann  wrote:
> Am 01.07.17 um 19:03 schrieb Paul B Mahol:
>> On 7/1/17, Thilo Borgmann  wrote:
>>> Am 01.07.17 um 14:42 schrieb Paul B Mahol:
 On 7/1/17, Michael Niedermayer  wrote:
> On Sat, Jul 01, 2017 at 02:18:17PM +0200, Paul B Mahol wrote:
>> On 7/1/17, Michael Niedermayer  wrote:
>>> On Sat, Jul 01, 2017 at 12:05:52PM +0200, Paul B Mahol wrote:
 Signed-off-by: Paul B Mahol 
 ---
  libavcodec/mlz.c | 7 +--
  1 file changed, 1 insertion(+), 6 deletions(-)

 diff --git a/libavcodec/mlz.c b/libavcodec/mlz.c
 index ebce796..715ea5c 100644
 --- a/libavcodec/mlz.c
 +++ b/libavcodec/mlz.c
 @@ -112,12 +112,7 @@ static int decode_string(MLZ* mlz, unsigned
 char
 *buff, int string_code, int *fi
  }

  static int input_code(GetBitContext* gb, int len) {
 -int tmp_code = 0;
 -int i;
 -for (i = 0; i < len; ++i) {
 -tmp_code |= get_bits1(gb) << i;
 -}
 -return tmp_code;
 +return get_bitsz(gb, len);
>>>
>>> have you tested this ? (seems not triggered in fate, i ve only found
>>> fuzzed samples that trigger this with len >= 1 quickly)
>>> isnt this the opposite endianness ?
>>
>> I created file with 22rev2 als encoder and decoding produce same hash,
>> before and after this patch.
>>
>> ALS uses big endian bit reader.
>
> ok, but please change the commit message then as the code before and
> afterwards dont read in the same endianness so this is not a
> simplification but a bugfix then

 Hmm, on second look you are probably right.
 They changed to this in R23 version and I failed to create file that
 triggers this path.
 So I will not apply this mostly because R23 support needs more work.
>>>
>>> Do I understand correctly, this patch works with RM22 only and fails on
>>> RM23?
>>
>> Probably. I can not confirm because I failed to create sample with
>> path that triggers this code.
>
> Well it should get applied only if it could properly be tested for both
> endianness cases.

Yes, until then I will not apply this. As float code works fine with R22rev2.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] Add FITS Demuxer

2017-07-02 Thread Paras Chadha
Filled buf with 0 to prevent overfow
Also added checks for integer overflow

Signed-off-by: Paras Chadha 
---
 libavformat/Makefile |   1 +
 libavformat/allformats.c |   1 +
 libavformat/fitsdec.c| 224 +++
 libavformat/version.h|   2 +-
 4 files changed, 227 insertions(+), 1 deletion(-)
 create mode 100644 libavformat/fitsdec.c

diff --git a/libavformat/Makefile b/libavformat/Makefile
index 80aeed2..1d43c05 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -164,6 +164,7 @@ OBJS-$(CONFIG_FFMETADATA_MUXER)  += ffmetaenc.o
 OBJS-$(CONFIG_FIFO_MUXER)+= fifo.o
 OBJS-$(CONFIG_FILMSTRIP_DEMUXER) += filmstripdec.o
 OBJS-$(CONFIG_FILMSTRIP_MUXER)   += filmstripenc.o
+OBJS-$(CONFIG_FITS_DEMUXER)  += fitsdec.o
 OBJS-$(CONFIG_FLAC_DEMUXER)  += flacdec.o rawdec.o \
 flac_picture.o   \
 oggparsevorbis.o \
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index a0e2fb8..74a2e15 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -121,6 +121,7 @@ static void register_all(void)
 REGISTER_MUXDEMUX(FFMETADATA,   ffmetadata);
 REGISTER_MUXER   (FIFO, fifo);
 REGISTER_MUXDEMUX(FILMSTRIP,filmstrip);
+REGISTER_DEMUXER (FITS, fits);
 REGISTER_MUXDEMUX(FLAC, flac);
 REGISTER_DEMUXER (FLIC, flic);
 REGISTER_MUXDEMUX(FLV,  flv);
diff --git a/libavformat/fitsdec.c b/libavformat/fitsdec.c
new file mode 100644
index 000..3670fbf
--- /dev/null
+++ b/libavformat/fitsdec.c
@@ -0,0 +1,224 @@
+/*
+ * FITS demuxer
+ * Copyright (c) 2017 Paras Chadha
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * FITS demuxer.
+ */
+
+#include "libavutil/intreadwrite.h"
+#include "internal.h"
+#include "libavutil/opt.h"
+
+typedef struct FITSContext {
+const AVClass *class;
+AVRational framerate;
+int image;
+int64_t pts;
+} FITSContext;
+
+static int fits_probe(AVProbeData *p)
+{
+const uint8_t *b = p->buf;
+
+if (AV_RB32(b) == 0x53494d50 && AV_RB16(b+4) == 0x4c45)
+return AVPROBE_SCORE_MAX - 1;
+return 0;
+}
+
+static int fits_read_header(AVFormatContext *s)
+{
+AVStream *st = avformat_new_stream(s, NULL);
+FITSContext * fits = s->priv_data;
+
+if (!st)
+return AVERROR(ENOMEM);
+
+st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+st->codecpar->codec_id = AV_CODEC_ID_FITS;
+
+avpriv_set_pts_info(st, 64, fits->framerate.den, fits->framerate.num);
+fits->pts = 0;
+return 0;
+}
+
+static int64_t find_size(AVIOContext * pb, FITSContext * fits)
+{
+int bitpix, naxis, dim_no, i, naxisn[999], groups=0;
+int64_t header_size = 0, data_size=0, ret, pcount=0, gcount=1, d;
+char buf[81], c;
+
+memset(buf, 0, 81);
+if ((ret = avio_read(pb, buf, 80)) != 80)
+return AVERROR_EOF;
+if (!strncmp(buf, "SIMPLE", 6) || !strncmp(buf, "XTENSION= 'IMAGE", 16)) {
+fits->image = 1;
+} else {
+fits->image = 0;
+}
+header_size += 80;
+
+if ((ret = avio_read(pb, buf, 80)) != 80)
+return AVERROR_EOF;
+if (sscanf(buf, "BITPIX = %d", &bitpix) != 1)
+return AVERROR_INVALIDDATA;
+header_size += 80;
+
+if ((ret = avio_read(pb, buf, 80)) != 80)
+return AVERROR_EOF;
+if (sscanf(buf, "NAXIS = %d", &naxis) != 1)
+return AVERROR_INVALIDDATA;
+header_size += 80;
+
+for (i = 0; i < naxis; i++) {
+if ((ret = avio_read(pb, buf, 80)) != 80)
+return AVERROR_EOF;
+if (sscanf(buf, "NAXIS%d = %d", &dim_no, &naxisn[i]) != 2)
+return AVERROR_INVALIDDATA;
+if (dim_no != i+1)
+return AVERROR_INVALIDDATA;
+header_size += 80;
+}
+
+if ((ret = avio_read(pb, buf, 80)) != 80)
+return AVERROR_EOF;
+header_size += 80;
+
+while (strncmp(buf, "END", 3)) {
+if (sscanf(buf, "PCOUNT = %ld", &d) == 1) {
+pcount = d;
+} else if (sscanf(buf, "GCOUNT = %ld", &d) == 1) {
+gcount = d;
+} else if (sscanf(buf

Re: [FFmpeg-devel] [PATCH 0/5] hvc1 Support Cherry-Picks

2017-07-02 Thread Derek Buitenhuis
On 6/28/2017 4:41 PM, Derek Buitenhuis wrote:
> Apple software and devices requrie hvc1. This patchset was originally
> sent to Libav for this same purpose.
> 
> John Stebbins (5):
>   movenc: use correct tag list for AVOutputFormat.codec_tag
>   movenc: simplify codec_tag lookup
>   movenc: move tags definitions to where they are used
>   movenc: write correct format hvcc when tag is hvc1
>   movenc: allow alternative hvc1 h.265 codec tag
> 
>  libavformat/movenc.c | 178 
> ++-
>  1 file changed, 90 insertions(+), 88 deletions(-)

Ping.

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


Re: [FFmpeg-devel] [PATCH 0/5] hvc1 Support Cherry-Picks

2017-07-02 Thread Paul B Mahol
On 7/2/17, Derek Buitenhuis  wrote:
> On 6/28/2017 4:41 PM, Derek Buitenhuis wrote:
>> Apple software and devices requrie hvc1. This patchset was originally
>> sent to Libav for this same purpose.
>>
>> John Stebbins (5):
>>   movenc: use correct tag list for AVOutputFormat.codec_tag
>>   movenc: simplify codec_tag lookup
>>   movenc: move tags definitions to where they are used
>>   movenc: write correct format hvcc when tag is hvc1
>>   movenc: allow alternative hvc1 h.265 codec tag
>>
>>  libavformat/movenc.c | 178
>> ++-
>>  1 file changed, 90 insertions(+), 88 deletions(-)
>
> Ping.
>
> - Derek
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

It looks fine to me.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/alsdec: relax opt_order limit

2017-07-02 Thread Paul B Mahol
On 6/11/16, Thilo Borgmann  wrote:
>
> Hi,
>
>> Am 09.06.2016 um 03:33 schrieb Michael Niedermayer
>> :
>>
>> Fixes: Ticket5297
>>
>> Needs review by maintainer / author to check that this is ok and
>> sufficient
>> ---
>> libavcodec/alsdec.c |   10 +-
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> I'll have a look but I need some more days to do so.
>
> -Thilo
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

Looks like Michael had same idea like I.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] libavformat/gdv: Fix parsing for soundless video

2017-07-02 Thread Azamat H. Hackimov
Added 2 byte skipping if there no sound present, that fixes playback
files without sound stream.
---
 libavformat/gdv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/gdv.c b/libavformat/gdv.c
index 90692bd61c..32209320a7 100644
--- a/libavformat/gdv.c
+++ b/libavformat/gdv.c
@@ -107,6 +107,8 @@ static int gdv_read_header(AVFormatContext *ctx)
 gdv->audio_size = (ast->codecpar->sample_rate / fps) *
ast->codecpar->channels * (1 + !!(snd_flags & 4)) / 
(1 + !!(snd_flags & 8));
 gdv->is_audio = 1;
+} else {
+avio_skip(pb, 2);
 }
 vid_depth = avio_rl16(pb);
 avio_skip(pb, 4);
-- 
2.13.0

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


[FFmpeg-devel] [PATCH] libavformat/gdv: Fix parsing for soundless video

2017-07-02 Thread Azamat H. Hackimov
Added 2 byte skipping if there no sound present, that fixes playback
files without sound stream.
---
 libavformat/gdv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/gdv.c b/libavformat/gdv.c
index 90692bd61c..32209320a7 100644
--- a/libavformat/gdv.c
+++ b/libavformat/gdv.c
@@ -107,6 +107,8 @@ static int gdv_read_header(AVFormatContext *ctx)
 gdv->audio_size = (ast->codecpar->sample_rate / fps) *
ast->codecpar->channels * (1 + !!(snd_flags & 4)) / 
(1 + !!(snd_flags & 8));
 gdv->is_audio = 1;
+} else {
+avio_skip(pb, 2);
 }
 vid_depth = avio_rl16(pb);
 avio_skip(pb, 4);
-- 
2.13.0

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


[FFmpeg-devel] [PATCH] avcodec/interplayvideo: Check sizes of decode buffers

2017-07-02 Thread Hein-Pieter van Braam
Fixes: 6503 crash with fuzzed file
---
 libavcodec/interplayvideo.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index d6f484a..4b0e36d 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -972,6 +972,8 @@ static void ipvideo_decode_format_06_opcodes(IpvideoContext 
*s, AVFrame *frame)
 x, y, opcode, bytestream2_tell(&s->stream_ptr));
 
 s->pixel_ptr = frame->data[0] + x + y * frame->linesize[0];
+if (s->pixel_ptr >= (s->pixel_ptr + 
s->upper_motion_limit_offset))
+return;
 ipvideo_format_06_passes[pass](s, frame, opcode);
 }
 }
@@ -1043,6 +1045,12 @@ static void 
ipvideo_decode_format_10_opcodes(IpvideoContext *s, AVFrame *frame)
 for (y = 0; y < s->avctx->height; y += 8) {
 for (x = 0; x < s->avctx->width; x += 8) {
 s->pixel_ptr = s->cur_decode_frame->data[0] + x + y * 
s->cur_decode_frame->linesize[0];
+if (s->pixel_ptr > s->pixel_ptr + s->upper_motion_limit_offset)
+return;
+
+if (s->cur_decode_frame->width != s->avctx->width ||
+s->cur_decode_frame->height != s->avctx->height)
+return;
 
 while (skip <= 0)  {
 if (skip != -0x8000 && skip) {
-- 
2.9.4

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


Re: [FFmpeg-devel] [PATCH] avcodec/interplayvideo: Check sizes of decode buffers

2017-07-02 Thread Hein-Pieter van Braam
On Sun, 2017-07-02 at 23:24 +0200, Hein-Pieter van Braam wrote:
> Fixes: 6503 crash with fuzzed file
> ---

I messed this up, I'll try to be more careful next time. v2 coming.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH v2] avcodec/interplayvideo: Check sizes of decode buffers

2017-07-02 Thread Hein-Pieter van Braam
Fixes: 6503 crash with fuzzed file

Signed-off-by: Hein-Pieter van Braam 
---
 libavcodec/interplayvideo.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index d6f484a..86530e6 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -972,6 +972,8 @@ static void ipvideo_decode_format_06_opcodes(IpvideoContext 
*s, AVFrame *frame)
 x, y, opcode, bytestream2_tell(&s->stream_ptr));
 
 s->pixel_ptr = frame->data[0] + x + y * frame->linesize[0];
+if (s->pixel_ptr > (s->pixel_ptr + 
s->upper_motion_limit_offset))
+return;
 ipvideo_format_06_passes[pass](s, frame, opcode);
 }
 }
@@ -1043,6 +1045,12 @@ static void 
ipvideo_decode_format_10_opcodes(IpvideoContext *s, AVFrame *frame)
 for (y = 0; y < s->avctx->height; y += 8) {
 for (x = 0; x < s->avctx->width; x += 8) {
 s->pixel_ptr = s->cur_decode_frame->data[0] + x + y * 
s->cur_decode_frame->linesize[0];
+if (s->pixel_ptr > s->pixel_ptr + s->upper_motion_limit_offset)
+return;
+
+if (s->cur_decode_frame->width != s->avctx->width ||
+s->cur_decode_frame->height != s->avctx->height)
+return;
 
 while (skip <= 0)  {
 if (skip != -0x8000 && skip) {
-- 
2.9.4

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


Re: [FFmpeg-devel] [PATCH] Add FITS Demuxer

2017-07-02 Thread Moritz Barsnick
On Sun, Jul 02, 2017 at 20:48:17 +0530, Paras Chadha wrote:
> +int64_t header_size = 0, data_size=0, ret, pcount=0, gcount=1, d;
[...]
> +header_size += 80;
[...]
> +header_size += 80;
[...]
> +header_size += 80;
[...]
> +for (i = 0; i < naxis; i++) {
[...]
> +header_size += 80;
[...]
> +header_size += 80;
[...]
> +while (strncmp(buf, "END", 3)) {
[...]
> +header_size += 80;
> +}
> +
> +header_size = ceil(header_size/2880.0)*2880;
> +if (header_size < 0)
> +return AVERROR_INVALIDDATA;

How can this happen, except by integer overflow?

> +if (data_size < 0)
> +return AVERROR_INVALIDDATA;
> +
> +if (!data_size) {
> +fits->image = 0;
> +} else {
> +data_size = ceil(data_size/2880.0)*2880;
> +if (data_size < 0)
> +return AVERROR_INVALIDDATA;

How can this occur?

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


Re: [FFmpeg-devel] [PATCH 3/3] avcodec/aacpsdsp_template: Fixes integer overflow in ps_add_squares_c()

2017-07-02 Thread Michael Niedermayer
On Sun, Jul 02, 2017 at 02:24:53PM +0100, Rostislav Pehlivanov wrote:
> On 2 July 2017 at 03:28, Michael Niedermayer  wrote:
> 
> > Fixes: runtime error: signed integer overflow: 1965219850 + 995792909
> > cannot be represented in type 'int'
> > Fixes: part of 2096/clusterfuzz-testcase-minimized-4901566068817920
> >
> > Found-by: continuous fuzzing process https://github.com/google/oss-
> > fuzz/tree/master/projects/ffmpeg
> > Signed-off-by
> > :
> > Michael Niedermayer 
> > ---
> >  libavcodec/aacpsdsp_template.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/aacpsdsp_template.c b/libavcodec/aacpsdsp_
> > template.c
> > index 9e1a95c1a1..2c0afd4512 100644
> > --- a/libavcodec/aacpsdsp_template.c
> > +++ b/libavcodec/aacpsdsp_template.c
> > @@ -26,9 +26,10 @@
> >  #include "libavutil/attributes.h"
> >  #include "aacpsdsp.h"
> >
> > -static void ps_add_squares_c(INTFLOAT *dst, const INTFLOAT (*src)[2], int
> > n)
> > +static void ps_add_squares_c(INTFLOAT *dst_param, const INTFLOAT
> > (*src)[2], int n)
> >  {
> >  int i;
> > +SUINTFLOAT *dst = dst_param;
> >  for (i = 0; i < n; i++)
> >  dst[i] += AAC_MADD28(src[i][0], src[i][0], src[i][1], src[i][1]);
> >  }
> >
> >
> What's the issue with just _not_ fixing it here? It only occurs on fuzzed
> inputs, doesn't crash on any known platform ever, makes the code uglier and
> why? Because some fuzzer is super pedantic.
> Why not fix the fuzzer? Why not just mark this as a false positive, since
> fixing it is pointless from the standpoint of security (you can't exploit
> overflows in transforms or functions like this), and all developers hate it.

Iam not sure you understand the problem.
signed integer overflows are undefined behavior, undefined behavior
is not allowed in C.


Theres also no option to mark anything as false positive.
If the tool makes a mistake, the issue needs to be reported to its
authors and needs to be fixed.
I belive the tool is correct, if someone thinks its not correct, the
place to report this to is likely where the clang sanitizers are
developed.

I do understand that this is annoying but this is how C works.

About "doesn't crash on any known platform ever",
"you can't exploit  overflows in transforms or functions like this"

undefined behavior has bitten people with unexpected results in the
past. for example "if (a+b < a)" to test for overflow, but because the condition
can only be true in case of overflow and overflow isnt allowed in C
the compiler didnt assemble this the way the human thought.

In the case of ps_add_squares_c(), dst[i] has to increase if iam
not mistaken. In case of overflow it can decrease but overflow is
not allowed so a compiler can prune anything that implies dst[] to be
negative.
dst[] is used downstream in checks of greater / less and in FFMAX
In this code the compiler can assume that the sign bit is clear,
what happens when  the compilers optimizer has false assumtations
i dont know but i know its not good.

That said even if no such chain of conditions exist its still invalid
code if theres undefined behavior in it

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange


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


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

2017-07-02 Thread Michael Niedermayer
On Sun, Jul 02, 2017 at 11:34:11AM +0530, Ashish Singh wrote:
> This patch fixes most of the styling and coding issues of the previous VMAF 
> patches.
> 
> ---
>  configure|   5 +
>  libavfilter/Makefile |   1 +
>  libavfilter/allfilters.c |   1 +
>  libavfilter/vf_vmaf.c| 400 
> +++
>  4 files changed, 407 insertions(+)
>  create mode 100644 libavfilter/vf_vmaf.c
> 
> diff --git a/configure b/configure
> index 5ae5227..faaf236 100755
> --- a/configure
> +++ b/configure
> @@ -259,6 +259,7 @@ External library support:
>--enable-libtwolame  enable MP2 encoding via libtwolame [no]
>--enable-libv4l2 enable libv4l2/v4l-utils [no]
>--enable-libvidstab  enable video stabilization using vid.stab [no]
> +  --enable-libvmaf enable vmaf filter via libvmaf [no]
>--enable-libvo-amrwbenc  enable AMR-WB encoding via libvo-amrwbenc [no]
>--enable-libvorbis   enable Vorbis en/decoding via libvorbis,
> native implementation exists [no]
> @@ -1569,6 +1570,7 @@ EXTERNAL_LIBRARY_LIST="
>  libtheora
>  libtwolame
>  libv4l2
> +libvmaf
>  libvorbis
>  libvpx
>  libwavpack

> @@ -2878,6 +2880,7 @@ libspeex_encoder_deps="libspeex"
>  libspeex_encoder_select="audio_frame_queue"
>  libtheora_encoder_deps="libtheora"
>  libtwolame_encoder_deps="libtwolame"
> +libvmaf_filter_deps="libvmaf"
>  libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
>  libvorbis_decoder_deps="libvorbis"
>  libvorbis_encoder_deps="libvorbis"

The filter is not called libvmaf filter thus this dependancy is ignored

CC  libavfilter/vf_vmaf.o
libavfilter/vf_vmaf.c:30:21: fatal error: libvmaf.h: No such file or directory
 #include 


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

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin


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


Re: [FFmpeg-devel] [PATCH 2/5] movenc: simplify codec_tag lookup

2017-07-02 Thread Michael Niedermayer
On Wed, Jun 28, 2017 at 04:41:59PM +0100, Derek Buitenhuis wrote:
> From: John Stebbins 
> 
> mux.c init_muxer() already sets codec_tag correctly in the cases
> simplified here.
> 
> This also adds the capability to support alternative tags for the
> same codec_id.
> 
> (cherry picked from commit f6f86f432fe51526a7aad2bdb025d6a45d239883)
> Signed-off-by: Derek Buitenhuis 
> ---
>  libavformat/movenc.c | 68 
> 
>  1 file changed, 15 insertions(+), 53 deletions(-)

breaks fate

TESTcopy-trac3074
--- ./tests/ref/fate/copy-trac3074  2017-07-02 00:09:52.091619495 +0200
+++ tests/data/fate/copy-trac3074   2017-07-03 03:16:18.208151309 +0200
@@ -1,4 +1,4 @@
-39aef1afff761d673fd1be07182941d1 *tests/data/fate/copy-trac3074.mp4
+364bdfb3ed40bf4a3517f978f6b7b9e3 *tests/data/fate/copy-trac3074.mp4
 333991 tests/data/fate/copy-trac3074.mp4
 #tb 0: 1/48000
 #media_type 0: audio
Test copy-trac3074 failed. Look at tests/data/fate/copy-trac3074.err for 
details.


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

Modern terrorism, a quick summary: Need oil, start war with country that
has oil, kill hundread thousand in war. Let country fall into chaos,
be surprised about raise of fundamantalists. Drop more bombs, kill more
people, be surprised about them taking revenge and drop even more bombs
and strip your own citizens of their rights and freedoms. to be continued


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


Re: [FFmpeg-devel] [PATCH 1/5] movenc: use correct tag list for AVOutputFormat.codec_tag

2017-07-02 Thread James Almer
On 6/28/2017 12:41 PM, Derek Buitenhuis wrote:
> From: John Stebbins 
> 
> ff_mp4_obj_type contains the wrong type of tags for
> AVOutputFormat.codec_tag. AVOutputFormat.codec_tag is used to
> validate AVCodecParameters.codec_tag so needs to be the same
> type of tag.
> 
> Creates new tag lists for mp4 and ismv.  New tag lists support
> same list of codecs found in ff_mp4_obj_type. psp uses the same
> tag list as mp4 since these both use mp4_get_codec_tag to look up tags.
> 
> (cherry picked from commit 713efb2c0d013a42be4051adb7cd90a7c2cbbb4f)
> Signed-off-by: Derek Buitenhuis 
> ---
>  libavformat/movenc.c | 42 +++---
>  1 file changed, 39 insertions(+), 3 deletions(-)
> 
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index ca389e3..2a07e00 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -6488,6 +6488,41 @@ static int mov_check_bitstream(struct AVFormatContext 
> *s, const AVPacket *pkt)
>  return ret;
>  }
>  
> +const AVCodecTag codec_mp4_tags[] = {
> +{ AV_CODEC_ID_MPEG4   , MKTAG('m', 'p', '4', 'v') },
> +{ AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') },
> +{ AV_CODEC_ID_HEVC, MKTAG('h', 'e', 'v', '1') },
> +{ AV_CODEC_ID_MPEG2VIDEO  , MKTAG('m', 'p', '4', 'v') },
> +{ AV_CODEC_ID_MPEG1VIDEO  , MKTAG('m', 'p', '4', 'v') },
> +{ AV_CODEC_ID_MJPEG   , MKTAG('m', 'p', '4', 'v') },
> +{ AV_CODEC_ID_PNG , MKTAG('m', 'p', '4', 'v') },
> +{ AV_CODEC_ID_JPEG2000, MKTAG('m', 'p', '4', 'v') },
> +{ AV_CODEC_ID_VC1 , MKTAG('v', 'c', '-', '1') },
> +{ AV_CODEC_ID_DIRAC   , MKTAG('d', 'r', 'a', 'c') },
> +{ AV_CODEC_ID_TSCC2   , MKTAG('m', 'p', '4', 'v') },
> +{ AV_CODEC_ID_VP9 , MKTAG('v', 'p', '0', '9') },
> +{ AV_CODEC_ID_EVR , MKTAG('m', 'p', '4', 'v') },
> +{ AV_CODEC_ID_AAC , MKTAG('m', 'p', '4', 'a') },
> +{ AV_CODEC_ID_MP4ALS  , MKTAG('m', 'p', '4', 'a') },
> +{ AV_CODEC_ID_MP3 , MKTAG('m', 'p', '4', 'a') },
> +{ AV_CODEC_ID_MP2 , MKTAG('m', 'p', '4', 'a') },
> +{ AV_CODEC_ID_AC3 , MKTAG('a', 'c', '-', '3') },
> +{ AV_CODEC_ID_EAC3, MKTAG('a', 'c', '-', '3') },

Should be ec-3. Changing it fixes fate-copy-trac3074 as pointed by
Michael in a reply to patch 2/5.

> +{ AV_CODEC_ID_DTS , MKTAG('m', 'p', '4', 'a') },

Doesn't DTS have a bunch of unique tags? The ones listed in
ff_codec_movaudio_tags and http://www.mp4ra.org/codecs.html

> +{ AV_CODEC_ID_FLAC, MKTAG('f', 'L', 'a', 'C') },
> +{ AV_CODEC_ID_OPUS, MKTAG('O', 'p', 'u', 's') },
> +{ AV_CODEC_ID_VORBIS  , MKTAG('m', 'p', '4', 'a') },
> +{ AV_CODEC_ID_QCELP   , MKTAG('m', 'p', '4', 'a') },
> +{ AV_CODEC_ID_DVD_SUBTITLE, MKTAG('m', 'p', '4', 's') },
> +{ AV_CODEC_ID_MOV_TEXT, MKTAG('t', 'x', '3', 'g') },
> +{ AV_CODEC_ID_NONE,0 },
> +};
> +
> +const AVCodecTag codec_ism_tags[] = {
> +{ AV_CODEC_ID_WMAPRO  , MKTAG('w', 'm', 'a', ' ') },
> +{ AV_CODEC_ID_NONE,0 },
> +};
> +
>  #if CONFIG_MOV_MUXER
>  MOV_CLASS(mov)
>  AVOutputFormat ff_mov_muxer = {
> @@ -6548,7 +6583,7 @@ AVOutputFormat ff_mp4_muxer = {
>  .write_trailer = mov_write_trailer,
>  .deinit= mov_free,
>  .flags = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | 
> AVFMT_TS_NEGATIVE,
> -.codec_tag = (const AVCodecTag* const []){ ff_mp4_obj_type, 0 },
> +.codec_tag = (const AVCodecTag* const []){ codec_mp4_tags, 0 },
>  .check_bitstream   = mov_check_bitstream,
>  .priv_class= &mp4_muxer_class,
>  };
> @@ -6569,7 +6604,7 @@ AVOutputFormat ff_psp_muxer = {
>  .write_trailer = mov_write_trailer,
>  .deinit= mov_free,
>  .flags = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | 
> AVFMT_TS_NEGATIVE,
> -.codec_tag = (const AVCodecTag* const []){ ff_mp4_obj_type, 0 },
> +.codec_tag = (const AVCodecTag* const []){ codec_mp4_tags, 0 },
>  .check_bitstream   = mov_check_bitstream,
>  .priv_class= &psp_muxer_class,
>  };
> @@ -6631,7 +,8 @@ AVOutputFormat ff_ismv_muxer = {
>  .write_trailer = mov_write_trailer,
>  .deinit= mov_free,
>  .flags = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | 
> AVFMT_TS_NEGATIVE,
> -.codec_tag = (const AVCodecTag* const []){ ff_mp4_obj_type, 0 },
> +.codec_tag = (const AVCodecTag* const []){
> +codec_mp4_tags, codec_ism_tags, 0 },
>  .check_bitstream   = mov_check_bitstream,
>  .priv_class= &ismv_muxer_class,
>  };
> 

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


Re: [FFmpeg-devel] [PATCH] avcodec/alsdec: remove unused header

2017-07-02 Thread Steven Liu
2017-07-02 4:24 GMT+08:00 Paul B Mahol :
> Signed-off-by: Paul B Mahol 
> ---
>  libavcodec/alsdec.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
> index 31e95e2..ac59885 100644
> --- a/libavcodec/alsdec.c
> +++ b/libavcodec/alsdec.c
> @@ -31,7 +31,6 @@
>  #include "get_bits.h"
>  #include "unary.h"
>  #include "mpeg4audio.h"
> -#include "bytestream.h"
>  #include "bgmc.h"
>  #include "bswapdsp.h"
>  #include "internal.h"
> --
> 2.9.3
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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