Re: [FFmpeg-devel] [PATCH v2 3/4] mips: port optimizations to mips n64

2015-03-06 Thread James Almer
On 05/03/15 2:40 PM, James Cowgill wrote:
> diff --git a/libavutil/mips/asmdefs.h b/libavutil/mips/asmdefs.h
> new file mode 100644
> index 000..4d2922c
> --- /dev/null
> +++ b/libavutil/mips/asmdefs.h
> @@ -0,0 +1,48 @@
> +/*
> + * Copyright (c) 2015 Imagination Technologies Ltd
> + *
> + * 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
> + * MIPS assembly defines from sys/asm.h but rewritten for use with C inline
> + * assembly (rather than from within .s files).
> + */
> +
> +#ifndef AVCODEC_MIPS_ASMDEFS_H
> +#define AVCODEC_MIPS_ASMDEFS_H
> +
> +#include 
> +
> +#if _MIPS_SIM == _ABI64

This broke compilation with Android NDK r8 (Which apparently doesn't support 
mips 64 bits).
http://fate.ffmpeg.org/report.cgi?time=20150307052927&slot=mipsel-android-gcc-4.4

CC  libavutil/mips/float_dsp_mips.o
mipsel-linux-android-gcc-4.4.3: unrecognized option '-pthreads'
In file included from /home/fate/fate/src/libavcodec/mips/aacdec_mips.h:61,
 from /home/fate/fate/src/libavcodec/aacdec.c:113:
/home/fate/fate/src/libavutil/mips/asmdefs.h:30:21: error: sgidefs.h: No such 
file or directory
/home/fate/fate/src/libavutil/mips/asmdefs.h:32:18: warning: "_ABI64" is not 
defined
make: *** [libavcodec/aacdec.o] Error 1

The -pthreads warning is unrelated related, but could also be dealt with.

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


[FFmpeg-devel] [PATCH] fate: add test for vp90-2-trac4359.webm

2015-03-06 Thread James Almer
Regression test for the bug from trac ticket #4359 fixed in commit efff3854

Signed-off-by: James Almer 
---
The file was uploaded to the ftp (Incoming folder). It should of course be 
placed in the vp9-test-vectors folder.

 tests/fate/vpx.mak  | 1 +
 tests/ref/fate/vp9-trac4359 | 9 +
 2 files changed, 10 insertions(+)
 create mode 100644 tests/ref/fate/vp9-trac4359

diff --git a/tests/fate/vpx.mak b/tests/fate/vpx.mak
index 0ef8dcc..83cda9c 100644
--- a/tests/fate/vpx.mak
+++ b/tests/fate/vpx.mak
@@ -102,6 +102,7 @@ $(eval $(call 
FATE_VP9_SUITE,segmentation-aq-akiyo,$(1),$(2)))
 $(eval $(call FATE_VP9_SUITE,segmentation-sf-akiyo,$(1),$(2)))
 $(eval $(call FATE_VP9_SUITE,tiling-pedestrian,$(1),$(2)))
 $(eval $(call FATE_VP9_SUITE,trac3849,$(1),$(2)))
+$(eval $(call FATE_VP9_SUITE,trac4359,$(1),$(2)))
 endef
 
 $(eval $(call FATE_VP9_FULL))
diff --git a/tests/ref/fate/vp9-trac4359 b/tests/ref/fate/vp9-trac4359
new file mode 100644
index 000..cd271a7
--- /dev/null
+++ b/tests/ref/fate/vp9-trac4359
@@ -0,0 +1,9 @@
+#format: frame checksums
+#version: 1
+#hash: MD5
+#tb 0: 1/25
+#stream#, dts,pts, duration, size, hash
+0,  0,  0,1,  1382400, 2929e5318edee6cd6b24ede0c1015137
+0,  1,  1,1,  1382400, ca0d83b04297da33a1aa17129a9fe9c9
+0,  2,  2,1,  1382400, dfdb277e615307e501f416669a208ff4
+0,  3,  3,1,  1382400, 9c17c58ea4fc5ff1c3398acbf5cc6c69
-- 
2.3.1

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


Re: [FFmpeg-devel] [PATCH] vp9: fix segmentation map retention with threading enabled.

2015-03-06 Thread James Almer
On 07/03/15 12:22 AM, Michael Niedermayer wrote:
> On Sat, Mar 07, 2015 at 04:20:58AM +0100, Michael Niedermayer wrote:
>> On Fri, Mar 06, 2015 at 09:07:54PM -0500, Ronald S. Bultje wrote:
>>> Fixes ticket 4359.
>>> ---
>>>  libavcodec/vp9.c | 16 +---
>>>  1 file changed, 13 insertions(+), 3 deletions(-)
>>
>> applied
> 
> should i backport this ?
> 
> if yes, to which releases ?

>From 2.2 onwards, every maintained one should get it.
Branches prior to 2.4 may also need 14e30255 if it hasn't been backported yet.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] vp9: fix segmentation map retention with threading enabled.

2015-03-06 Thread Michael Niedermayer
On Sat, Mar 07, 2015 at 04:20:58AM +0100, Michael Niedermayer wrote:
> On Fri, Mar 06, 2015 at 09:07:54PM -0500, Ronald S. Bultje wrote:
> > Fixes ticket 4359.
> > ---
> >  libavcodec/vp9.c | 16 +---
> >  1 file changed, 13 insertions(+), 3 deletions(-)
> 
> applied

should i backport this ?

if yes, to which releases ?

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes


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


Re: [FFmpeg-devel] [PATCH] vp9: fix segmentation map retention with threading enabled.

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 09:07:54PM -0500, Ronald S. Bultje wrote:
> Fixes ticket 4359.
> ---
>  libavcodec/vp9.c | 16 +---
>  1 file changed, 13 insertions(+), 3 deletions(-)

applied

thanks

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

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus


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


Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread Peter
I admit to being a serial rebaser and force-pusher to pull-requests. :P

Anyway, I can't run FATE on that setup, because although the ffmpeg libs compile
the ffmpeg command line tool doesn't compile.

The old "stdin->_cnt" hack no longer works since "FILE" in the new C runtime
is just a struct with a void*.

2015-03-06 22:44 GMT+01:00 Michael Niedermayer :
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> DNS cache poisoning attacks, popular search engine, Google internet authority
> dont be evil, please
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] vp9: fix segmentation map retention with threading enabled.

2015-03-06 Thread Ronald S. Bultje
Fixes ticket 4359.
---
 libavcodec/vp9.c | 16 +---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 2bb2432..aff86d0 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -279,7 +279,8 @@ static int vp9_alloc_frame(AVCodecContext *ctx, VP9Frame *f)
 
 // retain segmentation map if it doesn't update
 if (s->segmentation.enabled && !s->segmentation.update_map &&
-!s->intraonly && !s->keyframe && !s->errorres) {
+!s->intraonly && !s->keyframe && !s->errorres &&
+ctx->active_thread_type != FF_THREAD_FRAME) {
 memcpy(f->segmentation_map, s->frames[LAST_FRAME].segmentation_map, 
sz);
 }
 
@@ -1351,9 +1352,18 @@ static void decode_mode(AVCodecContext *ctx)
 
 if (!s->last_uses_2pass)
 ff_thread_await_progress(&s->frames[LAST_FRAME].tf, row >> 3, 
0);
-for (y = 0; y < h4; y++)
+for (y = 0; y < h4; y++) {
+int idx_base = (y + row) * 8 * s->sb_cols + col;
 for (x = 0; x < w4; x++)
-pred = FFMIN(pred, refsegmap[(y + row) * 8 * s->sb_cols + 
x + col]);
+pred = FFMIN(pred, refsegmap[idx_base + x]);
+if (!s->segmentation.update_map && ctx->active_thread_type == 
FF_THREAD_FRAME) {
+// FIXME maybe retain reference to previous frame as
+// segmap reference instead of copying the whole map
+// into a new buffer
+memcpy(&s->frames[CUR_FRAME].segmentation_map[idx_base],
+   &refsegmap[idx_base], w4);
+}
+}
 av_assert1(pred < 8);
 b->seg_id = pred;
 } else {
-- 
2.1.2

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


Re: [FFmpeg-devel] [PATCH] libavformat/mxfdec: export user comments metadata

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 01:24:35PM -0800, Mark Reid wrote:
> ---
>  libavformat/mxf.h|  1 +
>  libavformat/mxfdec.c | 96 
> +---
>  2 files changed, 93 insertions(+), 4 deletions(-)
[...]
> @@ -1630,6 +1692,30 @@ static MXFStructuralComponent* 
> mxf_resolve_sourceclip(MXFContext *mxf, UID *stro
>  return NULL;
>  }
>  
> +static int mxf_parse_package_comments(MXFContext *mxf, AVDictionary **pm, 
> MXFPackage *package)
> +{
> +MXFTaggedValue *tag;
> +int size, i;
> +const char *prefix = "comment_";
> +char *key = NULL;
> +
> +for (i = 0; i < package->comment_count; i++) {
> +tag = mxf_resolve_strong_ref(mxf, &package->comment_refs[i], 
> TaggedValue);
> +if (!tag || !tag->name || !tag->value)
> +continue;
> +
> +size = strlen(prefix) + strlen(tag->name) + 1;
> +key = av_mallocz(size);
> +if (!key)
> +return AVERROR(ENOMEM);
> +
> +strcpy(key, prefix);

> +strlcat(key, tag->name, size);

not available on all platforms, please use av_strlcat()

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

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf


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


Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 10:30:21PM +0100, Peter wrote:
> I originally send a patch without the libavutil/internal.h changes (with a
> wrong email address so I thought it didn't show up) but without them linking
> fails since it will then search avpriv_strtod and avpriv_snprintf but it will
> find neither.

ahh, this is more complex
so, what happened is you submited a pull request at github and posted
a email to ffmpeg-devel both with the hunk missing.
that mail didnt make it to the list, but i downloaded the git patch
from github.
then you updated the github pull req and send the 2nd mail with the
hunk. the mail got corrupted and i applied the patch from github i
downloaded previously which had the hunk missing

anyway, ill push the missing hunk in a moment

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

DNS cache poisoning attacks, popular search engine, Google internet authority
dont be evil, please


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


Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread Hendrik Leppkes
On Fri, Mar 6, 2015 at 10:40 PM, James Almer  wrote:
> On 06/03/15 6:23 PM, Michael Niedermayer wrote:
>> On Fri, Mar 06, 2015 at 06:06:23PM -0300, James Almer wrote:
>>> On 06/03/15 6:03 PM, Michael Niedermayer wrote:
 On Fri, Mar 06, 2015 at 09:58:37PM +0100, Michael Niedermayer wrote:
> On Fri, Mar 06, 2015 at 02:59:43PM -0500, Ronald S. Bultje wrote:
>> Hi,
>>
>> On Fri, Mar 6, 2015 at 2:42 PM, Peter  wrote:
>>
>>> From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
>>> From: Peter Tissen 
>>> Date: Fri, 6 Mar 2015 19:39:27 +0100
>>> Subject: [PATCH] Make compilable with VS2015
>>>
>>> So Visual Studio 2015 has some breaking changes regarding the C
>>> runtime. In short, they made C99 compatable runtime.
>>> Refer to
>>> http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx
>>>
>>> Signed-off-by: Peter Tissen 
>>> ---
>>>  configure| 14 +-
>>>  libavutil/internal.h |  2 +-
>>>  2 files changed, 10 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/configure b/configure
>>> index ce745d2..1ea2032 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -3531,7 +3531,9 @@ probe_cc(){
>>>  _flags='-nologo'
>>>  _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
>>> -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
>>>  if [ $pfx = hostcc ]; then
>>> -append _cflags -Dsnprintf=_snprintf
>>> +if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
>>> +append _cflags -Dsnprintf=_snprintf
>>> +fi
>>
>>
>> Oh wow that's amazing! They fixed it! Hurray! I'm seriously happy.
>
> applied (from the github pull req as the attached patch was corrupted)

 should i backport this to 2.6 ?
>>>
>>> Assuming it's properly tested (passes Fate, basically) then I'd say yeah, 
>>> it would be nice to
>>> have 2.6 compile with msvc 2015 out of the box.
>>
>> i dont have msvc setup so i cant easily test ...
>
> Maybe the patch's author could do a fate run since he has a msvc 2015 
> environment set up
> already. CCing him just in case.
> Nonetheless, the missing lavu hunk that was not applied from the github 
> request and present
> in this patch should be applied.


Once 2015 hits RTM i'll add a fate box, but I don't really bother with
pre-release versions usually.

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


Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread James Almer
On 06/03/15 6:23 PM, Michael Niedermayer wrote:
> On Fri, Mar 06, 2015 at 06:06:23PM -0300, James Almer wrote:
>> On 06/03/15 6:03 PM, Michael Niedermayer wrote:
>>> On Fri, Mar 06, 2015 at 09:58:37PM +0100, Michael Niedermayer wrote:
 On Fri, Mar 06, 2015 at 02:59:43PM -0500, Ronald S. Bultje wrote:
> Hi,
>
> On Fri, Mar 6, 2015 at 2:42 PM, Peter  wrote:
>
>> From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
>> From: Peter Tissen 
>> Date: Fri, 6 Mar 2015 19:39:27 +0100
>> Subject: [PATCH] Make compilable with VS2015
>>
>> So Visual Studio 2015 has some breaking changes regarding the C
>> runtime. In short, they made C99 compatable runtime.
>> Refer to
>> http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx
>>
>> Signed-off-by: Peter Tissen 
>> ---
>>  configure| 14 +-
>>  libavutil/internal.h |  2 +-
>>  2 files changed, 10 insertions(+), 6 deletions(-)
>>
>> diff --git a/configure b/configure
>> index ce745d2..1ea2032 100755
>> --- a/configure
>> +++ b/configure
>> @@ -3531,7 +3531,9 @@ probe_cc(){
>>  _flags='-nologo'
>>  _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
>> -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
>>  if [ $pfx = hostcc ]; then
>> -append _cflags -Dsnprintf=_snprintf
>> +if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
>> +append _cflags -Dsnprintf=_snprintf
>> +fi
>
>
> Oh wow that's amazing! They fixed it! Hurray! I'm seriously happy.

 applied (from the github pull req as the attached patch was corrupted)
>>>
>>> should i backport this to 2.6 ?
>>
>> Assuming it's properly tested (passes Fate, basically) then I'd say yeah, it 
>> would be nice to 
>> have 2.6 compile with msvc 2015 out of the box.
> 
> i dont have msvc setup so i cant easily test ...

Maybe the patch's author could do a fate run since he has a msvc 2015 
environment set up 
already. CCing him just in case.
Nonetheless, the missing lavu hunk that was not applied from the github request 
and present 
in this patch should be applied.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] [release/2.6] Add release notes

2015-03-06 Thread Clément Bœsch
On Thu, Mar 05, 2015 at 08:19:44PM -0300, James Almer wrote:
> On 05/03/15 6:26 PM, Clément Bœsch wrote:
> > +   Now let's talk about optimizations. Ronald S. Bultje made the VP9 codec
> > +   usable on x86 32-bit systems and pre-ssse3 CPUs like Phenom (even dual 
> > core
> > +   Athlons can run 1080p 30fps VP9 content now), so we now secretely hope 
> > for
> 
> I think "play" is better than "run" (And yes, i know i originally wrote that 
> :P).
> 
> > +   Google and Mozilla to use ffvp9 instead of libvpx.
> > +
> > +   But VP9 is not the center of attention anymore, and HEVC is also getting
> > +   many improvements, which includes optimizations, both in C and x86 ASM,
> > +   mainly from James Almer and Christophe Gisquet.
> 
> Pierre-Edouard Lepere and Seppo Tomperi should be mentioned as well, the 
> latter for 
> his ARM assembly work (The first ARM code to make it to the tree for that 
> matter, 
> so worth pointing out here).

Fixed all of this, with Lou Logan correction, and many other adjustments.
Thanks.

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 10:23:43PM +0100, Clément Bœsch wrote:
> On Fri, Mar 06, 2015 at 06:06:23PM -0300, James Almer wrote:
> > On 06/03/15 6:03 PM, Michael Niedermayer wrote:
> > > On Fri, Mar 06, 2015 at 09:58:37PM +0100, Michael Niedermayer wrote:
> > >> On Fri, Mar 06, 2015 at 02:59:43PM -0500, Ronald S. Bultje wrote:
> > >>> Hi,
> > >>>
> > >>> On Fri, Mar 6, 2015 at 2:42 PM, Peter  wrote:
> > >>>
> >  From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
> >  From: Peter Tissen 
> >  Date: Fri, 6 Mar 2015 19:39:27 +0100
> >  Subject: [PATCH] Make compilable with VS2015
> > 
> >  So Visual Studio 2015 has some breaking changes regarding the C
> >  runtime. In short, they made C99 compatable runtime.
> >  Refer to
> >  http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx
> > 
> >  Signed-off-by: Peter Tissen 
> >  ---
> >   configure| 14 +-
> >   libavutil/internal.h |  2 +-
> >   2 files changed, 10 insertions(+), 6 deletions(-)
> > 
> >  diff --git a/configure b/configure
> >  index ce745d2..1ea2032 100755
> >  --- a/configure
> >  +++ b/configure
> >  @@ -3531,7 +3531,9 @@ probe_cc(){
> >   _flags='-nologo'
> >   _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
> >  -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
> >   if [ $pfx = hostcc ]; then
> >  -append _cflags -Dsnprintf=_snprintf
> >  +if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; 
> >  then
> >  +append _cflags -Dsnprintf=_snprintf
> >  +fi
> > >>>
> > >>>
> > >>> Oh wow that's amazing! They fixed it! Hurray! I'm seriously happy.
> > >>
> > >> applied (from the github pull req as the attached patch was corrupted)
> > > 
> > > should i backport this to 2.6 ?
> > 
> > Assuming it's properly tested (passes Fate, basically) then I'd say yeah, 
> > it would be nice to 
> > have 2.6 compile with msvc 2015 out of the box.
> 
> Stop making me add stuff into the release note! @_@

considering the missing hunk on github i think ill tend toward
2.6.1 for the backport unless someone does fully test it and posts
any missing and tested hunks in time

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact


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


Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread Peter
I originally send a patch without the libavutil/internal.h changes (with a
wrong email address so I thought it didn't show up) but without them linking
fails since it will then search avpriv_strtod and avpriv_snprintf but it will
find neither.

So, yeah the changed line in libavutil/internal.h is also necessary

2015-03-06 22:23 GMT+01:00 Michael Niedermayer :
> On Fri, Mar 06, 2015 at 06:06:23PM -0300, James Almer wrote:
>> On 06/03/15 6:03 PM, Michael Niedermayer wrote:
>> > On Fri, Mar 06, 2015 at 09:58:37PM +0100, Michael Niedermayer wrote:
>> >> On Fri, Mar 06, 2015 at 02:59:43PM -0500, Ronald S. Bultje wrote:
>> >>> Hi,
>> >>>
>> >>> On Fri, Mar 6, 2015 at 2:42 PM, Peter  wrote:
>> >>>
>>  From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
>>  From: Peter Tissen 
>>  Date: Fri, 6 Mar 2015 19:39:27 +0100
>>  Subject: [PATCH] Make compilable with VS2015
>> 
>>  So Visual Studio 2015 has some breaking changes regarding the C
>>  runtime. In short, they made C99 compatable runtime.
>>  Refer to
>>  http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx
>> 
>>  Signed-off-by: Peter Tissen 
>>  ---
>>   configure| 14 +-
>>   libavutil/internal.h |  2 +-
>>   2 files changed, 10 insertions(+), 6 deletions(-)
>> 
>>  diff --git a/configure b/configure
>>  index ce745d2..1ea2032 100755
>>  --- a/configure
>>  +++ b/configure
>>  @@ -3531,7 +3531,9 @@ probe_cc(){
>>   _flags='-nologo'
>>   _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
>>  -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
>>   if [ $pfx = hostcc ]; then
>>  -append _cflags -Dsnprintf=_snprintf
>>  +if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
>>  +append _cflags -Dsnprintf=_snprintf
>>  +fi
>> >>>
>> >>>
>> >>> Oh wow that's amazing! They fixed it! Hurray! I'm seriously happy.
>> >>
>> >> applied (from the github pull req as the attached patch was corrupted)
>> >
>> > should i backport this to 2.6 ?
>>
>> Assuming it's properly tested (passes Fate, basically) then I'd say yeah, it 
>> would be nice to
>> have 2.6 compile with msvc 2015 out of the box.
>
> i dont have msvc setup so i cant easily test ...
>
> [...]
>
> --
> 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
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] libavformat/mxfdec: export user comments metadata

2015-03-06 Thread Mark Reid
---
 libavformat/mxf.h|  1 +
 libavformat/mxfdec.c | 96 +---
 2 files changed, 93 insertions(+), 4 deletions(-)

diff --git a/libavformat/mxf.h b/libavformat/mxf.h
index d9e17c6..71a4084 100644
--- a/libavformat/mxf.h
+++ b/libavformat/mxf.h
@@ -47,6 +47,7 @@ enum MXFMetadataSetType {
 EssenceContainerData,
 TypeBottom,// add metadata type before this
 EssenceGroup,
+TaggedValue,
 };
 
 enum MXFFrameLayout {
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 2e8dd05..970df33 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -144,6 +144,13 @@ typedef struct {
 typedef struct {
 UID uid;
 enum MXFMetadataSetType type;
+char *name;
+char *value;
+} MXFTaggedValue;
+
+typedef struct {
+UID uid;
+enum MXFMetadataSetType type;
 MXFSequence *sequence; /* mandatory, and only one */
 UID sequence_ref;
 int track_id;
@@ -206,6 +213,8 @@ typedef struct MXFPackage {
 MXFDescriptor *descriptor; /* only one */
 UID descriptor_ref;
 char *name;
+UID *comment_refs;
+int comment_count;
 } MXFPackage;
 
 typedef struct MXFMetadataSet {
@@ -282,6 +291,8 @@ static const uint8_t mxf_random_index_pack_key[]   
= { 0x06,0x0e,0x2b,0x
 static const uint8_t mxf_sony_mpeg4_extradata[]= { 
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0e,0x06,0x06,0x02,0x02,0x01,0x00,0x00 
};
 static const uint8_t mxf_avid_project_name[]   = { 
0xa5,0xfb,0x7b,0x25,0xf6,0x15,0x94,0xb9,0x62,0xfc,0x37,0x17,0x49,0x2d,0x42,0xbf 
};
 static const uint8_t mxf_jp2k_rsiz[]   = { 
0x06,0x0e,0x2b,0x34,0x02,0x05,0x01,0x01,0x0d,0x01,0x02,0x01,0x01,0x02,0x01,0x00 
};
+static const uint8_t mxf_indirect_value_utf16le[]  = { 
0x4c,0x00,0x02,0x10,0x01,0x00,0x00,0x00,0x00,0x06,0x0e,0x2b,0x34,0x01,0x04,0x01,0x01
 };
+static const uint8_t mxf_indirect_value_utf16be[]  = { 
0x42,0x01,0x10,0x02,0x00,0x00,0x00,0x00,0x00,0x06,0x0e,0x2b,0x34,0x01,0x04,0x01,0x01
 };
 
 #define IS_KLV_KEY(x, y) (!memcmp(x, y, sizeof(y)))
 
@@ -306,6 +317,10 @@ static void mxf_free_metadataset(MXFMetadataSet **ctx, int 
freectx)
 av_freep(&((MXFPackage *)*ctx)->tracks_refs);
 av_freep(&((MXFPackage *)*ctx)->name);
 break;
+case TaggedValue:
+av_freep(&((MXFTaggedValue *)*ctx)->name);
+av_freep(&((MXFTaggedValue *)*ctx)->value);
+break;
 case IndexTableSegment:
 seg = (MXFIndexTableSegment *)*ctx;
 av_freep(&seg->temporal_offset_entries);
@@ -803,7 +818,7 @@ static int mxf_read_essence_group(void *arg, AVIOContext 
*pb, int tag, int size,
 return 0;
 }
 
-static int mxf_read_utf16_string(AVIOContext *pb, int size, char** str)
+static inline int mxf_read_utf16_string(AVIOContext *pb, int size, char** str, 
int be)
 {
 int ret;
 size_t buf_size;
@@ -816,7 +831,12 @@ static int mxf_read_utf16_string(AVIOContext *pb, int 
size, char** str)
 if (!*str)
 return AVERROR(ENOMEM);
 
-if ((ret = avio_get_str16be(pb, size, *str, buf_size)) < 0) {
+if (be)
+ret = avio_get_str16be(pb, size, *str, buf_size);
+else
+ret = avio_get_str16le(pb, size, *str, buf_size);
+
+if (ret < 0) {
 av_freep(str);
 return ret;
 }
@@ -824,6 +844,15 @@ static int mxf_read_utf16_string(AVIOContext *pb, int 
size, char** str)
 return ret;
 }
 
+#define READ_STR16(type, big_endian)   
\
+static int mxf_read_utf16 ## type ##_string(AVIOContext *pb, int size, char** 
str) \
+{  
\
+return mxf_read_utf16_string(pb, size, str, big_endian);   
\
+}
+READ_STR16(be, 1)
+READ_STR16(le, 0)
+#undef READ_STR16
+
 static int mxf_read_package(void *arg, AVIOContext *pb, int tag, int size, UID 
uid, int64_t klv_offset)
 {
 MXFPackage *package = arg;
@@ -840,7 +869,10 @@ static int mxf_read_package(void *arg, AVIOContext *pb, 
int tag, int size, UID u
 avio_read(pb, package->descriptor_ref, 16);
 break;
 case 0x4402:
-return mxf_read_utf16_string(pb, size, &package->name);
+return mxf_read_utf16be_string(pb, size, &package->name);
+case 0x4406:
+return mxf_read_strong_ref_array(pb, &package->comment_refs,
+ &package->comment_count);
 }
 return 0;
 }
@@ -1012,6 +1044,36 @@ static int mxf_read_generic_descriptor(void *arg, 
AVIOContext *pb, int tag, int
 return 0;
 }
 
+static int mxf_read_indirect_value(void *arg, AVIOContext *pb, int size)
+{
+MXFTaggedValue *tagged_value = arg;
+uint8_t key[17];
+
+if (size <= 17)
+return 0;
+
+avio_read(pb, key, 17);
+/* TODO: handle other types of of indirect values */
+if (memcmp(key, mxf_indirect_value_utf16le, 17) == 0) {
+return mxf_read_utf16le_string(pb, 

Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 06:06:23PM -0300, James Almer wrote:
> On 06/03/15 6:03 PM, Michael Niedermayer wrote:
> > On Fri, Mar 06, 2015 at 09:58:37PM +0100, Michael Niedermayer wrote:
> >> On Fri, Mar 06, 2015 at 02:59:43PM -0500, Ronald S. Bultje wrote:
> >>> Hi,
> >>>
> >>> On Fri, Mar 6, 2015 at 2:42 PM, Peter  wrote:
> >>>
>  From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
>  From: Peter Tissen 
>  Date: Fri, 6 Mar 2015 19:39:27 +0100
>  Subject: [PATCH] Make compilable with VS2015
> 
>  So Visual Studio 2015 has some breaking changes regarding the C
>  runtime. In short, they made C99 compatable runtime.
>  Refer to
>  http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx
> 
>  Signed-off-by: Peter Tissen 
>  ---
>   configure| 14 +-
>   libavutil/internal.h |  2 +-
>   2 files changed, 10 insertions(+), 6 deletions(-)
> 
>  diff --git a/configure b/configure
>  index ce745d2..1ea2032 100755
>  --- a/configure
>  +++ b/configure
>  @@ -3531,7 +3531,9 @@ probe_cc(){
>   _flags='-nologo'
>   _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
>  -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
>   if [ $pfx = hostcc ]; then
>  -append _cflags -Dsnprintf=_snprintf
>  +if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
>  +append _cflags -Dsnprintf=_snprintf
>  +fi
> >>>
> >>>
> >>> Oh wow that's amazing! They fixed it! Hurray! I'm seriously happy.
> >>
> >> applied (from the github pull req as the attached patch was corrupted)
> > 
> > should i backport this to 2.6 ?
> 
> Assuming it's properly tested (passes Fate, basically) then I'd say yeah, it 
> would be nice to 
> have 2.6 compile with msvc 2015 out of the box.

i dont have msvc setup so i cant easily test ...

[...]

-- 
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] Make compilable with VS2015

2015-03-06 Thread Clément Bœsch
On Fri, Mar 06, 2015 at 06:06:23PM -0300, James Almer wrote:
> On 06/03/15 6:03 PM, Michael Niedermayer wrote:
> > On Fri, Mar 06, 2015 at 09:58:37PM +0100, Michael Niedermayer wrote:
> >> On Fri, Mar 06, 2015 at 02:59:43PM -0500, Ronald S. Bultje wrote:
> >>> Hi,
> >>>
> >>> On Fri, Mar 6, 2015 at 2:42 PM, Peter  wrote:
> >>>
>  From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
>  From: Peter Tissen 
>  Date: Fri, 6 Mar 2015 19:39:27 +0100
>  Subject: [PATCH] Make compilable with VS2015
> 
>  So Visual Studio 2015 has some breaking changes regarding the C
>  runtime. In short, they made C99 compatable runtime.
>  Refer to
>  http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx
> 
>  Signed-off-by: Peter Tissen 
>  ---
>   configure| 14 +-
>   libavutil/internal.h |  2 +-
>   2 files changed, 10 insertions(+), 6 deletions(-)
> 
>  diff --git a/configure b/configure
>  index ce745d2..1ea2032 100755
>  --- a/configure
>  +++ b/configure
>  @@ -3531,7 +3531,9 @@ probe_cc(){
>   _flags='-nologo'
>   _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
>  -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
>   if [ $pfx = hostcc ]; then
>  -append _cflags -Dsnprintf=_snprintf
>  +if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
>  +append _cflags -Dsnprintf=_snprintf
>  +fi
> >>>
> >>>
> >>> Oh wow that's amazing! They fixed it! Hurray! I'm seriously happy.
> >>
> >> applied (from the github pull req as the attached patch was corrupted)
> > 
> > should i backport this to 2.6 ?
> 
> Assuming it's properly tested (passes Fate, basically) then I'd say yeah, it 
> would be nice to 
> have 2.6 compile with msvc 2015 out of the box.

Stop making me add stuff into the release note! @_@

-- 
Clément B.


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


[FFmpeg-devel] [PATCH] libavformat/mxfdec: export user comments metadata

2015-03-06 Thread Mark Reid
Hi
This patch enable reading of tagged values from mxf files and export
the user comment tags as metadata. The tags can have arbitrary names
and values. values can also have different types.  I have only
added support for the utf16be and utf16le types. Avid for some reason
encodes tag indirect values as a utf16le strings. This patch only
exports the user comments tags, but there other tagged
values being read that aren't being exported. some of these tags also
have subtags which I'm also ignoring as well.

here is a sample mxf file that contains a bunch of user comments
https://dl.dropboxusercontent.com/u/170952/ffmpeg_samples/tagged_values.mxf

ffprobe tagged_values.mxf should show

comment_UNC Path: /Users/mark/Dev/ffmpeg/testsrc.mov
comment_example 3: 2
comment_example 1: value
comment_example 2: value2
comment_example 4: Lorem ipsum dolor
comment_example_5: £20.00
comment_TapeID  : TestSrC
comment_example 6: 100Ω
comment_example 7: ©2014

I'm currently prefixing all the user comments with "comment_" to separate them
from other metadata keys. The keys look kinda ugly and can have spaces,
if someone has a better suggestion I'd love to here it.

Mark Reid (1):
  libavformat/mxfdec: export user comments metadata

 libavformat/mxf.h|  1 +
 libavformat/mxfdec.c | 96 +---
 2 files changed, 93 insertions(+), 4 deletions(-)

-- 
2.2.1

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


Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread wm4
On Fri, 6 Mar 2015 22:06:25 +0100
Hendrik Leppkes  wrote:

> On Fri, Mar 6, 2015 at 10:00 PM, wm4  wrote:
> > On Fri, 6 Mar 2015 14:59:43 -0500
> > "Ronald S. Bultje"  wrote:
> >
> >> Hi,
> >>
> >> On Fri, Mar 6, 2015 at 2:42 PM, Peter  wrote:
> >>
> >> > From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
> >> > From: Peter Tissen 
> >> > Date: Fri, 6 Mar 2015 19:39:27 +0100
> >> > Subject: [PATCH] Make compilable with VS2015
> >> >
> >> > So Visual Studio 2015 has some breaking changes regarding the C
> >> > runtime. In short, they made C99 compatable runtime.
> >> > Refer to
> >> > http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx
> >> >
> >> > Signed-off-by: Peter Tissen 
> >> > ---
> >> >  configure| 14 +-
> >> >  libavutil/internal.h |  2 +-
> >> >  2 files changed, 10 insertions(+), 6 deletions(-)
> >> >
> >> > diff --git a/configure b/configure
> >> > index ce745d2..1ea2032 100755
> >> > --- a/configure
> >> > +++ b/configure
> >> > @@ -3531,7 +3531,9 @@ probe_cc(){
> >> >  _flags='-nologo'
> >> >  _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
> >> > -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
> >> >  if [ $pfx = hostcc ]; then
> >> > -append _cflags -Dsnprintf=_snprintf
> >> > +if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
> >> > +append _cflags -Dsnprintf=_snprintf
> >> > +fi
> >>
> >>
> >> Oh wow that's amazing! They fixed it! Hurray! I'm seriously happy.
> >
> > They still require calling _snprintf, though?
> >
> 
> No, one of the hunks remove this define if the compiler is > 18
> VS2015 should implement a fully C standard compliant snprintf. They
> also entirely revamped the implementation of all printf-related
> functions.

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


Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread James Almer
On 06/03/15 6:06 PM, Hendrik Leppkes wrote:
> On Fri, Mar 6, 2015 at 10:00 PM, wm4  wrote:
>> On Fri, 6 Mar 2015 14:59:43 -0500
>> "Ronald S. Bultje"  wrote:
>>
>>> Hi,
>>>
>>> On Fri, Mar 6, 2015 at 2:42 PM, Peter  wrote:
>>>
 From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
 From: Peter Tissen 
 Date: Fri, 6 Mar 2015 19:39:27 +0100
 Subject: [PATCH] Make compilable with VS2015

 So Visual Studio 2015 has some breaking changes regarding the C
 runtime. In short, they made C99 compatable runtime.
 Refer to
 http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx

 Signed-off-by: Peter Tissen 
 ---
  configure| 14 +-
  libavutil/internal.h |  2 +-
  2 files changed, 10 insertions(+), 6 deletions(-)

 diff --git a/configure b/configure
 index ce745d2..1ea2032 100755
 --- a/configure
 +++ b/configure
 @@ -3531,7 +3531,9 @@ probe_cc(){
  _flags='-nologo'
  _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
 -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
  if [ $pfx = hostcc ]; then
 -append _cflags -Dsnprintf=_snprintf
 +if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
 +append _cflags -Dsnprintf=_snprintf
 +fi
>>>
>>>
>>> Oh wow that's amazing! They fixed it! Hurray! I'm seriously happy.
>>
>> They still require calling _snprintf, though?
>>
> 
> No, one of the hunks remove this define if the compiler is > 18
> VS2015 should implement a fully C standard compliant snprintf. They
> also entirely revamped the implementation of all printf-related
> functions.
> 
> - Hendrik

Now that you mention, that hunk (if you mean the lavu/internal.h one) was not 
part of the 
github pull request and thus not applied.

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


Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread Hendrik Leppkes
On Fri, Mar 6, 2015 at 10:00 PM, wm4  wrote:
> On Fri, 6 Mar 2015 14:59:43 -0500
> "Ronald S. Bultje"  wrote:
>
>> Hi,
>>
>> On Fri, Mar 6, 2015 at 2:42 PM, Peter  wrote:
>>
>> > From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
>> > From: Peter Tissen 
>> > Date: Fri, 6 Mar 2015 19:39:27 +0100
>> > Subject: [PATCH] Make compilable with VS2015
>> >
>> > So Visual Studio 2015 has some breaking changes regarding the C
>> > runtime. In short, they made C99 compatable runtime.
>> > Refer to
>> > http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx
>> >
>> > Signed-off-by: Peter Tissen 
>> > ---
>> >  configure| 14 +-
>> >  libavutil/internal.h |  2 +-
>> >  2 files changed, 10 insertions(+), 6 deletions(-)
>> >
>> > diff --git a/configure b/configure
>> > index ce745d2..1ea2032 100755
>> > --- a/configure
>> > +++ b/configure
>> > @@ -3531,7 +3531,9 @@ probe_cc(){
>> >  _flags='-nologo'
>> >  _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
>> > -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
>> >  if [ $pfx = hostcc ]; then
>> > -append _cflags -Dsnprintf=_snprintf
>> > +if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
>> > +append _cflags -Dsnprintf=_snprintf
>> > +fi
>>
>>
>> Oh wow that's amazing! They fixed it! Hurray! I'm seriously happy.
>
> They still require calling _snprintf, though?
>

No, one of the hunks remove this define if the compiler is > 18
VS2015 should implement a fully C standard compliant snprintf. They
also entirely revamped the implementation of all printf-related
functions.

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


Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread James Almer
On 06/03/15 6:03 PM, Michael Niedermayer wrote:
> On Fri, Mar 06, 2015 at 09:58:37PM +0100, Michael Niedermayer wrote:
>> On Fri, Mar 06, 2015 at 02:59:43PM -0500, Ronald S. Bultje wrote:
>>> Hi,
>>>
>>> On Fri, Mar 6, 2015 at 2:42 PM, Peter  wrote:
>>>
 From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
 From: Peter Tissen 
 Date: Fri, 6 Mar 2015 19:39:27 +0100
 Subject: [PATCH] Make compilable with VS2015

 So Visual Studio 2015 has some breaking changes regarding the C
 runtime. In short, they made C99 compatable runtime.
 Refer to
 http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx

 Signed-off-by: Peter Tissen 
 ---
  configure| 14 +-
  libavutil/internal.h |  2 +-
  2 files changed, 10 insertions(+), 6 deletions(-)

 diff --git a/configure b/configure
 index ce745d2..1ea2032 100755
 --- a/configure
 +++ b/configure
 @@ -3531,7 +3531,9 @@ probe_cc(){
  _flags='-nologo'
  _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
 -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
  if [ $pfx = hostcc ]; then
 -append _cflags -Dsnprintf=_snprintf
 +if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
 +append _cflags -Dsnprintf=_snprintf
 +fi
>>>
>>>
>>> Oh wow that's amazing! They fixed it! Hurray! I'm seriously happy.
>>
>> applied (from the github pull req as the attached patch was corrupted)
> 
> should i backport this to 2.6 ?

Assuming it's properly tested (passes Fate, basically) then I'd say yeah, it 
would be nice to 
have 2.6 compile with msvc 2015 out of the box.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 09:58:37PM +0100, Michael Niedermayer wrote:
> On Fri, Mar 06, 2015 at 02:59:43PM -0500, Ronald S. Bultje wrote:
> > Hi,
> > 
> > On Fri, Mar 6, 2015 at 2:42 PM, Peter  wrote:
> > 
> > > From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
> > > From: Peter Tissen 
> > > Date: Fri, 6 Mar 2015 19:39:27 +0100
> > > Subject: [PATCH] Make compilable with VS2015
> > >
> > > So Visual Studio 2015 has some breaking changes regarding the C
> > > runtime. In short, they made C99 compatable runtime.
> > > Refer to
> > > http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx
> > >
> > > Signed-off-by: Peter Tissen 
> > > ---
> > >  configure| 14 +-
> > >  libavutil/internal.h |  2 +-
> > >  2 files changed, 10 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/configure b/configure
> > > index ce745d2..1ea2032 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -3531,7 +3531,9 @@ probe_cc(){
> > >  _flags='-nologo'
> > >  _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
> > > -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
> > >  if [ $pfx = hostcc ]; then
> > > -append _cflags -Dsnprintf=_snprintf
> > > +if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
> > > +append _cflags -Dsnprintf=_snprintf
> > > +fi
> > 
> > 
> > Oh wow that's amazing! They fixed it! Hurray! I'm seriously happy.
> 
> applied (from the github pull req as the attached patch was corrupted)

should i backport this to 2.6 ?

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

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates


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


Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread wm4
On Fri, 6 Mar 2015 14:59:43 -0500
"Ronald S. Bultje"  wrote:

> Hi,
> 
> On Fri, Mar 6, 2015 at 2:42 PM, Peter  wrote:
> 
> > From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
> > From: Peter Tissen 
> > Date: Fri, 6 Mar 2015 19:39:27 +0100
> > Subject: [PATCH] Make compilable with VS2015
> >
> > So Visual Studio 2015 has some breaking changes regarding the C
> > runtime. In short, they made C99 compatable runtime.
> > Refer to
> > http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx
> >
> > Signed-off-by: Peter Tissen 
> > ---
> >  configure| 14 +-
> >  libavutil/internal.h |  2 +-
> >  2 files changed, 10 insertions(+), 6 deletions(-)
> >
> > diff --git a/configure b/configure
> > index ce745d2..1ea2032 100755
> > --- a/configure
> > +++ b/configure
> > @@ -3531,7 +3531,9 @@ probe_cc(){
> >  _flags='-nologo'
> >  _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
> > -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
> >  if [ $pfx = hostcc ]; then
> > -append _cflags -Dsnprintf=_snprintf
> > +if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
> > +append _cflags -Dsnprintf=_snprintf
> > +fi
> 
> 
> Oh wow that's amazing! They fixed it! Hurray! I'm seriously happy.

They still require calling _snprintf, though?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 02:59:43PM -0500, Ronald S. Bultje wrote:
> Hi,
> 
> On Fri, Mar 6, 2015 at 2:42 PM, Peter  wrote:
> 
> > From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
> > From: Peter Tissen 
> > Date: Fri, 6 Mar 2015 19:39:27 +0100
> > Subject: [PATCH] Make compilable with VS2015
> >
> > So Visual Studio 2015 has some breaking changes regarding the C
> > runtime. In short, they made C99 compatable runtime.
> > Refer to
> > http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx
> >
> > Signed-off-by: Peter Tissen 
> > ---
> >  configure| 14 +-
> >  libavutil/internal.h |  2 +-
> >  2 files changed, 10 insertions(+), 6 deletions(-)
> >
> > diff --git a/configure b/configure
> > index ce745d2..1ea2032 100755
> > --- a/configure
> > +++ b/configure
> > @@ -3531,7 +3531,9 @@ probe_cc(){
> >  _flags='-nologo'
> >  _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
> > -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
> >  if [ $pfx = hostcc ]; then
> > -append _cflags -Dsnprintf=_snprintf
> > +if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
> > +append _cflags -Dsnprintf=_snprintf
> > +fi
> 
> 
> Oh wow that's amazing! They fixed it! Hurray! I'm seriously happy.

applied (from the github pull req as the attached patch was corrupted)

Thanks

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

Republics decline into democracies and democracies degenerate into
despotisms. -- 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] fix spelling errors

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 08:39:47PM +0100, Andreas Cadhalpun wrote:
> Hi,
> 
> attached patch fixes some spelling errors.
> 
>  opttimizations -> optimizations
>  grabing-> grabbing
>  many resource  -> many resources
>  isnt   -> isn't
>  silcense   -> silence
> 
> It also avoids the incorrect phrase 'allow to'.
> 
> Best regards,
> Andreas

>  Changelog   |2 +-
>  doc/indevs.texi |2 +-
>  doc/protocols.texi  |   10 +-
>  libavdevice/v4l2.c  |2 +-
>  libavformat/cache.c |4 ++--
>  libavformat/rmdec.c |2 +-
>  6 files changed, 11 insertions(+), 11 deletions(-)
> 1036e8eb32044a64022ffd3e32e5f17612a7ab1e  0001-fix-spelling-errors.patch
> From 65b7cae679bb96267ee96fdbedffae3659fc3b25 Mon Sep 17 00:00:00 2001
> From: Andreas Cadhalpun 
> Date: Fri, 6 Mar 2015 20:26:32 +0100
> Subject: [PATCH] fix spelling errors

applied

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates


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


Re: [FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread Ronald S. Bultje
Hi,

On Fri, Mar 6, 2015 at 2:42 PM, Peter  wrote:

> From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
> From: Peter Tissen 
> Date: Fri, 6 Mar 2015 19:39:27 +0100
> Subject: [PATCH] Make compilable with VS2015
>
> So Visual Studio 2015 has some breaking changes regarding the C
> runtime. In short, they made C99 compatable runtime.
> Refer to
> http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx
>
> Signed-off-by: Peter Tissen 
> ---
>  configure| 14 +-
>  libavutil/internal.h |  2 +-
>  2 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/configure b/configure
> index ce745d2..1ea2032 100755
> --- a/configure
> +++ b/configure
> @@ -3531,7 +3531,9 @@ probe_cc(){
>  _flags='-nologo'
>  _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
> -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
>  if [ $pfx = hostcc ]; then
> -append _cflags -Dsnprintf=_snprintf
> +if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
> +append _cflags -Dsnprintf=_snprintf
> +fi


Oh wow that's amazing! They fixed it! Hurray! I'm seriously happy.

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


Re: [FFmpeg-devel] HEVC hardware decoding

2015-03-06 Thread Hendrik Leppkes
On Fri, Mar 6, 2015 at 7:58 PM, Poczta  wrote:
> Hi,
>  Is any one working with the hardware support of HEVC decoding?
> Do you think that the new code in libvdpau (for hevc) is sufficient to
> start implementation for ffmpeg?
> Cheers

We already support hardware decoding of HEVC through DXVA2 on Windows.
When and if someone is going to implement it for VDPAU is not up to
us, but someone with the hardware and the will to work on it. :)

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


[FFmpeg-devel] [PATCH] Make compilable with VS2015

2015-03-06 Thread Peter
>From c72344d2b1dc8b087e5da904724c959005f36f4b Mon Sep 17 00:00:00 2001
From: Peter Tissen 
Date: Fri, 6 Mar 2015 19:39:27 +0100
Subject: [PATCH] Make compilable with VS2015

So Visual Studio 2015 has some breaking changes regarding the C
runtime. In short, they made C99 compatable runtime.
Refer to 
http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx

Signed-off-by: Peter Tissen 
---
 configure| 14 +-
 libavutil/internal.h |  2 +-
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index ce745d2..1ea2032 100755
--- a/configure
+++ b/configure
@@ -3531,7 +3531,9 @@ probe_cc(){
 _flags='-nologo'
 _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
-Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
 if [ $pfx = hostcc ]; then
-append _cflags -Dsnprintf=_snprintf
+if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
+append _cflags -Dsnprintf=_snprintf
+fi
 fi
 disable stripping
 elif $_cc --version 2>/dev/null | grep -q ^cparser; then
@@ -4318,10 +4320,12 @@ case $libc_type in
 add_compat strtod.o strtod=avpriv_strtod
 ;;
 msvcrt)
-add_compat strtod.o strtod=avpriv_strtod
-add_compat msvcrt/snprintf.o snprintf=avpriv_snprintf   \
- _snprintf=avpriv_snprintf  \
- vsnprintf=avpriv_vsnprintf
+if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then
+add_compat strtod.o strtod=avpriv_strtod
+add_compat msvcrt/snprintf.o snprintf=avpriv_snprintf   \
+ _snprintf=avpriv_snprintf  \
+ vsnprintf=avpriv_vsnprintf
+fi
 ;;
 esac

diff --git a/libavutil/internal.h b/libavutil/internal.h
index 143e2db..08ee6e5 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -164,7 +164,7 @@

 #include "libm.h"

-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && _MSC_VER < 1900
 #pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_strtod")
 #pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_snprintf")
 #endif
-- 
1.9.4.msysgit.1
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] fix spelling errors

2015-03-06 Thread Andreas Cadhalpun

Hi,

attached patch fixes some spelling errors.

 opttimizations -> optimizations
 grabing-> grabbing
 many resource  -> many resources
 isnt   -> isn't
 silcense   -> silence

It also avoids the incorrect phrase 'allow to'.

Best regards,
Andreas
>From 65b7cae679bb96267ee96fdbedffae3659fc3b25 Mon Sep 17 00:00:00 2001
From: Andreas Cadhalpun 
Date: Fri, 6 Mar 2015 20:26:32 +0100
Subject: [PATCH] fix spelling errors

 opttimizations -> optimizations
 grabing-> grabbing
 many resource  -> many resources
 isnt   -> isn't
 silcense   -> silence

Signed-off-by: Andreas Cadhalpun 
---
 Changelog   |  2 +-
 doc/indevs.texi |  2 +-
 doc/protocols.texi  | 10 +-
 libavdevice/v4l2.c  |  2 +-
 libavformat/cache.c |  4 ++--
 libavformat/rmdec.c |  2 +-
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/Changelog b/Changelog
index 55484b7..640b14d 100644
--- a/Changelog
+++ b/Changelog
@@ -39,7 +39,7 @@ version 2.6:
 - Canopus HQX decoder
 - RTP depacketization of T.140 text (RFC 4103)
 - VP9 RTP payload format (draft 0) experimental depacketizer
-- Port MIPS opttimizations to 64-bit
+- Port MIPS optimizations to 64-bit
 
 
 version 2.5:
diff --git a/doc/indevs.texi b/doc/indevs.texi
index 1a49293..ccbb39a 100644
--- a/doc/indevs.texi
+++ b/doc/indevs.texi
@@ -1109,7 +1109,7 @@ The syntax is:
 -grab_x @var{x_offset} -grab_y @var{y_offset}
 @end example
 
-Set the grabing region coordinates. The are expressed as offset from the top left
+Set the grabbing region coordinates. They are expressed as offset from the top left
 corner of the X11 window. The default value is 0.
 
 @section decklink
diff --git a/doc/protocols.texi b/doc/protocols.texi
index 006324c..5f6dfa8 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -63,7 +63,7 @@ cache:@var{URL}
 
 Physical concatenation protocol.
 
-Allow to read and seek from many resource in sequence as if they were
+Read and seek from many resources in sequence as if they were
 a unique resource.
 
 A URL accepted by this protocol has the syntax:
@@ -117,7 +117,7 @@ ffmpeg -i "data:image/gif;base64,R0lGODdhCAAIAMIE//8AAP//AP/
 
 File access protocol.
 
-Allow to read from or write to a file.
+Read from or write to a file.
 
 A file URL can have the form:
 @example
@@ -155,7 +155,7 @@ time, which is valuable for files on slow medium.
 
 FTP (File Transfer Protocol).
 
-Allow to read from or write to remote resources using FTP protocol.
+Read from or write to remote resources using FTP protocol.
 
 Following syntax is required.
 @example
@@ -374,7 +374,7 @@ be seekable, so they will fail with the MD5 output protocol.
 
 UNIX pipe access protocol.
 
-Allow to read and write from UNIX pipes.
+Read and write from UNIX pipes.
 
 The accepted syntax is:
 @example
@@ -614,7 +614,7 @@ For more information see: @url{http://www.samba.org/}.
 
 Secure File Transfer Protocol via libssh
 
-Allow to read from or write to remote resources using SFTP protocol.
+Read from or write to remote resources using SFTP protocol.
 
 Following syntax is required.
 
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 0f64d74..fba7764 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -747,7 +747,7 @@ static int v4l2_set_parameters(AVFormatContext *ctx)
 }
 } else {
 av_log(ctx, AV_LOG_WARNING,
-   "The driver does not allow to change time per frame\n");
+   "The driver does not permit changing the time per frame\n");
 }
 }
 if (tpf->denominator > 0 && tpf->numerator > 0) {
diff --git a/libavformat/cache.c b/libavformat/cache.c
index 26e68c5..d3d12bb 100644
--- a/libavformat/cache.c
+++ b/libavformat/cache.c
@@ -145,7 +145,7 @@ static int add_entry(URLContext *h, const unsigned char *buf, int size)
 
 return 0;
 fail:
-//we could truncate the file to pos here if pos >=0 but ftruncate isnt available in VS so
+//we could truncate the file to pos here if pos >=0 but ftruncate isn't available in VS so
 //for simplicty we just leave the file a bit larger
 av_free(entry);
 av_free(node);
@@ -300,7 +300,7 @@ static int cache_close(URLContext *h)
 #define D AV_OPT_FLAG_DECODING_PARAM
 
 static const AVOption options[] = {
-{ "read_ahead_limit", "Amount in bytes that may be read ahead when seeking isnt supported, -1 for unlimited", OFFSET(read_ahead_limit), AV_OPT_TYPE_INT, { .i64 = 65536 }, -1, INT_MAX, D },
+{ "read_ahead_limit", "Amount in bytes that may be read ahead when seeking isn't supported, -1 for unlimited", OFFSET(read_ahead_limit), AV_OPT_TYPE_INT, { .i64 = 65536 }, -1, INT_MAX, D },
 {NULL},
 };
 
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 9468d97..727d065 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -708,7 +708,7 @@ static int rm_assemble_video_frame(AVFormatContext *s, AVIOContext *pb,
int64_t *timestamp

[FFmpeg-devel] HEVC hardware decoding

2015-03-06 Thread Poczta
Hi,
 Is any one working with the hardware support of HEVC decoding?
Do you think that the new code in libvdpau (for hevc) is sufficient to
start implementation for ffmpeg?
Cheers
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]Autoselect ffv1 coder also for RGB colourpaces

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 04:48:36PM +0100, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch makes the behaviour of ffv1 using gprp more similar 
> to yuv for >8 bit.
> Reported by Christoph Gerstbauer .
> 
> Please comment, Carl Eugen

LGTM

[...]

-- 
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] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 01:06:53PM -0300, Claudio Freire wrote:
> On Fri, Mar 6, 2015 at 11:47 AM, Michael Niedermayer  wrote:
> >> 2- How to run that, make check dies at dct1d-4
> >
> > make check should pass, if it does not please try without local
> > changes, with make distclean or if (unlikely) these still fail a
> > fresh git checkout
> 
> I did use a clean checkout.
> 
> Just in case,
> 
> $ make disclean
> $ ./confiigure & ./configure --enable-gpl --enable-version3
> --enable-shared --disable-static --enable-x11grab
> --extra-cflags='-mtune=native -march=native' --enable-libmp3lame
> --enable-libvorbis --enable-libtheora --enable-libspeex
> --enable-libxvid --enable-libx264 --enable-libschroedinger
> --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfaac
> --enable-nonfree --enable-libfreetype --enable-pthreads --enable-debug
> && make -j3 && make -j3 testprogs
> ...
> $ make check
> warning: only a subset of the fate tests will be run because SAMPLES
> is not specified
> HOSTCC  tests/base64.o
> HOSTLD  tests/base64
> HOSTCC  tests/tiny_psnr.o
> HOSTLD  tests/tiny_psnr
> HOSTCC  tests/tiny_ssim.o
> HOSTLD  tests/tiny_ssim
> TESTdct1d-4
> Test dct1d-4 failed. Look at tests/data/fate/dct1d-4.err for details.
> $ cat tests/data/fate/dct1d-4.err
> /home/claudiofreire/src/ffmpeg.aacupstreamref.git/libavcodec/fft-test:
> error while loading shared libraries: libavutil.so.54: cannot open
> shared object file: No such file or directory

you can build without --enable-shared --disable-static or install the
libs in a place where they will be used or as you suggest below
make the tests handle this case better ...


> 
> So it seems the test doesn't set up the LD_LIBRARY_PATH correctly.
> That's fixable, I'll see about getting a patch for that when I
> understand the makefile layout.
> 
> In the meantime, I'm *guessing* a test would look like the patch
> attached, but I still cannot run it. It says it won't, because:
> warning: only a subset of the fate tests will be run because SAMPLES
> is not specified
> 
> Any idea where to get the samples? It's not just any samples, it wants
> a specific set of samples.

configure with --samples= to point to some directory and run
make fate-rsync
(this will need about 900mb space)

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.


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


Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates

2015-03-06 Thread Claudio Freire
On Fri, Mar 6, 2015 at 11:47 AM, Michael Niedermayer  wrote:
>> 2- How to run that, make check dies at dct1d-4
>
> make check should pass, if it does not please try without local
> changes, with make distclean or if (unlikely) these still fail a
> fresh git checkout

I did use a clean checkout.

Just in case,

$ make disclean
$ ./confiigure & ./configure --enable-gpl --enable-version3
--enable-shared --disable-static --enable-x11grab
--extra-cflags='-mtune=native -march=native' --enable-libmp3lame
--enable-libvorbis --enable-libtheora --enable-libspeex
--enable-libxvid --enable-libx264 --enable-libschroedinger
--enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfaac
--enable-nonfree --enable-libfreetype --enable-pthreads --enable-debug
&& make -j3 && make -j3 testprogs
...
$ make check
warning: only a subset of the fate tests will be run because SAMPLES
is not specified
HOSTCC  tests/base64.o
HOSTLD  tests/base64
HOSTCC  tests/tiny_psnr.o
HOSTLD  tests/tiny_psnr
HOSTCC  tests/tiny_ssim.o
HOSTLD  tests/tiny_ssim
TESTdct1d-4
Test dct1d-4 failed. Look at tests/data/fate/dct1d-4.err for details.
$ cat tests/data/fate/dct1d-4.err
/home/claudiofreire/src/ffmpeg.aacupstreamref.git/libavcodec/fft-test:
error while loading shared libraries: libavutil.so.54: cannot open
shared object file: No such file or directory

So it seems the test doesn't set up the LD_LIBRARY_PATH correctly.
That's fixable, I'll see about getting a patch for that when I
understand the makefile layout.

In the meantime, I'm *guessing* a test would look like the patch
attached, but I still cannot run it. It says it won't, because:
warning: only a subset of the fate tests will be run because SAMPLES
is not specified

Any idea where to get the samples? It's not just any samples, it wants
a specific set of samples.
diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
index 34823be..8ca513d 100644
--- a/tests/fate/aac.mak
+++ b/tests/fate/aac.mak
@@ -95,6 +95,16 @@ fate-aac-aref-encode: CMP_TARGET = 434
 fate-aac-aref-encode: SIZE_TOLERANCE = 2464
 fate-aac-aref-encode: FUZZ = 5
 
+FATE_AAC_ENCODE += fate-aac-s7350-encode
+fate-aac-aref-encode: ./tests/data/asynth-7350-2.wav
+fate-aac-aref-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 -c:a aac -b:a 256k
+fate-aac-aref-encode: CMP = stddev
+fate-aac-aref-encode: REF = ./tests/data/asynth-7350-2.wav
+fate-aac-aref-encode: CMP_SHIFT = -4096
+fate-aac-aref-encode: CMP_TARGET = 434
+fate-aac-aref-encode: SIZE_TOLERANCE = 2464
+fate-aac-aref-encode: FUZZ = 5
+
 FATE_AAC_ENCODE += fate-aac-ln-encode
 fate-aac-ln-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -strict -2 -c:a aac -b:a 512k
 fate-aac-ln-encode: CMP = stddev
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH]Autoselect ffv1 coder also for RGB colourpaces

2015-03-06 Thread Carl Eugen Hoyos
Hi!

Attached patch makes the behaviour of ffv1 using gprp more similar 
to yuv for >8 bit.
Reported by Christoph Gerstbauer .

Please comment, Carl Eugen
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index c3bf759..942bc37 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -780,6 +780,10 @@ static av_cold int encode_init(AVCodecContext *avctx)
 s->colorspace = 1;
 s->chroma_planes = 1;
 s->version = FFMAX(s->version, 1);
+if (!s->ac && avctx->coder_type == -1) {
+av_log(avctx, AV_LOG_INFO, "bits_per_raw_sample > 8, forcing coder 
1\n");
+s->ac = 2;
+}
 if (!s->ac) {
 av_log(avctx, AV_LOG_ERROR, "bits_per_raw_sample of more than 8 
needs -coder 1 currently\n");
 return AVERROR(ENOSYS);
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 10:54:33AM -0300, Claudio Freire wrote:
> On Fri, Mar 6, 2015 at 9:59 AM, Michael Niedermayer  wrote:
> > On Fri, Mar 06, 2015 at 04:28:38AM -0300, Claudio Freire wrote:
> >> AAC: Add support for 7350Hz sampling rates, no error on too hight bitrate.
> >>
> >> Instead, warn that bitrate will be clamped down to the maximum allowed.
> >>
> >> Patch is mostly work of Kamendo2 in issue #2686, quite tested within that 
> >> issue.
> >>
> >> Tested with abtest.sh and confirmed it does work as intended.
> >
> >>  aacenc.c |   23 ++-
> >>  1 file changed, 18 insertions(+), 5 deletions(-)
> >> 030cd61fb3e5180d38e3d7b70c9cdce46cf17b3b  aac-bugfixes-3.patch
> >> From df43314a67ad625775795561d960c30408fcf892 Mon Sep 17 00:00:00 2001
> >> From: Claudio Freire 
> >> Date: Fri, 6 Mar 2015 04:05:32 -0300
> >> Subject: [PATCH] AAC: Add support for 7350Hz sampling rates, no error on 
> >> too
> >>  hight bitrate.
> >>
> >> Instead, warn that bitrate will be clamped down to the maximum allowed.
> >>
> >> Patch is mostly work of Kamendo2 in issue #2686, quite tested within that 
> >> issue.
> >
> > applied
> >
> > does it make sense to add a fate test for 7350Hz ?
> >
> > thanks
> 
> 
> It does, but I'm not sure how that works.
> 
> I see that there's tests/fate/aac.mak with lots of tests, but
> 
> 1- I'm not sure where the samples are, an extra sample at 7350hz would be 
> needed

the samples are created by audiogen, you only need to add a dependancy
in your test to the appropriate asynth-* file and the file will be
generated by make before your test


> 2- How to run that, make check dies at dct1d-4

make check should pass, if it does not please try without local
changes, with make distclean or if (unlikely) these still fail a
fresh git checkout

[...]

-- 
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/http: support auto reconnect

2015-03-06 Thread Lukasz Marek
On 6 March 2015 at 11:19, Zhang Rui  wrote:

>  if (!s->hd)
>  return AVERROR_EOF;
> @@ -945,7 +949,19 @@ static int http_read_stream(URLContext *h, uint8_t
> *buf, int size)
>  if (s->compressed)
>  return http_buf_read_compressed(h, buf, size);
>  #endif /* CONFIG_ZLIB */
> -return http_buf_read(h, buf, size);
> +read_ret = http_buf_read(h, buf, size);
> +if (s->reconnect && s->filesize > 0 && s->off < s->filesize &&
> read_ret < 0) {
>

minor: you can chek read_ret < 0 first, this condition usually will net be
meet.


> +av_log(h, AV_LOG_WARNING, "Will reconnect at %"PRId64".\n",
> s->off);
>

Not sure this should be a warning. maybe info, debug or verbose?


> +seek_ret = http_seek_internal(h, s->off, SEEK_SET, 1);
> +if (seek_ret != s->off) {
> +av_log(h, AV_LOG_WARNING, "Failed to reconnect at
> %"PRId64".\n", s->off);
>

This should be an error I think.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/http: support auto reconnect

2015-03-06 Thread wm4
On Fri,  6 Mar 2015 18:19:14 +0800
Zhang Rui  wrote:

> ---
>  libavformat/http.c | 32 +++-
>  1 file changed, 27 insertions(+), 5 deletions(-)
> 
> diff --git a/libavformat/http.c b/libavformat/http.c
> index 55dcb6e..9d44f3b 100644
> --- a/libavformat/http.c
> +++ b/libavformat/http.c
> @@ -93,6 +93,7 @@ typedef struct HTTPContext {
>  AVDictionary *chained_options;
>  int send_expect_100;
>  char *method;
> +int reconnect;
>  } HTTPContext;
>  
>  #define OFFSET(x) offsetof(HTTPContext, x)
> @@ -123,6 +124,7 @@ static const AVOption options[] = {
>  { "offset", "initial byte offset", OFFSET(off), AV_OPT_TYPE_INT64, { 
> .i64 = 0 }, 0, INT64_MAX, D },
>  { "end_offset", "try to limit the request to bytes preceding this 
> offset", OFFSET(end_off), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, D },
>  { "method", "Override the HTTP method", OFFSET(method), 
> AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E },
> +{ "reconnect", "auto reconnect after disconnect before EOF", 
> OFFSET(reconnect), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, D },

The default of this setting is probably worth a discussion.

>  { NULL }
>  };
>  
> @@ -908,10 +910,12 @@ static int http_buf_read_compressed(URLContext *h, 
> uint8_t *buf, int size)
>  }
>  #endif /* CONFIG_ZLIB */
>  
> +static int64_t http_seek_internal(URLContext *h, int64_t off, int whence, 
> int force_reconnect);
> +
>  static int http_read_stream(URLContext *h, uint8_t *buf, int size)
>  {
>  HTTPContext *s = h->priv_data;
> -int err, new_location;
> +int err, new_location, read_ret, seek_ret;
>  
>  if (!s->hd)
>  return AVERROR_EOF;
> @@ -945,7 +949,19 @@ static int http_read_stream(URLContext *h, uint8_t *buf, 
> int size)
>  if (s->compressed)
>  return http_buf_read_compressed(h, buf, size);
>  #endif /* CONFIG_ZLIB */
> -return http_buf_read(h, buf, size);
> +read_ret = http_buf_read(h, buf, size);
> +if (s->reconnect && s->filesize > 0 && s->off < s->filesize && read_ret 
> < 0) {

Maybe it should check is_streamed (seekability) too?

> +av_log(h, AV_LOG_WARNING, "Will reconnect at %"PRId64".\n", s->off);
> +seek_ret = http_seek_internal(h, s->off, SEEK_SET, 1);
> +if (seek_ret != s->off) {
> +av_log(h, AV_LOG_WARNING, "Failed to reconnect at %"PRId64".\n", 
> s->off);
> +return read_ret;

Not sure if it should return read_ret or seek_ret...

> +}
> +
> +read_ret = http_buf_read(h, buf, size);
> +}
> +
> +return read_ret;
>  }
>  
>  // Like http_read_stream(), but no short reads.
> @@ -1104,7 +1120,7 @@ static int http_close(URLContext *h)
>  return ret;
>  }
>  
> -static int64_t http_seek(URLContext *h, int64_t off, int whence)
> +static int64_t http_seek_internal(URLContext *h, int64_t off, int whence, 
> int force_reconnect)
>  {
>  HTTPContext *s = h->priv_data;
>  URLContext *old_hd = s->hd;
> @@ -1115,8 +1131,9 @@ static int64_t http_seek(URLContext *h, int64_t off, 
> int whence)
>  
>  if (whence == AVSEEK_SIZE)
>  return s->filesize;
> -else if ((whence == SEEK_CUR && off == 0) ||
> - (whence == SEEK_SET && off == s->off))
> +else if (!force_reconnect &&
> + ((whence == SEEK_CUR && off == 0) ||
> +  (whence == SEEK_SET && off == s->off)))
>  return s->off;
>  else if ((s->filesize == -1 && whence == SEEK_END) || h->is_streamed)
>  return AVERROR(ENOSYS);
> @@ -1151,6 +1168,11 @@ static int64_t http_seek(URLContext *h, int64_t off, 
> int whence)
>  return off;
>  }
>  
> +static int64_t http_seek(URLContext *h, int64_t off, int whence)
> +{
> +return http_seek_internal(h, off, whence, 0);
> +}
> +
>  static int http_get_file_handle(URLContext *h)
>  {
>  HTTPContext *s = h->priv_data;

In generals looks sane to me.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] is_compiled flag not being cleared in av_opencl_uninit

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 07:34:06PM +0800, Wei Gao wrote:
> 2015-03-05 8:48 GMT+08:00 Srikanth G :
> 
> > When OpenCL kernels are compiled, is_compiled flag is being set for each
> > kernel. But, in opencl uninit, this flag is not being cleared.
> > This causes an error when an OpenCL kernel is tried on different OpenCL
> > devices on same platform.
> >
> > Here is the patch with a fix
> >
> > ---
> >  libavutil/opencl.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/libavutil/opencl.c b/libavutil/opencl.c
> > index 36cb6fe..a56029c 100644
> > --- a/libavutil/opencl.c
> > +++ b/libavutil/opencl.c
> > @@ -611,6 +611,9 @@ void av_opencl_uninit(void)
> >  }
> >  opencl_ctx.context = NULL;
> >  }
> > + for (i = 0; i < opencl_ctx.kernel_code_count; i++) {
> > +opencl_ctx.kernel_code[i].is_compiled = 0;
> > +}
> >  free_device_list(&opencl_ctx.device_list);
> >  end:
> >  if (opencl_ctx.init_count <= 0)
> >
> > Please incorporate this change.
> > Let me know if more info is needed regarding this.
> >
> Looks good to me.

applied

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.


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


Re: [FFmpeg-devel] [PATCH v2 4/4] changelog: add mips 64-bit port

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 11:57:33AM +, Nedeljko Babic wrote:
> LGTM

applied

thanks

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

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes


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


Re: [FFmpeg-devel] [PATCH v2 3/4] mips: port optimizations to mips n64

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 11:08:24AM +, Nedeljko Babic wrote:
> LGTM

applied

thanks

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

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


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


Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates

2015-03-06 Thread Claudio Freire
On Fri, Mar 6, 2015 at 9:59 AM, Michael Niedermayer  wrote:
> On Fri, Mar 06, 2015 at 04:28:38AM -0300, Claudio Freire wrote:
>> AAC: Add support for 7350Hz sampling rates, no error on too hight bitrate.
>>
>> Instead, warn that bitrate will be clamped down to the maximum allowed.
>>
>> Patch is mostly work of Kamendo2 in issue #2686, quite tested within that 
>> issue.
>>
>> Tested with abtest.sh and confirmed it does work as intended.
>
>>  aacenc.c |   23 ++-
>>  1 file changed, 18 insertions(+), 5 deletions(-)
>> 030cd61fb3e5180d38e3d7b70c9cdce46cf17b3b  aac-bugfixes-3.patch
>> From df43314a67ad625775795561d960c30408fcf892 Mon Sep 17 00:00:00 2001
>> From: Claudio Freire 
>> Date: Fri, 6 Mar 2015 04:05:32 -0300
>> Subject: [PATCH] AAC: Add support for 7350Hz sampling rates, no error on too
>>  hight bitrate.
>>
>> Instead, warn that bitrate will be clamped down to the maximum allowed.
>>
>> Patch is mostly work of Kamendo2 in issue #2686, quite tested within that 
>> issue.
>
> applied
>
> does it make sense to add a fate test for 7350Hz ?
>
> thanks


It does, but I'm not sure how that works.

I see that there's tests/fate/aac.mak with lots of tests, but

1- I'm not sure where the samples are, an extra sample at 7350hz would be needed
2- How to run that, make check dies at dct1d-4
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v2 2/4] configure, mips: remove MIPS32R2, merging it with MIPSFPU

2015-03-06 Thread Michael Niedermayer
On Thu, Mar 05, 2015 at 05:40:14PM +, James Cowgill wrote:
> There are no independant uses of mips32r2 instructions except for the
> FPU parts. Due to the heavy use of mips32r2 specifc fpu extensions, I
> am guessing the original author intended MIPSFPU to imply MIPS32R2 anyway.
> 
> Since these fpu instructions are available on mips64 (non-r2), enable them
> there as well.
> 
> Also remove the last occurence of HAVE_MIPS32R2 (which is coupled to
> HAVE_MIPSFPU anyway).
> 
> mips32r2 is left in the list of options form compatability so that using
> --disable-mips32r2 doesn't break anything.

applied

thanks

[...]
-- 
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 v2 1/4] mips/aacdec: remove uses of mips32r2 specific ext instructions

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 11:07:01AM +, Nedeljko Babic wrote:
> LGTM

applied

thanks

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

Republics decline into democracies and democracies degenerate into
despotisms. -- 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] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates

2015-03-06 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 04:28:38AM -0300, Claudio Freire wrote:
> AAC: Add support for 7350Hz sampling rates, no error on too hight bitrate.
> 
> Instead, warn that bitrate will be clamped down to the maximum allowed.
> 
> Patch is mostly work of Kamendo2 in issue #2686, quite tested within that 
> issue.
> 
> Tested with abtest.sh and confirmed it does work as intended.

>  aacenc.c |   23 ++-
>  1 file changed, 18 insertions(+), 5 deletions(-)
> 030cd61fb3e5180d38e3d7b70c9cdce46cf17b3b  aac-bugfixes-3.patch
> From df43314a67ad625775795561d960c30408fcf892 Mon Sep 17 00:00:00 2001
> From: Claudio Freire 
> Date: Fri, 6 Mar 2015 04:05:32 -0300
> Subject: [PATCH] AAC: Add support for 7350Hz sampling rates, no error on too
>  hight bitrate.
> 
> Instead, warn that bitrate will be clamped down to the maximum allowed.
> 
> Patch is mostly work of Kamendo2 in issue #2686, quite tested within that 
> issue.

applied

does it make sense to add a fate test for 7350Hz ?

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates


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


Re: [FFmpeg-devel] [PATCH v2 4/4] changelog: add mips 64-bit port

2015-03-06 Thread Nedeljko Babic
LGTM

Thanks,
Nedeljko

Od: James Cowgill [james...@cowgill.org.uk]
Poslato: 5. mart 2015 18:40
Za: ffmpeg-devel@ffmpeg.org
Cc: Nedeljko Babic; James Cowgill
Tema: [PATCH v2 4/4] changelog: add mips 64-bit port

---
 Changelog | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Changelog b/Changelog
index 1374cbc..2a5d6b8 100644
--- a/Changelog
+++ b/Changelog
@@ -36,6 +36,7 @@ version :
 - Canopus HQX decoder
 - RTP depacketization of T.140 text (RFC 4103)
 - VP9 RTP payload format (draft 0) experimental depacketizer
+- Port MIPS opttimizations to 64-bit


 version 2.5:
--
2.1.4

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


Re: [FFmpeg-devel] [PATCH] is_compiled flag not being cleared in av_opencl_uninit

2015-03-06 Thread Wei Gao
2015-03-05 8:48 GMT+08:00 Srikanth G :

> When OpenCL kernels are compiled, is_compiled flag is being set for each
> kernel. But, in opencl uninit, this flag is not being cleared.
> This causes an error when an OpenCL kernel is tried on different OpenCL
> devices on same platform.
>
> Here is the patch with a fix
>
> ---
>  libavutil/opencl.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/libavutil/opencl.c b/libavutil/opencl.c
> index 36cb6fe..a56029c 100644
> --- a/libavutil/opencl.c
> +++ b/libavutil/opencl.c
> @@ -611,6 +611,9 @@ void av_opencl_uninit(void)
>  }
>  opencl_ctx.context = NULL;
>  }
> + for (i = 0; i < opencl_ctx.kernel_code_count; i++) {
> +opencl_ctx.kernel_code[i].is_compiled = 0;
> +}
>  free_device_list(&opencl_ctx.device_list);
>  end:
>  if (opencl_ctx.init_count <= 0)
>
> Please incorporate this change.
> Let me know if more info is needed regarding this.
>
Looks good to me.
Thanks

>
>
> Thanks,
> Srikanth
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v2 3/4] mips: port optimizations to mips n64

2015-03-06 Thread Nedeljko Babic
LGTM

Thanks,
- Nedeljko

Od: James Cowgill [james...@cowgill.org.uk]
Poslato: 5. mart 2015 18:40
Za: ffmpeg-devel@ffmpeg.org
Cc: Nedeljko Babic; James Cowgill
Tema: [PATCH v2 3/4] mips: port optimizations to mips n64

This mainly consists of replacing all the pointer arithmatic 'addiu'
instructions with PTR_ADDIU which will handle the differences in pointer
sizes when compiled on 64 bit mips systems.

The header asmdefs.h contains the PTR_ macros which expend to the correct mips
instructions to manipulate registers containing pointers.

Signed-off-by: James Cowgill 
---
 libavcodec/mips/aacdec_mips.c | 21 +--
 libavcodec/mips/aacdec_mips.h |  9 ++---
 libavcodec/mips/aacpsdsp_mips.c   | 43 +++---
 libavcodec/mips/aacpsy_mips.h |  6 ++--
 libavcodec/mips/aacsbr_mips.c | 53 +--
 libavcodec/mips/aacsbr_mips.h | 17 -
 libavcodec/mips/ac3dsp_mips.c | 59 ---
 libavcodec/mips/acelp_filters_mips.c  | 13 +++
 libavcodec/mips/acelp_vectors_mips.c  |  7 ++--
 libavcodec/mips/celp_filters_mips.c   | 13 +++
 libavcodec/mips/celp_math_mips.c  |  5 +--
 libavcodec/mips/compute_antialias_float.h |  4 ++-
 libavcodec/mips/fft_mips.c| 13 +++
 libavcodec/mips/fmtconvert_mips.c |  6 ++--
 libavcodec/mips/lsp_mips.h|  6 ++--
 libavcodec/mips/mpegaudiodsp_mips_fixed.c | 11 +++---
 libavcodec/mips/mpegaudiodsp_mips_float.c | 25 ++---
 libavcodec/mips/sbrdsp_mips.c | 45 +++
 libavutil/mips/asmdefs.h  | 48 +
 libavutil/mips/float_dsp_mips.c   | 21 +--
 20 files changed, 247 insertions(+), 178 deletions(-)
 create mode 100644 libavutil/mips/asmdefs.h

diff --git a/libavcodec/mips/aacdec_mips.c b/libavcodec/mips/aacdec_mips.c
index 93947be..253cdeb 100644
--- a/libavcodec/mips/aacdec_mips.c
+++ b/libavcodec/mips/aacdec_mips.c
@@ -56,6 +56,7 @@
 #include "aacdec_mips.h"
 #include "libavcodec/aactab.h"
 #include "libavcodec/sinewin.h"
+#include "libavutil/mips/asmdefs.h"

 #if HAVE_INLINE_ASM
 static av_always_inline void float_copy(float *dst, const float *src, int 
count)
@@ -80,7 +81,7 @@ static av_always_inline void float_copy(float *dst, const 
float *src, int count)
 "lw  %[temp5],20(%[src]) \n\t"
 "lw  %[temp6],24(%[src]) \n\t"
 "lw  %[temp7],28(%[src]) \n\t"
-"addiu   %[src],  %[src],  32\n\t"
+PTR_ADDIU "%[src],%[src],  32\n\t"
 "sw  %[temp0],0(%[dst])  \n\t"
 "sw  %[temp1],4(%[dst])  \n\t"
 "sw  %[temp2],8(%[dst])  \n\t"
@@ -90,7 +91,7 @@ static av_always_inline void float_copy(float *dst, const 
float *src, int count)
 "sw  %[temp6],24(%[dst]) \n\t"
 "sw  %[temp7],28(%[dst]) \n\t"
 "bne %[src],  %[loop_end], 1b\n\t"
-"addiu   %[dst],  %[dst],  32\n\t"
+PTR_ADDIU "%[dst],%[dst],  32\n\t"
 ".set pop\n\t"

 : [temp0]"=&r"(temp[0]), [temp1]"=&r"(temp[1]),
@@ -250,7 +251,7 @@ static void apply_ltp_mips(AACContext *ac, 
SingleChannelElement *sce)
 "sw  $0,  4(%[p_predTime])\n\t"
 "sw  $0,  8(%[p_predTime])\n\t"
 "sw  $0,  12(%[p_predTime])   \n\t"
-"addiu   %[p_predTime],   %[p_predTime], 16   \n\t"
+PTR_ADDIU "%[p_predTime], %[p_predTime], 16   \n\t"

 : [p_predTime]"+r"(p_predTime)
 :
@@ -261,7 +262,7 @@ static void apply_ltp_mips(AACContext *ac, 
SingleChannelElement *sce)

 __asm__ volatile (
 "sw  $0,  0(%[p_predTime])\n\t"
-"addiu   %[p_predTime],   %[p_predTime], 4\n\t"
+PTR_ADDIU "%[p_predTime], %[p_predTime], 4\n\t"

 : [p_predTime]"+r"(p_predTime)
 :
@@ -315,9 +316,9 @@ static av_always_inline void fmul_and_reverse(float *dst, 
const float *src0, con
 "swc1%[temp9],4(%[ptr1])\n\t"
 "swc1%[temp10],   8(%[ptr1])\n\t"
 "swc1%[temp11],   12(%[ptr1])   \n\t"
-"addiu   %[ptr1], %[ptr1],  16  \n\t"
-"addiu   %[ptr2], %[ptr2],  -16 \n\t"
-"addiu   %[ptr3], %[ptr3],  -16 \n\t"
+PTR_ADDIU "%[ptr1],   %[ptr1],  16  \n\t"
+PTR_ADDIU "%[ptr2],   %[ptr2],  -16 \n\t"
+PTR_ADDIU "%[ptr3]

Re: [FFmpeg-devel] [PATCH v2 1/4] mips/aacdec: remove uses of mips32r2 specific ext instructions

2015-03-06 Thread Nedeljko Babic
LGTM

Thanks,
- Nedeljko

Od: James Cowgill [james...@cowgill.org.uk]
Poslato: 5. mart 2015 18:40
Za: ffmpeg-devel@ffmpeg.org
Cc: Nedeljko Babic; James Cowgill
Tema: [PATCH v2 1/4] mips/aacdec: remove uses of mips32r2 specific ext 
instructions

Removing these removes the dependency of this code on mips32r2 which would
allow it to be used on processors which have FPU instructions, but not r2
instructions (like the mips64el debian port for instance).

Signed-off-by: James Cowgill 
---
 libavcodec/mips/aacdec_mips.h | 49 ++-
 1 file changed, 25 insertions(+), 24 deletions(-)

diff --git a/libavcodec/mips/aacdec_mips.h b/libavcodec/mips/aacdec_mips.h
index 9ba3079..c9efdbb 100644
--- a/libavcodec/mips/aacdec_mips.h
+++ b/libavcodec/mips/aacdec_mips.h
@@ -68,10 +68,10 @@ static inline float *VMUL2_mips(float *dst, const float *v, 
unsigned idx,
 float *ret;

 __asm__ volatile(
-"andi%[temp3],  %[idx],   15   \n\t"
-"ext %[temp4],  %[idx],   4,  4\n\t"
+"andi%[temp3],  %[idx],   0x0F \n\t"
+"andi%[temp4],  %[idx],   0xF0 \n\t"
 "sll %[temp3],  %[temp3], 2\n\t"
-"sll %[temp4],  %[temp4], 2\n\t"
+"srl %[temp4],  %[temp4], 2\n\t"
 "lwc1%[temp2],  0(%[scale])\n\t"
 "lwxc1   %[temp0],  %[temp3](%[v]) \n\t"
 "lwxc1   %[temp1],  %[temp4](%[v]) \n\t"
@@ -99,14 +99,13 @@ static inline float *VMUL4_mips(float *dst, const float *v, 
unsigned idx,
 float *ret;

 __asm__ volatile(
-"andi%[temp0],  %[idx],   3   \n\t"
-"ext %[temp1],  %[idx],   2,  2   \n\t"
-"ext %[temp2],  %[idx],   4,  2   \n\t"
-"ext %[temp3],  %[idx],   6,  2   \n\t"
+"andi%[temp0],  %[idx],   0x03\n\t"
+"andi%[temp1],  %[idx],   0x0C\n\t"
+"andi%[temp2],  %[idx],   0x30\n\t"
+"andi%[temp3],  %[idx],   0xC0\n\t"
 "sll %[temp0],  %[temp0], 2   \n\t"
-"sll %[temp1],  %[temp1], 2   \n\t"
-"sll %[temp2],  %[temp2], 2   \n\t"
-"sll %[temp3],  %[temp3], 2   \n\t"
+"srl %[temp2],  %[temp2], 2   \n\t"
+"srl %[temp3],  %[temp3], 4   \n\t"
 "lwc1%[temp4],  0(%[scale])   \n\t"
 "lwxc1   %[temp5],  %[temp0](%[v])\n\t"
 "lwxc1   %[temp6],  %[temp1](%[v])\n\t"
@@ -142,14 +141,14 @@ static inline float *VMUL2S_mips(float *dst, const float 
*v, unsigned idx,
 float *ret;

 __asm__ volatile(
-"andi%[temp0],  %[idx],   15 \n\t"
-"ext %[temp1],  %[idx],   4, 4   \n\t"
+"andi%[temp0],  %[idx],   0x0F   \n\t"
+"andi%[temp1],  %[idx],   0xF0   \n\t"
 "lw  %[temp4],  0(%[scale])  \n\t"
 "srl %[temp2],  %[sign],  1  \n\t"
 "sll %[temp3],  %[sign],  31 \n\t"
 "sll %[temp2],  %[temp2], 31 \n\t"
 "sll %[temp0],  %[temp0], 2  \n\t"
-"sll %[temp1],  %[temp1], 2  \n\t"
+"srl %[temp1],  %[temp1], 2  \n\t"
 "lwxc1   %[temp8],  %[temp0](%[v])   \n\t"
 "lwxc1   %[temp9],  %[temp1](%[v])   \n\t"
 "xor %[temp5],  %[temp4], %[temp2]   \n\t"
@@ -185,22 +184,24 @@ static inline float *VMUL4S_mips(float *dst, const float 
*v, unsigned idx,

 __asm__ volatile(
 "lw  %[temp0],   0(%[scale])   \n\t"
-"and %[temp1],   %[idx],   3   \n\t"
-"ext %[temp2],   %[idx],   2,  2   \n\t"
-"ext %[temp3],   %[idx],   4,  2   \n\t"
-"ext %[temp4],   %[idx],   6,  2   \n\t"
-"sll %[temp1],   %[temp1], 2   \n\t"
-"sll %[temp2],   %[temp2], 2   \n\t"
-"sll %[temp3],   %[temp3], 2   \n\t"
-"sll %[temp4],   %[temp4], 2   \n\t"
+"andi%[temp1],  %[idx],   0x03 \n\t"
+"andi%[temp2],  %[idx],   0x0C \n\t"
+"andi%[temp3],  %[idx],   0x30 \n\t"
+"andi%[temp4],  %[idx],   0xC0 \n\t"
+"sll %[temp1],  %[temp1], 2\n\t"
+"srl %[temp3],  %[temp3], 2\n\t"
+"srl %[temp4],  %[temp4], 4\n\t"
 "lwxc1   %[temp10],  %[temp1](%[v])\n\t"
 "lwxc1   %[temp11],  %[temp2](%[v])\n\t"
 "lwxc1

Re: [FFmpeg-devel] [PATCH] MAINTAINERS: Remove 1.2 from the maintained releases

2015-03-06 Thread Michael Niedermayer
On Sat, Feb 14, 2015 at 01:14:45PM +0100, Alexis Ballier wrote:
> On Fri, 13 Feb 2015 17:56:41 +0100
> Michael Niedermayer  wrote:
> 
> 
> > no security updates for FFmpeg 1.2 and "gentoo stable" but its
> > http://www.gentoo.org/security/en/glsa/index.xml also lists no
> > security updates for 1.2 also
> > http://packages.gentoo.org/package/media-video/ffmpeg lists stable as
> > shipping 1.2.6 which is 6 point releases behind so it appears our
> > security updates do not reach these distributions and continued
> > maintaince from us would in that case be a waste of time
> 
> 
> thanks for the notice; don't worry about gentoo: we're in the process
> of moving to latest 2.2 for stable.
> 
> as for security updates, better refer to what is stable from
> packages.gentoo.org for a more up to date view: since we're a rolling
> distro, pushing security updates to stable is what is done the
> quickest, while official security announcements are usually a bit
> delayed (but with more information, etc.)

ok, reworded the commit message a bit and applied

thanks

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

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway


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


[FFmpeg-devel] [PATCH] avformat/http: support auto reconnect

2015-03-06 Thread Zhang Rui
---
 libavformat/http.c | 32 +++-
 1 file changed, 27 insertions(+), 5 deletions(-)

diff --git a/libavformat/http.c b/libavformat/http.c
index 55dcb6e..9d44f3b 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -93,6 +93,7 @@ typedef struct HTTPContext {
 AVDictionary *chained_options;
 int send_expect_100;
 char *method;
+int reconnect;
 } HTTPContext;
 
 #define OFFSET(x) offsetof(HTTPContext, x)
@@ -123,6 +124,7 @@ static const AVOption options[] = {
 { "offset", "initial byte offset", OFFSET(off), AV_OPT_TYPE_INT64, { .i64 
= 0 }, 0, INT64_MAX, D },
 { "end_offset", "try to limit the request to bytes preceding this offset", 
OFFSET(end_off), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, D },
 { "method", "Override the HTTP method", OFFSET(method), 
AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E },
+{ "reconnect", "auto reconnect after disconnect before EOF", 
OFFSET(reconnect), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, D },
 { NULL }
 };
 
@@ -908,10 +910,12 @@ static int http_buf_read_compressed(URLContext *h, 
uint8_t *buf, int size)
 }
 #endif /* CONFIG_ZLIB */
 
+static int64_t http_seek_internal(URLContext *h, int64_t off, int whence, int 
force_reconnect);
+
 static int http_read_stream(URLContext *h, uint8_t *buf, int size)
 {
 HTTPContext *s = h->priv_data;
-int err, new_location;
+int err, new_location, read_ret, seek_ret;
 
 if (!s->hd)
 return AVERROR_EOF;
@@ -945,7 +949,19 @@ static int http_read_stream(URLContext *h, uint8_t *buf, 
int size)
 if (s->compressed)
 return http_buf_read_compressed(h, buf, size);
 #endif /* CONFIG_ZLIB */
-return http_buf_read(h, buf, size);
+read_ret = http_buf_read(h, buf, size);
+if (s->reconnect && s->filesize > 0 && s->off < s->filesize && read_ret < 
0) {
+av_log(h, AV_LOG_WARNING, "Will reconnect at %"PRId64".\n", s->off);
+seek_ret = http_seek_internal(h, s->off, SEEK_SET, 1);
+if (seek_ret != s->off) {
+av_log(h, AV_LOG_WARNING, "Failed to reconnect at %"PRId64".\n", 
s->off);
+return read_ret;
+}
+
+read_ret = http_buf_read(h, buf, size);
+}
+
+return read_ret;
 }
 
 // Like http_read_stream(), but no short reads.
@@ -1104,7 +1120,7 @@ static int http_close(URLContext *h)
 return ret;
 }
 
-static int64_t http_seek(URLContext *h, int64_t off, int whence)
+static int64_t http_seek_internal(URLContext *h, int64_t off, int whence, int 
force_reconnect)
 {
 HTTPContext *s = h->priv_data;
 URLContext *old_hd = s->hd;
@@ -1115,8 +1131,9 @@ static int64_t http_seek(URLContext *h, int64_t off, int 
whence)
 
 if (whence == AVSEEK_SIZE)
 return s->filesize;
-else if ((whence == SEEK_CUR && off == 0) ||
- (whence == SEEK_SET && off == s->off))
+else if (!force_reconnect &&
+ ((whence == SEEK_CUR && off == 0) ||
+  (whence == SEEK_SET && off == s->off)))
 return s->off;
 else if ((s->filesize == -1 && whence == SEEK_END) || h->is_streamed)
 return AVERROR(ENOSYS);
@@ -1151,6 +1168,11 @@ static int64_t http_seek(URLContext *h, int64_t off, int 
whence)
 return off;
 }
 
+static int64_t http_seek(URLContext *h, int64_t off, int whence)
+{
+return http_seek_internal(h, off, whence, 0);
+}
+
 static int http_get_file_handle(URLContext *h)
 {
 HTTPContext *s = h->priv_data;
-- 
2.0.0

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