Re: [FFmpeg-devel] Patch for libavcodec/exr.c implementing B44 compression technique

2015-03-18 Thread greeshma
On Wed, Mar 18, 2015 at 9:37 PM, Derek Buitenhuis <
derek.buitenh...@gmail.com> wrote:

> On 3/18/2015 2:20 PM, Derek Buitenhuis wrote:
> > Also, if you wrote this code, this copyright is both incorrect
> > and makes it non-free.
>
> Hi,
>

Thanks for pointing out the mistakes.

So after checking, the vast majority of this patch is copy & pasted
> from OpenEXR.
>
> On that note, a few points:
>
> 1. You have no properly recreated the license and copyright from OpenEXR,
>which is under 3-clause BSD.
>
> 2. Copying I believe copying and pasting is not in the spirit of GSOC,
>and does not deserve to be a passing grade for the qualifying task.
>

Yes, I have based major functions like unpack14 and unpack3 on Code from
OpenEXR.Since this is the first time working on Open Source Software (even
last time i worked i couldn't finish the task) i have taken code from other
sources. I got to know about the OpenExr from the Copyrights of exr.c file.
This is not the final patch. I would definitely work on the functions and
modify them accordingly.

>
> - Derek
> ___
> 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 2/2] libavutil: add bmi2 optimized av_mod_uintp2

2015-03-18 Thread James Almer
Signed-off-by: James Almer 
---
 libavutil/x86/intmath.h | 24 ++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/libavutil/x86/intmath.h b/libavutil/x86/intmath.h
index 7aa6bc4..c42fa83 100644
--- a/libavutil/x86/intmath.h
+++ b/libavutil/x86/intmath.h
@@ -24,15 +24,35 @@
 #include 
 #include "config.h"
 
+#if defined(__GNUC__)
+
 /* Our generic version of av_popcount is faster than GCC's built-in on
  * CPUs that don't support the popcnt instruction.
  */
-#if defined(__GNUC__) && defined(__POPCNT__)
+#if defined(__POPCNT__)
 #define av_popcount   __builtin_popcount
 #if ARCH_X86_64
 #define av_popcount64 __builtin_popcountll
 #endif
 
-#endif /* defined(__GNUC__) && defined(__POPCNT__) */
+#endif /* __POPCNT__ */
+
+#if defined(__BMI2__)
+
+#define av_mod_uintp2 av_mod_uintp2_bmi2
+static av_always_inline av_const unsigned av_mod_uintp2_bmi2(unsigned a, 
unsigned p)
+{
+if (av_builtin_constant_p(p))
+return a & ((1 << p) - 1);
+else {
+unsigned x;
+__asm__ ("bzhi %2, %1, %0 \n\t" : "=r"(x) : "rm"(a), "r"(p));
+return x;
+}
+}
+
+#endif /* __BMI2__ */
+
+#endif /* __GNUC__ */
 
 #endif /* AVUTIL_X86_INTMATH_H */
-- 
2.3.2

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


[FFmpeg-devel] [PATCH 1/2] libavutil: add av_mod_uintp2

2015-03-18 Thread James Almer
Signed-off-by: James Almer 
---
 libavutil/common.h | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/libavutil/common.h b/libavutil/common.h
index 852c1de..3e62b6d 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -211,6 +211,17 @@ static av_always_inline av_const unsigned 
av_clip_uintp2_c(int a, int p)
 }
 
 /**
+ * Clear high bits from an unsigned integer starting with specific bit position
+ * @param  a value to clip
+ * @param  p bit position to clip at
+ * @return clipped value
+ */
+static av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned 
p)
+{
+return a & ((1 << p) - 1);
+}
+
+/**
  * Add two signed 32-bit values with saturation.
  *
  * @param  a one value
@@ -466,6 +477,9 @@ static av_always_inline av_const int 
av_popcount64_c(uint64_t x)
 #ifndef av_clip_uintp2
 #   define av_clip_uintp2   av_clip_uintp2_c
 #endif
+#ifndef av_mod_uintp2
+#   define av_mod_uintp2av_mod_uintp2_c
+#endif
 #ifndef av_sat_add32
 #   define av_sat_add32 av_sat_add32_c
 #endif
-- 
2.3.2

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


[FFmpeg-devel] Blackmagic Design Intensity Pro 4K - Decklink - Problem to select RGB color space

2015-03-18 Thread Gonzalo Berdeal
Dear ffmpeg developers,

First of all, congrats for your incredible software.

I am using ffmpeg compiled with option Decklink and linked with Deckling
API to capture hdmi video. I have been using the Intensity Pro with
success. But l have just bought the new Intensity Pro 4K and I can not make
it work (however, it works fine with official desktop software).

I think the problem might be on the need of specifying the color space.
With the official software I have to select "Capture File Format" from
between:

AVI 8-bitYUV
AVI 10-bit YUV
AVI 10-bit RGB
AVI Motion JPEG
DPX 10-bit RGB

but with ffmpeg I can not find any option to specify color space. Option
"bm_v210" allows me to select between default (YUV 8-bit) and uyvy422 (YUV
10-bit), but I would need also "10-bit RGB" option.

Looking inside the source code (libavutil/avconfig.h) I have found
definitions of pix_fmt for RGB444. Could it be possible to add as an extra
option for ffmpeg when using Deckling devices the variable to support more
color spaces? Do you think this could fix the problem with the Intensity
Pro 4K?

Thank you very much in advance.
Best regards.

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


Re: [FFmpeg-devel] GSoc Qualification Task - Implementing Compression technique B44 as a part of exr format (libavcodec/exr.c)

2015-03-18 Thread greeshma
Greeshma



On Wed, Mar 18, 2015 at 4:28 AM, Michael Niedermayer 
wrote:

> On Mon, Mar 16, 2015 at 11:49:09PM +0530, greeshma wrote:
> > Hello ,
> >
> > I have implemented B44 lossy compression technique.The first patch is
> > hereby attached.Please have a look.
> > The diff file is also attached.
>
> Did you use any previously existing code to implement this?

Yes, I have wrote code based on already existing code .


> If so please add a link to that code and make sure you add
> copyright / author attribution of the material you used
> to the changed file and make sure its license is compatible
>

Yes,for sure.

>
> thanks
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> I am the wisest man alive, for I know one thing, and that is that I know
> nothing. -- Socrates
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] mxfenc: ensure mxf->body_partition_offset is not NULL before using it

2015-03-18 Thread Michael Niedermayer
On Wed, Mar 18, 2015 at 10:01:36PM +0100, Andreas Cadhalpun wrote:
> On 18.03.2015 16:59, tomas.har...@codemill.se wrote:
> > On 2015-03-17 16:13, Andreas Cadhalpun wrote:
> >> On 17.03.2015 10:17, tomas.har...@codemill.se wrote:
> >>> On 2015-03-14 18:03, Andreas Cadhalpun wrote:
> >>> [PATCH 2/2] mxfenc: don't try to write footer without header:
> >>>
>  +if (!mxf->header_written ||
>  +(s->oformat == &ff_mxf_opatom_muxer && 
>  !mxf->body_partition_offset)) {
>  +err = AVERROR_UNKNOWN;
>  +goto end;
>  +}
>  +
> >>>
> >>> AVERROR_UNKNOWN?
> >>
> >> It's unclear why the header was not written or body_partition_offset
> >> not allocated. It could e.g. be due to invalid options, not supported
> >> codecs, or just out of memory.
> >> Do you think AVERROR(EINVAL) or even just -1 would be better?
> >>
> >> Best regards,
> >> Andreas
> > 
> > No preference really. Perhaps a comment though?
> 
> OK. New patch with comment attached.
> 
> Best regards,
> Andreas
> 

>  mxfenc.c |7 +++
>  1 file changed, 7 insertions(+)
> db5cf2fdfe8a815e8785669644690907a9a5a7fe  
> 0001-mxfenc-don-t-try-to-write-footer-without-header.patch
> From 1424c87b9a786555b294fb9daa9fd2a67be9a30d Mon Sep 17 00:00:00 2001
> From: Andreas Cadhalpun 
> Date: Wed, 18 Mar 2015 21:57:58 +0100
> Subject: [PATCH] mxfenc: don't try to write footer without header
> 
> This fixes a crash, when trying to mux h264 into mxf_opatom.

applied

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle


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


Re: [FFmpeg-devel] Ticket 3530 : Fix proposal

2015-03-18 Thread Michael Niedermayer
On Thu, Mar 19, 2015 at 12:21:11AM +0100, Martin Vignali wrote:
> In attach a patch for ticket 3530 :
> https://trac.ffmpeg.org/ticket/3530
> 
> the file Apache_cut.aif of ticket 3530, works after the patch
> 
> But i'm not sure, this is the best way to correct it, because
> with this sample file, avio_feof return 1 before the end of the file.
> (tested with Mac os 10.9, Clang)

fixed differently

thanks for debuging this!

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"


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


[FFmpeg-devel] Ticket 3530 : Fix proposal

2015-03-18 Thread Martin Vignali
In attach a patch for ticket 3530 :
https://trac.ffmpeg.org/ticket/3530

the file Apache_cut.aif of ticket 3530, works after the patch

But i'm not sure, this is the best way to correct it, because
with this sample file, avio_feof return 1 before the end of the file.
(tested with Mac os 10.9, Clang)

Martin


0001-Fix-ticket-3530.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] web/index: add link to ff-facebook

2015-03-18 Thread Michael Niedermayer
On Wed, Mar 18, 2015 at 10:00:21PM +0100, Alexander Strasser wrote:
> On 2015-03-18 20:10 +0100, Michael Niedermayer wrote:
> > ---
> >  src/index |3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/src/index b/src/index
> > index d4fbc37..fbb3c05 100644
> > --- a/src/index
> > +++ b/src/index
> > @@ -31,7 +31,8 @@
> > 
> >  
> >https://plus.google.com/108003112428040046828?prsrc=3"; 
> > rel="publisher" style="text-decoration:none;">
> >    
> > -  https://twitter.com/FFmpeg";>
> > +  https://twitter.com/FFmpeg";>  
> > +  https://www.facebook.com/ffmpeg.org";>
> >  
> >  News
> >
> 
>   LGTM. I think it should be fine if it looks good and resulting HTML is 
> valid.

should be and should look good

applied

thanks

[...]

-- 
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] mxfenc: ensure mxf->body_partition_offset is not NULL before using it

2015-03-18 Thread Andreas Cadhalpun
On 18.03.2015 16:59, tomas.har...@codemill.se wrote:
> On 2015-03-17 16:13, Andreas Cadhalpun wrote:
>> On 17.03.2015 10:17, tomas.har...@codemill.se wrote:
>>> On 2015-03-14 18:03, Andreas Cadhalpun wrote:
>>> [PATCH 2/2] mxfenc: don't try to write footer without header:
>>>
 +if (!mxf->header_written ||
 +(s->oformat == &ff_mxf_opatom_muxer && 
 !mxf->body_partition_offset)) {
 +err = AVERROR_UNKNOWN;
 +goto end;
 +}
 +
>>>
>>> AVERROR_UNKNOWN?
>>
>> It's unclear why the header was not written or body_partition_offset
>> not allocated. It could e.g. be due to invalid options, not supported
>> codecs, or just out of memory.
>> Do you think AVERROR(EINVAL) or even just -1 would be better?
>>
>> Best regards,
>> Andreas
> 
> No preference really. Perhaps a comment though?

OK. New patch with comment attached.

Best regards,
Andreas

>From 1424c87b9a786555b294fb9daa9fd2a67be9a30d Mon Sep 17 00:00:00 2001
From: Andreas Cadhalpun 
Date: Wed, 18 Mar 2015 21:57:58 +0100
Subject: [PATCH] mxfenc: don't try to write footer without header

This fixes a crash, when trying to mux h264 into mxf_opatom.

Signed-off-by: Andreas Cadhalpun 
---
 libavformat/mxfenc.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index e9c4a9d..0349e5d 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -2402,6 +2402,13 @@ static int mxf_write_footer(AVFormatContext *s)
 AVIOContext *pb = s->pb;
 int err = 0;
 
+if (!mxf->header_written ||
+(s->oformat == &ff_mxf_opatom_muxer && !mxf->body_partition_offset)) {
+/* reason could be invalid options/not supported codec/out of memory */
+err = AVERROR_UNKNOWN;
+goto end;
+}
+
 mxf->duration = mxf->last_indexed_edit_unit + mxf->edit_units_count;
 
 mxf_write_klv_fill(s);
-- 
2.1.4

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


Re: [FFmpeg-devel] [PATCH] web/index: add link to ff-facebook

2015-03-18 Thread Alexander Strasser
On 2015-03-18 20:10 +0100, Michael Niedermayer wrote:
> ---
>  src/index |3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/index b/src/index
> index d4fbc37..fbb3c05 100644
> --- a/src/index
> +++ b/src/index
> @@ -31,7 +31,8 @@
> 
>  
>https://plus.google.com/108003112428040046828?prsrc=3"; 
> rel="publisher" style="text-decoration:none;">
>    
> -  https://twitter.com/FFmpeg";>
> +  https://twitter.com/FFmpeg";>  
> +  https://www.facebook.com/ffmpeg.org";>
>  
>  News
>

  LGTM. I think it should be fine if it looks good and resulting HTML is valid.

Thanks,
  Alexander


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


[FFmpeg-devel] [PATCH] web/index: add link to ff-facebook

2015-03-18 Thread Michael Niedermayer
---
 src/index |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/index b/src/index
index d4fbc37..fbb3c05 100644
--- a/src/index
+++ b/src/index
@@ -31,7 +31,8 @@
 
   https://plus.google.com/108003112428040046828?prsrc=3"; 
rel="publisher" style="text-decoration:none;">
   
-  https://twitter.com/FFmpeg";>
+  https://twitter.com/FFmpeg";>  
+  https://www.facebook.com/ffmpeg.org";>
 
 News
   
-- 
1.7.9.5

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


Re: [FFmpeg-devel] [PATCH] replace cookies with updated values

2015-03-18 Thread Michael Niedermayer
On Tue, Mar 17, 2015 at 08:55:11PM +1100, Micah Galizia wrote:
> Hi,
> 
> The current Set-Cookie handling appends cookies to the string without
> checking to see if a cookie with the same name should have its value
> updated.
> 
> This is my second attempt to fix this issue -- last time it was a bit
> of a string parsing nightmare. This time its a little less complex
> (using a dictionary).
> 
> Before we start the "the existing implementation sucks, change it"
> discussion I've looked into passing them around in their dictionary
> form (an only using the string to initialize cookies from an external
> source) but so far as I can tell, AVDictonary cannot be retrieved
> using av_opt_get or av_opt_find right now.
> 
> Anyway, I hope this is sufficient for inclusion.
> 
> TIA
> -- 
> "The mark of an immature man is that he wants to die nobly for a
> cause, while the mark of the mature man is that he wants to live
> humbly for one."   --W. Stekel

>  http.c |   65 
> -
>  1 file changed, 52 insertions(+), 13 deletions(-)
> 186645452fc5d5febd374b5ab91a1d9215ece986  
> 0003-replace-cookies-with-updated-values-instead-of-appen.patch
> From 18b00063d177965facd805d6b89eb96af371de94 Mon Sep 17 00:00:00 2001
> From: Micah Galizia 
> Date: Tue, 17 Mar 2015 20:22:59 +1100
> Subject: [PATCH 3/3] replace cookies with updated values instead of appending
>  forever

applied

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras


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


Re: [FFmpeg-devel] [PATCH] mips/float_dsp: fix vector_fmul_window_mips on mips64

2015-03-18 Thread Michael Niedermayer
On Wed, Mar 18, 2015 at 02:50:29PM +, Nedeljko Babic wrote:
> LGTM

applied

thanks

> 
> Thanks,
> - Nedeljko
> 
> Od: ffmpeg-devel-boun...@ffmpeg.org [ffmpeg-devel-boun...@ffmpeg.org] u ime 
> korisnika James Cowgill [james...@cowgill.org.uk]
> Poslato: 18. mart 2015 14:02
> Za: ffmpeg-devel@ffmpeg.org
> Cc: Nedeljko Babic; James Cowgill
> Tema: [FFmpeg-devel] [PATCH] mips/float_dsp: fix vector_fmul_window_mips  
>   on mips64
> 
> Commit dfa920807494 ("mips/float_dsp: fix a bug in vector_fmul_window_mips")
> fixed vector_fmul_window_mips by unrolling the loop only 4 times, but also
> removed the outer C loop and replaced it with assembly branches and pointer
> arithmetic. When submitting my 64-bit porting patch I missed this new
> assembly which also needed porting.
> 
> This patch fixes a bus error in the fate-float-dsp test when run on 64-bit
> mips.
> 
> Signed-off-by: James Cowgill 
> Cc: Nedeljko Babic 
> ---
>  libavutil/mips/float_dsp_mips.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/libavutil/mips/float_dsp_mips.c b/libavutil/mips/float_dsp_mips.c
> index a455687..b3a812c 100644
> --- a/libavutil/mips/float_dsp_mips.c
> +++ b/libavutil/mips/float_dsp_mips.c
> @@ -188,10 +188,10 @@ static void vector_fmul_window_mips(float *dst, const 
> float *src0,
>  "lwc1%[wj3],   -12(%[win_j])\n\t"
>  "lwc1%[s0], 8(%[src0_i])\n\t"
>  "lwc1%[s01],12(%[src0_i])   \n\t"
> -"addiu   %[src1_j],-16  \n\t"
> -"addiu   %[win_i],  16  \n\t"
> -"addiu   %[win_j], -16  \n\t"
> -"addiu   %[src0_i], 16  \n\t"
> +PTR_ADDIU "%[src1_j],-16\n\t"
> +PTR_ADDIU "%[win_i],16  \n\t"
> +PTR_ADDIU "%[win_j],-16 \n\t"
> +PTR_ADDIU "%[src0_i],16 \n\t"
>  "swc1%[temp],   0(%[dst_i]) \n\t" /* dst[i] = 
> s0*wj - s1*wi; */
>  "swc1%[temp1],  0(%[dst_j]) \n\t" /* dst[j] = 
> s0*wi + s1*wj; */
>  "swc1%[temp2],  4(%[dst_i]) \n\t" /* dst[i+1] = 
> s01*wj1 - s11*wi1; */
> @@ -208,8 +208,8 @@ static void vector_fmul_window_mips(float *dst, const 
> float *src0,
>  "swc1%[temp1], -8(%[dst_j]) \n\t" /* dst[j-2] = 
> s0*wi2 + s1*wj2; */
>  "swc1%[temp2],  12(%[dst_i])\n\t" /* dst[i+2] = 
> s01*wj3 - s11*wi3; */
>  "swc1%[temp3], -12(%[dst_j])\n\t" /* dst[j-3] = 
> s01*wi3 + s11*wj3; */
> -"addiu   %[dst_i],  16  \n\t"
> -"addiu   %[dst_j], -16  \n\t"
> +PTR_ADDIU "%[dst_i],16  \n\t"
> +PTR_ADDIU "%[dst_j],-16 \n\t"
>  "bne %[win_i], %[lp_end], 1b\n\t"
>  : [temp]"=&f"(temp), [temp1]"=&f"(temp1), [temp2]"=&f"(temp2),
>[temp3]"=&f"(temp3), [src0_i]"+r"(src0_i), [win_i]"+r"(win_i),
> --
> 2.1.4
> 
> ___
> 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
> 

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- 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 for libavcodec/exr.c implementing B44 compression technique

2015-03-18 Thread Derek Buitenhuis
On 3/18/2015 2:20 PM, Derek Buitenhuis wrote:
> Also, if you wrote this code, this copyright is both incorrect
> and makes it non-free.

Hi,

So after checking, the vast majority of this patch is copy & pasted
from OpenEXR.

On that note, a few points:

1. You have no properly recreated the license and copyright from OpenEXR,
   which is under 3-clause BSD.

2. Copying I believe copying and pasting is not in the spirit of GSOC,
   and does not deserve to be a passing grade for the qualifying task.

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


Re: [FFmpeg-devel] [PATCH] mxfenc: ensure mxf->body_partition_offset is not NULL before using it

2015-03-18 Thread tomas . hardin

On 2015-03-17 16:13, Andreas Cadhalpun wrote:

On 17.03.2015 10:17, tomas.har...@codemill.se wrote:

On 2015-03-14 18:03, Andreas Cadhalpun wrote:
[PATCH 2/2] mxfenc: don't try to write footer without header:


+if (!mxf->header_written ||
+(s->oformat == &ff_mxf_opatom_muxer && 
!mxf->body_partition_offset)) {

+err = AVERROR_UNKNOWN;
+goto end;
+}
+


AVERROR_UNKNOWN?


It's unclear why the header was not written or body_partition_offset
not allocated. It could e.g. be due to invalid options, not supported
codecs, or just out of memory.
Do you think AVERROR(EINVAL) or even just -1 would be better?

Best regards,
Andreas


No preference really. Perhaps a comment though?

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


Re: [FFmpeg-devel] [PATCH]Do not set bitrate for DTS-HD Master and High Resolution

2015-03-18 Thread Marcus Johnson
That's even worse, is there any way we can fix it? how much effort would it
require?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] mips/float_dsp: fix vector_fmul_window_mips on mips64

2015-03-18 Thread Nedeljko Babic
LGTM

Thanks,
- Nedeljko

Od: ffmpeg-devel-boun...@ffmpeg.org [ffmpeg-devel-boun...@ffmpeg.org] u ime 
korisnika James Cowgill [james...@cowgill.org.uk]
Poslato: 18. mart 2015 14:02
Za: ffmpeg-devel@ffmpeg.org
Cc: Nedeljko Babic; James Cowgill
Tema: [FFmpeg-devel] [PATCH] mips/float_dsp: fix vector_fmul_window_mips
on mips64

Commit dfa920807494 ("mips/float_dsp: fix a bug in vector_fmul_window_mips")
fixed vector_fmul_window_mips by unrolling the loop only 4 times, but also
removed the outer C loop and replaced it with assembly branches and pointer
arithmetic. When submitting my 64-bit porting patch I missed this new
assembly which also needed porting.

This patch fixes a bus error in the fate-float-dsp test when run on 64-bit
mips.

Signed-off-by: James Cowgill 
Cc: Nedeljko Babic 
---
 libavutil/mips/float_dsp_mips.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavutil/mips/float_dsp_mips.c b/libavutil/mips/float_dsp_mips.c
index a455687..b3a812c 100644
--- a/libavutil/mips/float_dsp_mips.c
+++ b/libavutil/mips/float_dsp_mips.c
@@ -188,10 +188,10 @@ static void vector_fmul_window_mips(float *dst, const 
float *src0,
 "lwc1%[wj3],   -12(%[win_j])\n\t"
 "lwc1%[s0], 8(%[src0_i])\n\t"
 "lwc1%[s01],12(%[src0_i])   \n\t"
-"addiu   %[src1_j],-16  \n\t"
-"addiu   %[win_i],  16  \n\t"
-"addiu   %[win_j], -16  \n\t"
-"addiu   %[src0_i], 16  \n\t"
+PTR_ADDIU "%[src1_j],-16\n\t"
+PTR_ADDIU "%[win_i],16  \n\t"
+PTR_ADDIU "%[win_j],-16 \n\t"
+PTR_ADDIU "%[src0_i],16 \n\t"
 "swc1%[temp],   0(%[dst_i]) \n\t" /* dst[i] = 
s0*wj - s1*wi; */
 "swc1%[temp1],  0(%[dst_j]) \n\t" /* dst[j] = 
s0*wi + s1*wj; */
 "swc1%[temp2],  4(%[dst_i]) \n\t" /* dst[i+1] = 
s01*wj1 - s11*wi1; */
@@ -208,8 +208,8 @@ static void vector_fmul_window_mips(float *dst, const float 
*src0,
 "swc1%[temp1], -8(%[dst_j]) \n\t" /* dst[j-2] = 
s0*wi2 + s1*wj2; */
 "swc1%[temp2],  12(%[dst_i])\n\t" /* dst[i+2] = 
s01*wj3 - s11*wi3; */
 "swc1%[temp3], -12(%[dst_j])\n\t" /* dst[j-3] = 
s01*wi3 + s11*wj3; */
-"addiu   %[dst_i],  16  \n\t"
-"addiu   %[dst_j], -16  \n\t"
+PTR_ADDIU "%[dst_i],16  \n\t"
+PTR_ADDIU "%[dst_j],-16 \n\t"
 "bne %[win_i], %[lp_end], 1b\n\t"
 : [temp]"=&f"(temp), [temp1]"=&f"(temp1), [temp2]"=&f"(temp2),
   [temp3]"=&f"(temp3), [src0_i]"+r"(src0_i), [win_i]"+r"(win_i),
--
2.1.4

___
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]Do not set bitrate for DTS-HD Master and High Resolution

2015-03-18 Thread Hendrik Leppkes
On Wed, Mar 18, 2015 at 3:40 PM, Marcus Johnson
 wrote:
> I see, I thought it counted frames and not just multiplied the bitrate by
> the number of frames.

It just divides the file size by the bitrate. It doesn't count frames
at all, its not equipped for that.
If it were, it could provide accurate duration values, but alas, it cannot.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]Do not set bitrate for DTS-HD Master and High Resolution

2015-03-18 Thread Marcus Johnson
I see, I thought it counted frames and not just multiplied the bitrate by
the number of frames.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Patch for libavcodec/exr.c implementing B44 compression technique

2015-03-18 Thread Derek Buitenhuis
On 3/18/2015 2:08 PM, greeshma wrote:
> The .diff file is also attached henceforth.Please have a look.

This is still not a git-format patch as required and asked for
by Michael.

Also, the style and formatting is all over the place - that is,
there is no consistent style or formatting at all. Please fix
this so it is in line with our development style (see the
contributing document on ffmpeg.org).

Review follows.

> + * @file
> + * OpenEXR decoder
> + * Digital Ltd. LLC
> + * All rights reserved.
> + *
> + * For more information on the OpenEXR format, visit:
> + *  http://openexr.com/

@file only goes in a file once.

Also, if you wrote this code, this copyright is both incorrect
and makes it non-free.

> static
> +void unpack14 (const unsigned char b[14], unsigned short s[16])

Do not use unsigned char. Use uint8_t. This applies to all further uses.

> +{
> +//
> +// Unpack a 14-byte block into 4 by 4 16-bit pixels.
> +//
> +unsigned short shift,bias;

Do not use unsigned short. Use uint16_t. This applies to all further uses.

> +#if defined (DEBUG)
> +assert (b[2] != 0xfc);
> +#endif

This ifdef is pointless.

Please use one of the av_assert functions.

> +static int b44_uncompress(EXRContext *s, const uint8_t *src,int 
> compressed_size, int uncompressed_size,
> +EXRThreadData *td)
> +{
> +unsigned long dest_len = uncompressed_size;

Do not use long, and especially do not out ints in a long. This is not portable.

> +uint8_t *out;
> +int i, j;
> +//int c;

Don't leave in commented out code.

> +memcpy (ptr, inPtr, n);
> +inPtr += n;
> +inSize -= n;

There should probably be a buf size check somewhere, no?

Same for the rest of the buf stuff.

> +int num = (x + 3 < s->xdelta)? 4 * sizeof (unsigned 
> short) : (s->xdelta - x) * sizeof (unsigned short);

NIT: We usually use sizeof(*thing) instead of sizeof(type_of_thing).

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


Re: [FFmpeg-devel] [PATCH v2] mov: Add option to keep exact packet sequence after seeking

2015-03-18 Thread Michael Niedermayer
On Wed, Mar 18, 2015 at 02:04:29PM +, Derek Buitenhuis wrote:
> On 3/18/2015 2:01 PM, Michael Niedermayer wrote:
> > LGTM but like the previous version i did not verify that it actually
> > produces the same sequence of packets, i dont think its critical to
> > verify that ...
> 
> I've verified this patch on several pathological samples I have, and it works.

ok, i wasnt aware of that
thanks

[...]
-- 
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


[FFmpeg-devel] Patch for libavcodec/exr.c implementing B44 compression technique

2015-03-18 Thread greeshma
The .diff file is also attached henceforth.Please have a look.


diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 6251fb7..cc15a3a 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -770,6 +770,163 @@ static int piz_uncompress(EXRContext *s, const
uint8_t *src, int ssize,
 return 0;
 }

+
+/*
+
+*
+ * @file
+ * OpenEXR decoder
+ * Digital Ltd. LLC
+ * All rights reserved.
+ *
+ * For more information on the OpenEXR format, visit:
+ *  http://openexr.com/
+
+implemetation of B44_uncompress method which is a lossy compression method
which the following features
+
+compression rate 32/14
+works only on channels of HALF .It'll not work on FLOAT and UINT
+the compression method is as follows: It interprets 32byte input data as
16 - 16 bit integers
+It divides it into blocks of 4 by 4 pixels.Itt compresses 16 into 14 bytes.
+*/
+
+static
+void unpack14 (const unsigned char b[14], unsigned short s[16])
+{
+//
+// Unpack a 14-byte block into 4 by 4 16-bit pixels.
+//
+unsigned short shift,bias;
+#if defined (DEBUG)
+assert (b[2] != 0xfc);
+#endif
+s[ 0] = (b[0] << 8) | b[1];
+shift = (b[ 2] >> 2);
+bias = (0x20 << shift);
+s[ 4] = s[ 0] + b[ 2] << 4) | (b[ 3] >> 4)) & 0x3f) << shift) -
bias;
+s[ 8] = s[ 4] + b[ 3] << 2) | (b[ 4] >> 6)) & 0x3f) << shift) -
bias;
+s[12] = s[ 8] +   ((b[ 4]   & 0x3f) << shift) -
bias;
+s[ 1] = s[ 0] +   ((b[ 5] >> 2) << shift) -
bias;
+s[ 5] = s[ 4] + b[ 5] << 4) | (b[ 6] >> 4)) & 0x3f) << shift) -
bias;
+s[ 9] = s[ 8] + b[ 6] << 2) | (b[ 7] >> 6)) & 0x3f) << shift) -
bias;
+s[13] = s[12] +   ((b[ 7]   & 0x3f) << shift) -
bias;
+s[ 2] = s[ 1] +   ((b[ 8] >> 2) << shift) -
bias;
+s[ 6] = s[ 5] + b[ 8] << 4) | (b[ 9] >> 4)) & 0x3f) << shift) -
bias;
+s[10] = s[ 9] + b[ 9] << 2) | (b[10] >> 6)) & 0x3f) << shift) -
bias;
+s[14] = s[13] +   ((b[10]   & 0x3f) << shift) -
bias;
+s[ 3] = s[ 2] +   ((b[11] >> 2) << shift) -
bias;
+s[ 7] = s[ 6] + b[11] << 4) | (b[12] >> 4)) & 0x3f) << shift) -
bias;
+s[11] = s[10] + b[12] << 2) | (b[13] >> 6)) & 0x3f) << shift) -
bias;
+s[15] = s[14] +   ((b[13]   & 0x3f) << shift) -
bias;
+for (int i = 0; i < 16; ++i) {
+if (s[i] & 0x8000)
+s[i] &= 0x7fff;
+else
+s[i] = ~s[i];
+}
+}
+
+
+
+static void unpack3 (const unsigned char b[3], unsigned short s[16])
+{
+//
+// Unpack a 3-byte block into 4 by 4 identical 16-bit pixels.
+//
+#if defined (DEBUG)
+assert (b[2] == 0xfc);
+#endif
+s[0] = (b[0] << 8) | b[1];
+if (s[0] & 0x8000)
+s[0] &= 0x7fff;
+else
+s[0] = ~s[0];
+for (int i = 1; i < 16; ++i)
+s[i] = s[0];
+}
+
+
+
+static int b44_uncompress(EXRContext *s, const uint8_t *src,int
compressed_size, int uncompressed_size,
+EXRThreadData *td)
+{
+unsigned long dest_len = uncompressed_size;
+uint8_t *out;
+int i, j;
+//int c;
+uint16_t *ptr;
+uint16_t *tmp = (uint16_t *)td->tmp;
+out = td->uncompressed_data;
+if (uncompress(td->tmp, &dest_len, src, compressed_size) != Z_OK ||
+dest_len != uncompressed_size)
+return AVERROR_INVALIDDATA;
+for (i = 0; i < s->nb_channels; i++) {
+EXRChannel *channel = &s->channels[i];
+int size = channel->pixel_type;
+const char *inPtr=src;
+int inSize = compressed_size;
+ptr = tmp;
+if (channel->pixel_type != EXR_HALF) {
+//
+// UINT or FLOAT channel.
+//
+int n = s->xdelta * s->ydelta * size * sizeof (unsigned short);
+memcpy (ptr, inPtr, n);
+inPtr += n;
+inSize -= n;
+continue;
+} else {
+//
+//EXR_HALF Channel
+for (int y=0; y < s->ydelta; y +=4 ) {
+unsigned short *row0 = ptr + y * s->xdelta;
+unsigned short *row1 = row0 + s->xdelta;
+unsigned short *row2 = row1 + s->xdelta;
+unsigned short *row3 = row2 + s->xdelta;
+for (int x = 0; x < s->xdelta; x += 4) {
+unsigned short stmp[16];
+if (((const unsigned char *)inPtr)[2] == 0xfc) {
+unpack3 ((const unsigned char *)inPtr, stmp);
+inPtr += 3;
+inSize -= 3;
+} else {
+unpack14 ((const unsigned char *)inPtr, stmp);
+inPtr += 14;
+inSize -= 14;
+}
+int num = (x + 3 < s->xdelta)? 4 * sizeof (unsigned
short) : (s->xdelta - x) * sizeof (unsigned short);
+if (y + 3 < s->ydelta) {
+

Re: [FFmpeg-devel] [PATCH v2] mov: Add option to keep exact packet sequence after seeking

2015-03-18 Thread Derek Buitenhuis
On 3/18/2015 2:01 PM, Michael Niedermayer wrote:
> LGTM but like the previous version i did not verify that it actually
> produces the same sequence of packets, i dont think its critical to
> verify that ...

I've verified this patch on several pathological samples I have, and it works.

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


Re: [FFmpeg-devel] [PATCH v2] mov: Add option to keep exact packet sequence after seeking

2015-03-18 Thread Michael Niedermayer
On Wed, Mar 18, 2015 at 01:28:05PM +, Derek Buitenhuis wrote:
> On 3/17/2015 2:19 PM, Derek Buitenhuis wrote:
> 
> [...]
> 
> > ---
> >  libavformat/isom.h|  1 +
> >  libavformat/mov.c | 46 +++---
> >  libavformat/version.h |  4 ++--
> >  3 files changed, 38 insertions(+), 13 deletions(-)
> 
> Ping.

LGTM but like the previous version i did not verify that it actually
produces the same sequence of packets, i dont think its critical to
verify that ...

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- 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 v2] mov: Add option to keep exact packet sequence after seeking

2015-03-18 Thread Derek Buitenhuis
On 3/17/2015 2:19 PM, Derek Buitenhuis wrote:

[...]

> ---
>  libavformat/isom.h|  1 +
>  libavformat/mov.c | 46 +++---
>  libavformat/version.h |  4 ++--
>  3 files changed, 38 insertions(+), 13 deletions(-)

Ping.

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


Re: [FFmpeg-devel] [PATCH]Do not set bitrate for DTS-HD Master and High Resolution

2015-03-18 Thread Michael Niedermayer
On Wed, Mar 18, 2015 at 01:21:25PM +0100, Hendrik Leppkes wrote:
> On Wed, Mar 18, 2015 at 1:06 PM, Michael Niedermayer  wrote:
> > On Wed, Mar 18, 2015 at 07:49:46AM -0400, Marcus Johnson wrote:
> >> This reminds me of another bug with DTS files, it estimates the file
> >> duration by counting each frame I assume, including the HD ones resulting
> >> in it being massively incorrect for example here's the ffmpeg output of a
> >> DTS-HD MA file that's actually 98 minutes long
> >>
> >>
> >>
> >> Log:
> >>
> >> ffmpeg -i /Users/Marcus/Desktop/DTS/ThePrincessBride.dtsma
> >>
> >> ffmpeg version N-68833-ge949e9f Copyright (c) 2000-2014 the FFmpeg
> >> developers
> >>
> >>   built on Mar 18 2015 07:47:46 with Apple LLVM version 6.0
> >> (clang-600.0.57) (based on LLVM 3.5svn)
> >>
> >>   configuration: --disable-yasm --disable-asm --disable-inline-asm
> >> --disable-ffserver --disable-ffplay --disable-doc --disable-ffprobe
> >>
> >>   libavutil  54. 16.100 / 54. 16.100
> >>
> >>   libavcodec 56. 19.100 / 56. 19.100
> >>
> >>   libavformat56. 16.102 / 56. 16.102
> >>
> >>   libavdevice56.  3.100 / 56.  3.100
> >>
> >>   libavfilter 5.  6.100 /  5.  6.100
> >>
> >>   libswscale  3.  1.101 /  3.  1.101
> >>
> >>   libswresample   1.  1.100 /  1.  1.100
> >>
> >> [dts @ 0x7fe833822800] Estimating duration from bitrate, this may be
> >> inaccurate
> >>
> >> Input #0, dts, from '/Users/Marcus/Desktop/DTS/ThePrincessBride.dtsma':
> >>
> >>   Duration: 04:06:57.61, start: 0.00, bitrate: 1535 kb/s
> >>
> >> Stream #0:0: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
> >>
> >>
> >> Instead of it saying it's about 1 hours and 30 minutes, it says it's 4
> >> hours, and 6 minutes.
> >>
> >>
> >
> >> Maybe the parser should ignore the dts-hd frames, because they won't
> >> increase the duration at all, due to the differential nature of the codec.
> >
> > if i understand correctly, yes,
> >
> > all parts of the data stream which encode the same time period belong
> > in the same AVPacket.
> 
> It already does this. The Core and HD extensions are all placed in the
> same AVPacket if the dca parser is used.

i misunderstood the suggestion then, it also sounded odd that it
wouldnt

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

Democracy is the form of government in which you can choose your dictator


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


[FFmpeg-devel] [PATCH] mips/float_dsp: fix vector_fmul_window_mips on mips64

2015-03-18 Thread James Cowgill
Commit dfa920807494 ("mips/float_dsp: fix a bug in vector_fmul_window_mips")
fixed vector_fmul_window_mips by unrolling the loop only 4 times, but also
removed the outer C loop and replaced it with assembly branches and pointer
arithmetic. When submitting my 64-bit porting patch I missed this new
assembly which also needed porting.

This patch fixes a bus error in the fate-float-dsp test when run on 64-bit
mips.

Signed-off-by: James Cowgill 
Cc: Nedeljko Babic 
---
 libavutil/mips/float_dsp_mips.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavutil/mips/float_dsp_mips.c b/libavutil/mips/float_dsp_mips.c
index a455687..b3a812c 100644
--- a/libavutil/mips/float_dsp_mips.c
+++ b/libavutil/mips/float_dsp_mips.c
@@ -188,10 +188,10 @@ static void vector_fmul_window_mips(float *dst, const 
float *src0,
 "lwc1%[wj3],   -12(%[win_j])\n\t"
 "lwc1%[s0], 8(%[src0_i])\n\t"
 "lwc1%[s01],12(%[src0_i])   \n\t"
-"addiu   %[src1_j],-16  \n\t"
-"addiu   %[win_i],  16  \n\t"
-"addiu   %[win_j], -16  \n\t"
-"addiu   %[src0_i], 16  \n\t"
+PTR_ADDIU "%[src1_j],-16\n\t"
+PTR_ADDIU "%[win_i],16  \n\t"
+PTR_ADDIU "%[win_j],-16 \n\t"
+PTR_ADDIU "%[src0_i],16 \n\t"
 "swc1%[temp],   0(%[dst_i]) \n\t" /* dst[i] = 
s0*wj - s1*wi; */
 "swc1%[temp1],  0(%[dst_j]) \n\t" /* dst[j] = 
s0*wi + s1*wj; */
 "swc1%[temp2],  4(%[dst_i]) \n\t" /* dst[i+1] = 
s01*wj1 - s11*wi1; */
@@ -208,8 +208,8 @@ static void vector_fmul_window_mips(float *dst, const float 
*src0,
 "swc1%[temp1], -8(%[dst_j]) \n\t" /* dst[j-2] = 
s0*wi2 + s1*wj2; */
 "swc1%[temp2],  12(%[dst_i])\n\t" /* dst[i+2] = 
s01*wj3 - s11*wi3; */
 "swc1%[temp3], -12(%[dst_j])\n\t" /* dst[j-3] = 
s01*wi3 + s11*wj3; */
-"addiu   %[dst_i],  16  \n\t"
-"addiu   %[dst_j], -16  \n\t"
+PTR_ADDIU "%[dst_i],16  \n\t"
+PTR_ADDIU "%[dst_j],-16 \n\t"
 "bne %[win_i], %[lp_end], 1b\n\t"
 : [temp]"=&f"(temp), [temp1]"=&f"(temp1), [temp2]"=&f"(temp2),
   [temp3]"=&f"(temp3), [src0_i]"+r"(src0_i), [win_i]"+r"(win_i),
-- 
2.1.4

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


Re: [FFmpeg-devel] [PATCH]Do not set bitrate for DTS-HD Master and High Resolution

2015-03-18 Thread Hendrik Leppkes
On Wed, Mar 18, 2015 at 1:06 PM, Michael Niedermayer  wrote:
> On Wed, Mar 18, 2015 at 07:49:46AM -0400, Marcus Johnson wrote:
>> This reminds me of another bug with DTS files, it estimates the file
>> duration by counting each frame I assume, including the HD ones resulting
>> in it being massively incorrect for example here's the ffmpeg output of a
>> DTS-HD MA file that's actually 98 minutes long
>>
>>
>>
>> Log:
>>
>> ffmpeg -i /Users/Marcus/Desktop/DTS/ThePrincessBride.dtsma
>>
>> ffmpeg version N-68833-ge949e9f Copyright (c) 2000-2014 the FFmpeg
>> developers
>>
>>   built on Mar 18 2015 07:47:46 with Apple LLVM version 6.0
>> (clang-600.0.57) (based on LLVM 3.5svn)
>>
>>   configuration: --disable-yasm --disable-asm --disable-inline-asm
>> --disable-ffserver --disable-ffplay --disable-doc --disable-ffprobe
>>
>>   libavutil  54. 16.100 / 54. 16.100
>>
>>   libavcodec 56. 19.100 / 56. 19.100
>>
>>   libavformat56. 16.102 / 56. 16.102
>>
>>   libavdevice56.  3.100 / 56.  3.100
>>
>>   libavfilter 5.  6.100 /  5.  6.100
>>
>>   libswscale  3.  1.101 /  3.  1.101
>>
>>   libswresample   1.  1.100 /  1.  1.100
>>
>> [dts @ 0x7fe833822800] Estimating duration from bitrate, this may be
>> inaccurate
>>
>> Input #0, dts, from '/Users/Marcus/Desktop/DTS/ThePrincessBride.dtsma':
>>
>>   Duration: 04:06:57.61, start: 0.00, bitrate: 1535 kb/s
>>
>> Stream #0:0: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
>>
>>
>> Instead of it saying it's about 1 hours and 30 minutes, it says it's 4
>> hours, and 6 minutes.
>>
>>
>
>> Maybe the parser should ignore the dts-hd frames, because they won't
>> increase the duration at all, due to the differential nature of the codec.
>
> if i understand correctly, yes,
>
> all parts of the data stream which encode the same time period belong
> in the same AVPacket.

It already does this. The Core and HD extensions are all placed in the
same AVPacket if the dca parser is used.

I'm quite sure the problem Marcus Johnson is describing is exactly the
same problem as Carl's patch fixes.
If you take a high-bitrate DTS-HD MA file and then use the core
bitrate to calculate the duration, you can easily get a factor 2-3
error in the computed duration value, since it just doesn't account
for the extra bitrate form the HD parts.

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


Re: [FFmpeg-devel] [PATCH]Do not set bitrate for DTS-HD Master and High Resolution

2015-03-18 Thread Michael Niedermayer
On Wed, Mar 18, 2015 at 07:49:46AM -0400, Marcus Johnson wrote:
> This reminds me of another bug with DTS files, it estimates the file
> duration by counting each frame I assume, including the HD ones resulting
> in it being massively incorrect for example here's the ffmpeg output of a
> DTS-HD MA file that's actually 98 minutes long
> 
> 
> 
> Log:
> 
> ffmpeg -i /Users/Marcus/Desktop/DTS/ThePrincessBride.dtsma
> 
> ffmpeg version N-68833-ge949e9f Copyright (c) 2000-2014 the FFmpeg
> developers
> 
>   built on Mar 18 2015 07:47:46 with Apple LLVM version 6.0
> (clang-600.0.57) (based on LLVM 3.5svn)
> 
>   configuration: --disable-yasm --disable-asm --disable-inline-asm
> --disable-ffserver --disable-ffplay --disable-doc --disable-ffprobe
> 
>   libavutil  54. 16.100 / 54. 16.100
> 
>   libavcodec 56. 19.100 / 56. 19.100
> 
>   libavformat56. 16.102 / 56. 16.102
> 
>   libavdevice56.  3.100 / 56.  3.100
> 
>   libavfilter 5.  6.100 /  5.  6.100
> 
>   libswscale  3.  1.101 /  3.  1.101
> 
>   libswresample   1.  1.100 /  1.  1.100
> 
> [dts @ 0x7fe833822800] Estimating duration from bitrate, this may be
> inaccurate
> 
> Input #0, dts, from '/Users/Marcus/Desktop/DTS/ThePrincessBride.dtsma':
> 
>   Duration: 04:06:57.61, start: 0.00, bitrate: 1535 kb/s
> 
> Stream #0:0: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
> 
> 
> Instead of it saying it's about 1 hours and 30 minutes, it says it's 4
> hours, and 6 minutes.
> 
> 

> Maybe the parser should ignore the dts-hd frames, because they won't
> increase the duration at all, due to the differential nature of the codec.

if i understand correctly, yes,

all parts of the data stream which encode the same time period belong
in the same AVPacket.
Like also with video frames parts that encode slices or more details
of a picture should be all in the same AVPacket, that way a decoder
takes a AVPacket and can return a picture or sequence of audio samples
also each AVPackets duration can be added up (thats slightly
oversimplified for overlapped transforms and stuff)
but storing additional details in a seperate AVPacket which cover
the same time period as the last packet isnt supported currently and
would cause problems


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

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.


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


Re: [FFmpeg-devel] [PATCH]Do not set bitrate for DTS-HD Master and High Resolution

2015-03-18 Thread Marcus Johnson
This reminds me of another bug with DTS files, it estimates the file
duration by counting each frame I assume, including the HD ones resulting
in it being massively incorrect for example here's the ffmpeg output of a
DTS-HD MA file that's actually 98 minutes long



Log:

ffmpeg -i /Users/Marcus/Desktop/DTS/ThePrincessBride.dtsma

ffmpeg version N-68833-ge949e9f Copyright (c) 2000-2014 the FFmpeg
developers

  built on Mar 18 2015 07:47:46 with Apple LLVM version 6.0
(clang-600.0.57) (based on LLVM 3.5svn)

  configuration: --disable-yasm --disable-asm --disable-inline-asm
--disable-ffserver --disable-ffplay --disable-doc --disable-ffprobe

  libavutil  54. 16.100 / 54. 16.100

  libavcodec 56. 19.100 / 56. 19.100

  libavformat56. 16.102 / 56. 16.102

  libavdevice56.  3.100 / 56.  3.100

  libavfilter 5.  6.100 /  5.  6.100

  libswscale  3.  1.101 /  3.  1.101

  libswresample   1.  1.100 /  1.  1.100

[dts @ 0x7fe833822800] Estimating duration from bitrate, this may be
inaccurate

Input #0, dts, from '/Users/Marcus/Desktop/DTS/ThePrincessBride.dtsma':

  Duration: 04:06:57.61, start: 0.00, bitrate: 1535 kb/s

Stream #0:0: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s


Instead of it saying it's about 1 hours and 30 minutes, it says it's 4
hours, and 6 minutes.


Maybe the parser should ignore the dts-hd frames, because they won't
increase the duration at all, due to the differential nature of the codec.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter/showwaves: add single_pic option

2015-03-18 Thread Stefano Sabatini
On date Thursday 2014-12-25 23:57:47 +0100, Clément Bœsch encoded:
> On Thu, Dec 25, 2014 at 09:07:04PM +0100, Lars Kiesow wrote:
[...]
> > One improvement that's left is to choose the colors, but that's
> > something for another patch and you can archive that quite easily with
> > some of the other filters already.
> 
> Yeah you can just apply a filter on top of it. Adding a color option can
> be annoying because of the grayscale logic when you do not use
> split_channels option.

I see there are several ways to do it (e.g. using lut3d). Can you
suggest the way you would do it?

(I considered to add the color option myself, for example it would be
useful to distinguish the various channels).
-- 
FFmpeg = Funny Freak Mythic Peaceful Exuberant Gadget
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter/showwaves: add single_pic option

2015-03-18 Thread Stefano Sabatini
On date Tuesday 2015-03-17 21:23:27 +0100, Clément Bœsch encoded:
> On Mon, Mar 16, 2015 at 04:11:24PM +0100, Stefano Sabatini wrote:
[...]
> > From 5ecb0190806d39bdd869de951634000b1d1e1c0f Mon Sep 17 00:00:00 2001
> > From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= 
> > Date: Wed, 24 Dec 2014 15:03:26 +0100
> > Subject: [PATCH] lavfi: add showwavespic filter
> > MIME-Version: 1.0
> > Content-Type: text/plain; charset=UTF-8
> > Content-Transfer-Encoding: 8bit
> > 
> > This is a variant of showaves. It is implemented as a different filter so
> > that the user is not allowed to use meaningless options which belong to
> > showaves (such as rate).
> > 
> > Major edits done by Stefano Sabatini, from a patch by ubitux.
> > 
> > See thread:
> > From: Clément Bœsch 
> > To: ffmpeg-devel@ffmpeg.org
> > Date: Wed, 24 Dec 2014 15:03:26 +0100
> > Subject: [FFmpeg-devel] [PATCH] avfilter/showwaves: add single_pic option
> > 
> > TODO: bump minor
> > ---
> >  doc/filters.texi|  27 +
> >  libavfilter/Makefile|   1 +
> >  libavfilter/allfilters.c|   1 +
> >  libavfilter/avf_showwaves.c | 274 
> > ++--
> >  4 files changed, 268 insertions(+), 35 deletions(-)
> > 
> 
> Good idea, patch LGTM after a quick look, but since it's based on my code
> I haven't much comment.
> 
> BTW, it might be relevant to add a fate test.

Pushed, thanks.
-- 
FFmpeg = Funny & Freak Mythic Puritan Efficient Gem
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]Do not set bitrate for DTS-HD Master and High Resolution

2015-03-18 Thread Hendrik Leppkes
On Wed, Mar 18, 2015 at 10:24 AM, Carl Eugen Hoyos  wrote:
> Hi!
>
> Attached patch fixes ticket #4375 for me.
>
> Please comment, Carl Eugen
>

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


[FFmpeg-devel] [PATCH]Do not set bitrate for DTS-HD Master and High Resolution

2015-03-18 Thread Carl Eugen Hoyos
Hi!

Attached patch fixes ticket #4375 for me.

Please comment, Carl Eugen
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index 548a5f9..0339eef 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -1472,7 +1472,6 @@ static int dca_decode_frame(AVCodecContext *avctx, void 
*data,
 }
 // set AVCodec values with parsed data
 avctx->sample_rate = s->sample_rate;
-avctx->bit_rate= s->bit_rate;
 
 s->profile = FF_PROFILE_DTS;
 
@@ -1937,6 +1936,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
 if (ret < 0)
 return ret;
 
+if (   avctx->profile != FF_PROFILE_DTS_HD_MA
+&& avctx->profile != FF_PROFILE_DTS_HD_HRA)
+avctx->bit_rate = s->bit_rate;
 *got_frame_ptr = 1;
 
 return buf_size;
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/4] libavdevice/avfoundation: add capture_screen_mouse_clicks option

2015-03-18 Thread Matthieu Bouron
On Fri, Mar 13, 2015 at 8:16 PM,  wrote:

> From: Matthieu Bouron 
>
> Support mouse clicks capture while recording a screen on OSX >= 10.7.
> ---
>  libavdevice/avfoundation.m | 15 +++
>  1 file changed, 15 insertions(+)
>
> diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
> index e574518..8112229 100644
> --- a/libavdevice/avfoundation.m
> +++ b/libavdevice/avfoundation.m
> @@ -95,6 +95,7 @@ typedef struct
>  int width, height;
>
>  int capture_screen_cursor;
> +int capture_screen_mouse_clicks;
>
>  int list_devices;
>  int video_device_index;
> @@ -715,6 +716,12 @@ static int avf_read_header(AVFormatContext *s)
>  }
>  #endif
>
> +if (ctx->capture_screen_mouse_clicks) {
> +capture_screen_input.capturesMouseClicks = YES;
> +} else {
> +capture_screen_input.capturesMouseClicks = NO;
> +}
> +
>  video_device = (AVCaptureDevice*) capture_screen_input;
>  capture_screen = 1;
>  #endif
> @@ -758,6 +765,12 @@ static int avf_read_header(AVFormatContext *s)
>  capture_screen_input.capturesCursor = NO;
>  }
>  #endif
> +
> +if (ctx->capture_screen_mouse_clicks) {
> +capture_screen_input.capturesMouseClicks = YES;
> +} else {
> +capture_screen_input.capturesMouseClicks = NO;
> +}
>  }
>  }
>  #endif
> @@ -975,6 +988,8 @@ static const AVOption options[] = {
>  { "framerate", "set frame rate", offsetof(AVFContext, framerate),
> AV_OPT_TYPE_VIDEO_RATE, {.str = "ntsc"}, 0, 0, AV_OPT_FLAG_DECODING_PARAM },
>  { "size", "set video size", offsetof(AVFContext, width),
> AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, AV_OPT_FLAG_DECODING_PARAM },
>  { "capture_screen_cursor", "capture the screen cursor",
> offsetof(AVFContext, capture_screen_cursor), AV_OPT_TYPE_INT, {.i64=0}, 0,
> 1, AV_OPT_FLAG_DECODING_PARAM },
> +{ "capture_screen_mouse_clicks", "capture the screen mouse clicks",
> offsetof(AVFContext, capture_screen_mouse_clicks), AV_OPT_TYPE_INT,
> {.i64=0}, 0, 1, AV_OPT_FLAG_DECODING_PARAM },
> +
>  { NULL },
>  };
>
> --
> 2.3.2
>
>
ping
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 4/4] libavdevice/avfoundation: use pts/dts provided by the CMSampleBuffer API

2015-03-18 Thread Matthieu Bouron
On Fri, Mar 13, 2015 at 8:16 PM,  wrote:

> From: Matthieu Bouron 
>
> ---
>  libavdevice/avfoundation.m | 21 +++--
>  1 file changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
> index 8112229..5bcd6a4 100644
> --- a/libavdevice/avfoundation.m
> +++ b/libavdevice/avfoundation.m
> @@ -881,9 +881,14 @@ static int avf_read_packet(AVFormatContext *s,
> AVPacket *pkt)
>  return AVERROR(EIO);
>  }
>
> -pkt->pts = pkt->dts = av_rescale_q(av_gettime() -
> ctx->first_pts,
> -   AV_TIME_BASE_Q,
> -   avf_time_base_q);
> +CMItemCount count;
> +CMSampleTimingInfo timing_info;
> +
> +if
> (CMSampleBufferGetOutputSampleTimingInfoArray(ctx->current_frame, 1,
> &timing_info, &count) == noErr) {
> +AVRational timebase_q = av_make_q(1,
> timing_info.presentationTimeStamp.timescale);
> +pkt->pts = pkt->dts =
> av_rescale_q(timing_info.presentationTimeStamp.value, timebase_q,
> avf_time_base_q);
> +}
> +
>  pkt->stream_index  = ctx->video_stream_index;
>  pkt->flags|= AV_PKT_FLAG_KEY;
>
> @@ -911,9 +916,13 @@ static int avf_read_packet(AVFormatContext *s,
> AVPacket *pkt)
>  return AVERROR(EIO);
>  }
>
> -pkt->pts = pkt->dts = av_rescale_q(av_gettime() -
> ctx->first_audio_pts,
> -   AV_TIME_BASE_Q,
> -   avf_time_base_q);
> +CMItemCount count;
> +CMSampleTimingInfo timing_info;
> +
> +if
> (CMSampleBufferGetOutputSampleTimingInfoArray(ctx->current_audio_frame, 1,
> &timing_info, &count) == noErr) {
> +AVRational timebase_q = av_make_q(1,
> timing_info.presentationTimeStamp.timescale);
> +pkt->pts = pkt->dts =
> av_rescale_q(timing_info.presentationTimeStamp.value, timebase_q,
> avf_time_base_q);
> +}
>
>  pkt->stream_index  = ctx->audio_stream_index;
>  pkt->flags|= AV_PKT_FLAG_KEY;
> --
> 2.3.2
>
>
ping
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/4] libavdevice/avfoundation: add framerate and video size options

2015-03-18 Thread Matthieu Bouron
On Sat, Mar 14, 2015 at 11:09 AM, Matthieu Bouron  wrote:

> On Sat, Mar 14, 2015 at 11:01 AM, Matthieu Bouron <
> matthieu.bou...@gmail.com> wrote:
>
>>
>>
>> On Sat, Mar 14, 2015 at 8:31 AM, Carl Eugen Hoyos 
>> wrote:
>>
>>>   gmail.com> writes:
>>>
>>> > +for (NSObject *format in
>>>
>>> You may ignore this but I just changed the code
>>> to not mix declarations and statements to
>>> silence warnings when compiling with old gcc
>>> compilers...
>>>
>>
>> I don't have access to an older version of OSX which uses gcc.
>> I've updated the patch locally to separate declarations and statements.
>>
>>
>>>
>>> > +if (framerate == 0.0
>>>
>>> Just asking: Does this really work?
>>>
>>
>> Nope it doesn't, it's just a glitch i forget to remove when i was not
>> using the AV_OPT_TYPE_IMAGE_SIZE for the framerate option (and the value
>> was defaulting to 0).
>> I've removed it locally.
>>
>
> New patch attached.
>
>
ping
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/4] libavdevice/avfoundation: add capture_screen_cursor option

2015-03-18 Thread Matthieu Bouron
On Sat, Mar 14, 2015 at 11:11 AM, Matthieu Bouron  wrote:

>
>
> On Sat, Mar 14, 2015 at 10:50 AM, Matthieu Bouron <
> matthieu.bou...@gmail.com> wrote:
>
>>
>>
>> On Sat, Mar 14, 2015 at 8:29 AM, Carl Eugen Hoyos 
>> wrote:
>>
>>>   gmail.com> writes:
>>>
>>> > +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
>>>
>>> Please make this "#if !TARGET_OS_IPHONE && ..."
>>> to avoid warnings when compiling for iOS.
>>>
>>> Carl Eugen
>>>
>>> ___
>>> ffmpeg-devel mailing list
>>> ffmpeg-devel@ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>>
>>
>> Hello Carl,
>>
>> Both code blocks are already contained in the following blocks:
>>
>> #if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
>> [...]
>> #endif
>>
>> Do you still want the #if !TARGET_OS_IPHONE for consistency ?
>>
>
> New patch attached with the #if !TARGET_OS_IPHONE condition.
>

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


[FFmpeg-devel] [PATCH]Add an ignore_delay option to the gif demuxer

2015-03-18 Thread Carl Eugen Hoyos
Hi!

Attached patch allows users to force a delay for an animated gif.
Related to ticket #4369 (I don't think there is a bug, if there 
is a bug, it is reproducible with avi etc.)

Please comment, Carl Eugen
diff --git a/libavformat/gifdec.c b/libavformat/gifdec.c
index 7db5a27..4e0467e 100644
--- a/libavformat/gifdec.c
+++ b/libavformat/gifdec.c
@@ -44,6 +44,7 @@ typedef struct GIFDemuxContext {
  */
 int min_delay;
 int default_delay;
+int ignore_delay;
 
 /**
  * loop options
@@ -157,7 +158,7 @@ static int gif_read_ext(AVFormatContext *s)
 
 gdc->delay = avio_rl16(pb);
 
-if (gdc->delay < gdc->min_delay)
+if (gdc->delay < gdc->min_delay || gdc->ignore_delay)
 gdc->delay = gdc->default_delay;
 
 /* skip the rest of the Graphic Control Extension block */
@@ -311,6 +312,7 @@ static const AVOption options[] = {
 { "min_delay", "minimum valid delay between frames (in hundredths of 
second)", offsetof(GIFDemuxContext, min_delay), AV_OPT_TYPE_INT, {.i64 = 
GIF_MIN_DELAY}, 0, 100 * 60, AV_OPT_FLAG_DECODING_PARAM },
 { "default_delay", "default delay between frames (in hundredths of 
second)"  , offsetof(GIFDemuxContext, default_delay), AV_OPT_TYPE_INT, 
{.i64 = GIF_DEFAULT_DELAY}, 0, 100 * 60, AV_OPT_FLAG_DECODING_PARAM },
 { "ignore_loop"  , "ignore loop setting (netscape extension)"  
  , offsetof(GIFDemuxContext, ignore_loop)  , AV_OPT_TYPE_INT, {.i64 = 1}   
 , 0,1, AV_OPT_FLAG_DECODING_PARAM },
+{ "ignore_delay" , "always use the default delay between frames"   
  , offsetof(GIFDemuxContext, ignore_delay) , AV_OPT_TYPE_INT, {.i64 = 0}   
 , 0,1, AV_OPT_FLAG_DECODING_PARAM },
 { NULL },
 };
 
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel