Re: [FFmpeg-devel] Patch for Cast128 algorithm implementation

2014-10-16 Thread Giorgio Vazzana
Hi,

2014-10-16 5:32 GMT+02:00 Michael Niedermayer michae...@gmx.at:
 On Thu, Oct 16, 2014 at 03:25:42AM +0530, supraja reddy wrote:
 Extremely sorry for resending the patch . There was a trailing whitespace
 which I hadn't corrected .
 All the changes are done .
 Please let me if any changes needed further .

 also a test that enciphers and deciphers a larger amount of random
 data could be added

The RFC defines a Full Maintenance Test,

http://tools.ietf.org/html/rfc2144#appendix-B.2

it should probably be added (easy: just a few lines of code).



 +return err;
 +}
 +#endif
 diff --git a/libavutil/cast5.h b/libavutil/cast5.h
 new file mode 100644
 index 000..d151031
 --- /dev/null
 +++ b/libavutil/cast5.h
 @@ -0,0 +1,60 @@
 +/*
 + * An implementation of the CAST128 algorithm as mentioned in RFC2144
 + * Copyright (c) 2014 Supraja Meedinti
 + *
 + * 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
 + */
 +
 +#ifndef AVUTIL_CAST5_H
 +#define AVUTIL_CAST5_H
 +
 +#include stdint.h
 +

 +#include attributes.h
 +#include version.h

I think version.h is not needed and you can move attributes.h to cast5.c

No more comments from me, apart from: well done! Another round of
revision and hopefully we'll soon be able to apply the patch :)

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


Re: [FFmpeg-devel] [PATCH] Added STL demuxer and decoder

2014-10-16 Thread Clément Bœsch
On Thu, Oct 16, 2014 at 02:26:30AM +0530, Eejya Singh wrote:
 From: Eejya singh.ee...@gmail.com
 
 ---
  Changelog|   1 +
  doc/general.texi |   1 +
  libavcodec/Makefile  |   1 +
  libavcodec/allcodecs.c   |   1 +
  libavcodec/avcodec.h |   1 +
  libavcodec/codec_desc.c  |   7 +++
  libavcodec/textdec.c |  18 ++-
  libavformat/Makefile |   1 +
  libavformat/allformats.c |   1 +
  libavformat/stldec.c | 136 
 +++
  10 files changed, 167 insertions(+), 1 deletion(-)
  create mode 100644 libavformat/stldec.c
 

Please reply in the same thread when iterating the patch, it's easier for
us to track.

 diff --git a/Changelog b/Changelog
 index b59058b..9626d4a 100644
 --- a/Changelog
 +++ b/Changelog
 @@ -5,6 +5,7 @@ version next:
  - HEVC/H.265 RTP payload format (draft v6) packetizer
  - SUP/PGS subtitle demuxer
  - ffprobe -show_pixel_formats option
 +- STL subtitle demuxer and decoder
  
  version 2.4:
  - Icecast protocol
 diff --git a/doc/general.texi b/doc/general.texi
 index 2252f7b..681c5c9 100644
 --- a/doc/general.texi
 +++ b/doc/general.texi
 @@ -1032,6 +1032,7 @@ performance on systems without hardware floating point 
 support).
  @item RealText @tab   @tab X @tab   @tab X
  @item SAMI @tab   @tab X @tab   @tab X
  @item SSA/ASS  @tab X @tab X @tab X @tab X

 +@item STL  @tab   @tab X @tab   @tab X

Maybe mention Spruce here

[...]
 diff --git a/libavformat/stldec.c b/libavformat/stldec.c
 new file mode 100644
 index 000..9e79720
 --- /dev/null
 +++ b/libavformat/stldec.c
 @@ -0,0 +1,136 @@
 +/*
 + * Copyright (c) 2014 Eejya Singh
 + *
 + * 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
 + * STL subtitles format demuxer
 + */

Maybe add a @see entry with a link to the specifications here (git grep
'@see http' for examples)

Please also add a line breaks after the */

 +#include avformat.h
 +#include internal.h
 +#include subtitles.h
 +#include libavutil/intreadwrite.h
 +#include libavutil/avstring.h
 +
 +typedef struct {
 +FFDemuxSubtitlesQueue q;
 +} STLContext;
 +
 +static int stl_probe(AVProbeData *p)
 +{
 +char c;
 +const unsigned char *ptr = p-buf;
 +
 +if (AV_RB24(ptr) == 0xEFBBBF)
 +ptr += 3;  /* skip UTF-8 BOM */

 +while(*ptr=='\r' || *ptr=='\n' || *ptr=='$' || !strncmp(ptr,//,2))
 +ptr+=ff_subtitles_next_line(ptr);

Here and several times later in the file, the style is wrong. Please check
how spaces are supposed to be.

See http://ffmpeg.org/developer.html#toc-Coding-Rules-1

 +if (sscanf(ptr, %*d:%*d:%*d:%*d , %*d:%*d:%*d:%*d , %c, c) == 1)
 +return AVPROBE_SCORE_MAX;
 +return 0;

 +}

One more line break here to separate the functions

 +static int64_t get_pts(char **buf, int *duration)
 +{
 +int hh1, mm1, ss1, ms1;
 +int hh2, mm2, ss2, ms2;
 +int len=0;
 +if (sscanf(*buf, %2d:%2d:%2d:%2d , %2d:%2d:%2d:%2d , %n,
 +   hh1, mm1, ss1, ms1,
 +   hh2, mm2, ss2, ms2, len) = 8  len0) {
 +int64_t start = (hh1*3600LL + mm1*60LL + ss1) * 100LL + ms1;
 +int64_t end   = (hh2*3600LL + mm2*60LL + ss2) * 100LL + ms2;
 +*duration = end - start;
 +*buf+=len;
 +return start;
 + }
 +return AV_NOPTS_VALUE;

The indent of this function is wrong

[...]

Rest of the code LGTM.

It would be nice if you could add a test for this. Pick a .stl file, try
to add weird cases like timestamps with and without spaces, with an UTF-8
BOM, with random line breaks, use of '|', and with style
changes (for later). Not need for a huge file, just a sample that covers
most of the code.

Move your samples in fate-suite/sub/, then add an entry in
tests/fate/subtitles.mak and use make fate-sub-stl GEN=1 so it creates the
reference file. If we agree with the test, we'll upload the sample.

Thanks.

-- 
Clément B.


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


[FFmpeg-devel] [PATCH] avformat/id3v2: support buggy id3v2.3 tag length in id3v2.4

2014-10-16 Thread Benoit Fouet
Some encoders do not use syncsafe sizes in v2.4 id3 tags. Check the next
tag to try to choose between the two.

Fixes ticket #4003
---
 libavformat/id3v2.c | 42 +-
 1 file changed, 41 insertions(+), 1 deletion(-)

diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 5469e0a..3bccd76 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -170,6 +170,23 @@ static unsigned int get_size(AVIOContext *s, int len)
 return v;
 }
 
+/* No real verification, only check that the tag consists of
+ * a combination of capital alpha-numerical characters */
+static int is_tag(const char *buf, int len)
+{
+if (!len)
+return 0;
+
+while (len--)
+if ((buf[len]  'A' ||
+ buf[len]  'Z') 
+(buf[len]  '0' ||
+ buf[len]  '9'))
+return 0;
+
+return 1;
+}
+
 /**
  * Free GEOB type extra metadata.
  */
@@ -734,8 +751,31 @@ static void id3v2_parse(AVIOContext *pb, AVDictionary 
**metadata,
 tag[4] = 0;
 if (version == 3) {
 tlen = avio_rb32(pb);
-} else
+} else {
 tlen = get_size(pb, 4);
+if (tlen  0x7f) {
+/* some encoders incorrectly uses v3 sizes instead of 
syncsafe ones
+ * so check the next tag to see which one to use */
+int64_t cur = avio_tell(pb);
+char next_tag[5];
+
+next = cur + 2 /* tflags */ + tlen;
+avio_seek(pb, next, SEEK_SET);
+if (avio_read(pb, next_tag, 4)  4)
+break;
+if (AV_RB32(next_tag)  !is_tag(next_tag, 4)) {
+avio_seek(pb, cur - 4, SEEK_SET);
+tlen = avio_rb32(pb);
+next = cur + 2 + tlen;
+avio_seek(pb, next, SEEK_SET);
+if (avio_read(pb, next_tag, 4)  4)
+break;
+if (AV_RB32(next_tag)  !is_tag(next_tag, 4))
+break;
+}
+avio_seek(pb, cur, SEEK_SET);
+}
+}
 tflags  = avio_rb16(pb);
 tunsync = tflags  ID3v2_FLAG_UNSYNCH;
 } else {
-- 
2.1.2.443.g670a3c1

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


[FFmpeg-devel] [PATCH]Don't claim 16bit support for the noise filter

2014-10-16 Thread Carl Eugen Hoyos
Hi!

The noise filter claims to support 16bit formats but the output looks broken:
$ ffmpeg -f lavfi -i testsrc=s=3840x2160 -vf 
format=yuv444p16le,noise=c0s=10:allf=t -vcodec mpeg4 -qscale 2 -t 1 out.mov

Attached patch removes the 16bit support, fixes ticket #4017, ticket #4029 for 
16bit support already exists.

Carl Eugen
diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c
index 1028a3c..7296567 100644
--- a/libavfilter/vf_noise.c
+++ b/libavfilter/vf_noise.c
@@ -174,7 +174,7 @@ static int query_formats(AVFilterContext *ctx)
 
 for (fmt = 0; av_pix_fmt_desc_get(fmt); fmt++) {
 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
-if (desc-flags  AV_PIX_FMT_FLAG_PLANAR  
!((desc-comp[0].depth_minus1 + 1)  7))
+if (desc-flags  AV_PIX_FMT_FLAG_PLANAR  desc-comp[0].depth_minus1 
== 7)
 ff_add_format(formats, fmt);
 }
 
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] mpegts: add the judgement if a new program is ctreated successfully

2014-10-16 Thread Reynaldo H. Verdejo Pinochet

Hello Di Wu

On 10/15/2014 05:24 AM, di1028...@samsung.com wrote:

From: Di Wu di1028...@samsung.com

Add the judement after create a new program to avoid segment fault.
[..]


Thanks for your patch. Can you spell check your commit summary
though?, you have at least two typos there.

Thanks,

--
Reynaldo H. Verdejo Pinochet
Open Source Group
Samsung Research America / Silicon Valley
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]Don't claim 16bit support for the noise filter

2014-10-16 Thread Michael Niedermayer
On Thu, Oct 16, 2014 at 11:57:08AM +0200, Carl Eugen Hoyos wrote:
 Hi!
 
 The noise filter claims to support 16bit formats but the output looks broken:
 $ ffmpeg -f lavfi -i testsrc=s=3840x2160 -vf 
 format=yuv444p16le,noise=c0s=10:allf=t -vcodec mpeg4 -qscale 2 -t 1 out.mov
 
 Attached patch removes the 16bit support, fixes ticket #4017, ticket #4029 
 for 
 16bit support already exists.

fixed differently

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus


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


Re: [FFmpeg-devel] [PATCH] avformat/id3v2: silence a warning when CONFIG_ZLIB is unset.

2014-10-16 Thread Michael Niedermayer
On Thu, Oct 16, 2014 at 11:44:46AM +0200, Benoit Fouet wrote:
 dlen is only read when CONFIG_ZLIB is set, so mark it as possibly
 unused.
 ---
  libavformat/id3v2.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

applied

thx

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

The worst form of inequality is to try to make unequal things equal.
-- Aristotle


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


Re: [FFmpeg-devel] [PATCH] avformat/id3v2: support buggy id3v2.3 tag length in id3v2.4

2014-10-16 Thread Michael Niedermayer
On Thu, Oct 16, 2014 at 11:44:47AM +0200, Benoit Fouet wrote:
 Some encoders do not use syncsafe sizes in v2.4 id3 tags. Check the next
 tag to try to choose between the two.
 
 Fixes ticket #4003
 ---
  libavformat/id3v2.c | 42 +-
  1 file changed, 41 insertions(+), 1 deletion(-)
 
 diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
 index 5469e0a..3bccd76 100644
 --- a/libavformat/id3v2.c
 +++ b/libavformat/id3v2.c
 @@ -170,6 +170,23 @@ static unsigned int get_size(AVIOContext *s, int len)
  return v;
  }
  
 +/* No real verification, only check that the tag consists of
 + * a combination of capital alpha-numerical characters */
 +static int is_tag(const char *buf, int len)
 +{
 +if (!len)
 +return 0;
 +
 +while (len--)
 +if ((buf[len]  'A' ||
 + buf[len]  'Z') 
 +(buf[len]  '0' ||
 + buf[len]  '9'))
 +return 0;
 +
 +return 1;
 +}
 +
  /**
   * Free GEOB type extra metadata.
   */
 @@ -734,8 +751,31 @@ static void id3v2_parse(AVIOContext *pb, AVDictionary 
 **metadata,
  tag[4] = 0;
  if (version == 3) {
  tlen = avio_rb32(pb);
 -} else
 +} else {
  tlen = get_size(pb, 4);
 +if (tlen  0x7f) {

i think that check isnt sufficient to detect that the 2 readings
differ. For example 0xFF would be read as 0xFF by one and 0x7F by
the other and would not trigger this

also maybe len could be used to distingish a subset of cases

and there is the problem with seekable=0 streams where seeking
back might fail, not sure what to do in that case ...


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

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu


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


Re: [FFmpeg-devel] [PATCH] avformat/id3v2: support buggy id3v2.3 tag length in id3v2.4

2014-10-16 Thread Benoit Fouet
Hi,

On 16 October 2014 17:10:38 CEST, Michael Niedermayer michae...@gmx.at wrote:
On Thu, Oct 16, 2014 at 11:44:47AM +0200, Benoit Fouet wrote:
 Some encoders do not use syncsafe sizes in v2.4 id3 tags. Check the
next
 tag to try to choose between the two.
 
 Fixes ticket #4003
 ---
  libavformat/id3v2.c | 42 +-
  1 file changed, 41 insertions(+), 1 deletion(-)
 
 diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
 index 5469e0a..3bccd76 100644
 --- a/libavformat/id3v2.c
 +++ b/libavformat/id3v2.c
 @@ -170,6 +170,23 @@ static unsigned int get_size(AVIOContext *s, int
len)
  return v;
  }
  
 +/* No real verification, only check that the tag consists of
 + * a combination of capital alpha-numerical characters */
 +static int is_tag(const char *buf, int len)
 +{
 +if (!len)
 +return 0;
 +
 +while (len--)
 +if ((buf[len]  'A' ||
 + buf[len]  'Z') 
 +(buf[len]  '0' ||
 + buf[len]  '9'))
 +return 0;
 +
 +return 1;
 +}
 +
  /**
   * Free GEOB type extra metadata.
   */
 @@ -734,8 +751,31 @@ static void id3v2_parse(AVIOContext *pb,
AVDictionary **metadata,
  tag[4] = 0;
  if (version == 3) {
  tlen = avio_rb32(pb);
 -} else
 +} else {
  tlen = get_size(pb, 4);
 +if (tlen  0x7f) {

i think that check isnt sufficient to detect that the 2 readings
differ. For example 0xFF would be read as 0xFF by one and 0x7F by
the other and would not trigger this
 

True, although I guess that could be handled by just making this test a = 
instead of .

also maybe len could be used to distingish a subset of cases
 

Not sure I understand what you mean here... The tlen check seems to be enough 
to me.

and there is the problem with seekable=0 streams where seeking
back might fail, not sure what to do in that case ...
 

We could theoretically buffer the data instead of seeking back, as the syncsafe 
size will always be smaller than the other one. Is this something that we want?
I can work on something like that.

-- 
Ben


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


Re: [FFmpeg-devel] Patch for Cast128 algorithm implementation

2014-10-16 Thread supraja reddy
Updated the patch .
Please let me know if there are any other changes needed .

Thanks ,

Supraja

On Thu, Oct 16, 2014 at 1:37 PM, Giorgio Vazzana mywin...@gmail.com wrote:

 Hi,

 2014-10-16 5:32 GMT+02:00 Michael Niedermayer michae...@gmx.at:
  On Thu, Oct 16, 2014 at 03:25:42AM +0530, supraja reddy wrote:
  Extremely sorry for resending the patch . There was a trailing
 whitespace
  which I hadn't corrected .
  All the changes are done .
  Please let me if any changes needed further .

  also a test that enciphers and deciphers a larger amount of random
  data could be added

 The RFC defines a Full Maintenance Test,

 http://tools.ietf.org/html/rfc2144#appendix-B.2

 it should probably be added (easy: just a few lines of code).

 
 
  +return err;
  +}
  +#endif
  diff --git a/libavutil/cast5.h b/libavutil/cast5.h
  new file mode 100644
  index 000..d151031
  --- /dev/null
  +++ b/libavutil/cast5.h
  @@ -0,0 +1,60 @@
  +/*
  + * An implementation of the CAST128 algorithm as mentioned in RFC2144
  + * Copyright (c) 2014 Supraja Meedinti
  + *
  + * 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
  + */
  +
  +#ifndef AVUTIL_CAST5_H
  +#define AVUTIL_CAST5_H
  +
  +#include stdint.h
  +

  +#include attributes.h
  +#include version.h

 I think version.h is not needed and you can move attributes.h to cast5.c

 No more comments from me, apart from: well done! Another round of
 revision and hopefully we'll soon be able to apply the patch :)

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

From 0f00f635db3ca37bce4148c4df606e5fbe9f7948 Mon Sep 17 00:00:00 2001
From: Supraja Meedinti supraja0...@gmail.com
Date: Thu, 16 Oct 2014 23:04:23 +0530
Subject: [PATCH]  Add CAST128 symmetric block cipher to libavutil

Only ECB mode is supported at the moment

Signed-off-by: Supraja Meedinti supraja0...@gmail.com
---
 Changelog  |   1 +
 libavutil/Makefile |   3 +
 libavutil/cast5.c  | 541 +
 libavutil/cast5.h  |  64 +++
 4 files changed, 609 insertions(+)
 create mode 100644 libavutil/cast5.c
 create mode 100644 libavutil/cast5.h

diff --git a/Changelog b/Changelog
index b59058b..8aa9a0d 100644
--- a/Changelog
+++ b/Changelog
@@ -5,6 +5,7 @@ version next:
 - HEVC/H.265 RTP payload format (draft v6) packetizer
 - SUP/PGS subtitle demuxer
 - ffprobe -show_pixel_formats option
+- CAST128 symmetric block cipher
 
 version 2.4:
 - Icecast protocol
diff --git a/libavutil/Makefile b/libavutil/Makefile
index 80c5d00..6f90301 100644
--- a/libavutil/Makefile
+++ b/libavutil/Makefile
@@ -15,6 +15,7 @@ HEADERS = adler32.h \
   bprint.h  \
   bswap.h   \
   buffer.h  \
+  cast5.h   \
   channel_layout.h  \
   common.h  \
   cpu.h \
@@ -82,6 +83,7 @@ OBJS = adler32.o\
blowfish.o   \
bprint.o \
buffer.o \
+   cast5.o  \
channel_layout.o \
cpu.o\
crc.o\
@@ -151,6 +153,7 @@ TESTPROGS = adler32 \
 base64  \
 blowfish\
 bprint  \
+

Re: [FFmpeg-devel] [PATCH] doc/filters: update link to OpenCV docs

2014-10-16 Thread Lou Logan
On Tue, 14 Oct 2014 04:40:08 +0200, Michael Niedermayer wrote:

 On Mon, Oct 13, 2014 at 04:42:05PM -0800, Lou Logan wrote:
  Signed-off-by: Lou Logan l...@lrcd.com
  ---
   doc/filters.texi | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
  
  diff --git a/doc/filters.texi b/doc/filters.texi
  index b9575f4..e9c1a24 100644
  --- a/doc/filters.texi
  +++ b/doc/filters.texi
  @@ -6226,7 +6226,7 @@ values are assumed.
   
   Refer to the official libopencv documentation for more precise
   information:
  -@url{http://opencv.willowgarage.com/documentation/c/image_filtering.html}
  +@url{http://docs.opencv.org/master/modules/imgproc/doc/filtering.html}
 
 old link seems dead, new works, so i assume its ok

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


Re: [FFmpeg-devel] [PATCH]Don't claim 16bit support for the noise filter

2014-10-16 Thread Carl Eugen Hoyos
Michael Niedermayer michaelni at gmx.at writes:

  Attached patch removes the 16bit support, fixes 
  ticket #4017, ticket #4029 for 16bit support 
  already exists.
 
 fixed differently

Thank you!

Carl Eugen

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


Re: [FFmpeg-devel] [PATCH] avformat/id3v2: support buggy id3v2.3 tag length in id3v2.4

2014-10-16 Thread Michael Niedermayer
On Thu, Oct 16, 2014 at 06:06:39PM +0200, Benoit Fouet wrote:
 Hi,
 
 On 16 October 2014 17:10:38 CEST, Michael Niedermayer michae...@gmx.at 
 wrote:
 On Thu, Oct 16, 2014 at 11:44:47AM +0200, Benoit Fouet wrote:
  Some encoders do not use syncsafe sizes in v2.4 id3 tags. Check the
 next
  tag to try to choose between the two.
  
  Fixes ticket #4003
  ---
   libavformat/id3v2.c | 42 +-
   1 file changed, 41 insertions(+), 1 deletion(-)
  
  diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
  index 5469e0a..3bccd76 100644
  --- a/libavformat/id3v2.c
  +++ b/libavformat/id3v2.c
  @@ -170,6 +170,23 @@ static unsigned int get_size(AVIOContext *s, int
 len)
   return v;
   }
   
  +/* No real verification, only check that the tag consists of
  + * a combination of capital alpha-numerical characters */
  +static int is_tag(const char *buf, int len)
  +{
  +if (!len)
  +return 0;
  +
  +while (len--)
  +if ((buf[len]  'A' ||
  + buf[len]  'Z') 
  +(buf[len]  '0' ||
  + buf[len]  '9'))
  +return 0;
  +
  +return 1;
  +}
  +
   /**
* Free GEOB type extra metadata.
*/
  @@ -734,8 +751,31 @@ static void id3v2_parse(AVIOContext *pb,
 AVDictionary **metadata,
   tag[4] = 0;
   if (version == 3) {
   tlen = avio_rb32(pb);
  -} else
  +} else {
   tlen = get_size(pb, 4);
  +if (tlen  0x7f) {
 
 i think that check isnt sufficient to detect that the 2 readings
 differ. For example 0xFF would be read as 0xFF by one and 0x7F by
 the other and would not trigger this
  
 
 True, although I guess that could be handled by just making this test a = 
 instead of .

that wouldnt work with 0x81


 
 also maybe len could be used to distingish a subset of cases
  
 
 Not sure I understand what you mean here... The tlen check seems to be enough 
 to me.

i was thinking of avoiding the seek for cases where one is clearly
invalid like tlen  len IIRC the variable names


 
 and there is the problem with seekable=0 streams where seeking
 back might fail, not sure what to do in that case ...
  
 
 We could theoretically buffer the data instead of seeking back, as the 
 syncsafe size will always be smaller than the other one. Is this something 
 that we want?
 I can work on something like that.

probably that is needed, also see ffio_ensure_seekback()

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

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato


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


[FFmpeg-devel] [PATCH] x86/vf_noise: move asm code to a separate file

2014-10-16 Thread James Almer
Signed-off-by: James Almer jamr...@gmail.com
---
 libavfilter/vf_noise.c | 164 +++--
 libavfilter/vf_noise.h |  64 ++
 libavfilter/x86/Makefile   |   1 +
 libavfilter/x86/vf_noise.c | 144 +++
 4 files changed, 218 insertions(+), 155 deletions(-)
 create mode 100644 libavfilter/vf_noise.h
 create mode 100644 libavfilter/x86/vf_noise.c

diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c
index 6218ed0..4acad8a 100644
--- a/libavfilter/vf_noise.c
+++ b/libavfilter/vf_noise.c
@@ -29,43 +29,12 @@
 #include libavutil/lfg.h
 #include libavutil/parseutils.h
 #include libavutil/pixdesc.h
-#include libavutil/x86/asm.h
 #include avfilter.h
 #include formats.h
 #include internal.h
+#include vf_noise.h
 #include video.h
 
-#define MAX_NOISE 5120
-#define MAX_SHIFT 1024
-#define MAX_RES (MAX_NOISE-MAX_SHIFT)
-
-#define NOISE_UNIFORM  1
-#define NOISE_TEMPORAL 2
-#define NOISE_AVERAGED 8
-#define NOISE_PATTERN  16
-
-typedef struct {
-int strength;
-unsigned flags;
-AVLFG lfg;
-int seed;
-int8_t *noise;
-int8_t *prev_shift[MAX_RES][3];
-int rand_shift[MAX_RES];
-int rand_shift_init;
-} FilterParams;
-
-typedef struct {
-const AVClass *class;
-int nb_planes;
-int bytewidth[4];
-int height[4];
-FilterParams all;
-FilterParams param[4];
-void (*line_noise)(uint8_t *dst, const uint8_t *src, const int8_t *noise, 
int len, int shift);
-void (*line_noise_avg)(uint8_t *dst, const uint8_t *src, int len, const 
int8_t * const *shift);
-} NoiseContext;
-
 typedef struct ThreadData {
 AVFrame *in, *out;
 } ThreadData;
@@ -193,8 +162,8 @@ static int config_input(AVFilterLink *inlink)
 return 0;
 }
 
-static inline void line_noise_c(uint8_t *dst, const uint8_t *src, const int8_t 
*noise,
-   int len, int shift)
+void ff_line_noise_c(uint8_t *dst, const uint8_t *src, const int8_t *noise,
+ int len, int shift)
 {
 int i;
 
@@ -206,70 +175,8 @@ static inline void line_noise_c(uint8_t *dst, const 
uint8_t *src, const int8_t *
 }
 }
 
-#define ASMALIGN(ZEROBITS) .p2align  #ZEROBITS \n\t
-
-static void line_noise_mmx(uint8_t *dst, const uint8_t *src,
-   const int8_t *noise, int len, int shift)
-{
-#if HAVE_MMX_INLINE
-x86_reg mmx_len= len(~7);
-noise+=shift;
-
-__asm__ volatile(
-mov %3, %%REG_a   \n\t
-pcmpeqb %%mm7, %%mm7\n\t
-psllw $15, %%mm7\n\t
-packsswb %%mm7, %%mm7   \n\t
-ASMALIGN(4)
-1:  \n\t
-movq (%0, %%REG_a), %%mm0 \n\t
-movq (%1, %%REG_a), %%mm1 \n\t
-pxor %%mm7, %%mm0   \n\t
-paddsb %%mm1, %%mm0 \n\t
-pxor %%mm7, %%mm0   \n\t
-movq %%mm0, (%2, %%REG_a) \n\t
-add $8, %%REG_a   \n\t
- js 1b  \n\t
-:: r (src+mmx_len), r (noise+mmx_len), r (dst+mmx_len), g 
(-mmx_len)
-: %REG_a
-);
-if (mmx_len!=len)
-line_noise_c(dst+mmx_len, src+mmx_len, noise+mmx_len, len-mmx_len, 0);
-#endif
-}
-
-static void line_noise_mmxext(uint8_t *dst, const uint8_t *src,
-  const int8_t *noise, int len, int shift)
-{
-#if HAVE_MMXEXT_INLINE
-x86_reg mmx_len= len(~7);
-noise+=shift;
-
-__asm__ volatile(
-mov %3, %%REG_a\n\t
-pcmpeqb %%mm7, %%mm7 \n\t
-psllw $15, %%mm7 \n\t
-packsswb %%mm7, %%mm7\n\t
-ASMALIGN(4)
-1:   \n\t
-movq (%0, %%REG_a), %%mm0  \n\t
-movq (%1, %%REG_a), %%mm1  \n\t
-pxor %%mm7, %%mm0\n\t
-paddsb %%mm1, %%mm0  \n\t
-pxor %%mm7, %%mm0\n\t
-movntq %%mm0, (%2, %%REG_a)\n\t
-add $8, %%REG_a\n\t
- js 1b   \n\t
-:: r (src+mmx_len), r (noise+mmx_len), r (dst+mmx_len), g 
(-mmx_len)
-: %REG_a
-);
-if (mmx_len != len)
-line_noise_c(dst+mmx_len, src+mmx_len, noise+mmx_len, len-mmx_len, 0);
-#endif
-}
-
-static inline void line_noise_avg_c(uint8_t *dst, const uint8_t *src,
-   int len, const int8_t * const *shift)
+void ff_line_noise_avg_c(uint8_t *dst, const uint8_t *src,
+ int len, const int8_t * const *shift)
 {
 int i;
 const int8_t *src2 = (const int8_t*)src;
@@ -280,50 +187,6 @@ static inline void line_noise_avg_c(uint8_t *dst, const 
uint8_t *src,
 }
 }
 
-static inline void line_noise_avg_mmx(uint8_t *dst, const uint8_t *src,

Re: [FFmpeg-devel] [PATCH] libutvideo: remove libutvideo wrapper

2014-10-16 Thread Michael Niedermayer
On Thu, Oct 16, 2014 at 04:29:13PM -0800, Lou Logan wrote:
 Native decoder and encoder exists.
 
 Signed-off-by: Lou Logan l...@lrcd.com
 ---
 I don't know if libutvideo has any advantages over native; maybe Derek
 can elaborate (and answer other questions).
 
 Native seemed faster for decoding and encoding in my lazy, quick tests.
 
 Mostly a boredom patch/RFC...
 
 Todo:
 =
 * I probably forgot to remove something.
 * Update Changelog.
 * Version bump.
 
  LICENSE.md   |   3 -
  MAINTAINERS  |   1 -
  configure|   6 --
  libavcodec/Makefile  |   4 -
  libavcodec/allcodecs.c   |   1 -
  libavcodec/libutvideo.h  |  70 
  libavcodec/libutvideodec.cpp | 212 -
  libavcodec/libutvideoenc.cpp | 246 
 ---

this removes the possibility to easily test our decoder against
libutvideo.
Also iam happy to volunteer to take over maintainership for the
libutvideo wraper if that is wanted, as i suspect that would be
less work than fixing future issues in utvideo without an easy
accessible reference

[...]

-- 
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 for Cast128 algorithm implementation

2014-10-16 Thread Michael Niedermayer
On Thu, Oct 16, 2014 at 11:09:27PM +0530, supraja reddy wrote:
 Updated the patch .
 Please let me know if there are any other changes needed .
 
 Thanks ,
 
 Supraja
 
 On Thu, Oct 16, 2014 at 1:37 PM, Giorgio Vazzana mywin...@gmail.com wrote:
 
  Hi,
 
  2014-10-16 5:32 GMT+02:00 Michael Niedermayer michae...@gmx.at:
   On Thu, Oct 16, 2014 at 03:25:42AM +0530, supraja reddy wrote:
   Extremely sorry for resending the patch . There was a trailing
  whitespace
   which I hadn't corrected .
   All the changes are done .
   Please let me if any changes needed further .
 
   also a test that enciphers and deciphers a larger amount of random
   data could be added
 
  The RFC defines a Full Maintenance Test,
 
  http://tools.ietf.org/html/rfc2144#appendix-B.2
 
  it should probably be added (easy: just a few lines of code).
 
  
  
   +return err;
   +}
   +#endif
   diff --git a/libavutil/cast5.h b/libavutil/cast5.h
   new file mode 100644
   index 000..d151031
   --- /dev/null
   +++ b/libavutil/cast5.h
   @@ -0,0 +1,60 @@
   +/*
   + * An implementation of the CAST128 algorithm as mentioned in RFC2144
   + * Copyright (c) 2014 Supraja Meedinti
   + *
   + * 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
   + */
   +
   +#ifndef AVUTIL_CAST5_H
   +#define AVUTIL_CAST5_H
   +
   +#include stdint.h
   +
 
   +#include attributes.h
   +#include version.h
 
  I think version.h is not needed and you can move attributes.h to cast5.c
 
  No more comments from me, apart from: well done! Another round of
  revision and hopefully we'll soon be able to apply the patch :)
 
  Giorgio
  ___
  ffmpeg-devel mailing list
  ffmpeg-devel@ffmpeg.org
  http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 

  Changelog  |1 
  libavutil/Makefile |3 
  libavutil/cast5.c  |  541 
 +
  libavutil/cast5.h  |   64 ++
  4 files changed, 609 insertions(+)
 2359679d575d9443532b2c97dced599d7bf1f847  
 0001-Add-CAST128-symmetric-block-cipher-to-libavutil-n-nO.patch
 From 0f00f635db3ca37bce4148c4df606e5fbe9f7948 Mon Sep 17 00:00:00 2001
 From: Supraja Meedinti supraja0...@gmail.com
 Date: Thu, 16 Oct 2014 23:04:23 +0530
 Subject: [PATCH]  Add CAST128 symmetric block cipher to libavutil

we normally start the first line with the part that is changed
like
avutil: Add CAST128 symmetric block cipher
or
libavutil: Add CAST128 symmetric block cipher


 
 Only ECB mode is supported at the moment
 
 Signed-off-by: Supraja Meedinti supraja0...@gmail.com
 ---
  Changelog  |   1 +
  libavutil/Makefile |   3 +
  libavutil/cast5.c  | 541 
 +
  libavutil/cast5.h  |  64 +++
  4 files changed, 609 insertions(+)
  create mode 100644 libavutil/cast5.c
  create mode 100644 libavutil/cast5.h
 
 diff --git a/Changelog b/Changelog
 index b59058b..8aa9a0d 100644
 --- a/Changelog
 +++ b/Changelog

 @@ -5,6 +5,7 @@ version next:
  - HEVC/H.265 RTP payload format (draft v6) packetizer
  - SUP/PGS subtitle demuxer
  - ffprobe -show_pixel_formats option
 +- CAST128 symmetric block cipher

this could mention ECB mode


[...]

 diff --git a/libavutil/cast5.h b/libavutil/cast5.h
 new file mode 100644
 index 000..922a892
 --- /dev/null
 +++ b/libavutil/cast5.h
 @@ -0,0 +1,64 @@
 +/*
 + * An implementation of the CAST128 algorithm as mentioned in RFC2144
 + * Copyright (c) 2014 Supraja Meedinti
 + *
 + * 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 

Re: [FFmpeg-devel] [PATCH] doc/filters.texi: fix several typos in the vidstab* sections

2014-10-16 Thread Michael Niedermayer
On Wed, Oct 15, 2014 at 04:02:03PM +0200, Moritz Barsnick wrote:
 Hi,
 
 there are two minor typos and a stray bracket in the vidstab* sections
 of the filters documentation. Patch is attached.
 
 I also took the liberty to add references to the other filter (unsharp)
 which is mentioned, and had to add an anchor to the unsharp section for
 this. Some other sections do use @ref{} to point to other filters, some
 don't. *shrug* Is there any interest in someone adding @ref{}'s
 everywhere possible? I could give it a stab. ;-)
 
 Cheers,
 Moritz

  filters.texi |   15 ---
  1 file changed, 8 insertions(+), 7 deletions(-)
 fab03114e033ca7cd7957a7f1dfa95dd9a542413  
 0001-doc-filters.texi-fix-several-typos-in-the-vidstab-se.patch
 From 230daa1b3ce183adb14e47b7bcfe338dc140b745 Mon Sep 17 00:00:00 2001
 From: Moritz Barsnick barsn...@gmx.net
 Date: Wed, 15 Oct 2014 15:44:33 +0200
 Subject: [PATCH] doc/filters.texi: fix several typos in the vidstab* sections

applied
thx

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
Used only once- Some unspecified defect prevented a second use
In good condition - Can be repaird by experienced expert
As is - You wouldnt want it even if you were payed for it, if you knew ...


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