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

2015-03-07 Thread Claudio Freire
On Fri, Mar 6, 2015 at 2:19 PM, Michael Niedermayer michae...@gmx.at wrote:
 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)


Yeah, that works.

Attached another patch that adds the tests. Goes on top of the initial
patch (with the fixes themselves)
From 9ebb5b6d0085a547938afb32c7d203686f7fcf11 Mon Sep 17 00:00:00 2001
From: Claudio Freire klaussfre...@gmail.com
Date: Sun, 8 Mar 2015 03:53:22 -0300
Subject: [PATCH] Add AAC tests for 7350hz sampling rates and M/S

Also tweak fuzz factor to not error out on too little distortion (ie: codec improvement)
---
 tests/fate-run.sh  |  6 ++
 tests/fate/aac.mak | 33 +++--
 2 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 824d5f4..feac731 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -50,6 +50,12 @@ do_tiny_psnr(){
 size_cmp=$(compare $size1 $size2 $size_tolerance)
 if [ $val_cmp != 0 ] || [ $size_cmp != 0 ]; then
 echo $psnr
+if [ $val_cmp != 0 ]; then
+echo $3: |$val - $cmp_target| = $fuzz
+fi
+if [ $size_cmp != 0 ]; then
+echo size: |$size1 - $size2| = $size_tolerance
+fi
 return 1
 fi
 }
diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
index 34823be..cda80a4 100644
--- a/tests/fate/aac.mak
+++ b/tests/fate/aac.mak
@@ -91,9 +91,29 @@ fate-aac-aref-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 -c:a aa
 fate-aac-aref-encode: CMP = stddev
 fate-aac-aref-encode: REF = ./tests/data/asynth-44100-2.wav
 fate-aac-aref-encode: CMP_SHIFT = -4096
-fate-aac-aref-encode: CMP_TARGET = 434
+fate-aac-aref-encode: CMP_TARGET = 225
 fate-aac-aref-encode: SIZE_TOLERANCE = 2464
-fate-aac-aref-encode: FUZZ = 5
+fate-aac-aref-encode: FUZZ = 225
+
+FATE_AAC_ENCODE += fate-aac-s7350-encode
+fate-aac-s7350-encode: ./tests/data/asynth-7350-2.wav
+fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 -c:a aac -b:a 256k
+fate-aac-s7350-encode: CMP = stddev
+fate-aac-s7350-encode: REF = ./tests/data/asynth-7350-2.wav
+fate-aac-s7350-encode: CMP_SHIFT = -4096
+fate-aac-s7350-encode: CMP_TARGET = 225
+fate-aac-s7350-encode: SIZE_TOLERANCE = 4096
+fate-aac-s7350-encode: FUZZ = 225
+
+FATE_AAC_ENCODE += fate-aac-arefms-encode
+fate-aac-arefms-encode: ./tests/data/asynth-44100-2.wav
+fate-aac-arefms-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 -c:a aac -stereo_mode auto -b:a 512k
+fate-aac-arefms-encode: CMP = stddev
+fate-aac-arefms-encode: REF = ./tests/data/asynth-44100-2.wav
+fate-aac-arefms-encode: CMP_SHIFT = -4096
+fate-aac-arefms-encode: CMP_TARGET = 230
+fate-aac-arefms-encode: SIZE_TOLERANCE = 2464
+fate-aac-arefms-encode: FUZZ = 230
 
 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
@@ -103,6 +123,15 @@ fate-aac-ln-encode: CMP_SHIFT = -4096
 fate-aac-ln-encode: CMP_TARGET = 65
 fate-aac-ln-encode: SIZE_TOLERANCE = 3560
 
+FATE_AAC_ENCODE += fate-aac-lnms-encode
+fate-aac-lnms-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -strict -2 -stereo_mode auto -c:a aac -b:a 512k
+fate-aac-lnms-encode: CMP = stddev
+fate-aac-lnms-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
+fate-aac-lnms-encode: CMP_SHIFT = -4096
+fate-aac-lnms-encode: CMP_TARGET = 35
+fate-aac-lnms-encode: SIZE_TOLERANCE = 3560
+fate-aac-lnms-encode: FUZZ = 35
+
 FATE_AAC_LATM += fate-aac-latm_1180bc60
 fate-aac-latm_1180bc60: CMD = pcm -i $(TARGET_SAMPLES)/aac/latm_1180bc60.mpg
 fate-aac-latm_1180bc60: REF = $(SAMPLES)/aac/latm_1180bc60.s16
-- 
1.8.4.5

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


Re: [FFmpeg-devel] [PATCH] avformat/srtenc: avoid segmentation fault when transcoding from SSA to SRT

2015-03-07 Thread Clément Bœsch
On Sun, Mar 08, 2015 at 12:27:49AM +0100, Gilles Chanteperdrix wrote:
 On Sat, Mar 07, 2015 at 11:46:44PM +0100, Nicolas George wrote:
  Le septidi 17 ventôse, an CCXXIII, Gilles Chanteperdrix a écrit :
   You need an ASS file that produces a sub-title frame without text. I
   have been carrying this patch since 2013, I am afraid I no longer
   have the problematic file.
  
  I tried an ASS file with an empty text part, and it did not crash
  either.
 
 Is not there some way in the ssa format to declare some graphic
 elements which are not text?
 

Try adding tags with no text maybe. You may also try ASS drawing mode, but
FFmpeg probably doesn't do cray stuff about it.

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH] mips/asmdefs: change include guard to read AVUTIL_ instead of AVCODEC_

2015-03-07 Thread Michael Niedermayer
On Sat, Mar 07, 2015 at 10:15:19AM +, James Cowgill wrote:
 Signed-off-by: James Cowgill james...@cowgill.org.uk
 ---
  libavutil/mips/asmdefs.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

applied

thanks

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

There will always be a question for which you do not know the correct answer.


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


Re: [FFmpeg-devel] [PATCH] Port FFT domain filter.

2015-03-07 Thread Michael Niedermayer
On Sat, Mar 07, 2015 at 04:09:09PM +0530, arwa arif wrote:
 Updated the patch.

  doc/filters.texi |   38 +
  libavfilter/Makefile |1 
  libavfilter/allfilters.c |1 
  libavfilter/vf_fftfilt.c |  344 
 +++
  4 files changed, 384 insertions(+)
 97c8a8fce142d3c4f3e42ab941afb4087f6c0206  0001-Add-FFT-domain-filter.patch
 From 4e73a3876d0e33af33ea3af27d38ce4e5755ad25 Mon Sep 17 00:00:00 2001
 From: Arwa Arif arwaarif1...@gmail.com
 Date: Tue, 24 Feb 2015 12:17:30 +0530
 Subject: [PATCH] Add FFT domain filter.

ive renamed some luma to weight as its also used for chroma now,
and fixed copy_rev(), i possibly didnt explain it clearly enough
before and
applied

Thanks!

[...]

-- 
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 1/5] avcodec/vc1_mc: remove useless variables

2015-03-07 Thread zhaoxiu.zeng
From b448a6af018f8322c761571149d961853492a437 Mon Sep 17 00:00:00 2001
From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
Date: Sat, 7 Mar 2015 16:24:42 +0800
Subject: [PATCH 1/5] avcodec/vc1_mc: remove useless variables

Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
---
 libavcodec/vc1_mc.c | 18 +++---
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/libavcodec/vc1_mc.c b/libavcodec/vc1_mc.c
index 683b620..18324c0 100644
--- a/libavcodec/vc1_mc.c
+++ b/libavcodec/vc1_mc.c
@@ -778,7 +778,6 @@ void ff_vc1_interp_mc(VC1Context *v)
 H264ChromaContext *h264chroma = v-h264chroma;
 uint8_t *srcY, *srcU, *srcV;
 int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y;
-int off, off_uv;
 int v_edge_pos = s-v_edge_pos  v-field_mode;
 int use_ic = v-next_use_ic;
 
@@ -881,19 +880,16 @@ void ff_vc1_interp_mc(VC1Context *v)
 srcY += s-mspel * (1 + s-linesize);
 }
 
-off= 0;
-off_uv = 0;
-
 if (s-mspel) {
 dxy = ((my  3)  2) | (mx  3);
-v-vc1dsp.avg_vc1_mspel_pixels_tab[0][dxy](s-dest[0] + off, srcY  
  , s-linesize, v-rnd);
+v-vc1dsp.avg_vc1_mspel_pixels_tab[0][dxy](s-dest[0], srcY, 
s-linesize, v-rnd);
 } else { // hpel mc
 dxy = (my  2) | ((mx  2)  1);
 
 if (!v-rnd)
-s-hdsp.avg_pixels_tab[0][dxy](s-dest[0] + off, srcY, 
s-linesize, 16);
+s-hdsp.avg_pixels_tab[0][dxy](s-dest[0], srcY, s-linesize, 16);
 else
-s-hdsp.avg_no_rnd_pixels_tab[dxy](s-dest[0] + off, srcY, 
s-linesize, 16);
+s-hdsp.avg_no_rnd_pixels_tab[dxy](s-dest[0], srcY, s-linesize, 
16);
 }
 
 if (s-flags  CODEC_FLAG_GRAY) return;
@@ -901,10 +897,10 @@ void ff_vc1_interp_mc(VC1Context *v)
 uvmx = (uvmx  3)  1;
 uvmy = (uvmy  3)  1;
 if (!v-rnd) {
-h264chroma-avg_h264_chroma_pixels_tab[0](s-dest[1] + off_uv, srcU, 
s-uvlinesize, 8, uvmx, uvmy);
-h264chroma-avg_h264_chroma_pixels_tab[0](s-dest[2] + off_uv, srcV, 
s-uvlinesize, 8, uvmx, uvmy);
+h264chroma-avg_h264_chroma_pixels_tab[0](s-dest[1], srcU, 
s-uvlinesize, 8, uvmx, uvmy);
+h264chroma-avg_h264_chroma_pixels_tab[0](s-dest[2], srcV, 
s-uvlinesize, 8, uvmx, uvmy);
 } else {
-v-vc1dsp.avg_no_rnd_vc1_chroma_pixels_tab[0](s-dest[1] + off_uv, 
srcU, s-uvlinesize, 8, uvmx, uvmy);
-v-vc1dsp.avg_no_rnd_vc1_chroma_pixels_tab[0](s-dest[2] + off_uv, 
srcV, s-uvlinesize, 8, uvmx, uvmy);
+v-vc1dsp.avg_no_rnd_vc1_chroma_pixels_tab[0](s-dest[1], srcU, 
s-uvlinesize, 8, uvmx, uvmy);
+v-vc1dsp.avg_no_rnd_vc1_chroma_pixels_tab[0](s-dest[2], srcV, 
s-uvlinesize, 8, uvmx, uvmy);
 }
 }
-- 
2.1.0

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


[FFmpeg-devel] [PATCH 4/5] avcodec/vc1_mc: simplifying

2015-03-07 Thread zhaoxiu.zeng
From 5b695f07a5c62149bf2477efd02150e74ea12c36 Mon Sep 17 00:00:00 2001
From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
Date: Sat, 7 Mar 2015 17:41:51 +0800
Subject: [PATCH 4/5] avcodec/vc1_mc: simplifying

Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
---
 libavcodec/vc1_mc.c | 18 ++
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/libavcodec/vc1_mc.c b/libavcodec/vc1_mc.c
index 88473ea..05d6e20 100644
--- a/libavcodec/vc1_mc.c
+++ b/libavcodec/vc1_mc.c
@@ -403,13 +403,7 @@ void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int 
avg)
 } else {
 src_x = av_clip(src_x, -17, s-avctx-coded_width);
-if (v-fcm == ILACE_FRAME) {
-if (src_y  1)
-src_y = av_clip(src_y, -17, s-avctx-coded_height + 1);
-else
-src_y = av_clip(src_y, -18, s-avctx-coded_height);
-} else {
-src_y = av_clip(src_y, -18, s-avctx-coded_height + 1);
-}
+src_y = av_clip(src_y, -17 - (v-fcm != ILACE_FRAME || !(src_y  1)),
+   s-avctx-coded_height + (v-fcm != ILACE_FRAME 
|| (src_y  1)));
 }
 
 srcY += src_y * s-linesize + src_x;
-- 
2.1.0

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


[FFmpeg-devel] Windows deprecated stdin reading method

2015-03-07 Thread Peter
So trying to compile on VS2015 now works fine for the libraries.
However the command-line tool does not compile successfully.

The issue is this patch
https://github.com/FFmpeg/FFmpeg/commit/ca4d71b149ebe32aeaf617ffccf362624b9aafb1
which uses a member of the FILE struct which is not available in the
new C runtime (it's now just a struct with a void*).

I do not quite know the semantics of the stdin-_cnt  0 check.

So I tried a few approaches, like using the deprecated function that is called
after the #ifdef block anyway:
https://github.com/Bigpet/FFmpeg/commit/b167e17e6f8839e1b4ce0edad2708ff4237e4aec
(I'm kind of worried about this since using read(0, ch, 1); instead
of getch with that if
condition actually blocks in some cases, so it's not 100% equivalent)

Or trying to understand what the non-deprecated Win32 API calls would look like:
https://github.com/Bigpet/FFmpeg/commit/8d9cae13f389ab7dddc736ecac3feb01843ca094

But in the end I don't understand the purpose of the original piece of
code, so it's
hard to know what it should be replaced by. And finding documentation
on it seems
fruitless as well, since it used a non-public API to begin with.

Any help from people knowledgeable about the windows API would be appreciated.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/5] avcodec/vc1_mc: remove useless variables

2015-03-07 Thread Michael Niedermayer
On Sat, Mar 07, 2015 at 10:43:19PM +0800, zhaoxiu.zeng wrote:
 From b448a6af018f8322c761571149d961853492a437 Mon Sep 17 00:00:00 2001
 From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
 Date: Sat, 7 Mar 2015 16:24:42 +0800
 Subject: [PATCH 1/5] avcodec/vc1_mc: remove useless variables
 
 Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
 ---
  libavcodec/vc1_mc.c | 18 +++---
  1 file changed, 7 insertions(+), 11 deletions(-)

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] mips/asmdefs: use asm/sgidefs.h header on linux

2015-03-07 Thread James Cowgill
On Sat, 2015-03-07 at 18:06 +0100, wm4 wrote:
 On Sat,  7 Mar 2015 10:13:23 +
 James Cowgill james...@cowgill.org.uk wrote:
 
  Unfortunately android  api 21 (lollipop) doesn't have the sgidefs.h header,
  but the linux kernel does in asm/sgidefs.h. So use that header if we can.
  
  Change _ABI64 to _MIPS_SIM_ABI64 which is defined in both headers.
 
 What does this header contain? Requiring kernel headers for anything
 but Linux specific syscalls or for building kernel modules is incredibly
 broken.

Yes the correct header on mips is just 'sgidefs.h' and while glibc has
provided it for years, android bionic only added it for lollipop.

This is the kernel header:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/mips/include/uapi/asm/sgidefs.h

The one provided by glibc has a little more stuff but we don't need it.
_MIPS_SIM is defined by GCC (and some older mips compilers) to be equal
to one of the _MIPS_SIM_* constants depending on which ABI is selected.

GCC and Clang also define _ABI* themselves (as well as being defined in
the glibc version of the header) for the current ABI, so I suppose using
this without including anything might work if we don't care about other
compilers:

#if defined(_ABI64)  _MIPS_SIM == _ABI64

 And __linux__ is of course completely out of the question. Just because
 it's Linux, the libc doesn't necessarily provide kernel headers.

Ok

James

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


[FFmpeg-devel] [PATCH] doc: avoid the incorrect phrase 'allow to'

2015-03-07 Thread Andreas Cadhalpun

Hi,

I missed some occurrences of 'allow to' in my previous patch.

Best regards,
Andreas
From f3c94a70bfe9264e25575999a3cb134f029bea2d Mon Sep 17 00:00:00 2001
From: Andreas Cadhalpun andreas.cadhal...@googlemail.com
Date: Sat, 7 Mar 2015 19:36:07 +0100
Subject: [PATCH] doc: avoid the incorrect phrase 'allow to'

Signed-off-by: Andreas Cadhalpun andreas.cadhal...@googlemail.com
---
 doc/faq.texi  | 2 +-
 doc/ffserver.texi | 2 +-
 doc/filters.texi  | 2 +-
 doc/formats.texi  | 4 ++--
 doc/indevs.texi   | 2 +-
 doc/utils.texi| 4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/doc/faq.texi b/doc/faq.texi
index c3db720..5fe716b 100644
--- a/doc/faq.texi
+++ b/doc/faq.texi
@@ -349,7 +349,7 @@ FFmpeg has a @url{http://ffmpeg.org/ffmpeg-protocols.html#concat,
 @code{concat}} protocol designed specifically for that, with examples in the
 documentation.
 
-A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow to concatenate
+A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow one to concatenate
 video by merely concatenating the files containing them.
 
 Hence you may concatenate your multimedia files by first transcoding them to
diff --git a/doc/ffserver.texi b/doc/ffserver.texi
index 57c95fb..336cec1 100644
--- a/doc/ffserver.texi
+++ b/doc/ffserver.texi
@@ -72,7 +72,7 @@ the HTTP server (configured through the @option{HTTPPort} option), and
 configuration file.
 
 Each feed is associated to a file which is stored on disk. This stored
-file is used to allow to send pre-recorded data to a player as fast as
+file is used to send pre-recorded data to a player as fast as
 possible when new content is added in real-time to the stream.
 
 A live-stream or stream is a resource published by
diff --git a/doc/filters.texi b/doc/filters.texi
index b15087c..3f172d5 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -3486,7 +3486,7 @@ Set number overlapping pixels for each block. Since the filter can be slow, you
 may want to reduce this value, at the cost of a less effective filter and the
 risk of various artefacts.
 
-If the overlapping value doesn't allow to process the whole input width or
+If the overlapping value doesn't permit processing the whole input width or
 height, a warning will be displayed and according borders won't be denoised.
 
 Default value is @var{blocksize}-1, which is the best possible setting.
diff --git a/doc/formats.texi b/doc/formats.texi
index 4138709..cbbdc10 100644
--- a/doc/formats.texi
+++ b/doc/formats.texi
@@ -23,7 +23,7 @@ Reduce buffering.
 
 @item probesize @var{integer} (@emph{input})
 Set probing size in bytes, i.e. the size of the data to analyze to get
-stream information. A higher value will allow to detect more
+stream information. A higher value will enable detecting more
 information in case it is dispersed into the stream, but will increase
 latency. Must be an integer not lesser than 32. It is 500 by default.
 
@@ -67,7 +67,7 @@ Default is 0.
 
 @item analyzeduration @var{integer} (@emph{input})
 Specify how many microseconds are analyzed to probe the input. A
-higher value will allow to detect more accurate information, but will
+higher value will enable detecting more accurate information, but will
 increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
 
 @item cryptokey @var{hexadecimal string} (@emph{input})
diff --git a/doc/indevs.texi b/doc/indevs.texi
index 98cc557..79fec2e 100644
--- a/doc/indevs.texi
+++ b/doc/indevs.texi
@@ -1,7 +1,7 @@
 @chapter Input Devices
 @c man begin INPUT DEVICES
 
-Input devices are configured elements in FFmpeg which allow to access
+Input devices are configured elements in FFmpeg which enable accessing
 the data coming from a multimedia device attached to your system.
 
 When you configure your FFmpeg build, all the supported input devices
diff --git a/doc/utils.texi b/doc/utils.texi
index b0455af..79bf2a2 100644
--- a/doc/utils.texi
+++ b/doc/utils.texi
@@ -844,7 +844,7 @@ Return 1.0 if @var{x} is +/-INFINITY, 0.0 otherwise.
 Return 1.0 if @var{x} is NAN, 0.0 otherwise.
 
 @item ld(var)
-Allow to load the value of the internal variable with number
+Load the value of the internal variable with number
 @var{var}, which was previously stored with st(@var{var}, @var{expr}).
 The function returns the loaded value.
 
@@ -912,7 +912,7 @@ Compute the square root of @var{expr}. This is equivalent to
 Compute expression @code{1/(1 + exp(4*x))}.
 
 @item st(var, expr)
-Allow to store the value of the expression @var{expr} in an internal
+Store the value of the expression @var{expr} in an internal
 variable. @var{var} specifies the number of the variable where to
 store the value, and it is a value ranging from 0 to 9. The function
 returns the value stored in the internal variable.
-- 
2.1.4

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


Re: [FFmpeg-devel] [PATCH] ChangeLog: Remove the redundant VP9 RTP entry

2015-03-07 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 09:42:04AM +0800, Xiangyu Liu wrote:
 Hi,
 
 There is a redundant VP9 RTP entry in current Changelog. Just remove it.

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] avcodec/golomb: cleanup

2015-03-07 Thread Michael Niedermayer
On Sat, Mar 07, 2015 at 11:53:39PM +0800, zhaoxiu.zeng wrote:
 From 87f51c45cf3ebb2ffefbba72414bf5f9c06f6351 Mon Sep 17 00:00:00 2001
 From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
 Date: Sat, 7 Mar 2015 23:42:05 +0800
 Subject: [PATCH 1/1] avcodec/golomb: cleanup
 
 Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com

applied

thanks

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

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data


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/asmdefs: use asm/sgidefs.h header on linux

2015-03-07 Thread wm4
On Sat,  7 Mar 2015 10:13:23 +
James Cowgill james...@cowgill.org.uk wrote:

 Unfortunately android  api 21 (lollipop) doesn't have the sgidefs.h header,
 but the linux kernel does in asm/sgidefs.h. So use that header if we can.
 
 Change _ABI64 to _MIPS_SIM_ABI64 which is defined in both headers.

What does this header contain? Requiring kernel headers for anything
but Linux specific syscalls or for building kernel modules is incredibly
broken.

And __linux__ is of course completely out of the question. Just because
it's Linux, the libc doesn't necessarily provide kernel headers.

 Signed-off-by: James Cowgill james...@cowgill.org.uk
 ---
  libavutil/mips/asmdefs.h | 6 +-
  1 file changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/libavutil/mips/asmdefs.h b/libavutil/mips/asmdefs.h
 index 4d2922c..3660e98 100644
 --- a/libavutil/mips/asmdefs.h
 +++ b/libavutil/mips/asmdefs.h
 @@ -27,9 +27,13 @@
  #ifndef AVCODEC_MIPS_ASMDEFS_H
  #define AVCODEC_MIPS_ASMDEFS_H
  
 +#ifdef __linux__
 +#include asm/sgidefs.h
 +#else
  #include sgidefs.h
 +#endif
  
 -#if _MIPS_SIM == _ABI64
 +#if _MIPS_SIM == _MIPS_SIM_ABI64
  # define PTRSIZE 8 
  # define PTRLOG  3 
  # define PTR_ADDU   daddu 

___
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-07 Thread Michael Niedermayer
On Sat, Mar 07, 2015 at 10:53:05AM -0600, Srikanth G wrote:
 Hi Michael,
 
 Can you let me know the compilation errors?
 I tried with this fix and things were working for me.
 
 I will try again though.

you can checkout a fresh ffmpeg and apply the patch
i is not declared in that function so it will not build
the fix is trivial but i expect code to be tested, which this
obviously has not been and would not magically be if i add int i

[...]
-- 
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] is_compiled flag not being cleared in av_opencl_uninit

2015-03-07 Thread Srikanth G
Hi Michael,

Can you let me know the compilation errors?
I tried with this fix and things were working for me.

I will try again though.

-Srikanth

On Sat, Mar 7, 2015 at 3:24 AM, Michael Niedermayer michae...@gmx.at
wrote:

 On Fri, Mar 06, 2015 at 03:30:00PM +0100, Michael Niedermayer wrote:
  On Fri, Mar 06, 2015 at 07:34:06PM +0800, Wei Gao wrote:
   2015-03-05 8:48 GMT+08:00 Srikanth G gska...@gmail.com:
  
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

 reverted, this patch broke compilation with opencl

 [...]


 --
 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

 During times of universal deceit, telling the truth becomes a
 revolutionary act. -- George Orwell

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


[FFmpeg-devel] GSoC '15 Introduction

2015-03-07 Thread Ilinca Andrei
   Hello!

   Short description:
   Full name : Andrei Ilinca
   IRC Handle: andrei_il / andrei__il
   Studies: Second year student at the Faculty of Automatic Control and
   Computer Science at the  Polytechnic Univ of Bucharest
   Github: https://github.com/ailinca

   I'll try to divide my introduction mail into two main parts:
   Background, why FFmpeg and why directshow digital video capture project.

   *Background*

   I'm Andrei, I'm a second year student at the Faculty of Automatic
   Control and Computer Science at the  Polytechnic Univ of Bucharest. This
   GSoC is my first opportunity to work with the open source community and I
   can say I'm thrilled!
I have experience working with C and I enjoy coding using this
   language.C was my language of choice both for academic purposes and for
   coding challenges like talentbuddy https://www.talentbuddy.co and
   codingame http://www.codingame.com. Currently, I m exploring other
   areas as well, such as developing a standalone Java app that tracks how you
   spend money or some simple game in C++ and Qt. While programming is my
   carrer choice, math was always my passion. Since Primary School I attended
   contests and got rewarded Localy ,CityWide and National. I enjoy solving
   various smart mathematical problems with applications in all areas of
   research.

  * Why FFmpeg?*

   Why FFmpeg?  Honestly, I did not start looking for a project on this
   GSoC having the fixed FFmpeg org in mind, I was just looking for a C
   project. Because there are plenty orgs, with plenty projects and it's
   difficult to choose one, having no previous experience. On short, I landed
   on your project page more or less randomly. But I stayed. And here's why.
   FFmpeg development involves something that I've always considered
   interesting and that is encoding/decoding information. While I was on your
   website, I asked myself how is voice converted to digital, how does it
   happen, which lead me to this
   
http://electronics.howstuffworks.com/gadgets/high-tech-gadgets/speech-recognition1.html
   . All in all, I find all this interesting, a lot of new notions to me, but
   it's definetly somnething I would see myself enjoying working on throughout
   the summer.

   *Why directshow digital video capture ?*

   Simply because It sounds really interesting and entertaining. I have
   some experience using Matlab and Simulink for converting from time-domain
   to frequency-domain and back, Bode  Nyquist Diagrams and I have basic
   knowledge about how filters work and how they can be used and implemented.
   I've done some research about video capturing in DirectShow , mainly on this
   link
   
https://msdn.microsoft.com/en-us/library/windows/desktop/dd373406%28v=vs.85%29.aspx,
   and I believe this project suits me the best.

   I got the git code base cloned and started reading and documenting
   about it.
   I would like to work on the qualification task for this project but
   I need some more informations about it. How should I proceed further?
   I'll be around on IRC quite a lot, but I'll get in touch more once I
   start working on something. If you have any feedback or criticism, please
   do, it's appreciated!

   Sorry for the long-ish mail! It really seems like an interesting
   project and something I'm very enthusiastic about.
   Regards,
   Andrei

  Hello! Short description: Full name : Andrei Ilinca IRC Handle: andrei_il
/ andrei__il Studies: Second year student at the Faculty of Automatic
Control and Computer Science at the Polytechnic Univ of Bucharest Github:
https://github.com/ailinca I'll try to divide my introduction mail into two
main parts: Background, why FFmpeg and why directshow digital video capture
project. Background I'm Andrei, I'm a second year student at the Faculty of
Automatic Control and Computer Science at the Polytechnic Univ of
Bucharest. This GSoC is my first opportunity to work with the open source
community and I can say I'm thrilled! I have experience working with C and
I enjoy coding using this language.C was my language of choice both for
academic purposes and for coding challenges like talentbuddy(linkuri) and
codingame(aici sa pui linkuri). Currently, I m exploring other areas as
well, such as developing a standalone Java app that tracks how you spend
money or some simple game in C++ and Qt. While programming is my carrer
choice, math was always my passion. Since Primary School I attended
contests and got rewarded Localy ,CityWide and National. I enjoy solving
various smart mathematical problems with applications in all areas of
research. Why FFmpeg? Why FFmpeg? Honestly, I did not start looking for a
project on this GSoC having the fixed FFmpeg org in mind, I was just
looking for a C project. Because there are plenty orgs, with plenty
projects and it's difficult to choose one, having no previous experience.
On short, I landed 

[FFmpeg-devel] gsoc-2015: APNG

2015-03-07 Thread Федор
 Is GSOC task Animated Portable Network Graphics free? If yes I will work on 
it. My qualification Task: Improve the filter selection heuristic in in the png 
encoder so files compress better


Fedor Strizhnev
Федор Стрижнёв.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 5/5] avcodec/vc1_mc: optimize get_chroma_mv, and add get_luma_mv

2015-03-07 Thread zhaoxiu.zeng
From 8936ad9561a44fa71126a07efc2ca8096d209600 Mon Sep 17 00:00:00 2001
From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
Date: Sat, 7 Mar 2015 22:08:35 +0800
Subject: [PATCH 5/5] avcodec/vc1_mc: optimize get_chroma_mv, and add get_luma_mv

Test results:

before:
  fate-suite/vc1/SA10091.vc1: 1062 decicycles in ff_vc1_mc_4mv_chroma's get mv, 
4089 runs, 7 skips 
  fate-suite/vc1/SA10143.vc1: 1112 decicycles in ff_vc1_mc_4mv_luma's get mv, 
4096 runs, 0 skips
  fate-suite/vc1/SA20021.vc1: 991 decicycles in ff_vc1_mc_4mv_chroma get mv, 
8192 runs, 0 skips

after:
  fate-suite/vc1/SA10091.vc1: 940 decicycles in ff_vc1_mc_4mv_chroma's get mv, 
4096 runs, 0 skips
  fate-suite/vc1/SA10143.vc1: 786 decicycles in ff_vc1_mc_4mv_luma's get mv, 
4096 runs, 0 skips
  fate-suite/vc1/SA20021.vc1: 876 decicycles in ff_vc1_mc_4mv_chroma get mv, 
8189 runs, 3 skips

Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
---
 libavcodec/vc1_mc.c | 181 ++--
 1 file changed, 75 insertions(+), 106 deletions(-)

diff --git a/libavcodec/vc1_mc.c b/libavcodec/vc1_mc.c
index 05d6e20..f3f102e 100644
--- a/libavcodec/vc1_mc.c
+++ b/libavcodec/vc1_mc.c
@@ -103,6 +103,69 @@ static av_always_inline void vc1_lut_scale_chroma(uint8_t 
*srcU, uint8_t *srcV,
 }
 }
 
+static const uint8_t popcount4[16] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 
3, 3, 4 };
+
+static av_always_inline int get_luma_mv(VC1Context *v, int dir, int16_t *tx, 
int16_t *ty)
+{
+MpegEncContext *s = v-s;
+int idx = v-mv_f[dir][s-block_index[0] + v-blocks_off] |
+ (v-mv_f[dir][s-block_index[1] + v-blocks_off]  1) |
+ (v-mv_f[dir][s-block_index[2] + v-blocks_off]  2) |
+ (v-mv_f[dir][s-block_index[3] + v-blocks_off]  3);
+static const uint8_t index2[16] = { 0, 0, 0, 0x23, 0, 0x13, 0x03, 0, 0, 
0x12, 0x02, 0, 0x01, 0, 0, 0 };
+int opp_count = popcount4[idx];
+
+switch (opp_count) {
+case 0:
+case 4:
+*tx = median4(s-mv[dir][0][0], s-mv[dir][1][0], s-mv[dir][2][0], 
s-mv[dir][3][0]);
+*ty = median4(s-mv[dir][0][1], s-mv[dir][1][1], s-mv[dir][2][1], 
s-mv[dir][3][1]);
+break;
+case 1:
+*tx = mid_pred(s-mv[dir][idx  2][0], s-mv[dir][1 + (idx  4)][0], 
s-mv[dir][2 + (idx  8)][0]);
+*ty = mid_pred(s-mv[dir][idx  2][1], s-mv[dir][1 + (idx  4)][1], 
s-mv[dir][2 + (idx  8)][1]);
+break;
+case 3:
+*tx = mid_pred(s-mv[dir][idx  0xd][0], s-mv[dir][1 + (idx  
0xb)][0], s-mv[dir][2 + (idx  0x7)][0]);
+*ty = mid_pred(s-mv[dir][idx  0xd][1], s-mv[dir][1 + (idx  
0xb)][1], s-mv[dir][2 + (idx  0x7)][1]);
+break;
+case 2:
+*tx = (s-mv[dir][index2[idx]  4][0] + s-mv[dir][index2[idx]  
0xf][0]) / 2;
+*ty = (s-mv[dir][index2[idx]  4][1] + s-mv[dir][index2[idx]  
0xf][1]) / 2;
+break;
+}
+return opp_count;
+}
+
+static av_always_inline int get_chroma_mv(VC1Context *v, int dir, int16_t *tx, 
int16_t *ty)
+{
+MpegEncContext *s = v-s;
+int idx = !v-mb_type[0][s-block_index[0]] |
+ (!v-mb_type[0][s-block_index[1]]  1) |
+ (!v-mb_type[0][s-block_index[2]]  2) |
+ (!v-mb_type[0][s-block_index[3]]  3);
+static const uint8_t index2[16] = { 0, 0, 0, 0x01, 0, 0x02, 0x12, 0, 0, 
0x03, 0x13, 0, 0x23, 0, 0, 0 };
+int valid_count = popcount4[idx];
+
+switch (valid_count) {
+case 4:
+*tx = median4(s-mv[dir][0][0], s-mv[dir][1][0], s-mv[dir][2][0], 
s-mv[dir][3][0]);
+*ty = median4(s-mv[dir][0][1], s-mv[dir][1][1], s-mv[dir][2][1], 
s-mv[dir][3][1]);
+break;
+case 3:
+*tx = mid_pred(s-mv[dir][idx  0xd][0], s-mv[dir][1 + (idx  
0xb)][0], s-mv[dir][2 + (idx  0x7)][0]);
+*ty = mid_pred(s-mv[dir][idx  0xd][1], s-mv[dir][1 + (idx  
0xb)][1], s-mv[dir][2 + (idx  0x7)][1]);
+break;
+case 2:
+*tx = (s-mv[dir][index2[idx]  4][0] + s-mv[dir][index2[idx]  
0xf][0]) / 2;
+*ty = (s-mv[dir][index2[idx]  4][1] + s-mv[dir][index2[idx]  
0xf][1]) / 2;
+break;
+default:
+return 0;
+}
+return valid_count;
+}
+
 /** Do motion compensation over 1 macroblock
  * Mostly adapted hpel_motion and qpel_motion from mpegvideo.c
  */
@@ -330,37 +393,10 @@ void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, 
int avg)
 }
 
 if (s-pict_type == AV_PICTURE_TYPE_P  n == 3  v-field_mode) {
-int same_count = 0, opp_count = 0, k;
-int chosen_mv[2][4][2], f;
-int tx, ty;
-for (k = 0; k  4; k++) {
-f = v-mv_f[0][s-block_index[k] + v-blocks_off];
-chosen_mv[f][f ? opp_count : same_count][0] = s-mv[0][k][0];
-chosen_mv[f][f ? opp_count : same_count][1] = s-mv[0][k][1];
-opp_count  += f;
-same_count += 1 - f;
-}
-f = opp_count  same_count;
-switch (f ? opp_count : same_count) {
-case 4:
-tx = median4(chosen_mv[f][0][0], 

[FFmpeg-devel] [PATCH] avcodec/wmalossless: use av_clip_intp2

2015-03-07 Thread zhaoxiu.zeng
From 47c997fa0623ab94a7a93b2d2e4cc4fa64c85d5f Mon Sep 17 00:00:00 2001
From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
Date: Sat, 7 Mar 2015 23:26:42 +0800
Subject: [PATCH 1/1] avcodec/wmalossless: use av_clip_intp2

Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
---
 libavcodec/wmalosslessdec.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index fcadbc0..afe82a9 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -622,7 +622,6 @@ static void mclms_update(WmallDecodeCtx *s, int icoef, int 
*pred)
 int i, j, ich, pred_error;
 int order= s-mclms_order;
 int num_channels = s-num_channels;
-int range= 1  (s-bits_per_sample - 1);
 
 for (ich = 0; ich  num_channels; ich++) {
 pred_error = s-channel_residues[ich][icoef] - pred[ich];
@@ -643,8 +642,8 @@ static void mclms_update(WmallDecodeCtx *s, int icoef, int 
*pred)
 
 for (ich = num_channels - 1; ich = 0; ich--) {
 s-mclms_recent--;
-s-mclms_prevvalues[s-mclms_recent] = 
av_clip(s-channel_residues[ich][icoef],
--range, range - 1);
+s-mclms_prevvalues[s-mclms_recent] = 
av_clip_intp2(s-channel_residues[ich][icoef],
+s-bits_per_sample - 1);
 s-mclms_updates[s-mclms_recent] = 
WMASIGN(s-channel_residues[ich][icoef]);
 }
 
@@ -693,7 +692,6 @@ static void revert_mclms(WmallDecodeCtx *s, int tile_size)
 static void lms_update(WmallDecodeCtx *s, int ich, int ilms, int input)
 {
 int recent = s-cdlms[ich][ilms].recent;
-int range  = 1  s-bits_per_sample - 1;
 int order  = s-cdlms[ich][ilms].order;
 
 if (recent)
@@ -706,7 +704,7 @@ static void lms_update(WmallDecodeCtx *s, int ich, int 
ilms, int input)
 recent = order - 1;
 }
 
-s-cdlms[ich][ilms].lms_prevvalues[recent] = av_clip(input, -range, range 
- 1);
+s-cdlms[ich][ilms].lms_prevvalues[recent] = av_clip_intp2(input, 
s-bits_per_sample - 1);
 s-cdlms[ich][ilms].lms_updates[recent] = WMASIGN(input) * 
s-update_speed[ich];
 
 s-cdlms[ich][ilms].lms_updates[recent + (order  4)] = 2;
-- 
2.1.0

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


[FFmpeg-devel] [PATCH] mips/asmdefs: change include guard to read AVUTIL_ instead of AVCODEC_

2015-03-07 Thread James Cowgill
Signed-off-by: James Cowgill james...@cowgill.org.uk
---
 libavutil/mips/asmdefs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/mips/asmdefs.h b/libavutil/mips/asmdefs.h
index 3660e98..04c036e 100644
--- a/libavutil/mips/asmdefs.h
+++ b/libavutil/mips/asmdefs.h
@@ -24,8 +24,8 @@
  * assembly (rather than from within .s files).
  */
 
-#ifndef AVCODEC_MIPS_ASMDEFS_H
-#define AVCODEC_MIPS_ASMDEFS_H
+#ifndef AVUTIL_MIPS_ASMDEFS_H
+#define AVUTIL_MIPS_ASMDEFS_H
 
 #ifdef __linux__
 #include asm/sgidefs.h
-- 
2.1.4

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


[FFmpeg-devel] [PATCH 2/5] avcodec/vc1_mc: Simplify v_edge_pos and src_y correction when fieldmv is true

2015-03-07 Thread zhaoxiu.zeng
From 1a57b4d3809710aeefc073a102a38e82f1d6e164 Mon Sep 17 00:00:00 2001
From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
Date: Sat, 7 Mar 2015 17:36:33 +0800
Subject: [PATCH 2/5] avcodec/vc1_mc: Simplify v_edge_pos and src_y correction
 when fieldmv is true

Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
---
 libavcodec/vc1_mc.c | 21 -
 1 file changed, 12 insertions(+), 9 deletions(-)
 mode change 100644 = 100755 libavcodec/vc1_mc.c

diff --git a/libavcodec/vc1_mc.c b/libavcodec/vc1_mc.c
old mode 100644
new mode 100755
index 18324c0..4b7f8b6
--- a/libavcodec/vc1_mc.c
+++ b/libavcodec/vc1_mc.c
@@ -416,10 +416,12 @@ void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, 
int avg)
 if (v-field_mode  v-ref_field_type[dir])
 srcY += s-current_picture_ptr-f-linesize[0];
 
-if (fieldmv  !(src_y  1))
-v_edge_pos--;
-if (fieldmv  (src_y  1)  src_y  4)
-src_y--;
+if (fieldmv) {
+if (!(src_y  1))
+v_edge_pos--;
+else
+src_y -= (src_y  4);
+}
 if (v-rangeredfrm || use_ic
 || s-h_edge_pos  13 || v_edge_pos  23
 || (unsigned)(src_x - s-mspel)  s-h_edge_pos - (mx  3) - 8 - 
s-mspel * 2
@@ -722,11 +724,12 @@ void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int 
dir2, int avg)
 uvmx_field[i] = (uvmx_field[i]  3)  1;
 uvmy_field[i] = (uvmy_field[i]  3)  1;
 
-if (fieldmv  !(uvsrc_y  1))
-v_edge_pos = (s-v_edge_pos  1) - 1;
-
-if (fieldmv  (uvsrc_y  1)  uvsrc_y  2)
-uvsrc_y--;
+if (fieldmv) {
+if (!(uvsrc_y  1))
+v_edge_pos = (s-v_edge_pos  1) - 1;
+else
+uvsrc_y -= (uvsrc_y  2);
+}
 if (use_ic
 || s-h_edge_pos  10 || v_edge_pos  (5  fieldmv)
 || (unsigned)uvsrc_x  (s-h_edge_pos  1) - 5
-- 
2.1.0

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


[FFmpeg-devel] [PATCH 3/5] avcodec/vc1_mc: change the type of s_rndtblfield to uint8_t

2015-03-07 Thread zhaoxiu.zeng
From 89d7ae20136a6d65cd72117dd367f60003a7391e Mon Sep 17 00:00:00 2001
From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
Date: Sat, 7 Mar 2015 17:38:54 +0800
Subject: [PATCH 3/5] avcodec/vc1_mc: change the type of s_rndtblfield to
 uint8_t

Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
---
 libavcodec/vc1_mc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 mode change 100755 = 100644 libavcodec/vc1_mc.c

diff --git a/libavcodec/vc1_mc.c b/libavcodec/vc1_mc.c
old mode 100755
new mode 100644
index 4b7f8b6..88473ea
--- a/libavcodec/vc1_mc.c
+++ b/libavcodec/vc1_mc.c
@@ -679,7 +679,7 @@ void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int 
dir2, int avg)
 int uvmx_field[4], uvmy_field[4];
 int i, off, tx, ty;
 int fieldmv = v-blk_mv_type[s-block_index[0]];
-static const int s_rndtblfield[16] = { 0, 0, 1, 2, 4, 4, 5, 6, 2, 2, 3, 8, 
6, 6, 7, 12 };
+static const uint8_t s_rndtblfield[16] = { 0, 0, 1, 2, 4, 4, 5, 6, 2, 2, 
3, 8, 6, 6, 7, 12 };
 int v_dist = fieldmv ? 1 : 4; // vertical offset for lower sub-blocks
 int v_edge_pos = s-v_edge_pos  1;
 int use_ic;
-- 
2.1.0

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


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

2015-03-07 Thread Michael Niedermayer
On Sat, Mar 07, 2015 at 02:24:24AM -0300, James Almer wrote:
 Regression test for the bug from trac ticket #4359 fixed in commit efff3854
 
 Signed-off-by: James Almer jamr...@gmail.com
 ---

 The file was uploaded to the ftp (Incoming folder). It should of course be 
 placed in the vp9-test-vectors folder.

uploaded, feel free to push in 24h

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

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data


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


Re: [FFmpeg-devel] [PATCH] Port FFT domain filter.

2015-03-07 Thread arwa arif
Updated the patch.
From 4e73a3876d0e33af33ea3af27d38ce4e5755ad25 Mon Sep 17 00:00:00 2001
From: Arwa Arif arwaarif1...@gmail.com
Date: Tue, 24 Feb 2015 12:17:30 +0530
Subject: [PATCH] Add FFT domain filter.

---
 doc/filters.texi |   38 +
 libavfilter/Makefile |1 +
 libavfilter/allfilters.c |1 +
 libavfilter/vf_fftfilt.c |  344 ++
 4 files changed, 384 insertions(+)
 create mode 100644 libavfilter/vf_fftfilt.c

diff --git a/doc/filters.texi b/doc/filters.texi
index 485efcb..10034e5 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -4591,6 +4591,44 @@ fade=t=in:st=5.5:d=0.5
 
 @end itemize
 
+@section fftfilt
+Adjust gain and luminance. It uses frequency domain filtering.
+
+@table @option
+@item dc_Y
+Adjust the dc value (gain) of the luma plane of the image. The filter
+accepts an integer value in range @code{0} to @code{1000}. The default
+value is set to @code{0}.
+
+@item dc_U
+Adjust the dc value (gain) of the 1st chroma plane of the image. The
+filter accepts an integer value in range @code{0} to @code{1000}. The
+default value is set to @code{0}.
+
+@item dc_V
+Adjust the dc value (gain) of the 2nd chroma plane of the image. The
+filter accepts an integer value in range @code{0} to @code{1000}. The 
+default value is set to @code{0}.
+
+@item lum_Y
+Set the luminance expression for the luma plane. 
+
+@item lum_U
+Set the luminance expression for the 1st chroma plane.
+
+@item lum_V
+Set the luminance expression for the 2nd chroma plane.
+
+The filter accepts the following variables:
+@item X
+@item Y
+The coordinates of the current sample.
+
+@item W
+@item H
+The width and height of the image.
+@end table
+
 @section field
 
 Extract a single field from an interlaced image using stride
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 289c63b..b184f07 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -120,6 +120,7 @@ OBJS-$(CONFIG_EDGEDETECT_FILTER) += vf_edgedetect.o
 OBJS-$(CONFIG_EQ_FILTER) += vf_eq.o
 OBJS-$(CONFIG_EXTRACTPLANES_FILTER)  += vf_extractplanes.o
 OBJS-$(CONFIG_FADE_FILTER)   += vf_fade.o
+OBJS-$(CONFIG_FFTFILT_FILTER)+= vf_fftfilt.o
 OBJS-$(CONFIG_FIELD_FILTER)  += vf_field.o
 OBJS-$(CONFIG_FIELDMATCH_FILTER) += vf_fieldmatch.o
 OBJS-$(CONFIG_FIELDORDER_FILTER) += vf_fieldorder.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 55de154..043ac56 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -136,6 +136,7 @@ void avfilter_register_all(void)
 REGISTER_FILTER(EQ, eq, vf);
 REGISTER_FILTER(EXTRACTPLANES,  extractplanes,  vf);
 REGISTER_FILTER(FADE,   fade,   vf);
+REGISTER_FILTER(FFTFILT,fftfilt,vf);
 REGISTER_FILTER(FIELD,  field,  vf);
 REGISTER_FILTER(FIELDMATCH, fieldmatch, vf);
 REGISTER_FILTER(FIELDORDER, fieldorder, vf);
diff --git a/libavfilter/vf_fftfilt.c b/libavfilter/vf_fftfilt.c
new file mode 100644
index 000..dfed875
--- /dev/null
+++ b/libavfilter/vf_fftfilt.c
@@ -0,0 +1,344 @@
+/*
+ * Copyright (c) 2015 Arwa Arif arwaarif1...@gmail.com
+ *
+ * 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
+ * FFT domain filtering.
+ */
+
+#include libavfilter/internal.h
+#include libavutil/common.h
+#include libavutil/imgutils.h
+#include libavutil/opt.h
+#include libavutil/pixdesc.h
+#include libavcodec/avfft.h
+#include libavutil/eval.h
+
+typedef struct {
+const AVClass *class;
+
+RDFTContext *rdft;
+int rdft_hbits[3];
+int rdft_vbits[3];
+size_t rdft_hlen[3];
+size_t rdft_vlen[3];
+FFTSample *rdft_hdata[3];
+FFTSample *rdft_vdata[3];
+
+int dc[3];
+char *lum_str[3];
+AVExpr *lum_expr[3];
+double *lum_data[3];
+
+} FFTFILTContext;
+
+static const char *const var_names[] = {   X,   Y,   W,   H, NULL};
+enum   { VAR_X, VAR_Y, VAR_W, VAR_H, VAR_VARS_NB };
+
+enum { Y = 0, U, V };
+
+#define OFFSET(x) offsetof(FFTFILTContext, x)
+#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
+

[FFmpeg-devel] [PATCH] vp9: split segmentation map / mvpair references.

2015-03-07 Thread Ronald S. Bultje
This prevents a memcpy if segmentation.update_map == false.
---
 libavcodec/vp9.c | 68 ++--
 1 file changed, 32 insertions(+), 36 deletions(-)

diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index aff86d0..6ac2935 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -74,6 +74,7 @@ typedef struct VP9Frame {
 AVBufferRef *extradata;
 uint8_t *segmentation_map;
 struct VP9mvrefPair *mv;
+int uses_2pass;
 } VP9Frame;
 
 struct VP9Filter {
@@ -100,7 +101,7 @@ typedef struct VP9Context {
 VP56RangeCoder *c_b;
 unsigned c_b_size;
 VP9Block *b_base, *b;
-int pass, uses_2pass, last_uses_2pass;
+int pass;
 int row, row7, col, col7;
 uint8_t *dst[3];
 ptrdiff_t y_stride, uv_stride;
@@ -128,8 +129,9 @@ typedef struct VP9Context {
 uint8_t varcompref[2];
 ThreadFrame refs[8], next_refs[8];
 #define CUR_FRAME 0
-#define LAST_FRAME 1
-VP9Frame frames[2];
+#define REF_FRAME_MVPAIR 1
+#define REF_FRAME_SEGMAP 2
+VP9Frame frames[3];
 
 struct {
 uint8_t level;
@@ -277,13 +279,6 @@ static int vp9_alloc_frame(AVCodecContext *ctx, VP9Frame 
*f)
 f-segmentation_map = f-extradata-data;
 f-mv = (struct VP9mvrefPair *) (f-extradata-data + sz);
 
-// retain segmentation map if it doesn't update
-if (s-segmentation.enabled  !s-segmentation.update_map 
-!s-intraonly  !s-keyframe  !s-errorres 
-ctx-active_thread_type != FF_THREAD_FRAME) {
-memcpy(f-segmentation_map, s-frames[LAST_FRAME].segmentation_map, 
sz);
-}
-
 return 0;
 }
 
@@ -362,12 +357,12 @@ static int update_block_buffers(AVCodecContext *ctx)
 {
 VP9Context *s = ctx-priv_data;
 
-if (s-b_base  s-block_base  s-block_alloc_using_2pass == 
s-uses_2pass)
+if (s-b_base  s-block_base  s-block_alloc_using_2pass == 
s-frames[CUR_FRAME].uses_2pass)
 return 0;
 
 av_free(s-b_base);
 av_free(s-block_base);
-if (s-uses_2pass) {
+if (s-frames[CUR_FRAME].uses_2pass) {
 int sbs = s-sb_cols * s-sb_rows;
 
 s-b_base = av_malloc_array(s-cols * s-rows, sizeof(VP9Block));
@@ -390,7 +385,7 @@ static int update_block_buffers(AVCodecContext *ctx)
 s-uveob_base[0] = s-eob_base + 256;
 s-uveob_base[1] = s-uveob_base[0] + 64;
 }
-s-block_alloc_using_2pass = s-uses_2pass;
+s-block_alloc_using_2pass = s-frames[CUR_FRAME].uses_2pass;
 
 return 0;
 }
@@ -491,7 +486,6 @@ static int decode_frame_header(AVCodecContext *ctx,
 *ref = get_bits(s-gb, 3);
 return 0;
 }
-s-last_uses_2pass = s-uses_2pass;
 s-last_keyframe  = s-keyframe;
 s-keyframe   = !get_bits1(s-gb);
 last_invisible= s-invisible;
@@ -1082,10 +1076,10 @@ static void find_ref_mvs(VP9Context *s,
 
 // MV at this position in previous frame, using same reference frame
 if (s-use_last_frame_mvs) {
-struct VP9mvrefPair *mv = s-frames[LAST_FRAME].mv[row * s-sb_cols * 
8 + col];
+struct VP9mvrefPair *mv = s-frames[REF_FRAME_MVPAIR].mv[row * 
s-sb_cols * 8 + col];
 
-if (!s-last_uses_2pass)
-ff_thread_await_progress(s-frames[LAST_FRAME].tf, row  3, 0);
+if (!s-frames[REF_FRAME_MVPAIR].uses_2pass)
+ff_thread_await_progress(s-frames[REF_FRAME_MVPAIR].tf, row  
3, 0);
 if (mv-ref[0] == ref) {
 RETURN_MV(mv-mv[0]);
 } else if (mv-ref[1] == ref) {
@@ -1124,7 +1118,7 @@ static void find_ref_mvs(VP9Context *s,
 
 // MV at this position in previous frame, using different reference frame
 if (s-use_last_frame_mvs) {
-struct VP9mvrefPair *mv = s-frames[LAST_FRAME].mv[row * s-sb_cols * 
8 + col];
+struct VP9mvrefPair *mv = s-frames[REF_FRAME_MVPAIR].mv[row * 
s-sb_cols * 8 + col];
 
 // no need to await_progress, because we already did that above
 if (mv-ref[0] != ref  mv-ref[0] = 0) {
@@ -1348,21 +1342,14 @@ static void decode_mode(AVCodecContext *ctx)
 s-left_segpred_ctx[row7]]))) {
 if (!s-errorres) {
 int pred = 8, x;
-uint8_t *refsegmap = s-frames[LAST_FRAME].segmentation_map;
+uint8_t *refsegmap = s-frames[REF_FRAME_SEGMAP].segmentation_map;
 
-if (!s-last_uses_2pass)
-ff_thread_await_progress(s-frames[LAST_FRAME].tf, row  3, 
0);
+if (!s-frames[REF_FRAME_SEGMAP].uses_2pass)
+ff_thread_await_progress(s-frames[REF_FRAME_SEGMAP].tf, row 
 3, 0);
 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[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
- 

Re: [FFmpeg-devel] [PATCH] mips/asmdefs: use asm/sgidefs.h header on linux

2015-03-07 Thread Michael Niedermayer
On Sat, Mar 07, 2015 at 10:13:23AM +, James Cowgill wrote:
 Unfortunately android  api 21 (lollipop) doesn't have the sgidefs.h header,
 but the linux kernel does in asm/sgidefs.h. So use that header if we can.
 
 Change _ABI64 to _MIPS_SIM_ABI64 which is defined in both headers.
 
 Signed-off-by: James Cowgill james...@cowgill.org.uk
 ---
  libavutil/mips/asmdefs.h | 6 +-
  1 file changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/libavutil/mips/asmdefs.h b/libavutil/mips/asmdefs.h
 index 4d2922c..3660e98 100644
 --- a/libavutil/mips/asmdefs.h
 +++ b/libavutil/mips/asmdefs.h
 @@ -27,9 +27,13 @@
  #ifndef AVCODEC_MIPS_ASMDEFS_H
  #define AVCODEC_MIPS_ASMDEFS_H
  
 +#ifdef __linux__
 +#include asm/sgidefs.h
 +#else
  #include sgidefs.h
 +#endif

is it possible to to test for the header in configure instead of
testing for __linux__
we test for most other headers in configure

see, for example check_header asm/types.h / #if HAVE_ASM_TYPES_H

[...]

-- 
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-07 Thread Michael Niedermayer
On Sat, Mar 07, 2015 at 02:47:51AM -0300, James Almer wrote:
 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 sgidefs.h
  +
  +#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=20150307052927slot=mipsel-android-gcc-4.4
 
 CClibavutil/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.

adding nedelko and James (Cowgill) to the CC so this is not missed

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.


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-07 Thread James Cowgill
On Sat, 2015-03-07 at 10:15 +0100, Michael Niedermayer wrote:
 On Sat, Mar 07, 2015 at 02:47:51AM -0300, James Almer wrote:
  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 sgidefs.h
   +
   +#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=20150307052927slot=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

Lovely. It looks like sgidefs.h was only added in lollipop (even though
it's been everywhere else for years):
https://github.com/android/platform_bionic/commit/1c2cf23a0c54619e7a362e1b82b0fb37ec9dd11a

But there's still asm/sgidefs.h defined in the linux kernel headers we
can use instead (give me a moment).

James

___
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-07 Thread Michael Niedermayer
On Sat, Mar 07, 2015 at 12:46:46AM -0300, James Almer wrote:
 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.

done locally, should be in my next push to each respective release
Branch

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch


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


[FFmpeg-devel] [PATCH] mips/asmdefs: use asm/sgidefs.h header on linux

2015-03-07 Thread James Cowgill
Unfortunately android  api 21 (lollipop) doesn't have the sgidefs.h header,
but the linux kernel does in asm/sgidefs.h. So use that header if we can.

Change _ABI64 to _MIPS_SIM_ABI64 which is defined in both headers.

Signed-off-by: James Cowgill james...@cowgill.org.uk
---
 libavutil/mips/asmdefs.h | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavutil/mips/asmdefs.h b/libavutil/mips/asmdefs.h
index 4d2922c..3660e98 100644
--- a/libavutil/mips/asmdefs.h
+++ b/libavutil/mips/asmdefs.h
@@ -27,9 +27,13 @@
 #ifndef AVCODEC_MIPS_ASMDEFS_H
 #define AVCODEC_MIPS_ASMDEFS_H
 
+#ifdef __linux__
+#include asm/sgidefs.h
+#else
 #include sgidefs.h
+#endif
 
-#if _MIPS_SIM == _ABI64
+#if _MIPS_SIM == _MIPS_SIM_ABI64
 # define PTRSIZE 8 
 # define PTRLOG  3 
 # define PTR_ADDU   daddu 
-- 
2.1.4

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


[FFmpeg-devel] [PATCH v2] mips/asmdefs: use asm/sgidefs.h header on linux

2015-03-07 Thread James Cowgill
Unfortunately android  api 21 (lollipop) doesn't have the sgidefs.h header,
but the linux kernel does have an almost equivalent asm/sgidefs.h which will
do so use that header if we can.

Change _ABI64 to _MIPS_SIM_ABI64 which is defined in both headers.

Signed-off-by: James Cowgill james...@cowgill.org.uk
---
 configure| 4 
 libavutil/mips/asmdefs.h | 6 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 1ea2032..a5ff67c 100755
--- a/configure
+++ b/configure
@@ -1642,6 +1642,7 @@ HEADERS_LIST=
 alsa_asoundlib_h
 altivec_h
 arpa_inet_h
+asm_sgidefs_h
 asm_types_h
 cdio_paranoia_h
 cdio_paranoia_paranoia_h
@@ -4570,6 +4571,9 @@ EOF
 
 elif enabled mips; then
 
+check_header asm/sgidefs.h || check_header sgidefs.h || \
+die either asm/sgidefs.h or sgidefs.h is required on mips
+
 check_inline_asm loongson 'dmult.g $1, $2, $3'
 
 # Enable minimum ISA based on selected options
diff --git a/libavutil/mips/asmdefs.h b/libavutil/mips/asmdefs.h
index a3a5ee3..0e911cb 100644
--- a/libavutil/mips/asmdefs.h
+++ b/libavutil/mips/asmdefs.h
@@ -27,9 +27,13 @@
 #ifndef AVUTIL_MIPS_ASMDEFS_H
 #define AVUTIL_MIPS_ASMDEFS_H
 
+#if HAVE_ASM_SGIDEFS_H
+#include asm/sgidefs.h
+#else
 #include sgidefs.h
+#endif
 
-#if _MIPS_SIM == _ABI64
+#if _MIPS_SIM == _MIPS_SIM_ABI64
 # define PTRSIZE 8 
 # define PTRLOG  3 
 # define PTR_ADDU   daddu 
-- 
2.1.4

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


Re: [FFmpeg-devel] [PATCH v2] mips/asmdefs: use asm/sgidefs.h header on linux

2015-03-07 Thread James Cowgill
On Sat, 2015-03-07 at 13:32 +0100, Michael Niedermayer wrote:
 On Sat, Mar 07, 2015 at 10:56:45AM +, James Cowgill wrote:
  Unfortunately android  api 21 (lollipop) doesn't have the sgidefs.h header,
  but the linux kernel does have an almost equivalent asm/sgidefs.h which will
  do so use that header if we can.
  
  Change _ABI64 to _MIPS_SIM_ABI64 which is defined in both headers.
  
  Signed-off-by: James Cowgill james...@cowgill.org.uk
 
 tryng to build for androidmips:
 In file included from ffmpeg/libavcodec/mips/mpegaudiodsp_mips_float.c:58:
 ffmpeg/libavutil/mips/asmdefs.h:30:5: warning: HAVE_ASM_SGIDEFS_H is not 
 defined
 ffmpeg/libavutil/mips/asmdefs.h:33:21: error: sgidefs.h: No such file or 
 directory
 ffmpeg/libavutil/mips/asmdefs.h:36:18: warning: _MIPS_SIM_ABI64 is not 
 defined
 
 i guess you are missing a include config.h in this

Woops sorry - I don't have access to any mips machines at the weekend so
it wasn't tested a huge amount (time for qemu...)

James

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


Re: [FFmpeg-devel] [libav-devel] [PATCH 2/2] lavf: move internal fields from public to internal context

2015-03-07 Thread Rainer Hochecker
Michael Niedermayer michaelni at gmx.at writes:


 
 ive already applied wm4s patch yesterday, so the next ffmpeg release
 (2.6) should contain avformat_flush()
 
 if further changes are needed please tell me
 
 [...]
 


Thanks for notification. I will switch Kodi to 2.6 this weekend.

___
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-07 Thread Michael Niedermayer
On Fri, Mar 06, 2015 at 03:30:00PM +0100, Michael Niedermayer wrote:
 On Fri, Mar 06, 2015 at 07:34:06PM +0800, Wei Gao wrote:
  2015-03-05 8:48 GMT+08:00 Srikanth G gska...@gmail.com:
  
   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

reverted, this patch broke compilation with opencl

[...]


-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell


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] mips/asmdefs: use asm/sgidefs.h header on linux

2015-03-07 Thread Michael Niedermayer
On Sat, Mar 07, 2015 at 10:56:45AM +, James Cowgill wrote:
 Unfortunately android  api 21 (lollipop) doesn't have the sgidefs.h header,
 but the linux kernel does have an almost equivalent asm/sgidefs.h which will
 do so use that header if we can.
 
 Change _ABI64 to _MIPS_SIM_ABI64 which is defined in both headers.
 
 Signed-off-by: James Cowgill james...@cowgill.org.uk

tryng to build for androidmips:
In file included from ffmpeg/libavcodec/mips/mpegaudiodsp_mips_float.c:58:
ffmpeg/libavutil/mips/asmdefs.h:30:5: warning: HAVE_ASM_SGIDEFS_H is not 
defined
ffmpeg/libavutil/mips/asmdefs.h:33:21: error: sgidefs.h: No such file or 
directory
ffmpeg/libavutil/mips/asmdefs.h:36:18: warning: _MIPS_SIM_ABI64 is not defined

i guess you are missing a include config.h in 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


Re: [FFmpeg-devel] [PATCH] avformat/srtenc: avoid segmentation fault when transcoding from SSA to SRT

2015-03-07 Thread Nicolas George
Le septidi 17 ventôse, an CCXXIII, Gilles Chanteperdrix a écrit :
 When transcoding to SRT, do not assume that each sub-title frame contains
 text.

Can you explain how to reproduce the segfault? I tried transcoding an ASS
file and it worked.

Regards,

-- 
  Nicolas George


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


[FFmpeg-devel] [PATCH] doc/filters: Add some random examples for fftfilt

2015-03-07 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer michae...@gmx.at
---
 doc/filters.texi |   23 +++
 1 file changed, 23 insertions(+)

diff --git a/doc/filters.texi b/doc/filters.texi
index b15087c..9149ae5 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -4629,6 +4629,29 @@ The coordinates of the current sample.
 The width and height of the image.
 @end table
 
+@subsection Examples
+
+@itemize
+@item
+Highpass:
+@example
+fftfilt=dc_Y=128:weight_Y='squish(1-(Y+X)/100)'
+
+@end example
+
+Lowpass
+@example
+fftfilt=dc_Y=0:weight_Y='squish((Y+X)/100-1)'
+@end example
+
+@item
+Sharpen:
+@example
+fftfilt=dc_Y=0:weight_Y='1+squish(1-(Y+X)/100)'
+@end example
+
+@end itemize
+
 @section field
 
 Extract a single field from an interlaced image using stride
-- 
1.7.9.5

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


Re: [FFmpeg-devel] [PATCH] avformat/srtenc: avoid segmentation fault when transcoding from SSA to SRT

2015-03-07 Thread Gilles Chanteperdrix
On Sat, Mar 07, 2015 at 11:46:44PM +0100, Nicolas George wrote:
 Le septidi 17 ventôse, an CCXXIII, Gilles Chanteperdrix a écrit :
  You need an ASS file that produces a sub-title frame without text. I
  have been carrying this patch since 2013, I am afraid I no longer
  have the problematic file.
 
 I tried an ASS file with an empty text part, and it did not crash
 either.

Is not there some way in the ssa format to declare some graphic
elements which are not text?

 It
 is entirely possible the problem has disappeared due to some of the reworks
 of the text subtitles code since you experienced it.

In my modest experience, bugs do not just disappear if you do not
fix them.

 
 I am sorry to insist, but I am always suspicious of changes that go if the
 value is not what we expect, silently ignore it, because they frequently
 should return an error or hide a bug earlier in the code; 

Maybe it is not a perfect patch, but if subtitles can contain
graphic elements mixed with text, it seems better to translate the
text only when the target codec only supports text, than to fail
with a segmentation fault.

 for these reasons,
 I would like either a more detailed analysis or a chance to see for myself
 before this patch is applied.

Just to make things clear: you will not get such an analysis for me.
I am perfectly fine with the patch applied in my local copy of
ffmpeg.

-- 
Gilles.


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


Re: [FFmpeg-devel] Windows deprecated stdin reading method

2015-03-07 Thread Peter
Alright, I may have been really stupid, for some reason I always passed
input_handle to read and WaitForSingleObject instead of stdin, no clue
what happened there in my head.

Turns out this actually works in my initial tests:

https://github.com/Bigpet/FFmpeg/commit/93864dd0373bc6561be8e45f14f835453c74e832

2015-03-08 0:22 GMT+01:00 Peter dravo...@googlemail.com:
It checks if there is data in the buffer. The point is to do a non-blocking 
read on stdin.

 I don't know how else to do that for stdin. Using WaitForSingleObject with
 generic functions like read() from io.h or ReadFile doesn't work since
 WaitForSingleObject will trigger on mouse and windows events, so calling those
 functions can result in blocking (even if I wait for an actual keyboard 
 event).

 Or is that code specifically there to deal with everything that is not a
 console and what I actually need to do there is somehow typecheck that
 GetStdHandle did not return a console and only then call one of the generic
 read functions? (and let the kbhit and getch that come afterwards handle the
 console)

 2015-03-07 23:38 GMT+01:00 Reimar Döffinger reimar.doeffin...@gmx.de:
 On 07.03.2015, at 16:51, Peter dravo...@googlemail.com wrote:
 The issue is this patch
 https://github.com/FFmpeg/FFmpeg/commit/ca4d71b149ebe32aeaf617ffccf362624b9aafb1
 which uses a member of the FILE struct which is not available in the
 new C runtime (it's now just a struct with a void*).

 I do not quite know the semantics of the stdin-_cnt  0 check.

 It checks if there is data in the buffer. The point is to do a non-blocking 
 read on stdin.

 So I tried a few approaches, like using the deprecated function that is 
 called
 after the #ifdef block anyway:
 https://github.com/Bigpet/FFmpeg/commit/b167e17e6f8839e1b4ce0edad2708ff4237e4aec
 (I'm kind of worried about this since using read(0, ch, 1); instead
 of getch with that if
 condition actually blocks in some cases, so it's not 100% equivalent)

 Or trying to understand what the non-deprecated Win32 API calls would look 
 like:
 https://github.com/Bigpet/FFmpeg/commit/8d9cae13f389ab7dddc736ecac3feb01843ca094

 I don't think that's generic enough, you can't know what kind of thing stdin 
 is, so using any non-generic function on it might break things...
 ___
 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] Windows deprecated stdin reading method

2015-03-07 Thread Reimar Döffinger
On 07.03.2015, at 16:51, Peter dravo...@googlemail.com wrote:
 The issue is this patch
 https://github.com/FFmpeg/FFmpeg/commit/ca4d71b149ebe32aeaf617ffccf362624b9aafb1
 which uses a member of the FILE struct which is not available in the
 new C runtime (it's now just a struct with a void*).
 
 I do not quite know the semantics of the stdin-_cnt  0 check.

It checks if there is data in the buffer. The point is to do a non-blocking 
read on stdin.

 So I tried a few approaches, like using the deprecated function that is called
 after the #ifdef block anyway:
 https://github.com/Bigpet/FFmpeg/commit/b167e17e6f8839e1b4ce0edad2708ff4237e4aec
 (I'm kind of worried about this since using read(0, ch, 1); instead
 of getch with that if
 condition actually blocks in some cases, so it's not 100% equivalent)
 
 Or trying to understand what the non-deprecated Win32 API calls would look 
 like:
 https://github.com/Bigpet/FFmpeg/commit/8d9cae13f389ab7dddc736ecac3feb01843ca094

I don't think that's generic enough, you can't know what kind of thing stdin 
is, so using any non-generic function on it might break things...
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] gsoc-2015: APNG

2015-03-07 Thread Paul B Mahol
On 3/7/15, Fedor fedor...@mail.ru wrote:
  Is GSOC task Animated Portable Network Graphics free? If yes I will work on
 it. My qualification Task: Improve the filter selection heuristic in in the
 png encoder so files compress better


You are 5th that picked it. I wonder why APNG is so popular. Good luck
with your qualification task.


 Fedor Strizhnev
 Fedor Strizhniov.
 ___
 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] avformat/srtenc: avoid segmentation fault when transcoding from SSA to SRT

2015-03-07 Thread Gilles Chanteperdrix
When transcoding to SRT, do not assume that each sub-title frame contains
text.

Signed-off-by: Gilles Chanteperdrix gilles.chanteperd...@xenomai.org
---
 libavcodec/srtenc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/srtenc.c b/libavcodec/srtenc.c
index 3287970..ab790f8 100644
--- a/libavcodec/srtenc.c
+++ b/libavcodec/srtenc.c
@@ -241,6 +241,9 @@ static int srt_encode_frame(AVCodecContext *avctx,
 for (; dialog  num--; dialog++) {
 s-alignment_applied = 0;
 srt_style_apply(s, dialog-style);
+if (!dialog-text)
+continue;
+
 ff_ass_split_override_codes(srt_callbacks, s, dialog-text);
 }
 }
-- 
1.8.4

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


[FFmpeg-devel] [PATCH] intreadwrite: Altivec implementations of AV_COPY128 and AV_ZERO128.

2015-03-07 Thread Reimar Döffinger
Slightly (ca. 4%?) faster and smaller ff_h264_decode_mb_cavlc
in my tests on a G4 7450.

Signed-off-by: Reimar Döffinger reimar.doeffin...@gmx.de
---
 libavutil/ppc/intreadwrite.h | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/libavutil/ppc/intreadwrite.h b/libavutil/ppc/intreadwrite.h
index 1ec349e..b68b40e 100644
--- a/libavutil/ppc/intreadwrite.h
+++ b/libavutil/ppc/intreadwrite.h
@@ -38,6 +38,16 @@
 
 #endif
 
+#if HAVE_ALTIVEC
+#include util_altivec.h
+#if HAVE_BIGENDIAN
+#define AV_COPY128(d, s) vec_st(vec_ld(0, (const unsigned char *)(s)), 0, 
(unsigned char *)(d))
+#else
+#define AV_COPY128(d, s) vec_vsx_st(vec_vsx_ld(0, (const unsigned char *)(s)), 
0, (unsigned char *)(d))
+#endif
+#define AV_ZERO128(d) VEC_ST(vec_splat_u8(0), 0, (unsigned char *)(d))
+#endif
+
 #if HAVE_XFORM_ASM
 
 #if HAVE_BIGENDIAN
-- 
2.1.4

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


Re: [FFmpeg-devel] [PATCH] Port FFT domain filter.

2015-03-07 Thread James Almer
On 07/03/15 7:39 AM, arwa arif wrote:
 Updated the patch.

Please send a patch to add the relevant dependencies to configure.
Look how showspectrum is handled to get an idea.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Windows deprecated stdin reading method

2015-03-07 Thread Reimar Döffinger
On 08.03.2015, at 00:46, Peter dravo...@googlemail.com wrote:
 Alright, I may have been really stupid, for some reason I always passed
 input_handle to read and WaitForSingleObject instead of stdin, no clue
 what happened there in my head.
 
 Turns out this actually works in my initial tests:
 
 https://github.com/Bigpet/FFmpeg/commit/93864dd0373bc6561be8e45f14f835453c74e832

It looks reasonable, but I'd expect there is a reason we didn't do this 
originally?
Have you tested in the normal console, cygwin console, with stdin redirection 
etc?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] Patch proposal : Fix crash with astats filter when no audio input

2015-03-07 Thread Martin Vignali
Hello,

Exemple to create the crash :
ffmpeg -i fileWithoutSound -filter astats -f null -

A patch in attach avoid the crash by avoiding Zero division in print_stats.

I test the patch on several files, and the crash doesn't appear anymore.

Best regards

Martin


0001-Fix-crash-in-astats-filter-whith-no-audio-input.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Patch proposal : Fix crash with astats filter when no audio input

2015-03-07 Thread Nicolas George
Le septidi 17 ventôse, an CCXXIII, Martin Vignali a écrit :
 Exemple to create the crash :
 ffmpeg -i fileWithoutSound -filter astats -f null -

I experience no crash. As far as I can see, the divisions happen with
floats, which is valid.

 From 621b18a278c3d314da773b8eec9f9e12707a20bb Mon Sep 17 00:00:00 2001
 From: Martin Vignali martin.vign...@gmail.com
 Date: Sat, 7 Mar 2015 23:09:40 +0100
 Subject: [PATCH] Fix crash in astats filter, whith no audio input
 
 Avoid Zero division in print part.
 ---
  libavfilter/af_astats.c | 24 +---
  1 file changed, 13 insertions(+), 11 deletions(-)
 
 diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c
 index 60ccd73..8e90f6b 100644
 --- a/libavfilter/af_astats.c
 +++ b/libavfilter/af_astats.c
 @@ -222,18 +222,20 @@ static void print_stats(AVFilterContext *ctx)
  av_log(ctx, AV_LOG_INFO, Peak count: %PRId64\n, p-min_count + 
 p-max_count);
  }
  
 -av_log(ctx, AV_LOG_INFO, Overall\n);
 -av_log(ctx, AV_LOG_INFO, DC offset: %f\n, max_sigma_x / (nb_samples / 
 s-nb_channels));
 -av_log(ctx, AV_LOG_INFO, Min level: %f\n, min);
 -av_log(ctx, AV_LOG_INFO, Max level: %f\n, max);
 -av_log(ctx, AV_LOG_INFO, Peak level dB: %f\n, LINEAR_TO_DB(FFMAX(-min, 
 max)));
 -av_log(ctx, AV_LOG_INFO, RMS level dB: %f\n, 
 LINEAR_TO_DB(sqrt(sigma_x2 / nb_samples)));
 -av_log(ctx, AV_LOG_INFO, RMS peak dB: %f\n, 
 LINEAR_TO_DB(sqrt(max_sigma_x2)));

Please do the reindent in a separate patch.

 -if (min_sigma_x2 != 1)

 +if ((s-nb_channels != 0)(nb_samples !=0)){/* Avoid crash when input 
 don't have sound */

s-nb_channels can not be 0.

And cosmetic nit: the standard coding style in FFmpeg is: no != 0, no
extra parentheses on tests, spaces around operators, including , and
between clause and braces.

 +av_log(ctx, AV_LOG_INFO, Overall\n);
 +av_log(ctx, AV_LOG_INFO, DC offset: %f\n, max_sigma_x / 
 (nb_samples / s-nb_channels));
 +av_log(ctx, AV_LOG_INFO, Min level: %f\n, min);
 +av_log(ctx, AV_LOG_INFO, Max level: %f\n, max);
 +av_log(ctx, AV_LOG_INFO, Peak level dB: %f\n, 
 LINEAR_TO_DB(FFMAX(-min, max)));
 +av_log(ctx, AV_LOG_INFO, RMS level dB: %f\n, 
 LINEAR_TO_DB(sqrt(sigma_x2 / nb_samples)));
 +av_log(ctx, AV_LOG_INFO, RMS peak dB: %f\n, 
 LINEAR_TO_DB(sqrt(max_sigma_x2)));
 +if (min_sigma_x2 != 1)
  av_log(ctx, AV_LOG_INFO, RMS trough dB: %f\n, 
 LINEAR_TO_DB(sqrt(min_sigma_x2)));
 -av_log(ctx, AV_LOG_INFO, Flat factor: %f\n, LINEAR_TO_DB((min_runs + 
 max_runs) / (min_count + max_count)));
 -av_log(ctx, AV_LOG_INFO, Peak count: %f\n, (min_count + max_count) / 
 (double)s-nb_channels);
 -av_log(ctx, AV_LOG_INFO, Number of samples: %PRId64\n, nb_samples / 
 s-nb_channels);
 +av_log(ctx, AV_LOG_INFO, Flat factor: %f\n, LINEAR_TO_DB((min_runs 
 + max_runs) / (min_count + max_count)));
 +av_log(ctx, AV_LOG_INFO, Peak count: %f\n, (min_count + max_count) 
 / (double)s-nb_channels);
 +av_log(ctx, AV_LOG_INFO, Number of samples: %PRId64\n, 
 nb_samples / s-nb_channels);
 +}
  }
  
  static av_cold void uninit(AVFilterContext *ctx)

Regards,

-- 
  Nicolas George


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/srtenc: avoid segmentation fault when transcoding from SSA to SRT

2015-03-07 Thread Gilles Chanteperdrix
On Sat, Mar 07, 2015 at 11:46:44PM +0100, Nicolas George wrote:
 Le septidi 17 ventôse, an CCXXIII, Gilles Chanteperdrix a écrit :
  You need an ASS file that produces a sub-title frame without text. I
  have been carrying this patch since 2013, I am afraid I no longer
  have the problematic file.
 
 I tried an ASS file with an empty text part, and it did not crash either. It
 is entirely possible the problem has disappeared due to some of the reworks
 of the text subtitles code since you experienced it.
 
 I am sorry to insist, but I am always suspicious of changes that go if the
 value is not what we expect, silently ignore it, because they frequently
 should return an error or hide a bug earlier in the code; for these reasons,
 I would like either a more detailed analysis or a chance to see for myself
 before this patch is applied.

If I read ffmpeg current documentation here:

http://www.ffmpeg.org/doxygen/2.5/group__lavc__core.html#ga828218dcb8874ab2c5af8d486c365421

It seems that when a subtitle rect type is SUBTITLE_ASS (which is
the case in the code which my patch modified), there is no guarantee
that the text field contains something.

-- 
Gilles.


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


Re: [FFmpeg-devel] [PATCH 2/5] avcodec/vc1_mc: Simplify v_edge_pos and src_y correction when fieldmv is true

2015-03-07 Thread Michael Niedermayer
On Sat, Mar 07, 2015 at 10:45:36PM +0800, zhaoxiu.zeng wrote:
 From 1a57b4d3809710aeefc073a102a38e82f1d6e164 Mon Sep 17 00:00:00 2001
 From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
 Date: Sat, 7 Mar 2015 17:36:33 +0800
 Subject: [PATCH 2/5] avcodec/vc1_mc: Simplify v_edge_pos and src_y correction
  when fieldmv is true
 
 Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
 ---
  libavcodec/vc1_mc.c | 21 -
  1 file changed, 12 insertions(+), 9 deletions(-)

  mode change 100644 = 100755 libavcodec/vc1_mc.c

applied without the mode change

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

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA


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/srtenc: avoid segmentation fault when transcoding from SSA to SRT

2015-03-07 Thread Gilles Chanteperdrix
On Sat, Mar 07, 2015 at 09:18:41PM +0100, Nicolas George wrote:
 Le septidi 17 ventôse, an CCXXIII, Gilles Chanteperdrix a écrit :
  When transcoding to SRT, do not assume that each sub-title frame contains
  text.
 
 Can you explain how to reproduce the segfault? I tried transcoding an ASS
 file and it worked.

You need an ASS file that produces a sub-title frame without text. I
have been carrying this patch since 2013, I am afraid I no longer
have the problematic file.

-- 
Gilles.


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


Re: [FFmpeg-devel] [PATCH 3/5] avcodec/vc1_mc: change the type of s_rndtblfield to uint8_t

2015-03-07 Thread Michael Niedermayer
On Sat, Mar 07, 2015 at 10:47:18PM +0800, zhaoxiu.zeng wrote:
 From 89d7ae20136a6d65cd72117dd367f60003a7391e Mon Sep 17 00:00:00 2001
 From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
 Date: Sat, 7 Mar 2015 17:38:54 +0800
 Subject: [PATCH 3/5] avcodec/vc1_mc: change the type of s_rndtblfield to
  uint8_t
 
 Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
 ---
  libavcodec/vc1_mc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

applied

thanks

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

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin


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


Re: [FFmpeg-devel] [PATCH] avformat/srtenc: avoid segmentation fault when transcoding from SSA to SRT

2015-03-07 Thread Nicolas George
Le septidi 17 ventôse, an CCXXIII, Gilles Chanteperdrix a écrit :
 You need an ASS file that produces a sub-title frame without text. I
 have been carrying this patch since 2013, I am afraid I no longer
 have the problematic file.

I tried an ASS file with an empty text part, and it did not crash either. It
is entirely possible the problem has disappeared due to some of the reworks
of the text subtitles code since you experienced it.

I am sorry to insist, but I am always suspicious of changes that go if the
value is not what we expect, silently ignore it, because they frequently
should return an error or hide a bug earlier in the code; for these reasons,
I would like either a more detailed analysis or a chance to see for myself
before this patch is applied.

Regards,

-- 
  Nicolas George


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


Re: [FFmpeg-devel] Windows deprecated stdin reading method

2015-03-07 Thread Peter
It checks if there is data in the buffer. The point is to do a non-blocking 
read on stdin.

I don't know how else to do that for stdin. Using WaitForSingleObject with
generic functions like read() from io.h or ReadFile doesn't work since
WaitForSingleObject will trigger on mouse and windows events, so calling those
functions can result in blocking (even if I wait for an actual keyboard event).

Or is that code specifically there to deal with everything that is not a
console and what I actually need to do there is somehow typecheck that
GetStdHandle did not return a console and only then call one of the generic
read functions? (and let the kbhit and getch that come afterwards handle the
console)

2015-03-07 23:38 GMT+01:00 Reimar Döffinger reimar.doeffin...@gmx.de:
 On 07.03.2015, at 16:51, Peter dravo...@googlemail.com wrote:
 The issue is this patch
 https://github.com/FFmpeg/FFmpeg/commit/ca4d71b149ebe32aeaf617ffccf362624b9aafb1
 which uses a member of the FILE struct which is not available in the
 new C runtime (it's now just a struct with a void*).

 I do not quite know the semantics of the stdin-_cnt  0 check.

 It checks if there is data in the buffer. The point is to do a non-blocking 
 read on stdin.

 So I tried a few approaches, like using the deprecated function that is 
 called
 after the #ifdef block anyway:
 https://github.com/Bigpet/FFmpeg/commit/b167e17e6f8839e1b4ce0edad2708ff4237e4aec
 (I'm kind of worried about this since using read(0, ch, 1); instead
 of getch with that if
 condition actually blocks in some cases, so it's not 100% equivalent)

 Or trying to understand what the non-deprecated Win32 API calls would look 
 like:
 https://github.com/Bigpet/FFmpeg/commit/8d9cae13f389ab7dddc736ecac3feb01843ca094

 I don't think that's generic enough, you can't know what kind of thing stdin 
 is, so using any non-generic function on it might break things...
 ___
 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 proposal : Fix crash with astats filter when no audio input

2015-03-07 Thread Martin Vignali
In attach a sample file, who make a crash. (on mac os x with latest git
version, and on windows with older version).

i just make the test now, and s-nb_channels can be 0. (this is the case
with the file in attach).

For the coding style.
Do you prefer something like that : ?
if (s-nb_channels == 0) || (nb_samples !=0)
return;

Best regards

Martin

2015-03-08 0:07 GMT+01:00 Nicolas George geo...@nsup.org:

 Le septidi 17 ventôse, an CCXXIII, Martin Vignali a écrit :
  Exemple to create the crash :
  ffmpeg -i fileWithoutSound -filter astats -f null -

 I experience no crash. As far as I can see, the divisions happen with
 floats, which is valid.

  From 621b18a278c3d314da773b8eec9f9e12707a20bb Mon Sep 17 00:00:00 2001
  From: Martin Vignali martin.vign...@gmail.com
  Date: Sat, 7 Mar 2015 23:09:40 +0100
  Subject: [PATCH] Fix crash in astats filter, whith no audio input
 
  Avoid Zero division in print part.
  ---
   libavfilter/af_astats.c | 24 +---
   1 file changed, 13 insertions(+), 11 deletions(-)
 
  diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c
  index 60ccd73..8e90f6b 100644
  --- a/libavfilter/af_astats.c
  +++ b/libavfilter/af_astats.c
  @@ -222,18 +222,20 @@ static void print_stats(AVFilterContext *ctx)
   av_log(ctx, AV_LOG_INFO, Peak count: %PRId64\n,
 p-min_count + p-max_count);
   }
 
  -av_log(ctx, AV_LOG_INFO, Overall\n);
  -av_log(ctx, AV_LOG_INFO, DC offset: %f\n, max_sigma_x /
 (nb_samples / s-nb_channels));
  -av_log(ctx, AV_LOG_INFO, Min level: %f\n, min);
  -av_log(ctx, AV_LOG_INFO, Max level: %f\n, max);
  -av_log(ctx, AV_LOG_INFO, Peak level dB: %f\n,
 LINEAR_TO_DB(FFMAX(-min, max)));
  -av_log(ctx, AV_LOG_INFO, RMS level dB: %f\n,
 LINEAR_TO_DB(sqrt(sigma_x2 / nb_samples)));
  -av_log(ctx, AV_LOG_INFO, RMS peak dB: %f\n,
 LINEAR_TO_DB(sqrt(max_sigma_x2)));

 Please do the reindent in a separate patch.

  -if (min_sigma_x2 != 1)

  +if ((s-nb_channels != 0)(nb_samples !=0)){/* Avoid crash when
 input don't have sound */

 s-nb_channels can not be 0.

 And cosmetic nit: the standard coding style in FFmpeg is: no != 0, no
 extra parentheses on tests, spaces around operators, including , and
 between clause and braces.

  +av_log(ctx, AV_LOG_INFO, Overall\n);
  +av_log(ctx, AV_LOG_INFO, DC offset: %f\n, max_sigma_x /
 (nb_samples / s-nb_channels));
  +av_log(ctx, AV_LOG_INFO, Min level: %f\n, min);
  +av_log(ctx, AV_LOG_INFO, Max level: %f\n, max);
  +av_log(ctx, AV_LOG_INFO, Peak level dB: %f\n,
 LINEAR_TO_DB(FFMAX(-min, max)));
  +av_log(ctx, AV_LOG_INFO, RMS level dB: %f\n,
 LINEAR_TO_DB(sqrt(sigma_x2 / nb_samples)));
  +av_log(ctx, AV_LOG_INFO, RMS peak dB: %f\n,
 LINEAR_TO_DB(sqrt(max_sigma_x2)));
  +if (min_sigma_x2 != 1)
   av_log(ctx, AV_LOG_INFO, RMS trough dB: %f\n,
 LINEAR_TO_DB(sqrt(min_sigma_x2)));
  -av_log(ctx, AV_LOG_INFO, Flat factor: %f\n,
 LINEAR_TO_DB((min_runs + max_runs) / (min_count + max_count)));
  -av_log(ctx, AV_LOG_INFO, Peak count: %f\n, (min_count +
 max_count) / (double)s-nb_channels);
  -av_log(ctx, AV_LOG_INFO, Number of samples: %PRId64\n,
 nb_samples / s-nb_channels);
  +av_log(ctx, AV_LOG_INFO, Flat factor: %f\n,
 LINEAR_TO_DB((min_runs + max_runs) / (min_count + max_count)));
  +av_log(ctx, AV_LOG_INFO, Peak count: %f\n, (min_count +
 max_count) / (double)s-nb_channels);
  +av_log(ctx, AV_LOG_INFO, Number of samples: %PRId64\n,
 nb_samples / s-nb_channels);
  +}
   }
 
   static av_cold void uninit(AVFilterContext *ctx)

 Regards,

 --
   Nicolas George

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




movSsSon.mov
Description: QuickTime movie
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Windows deprecated stdin reading method

2015-03-07 Thread Hendrik Leppkes
On Sun, Mar 8, 2015 at 1:01 AM, Reimar Döffinger
reimar.doeffin...@gmx.de wrote:
 On 08.03.2015, at 00:46, Peter dravo...@googlemail.com wrote:
 Alright, I may have been really stupid, for some reason I always passed
 input_handle to read and WaitForSingleObject instead of stdin, no clue
 what happened there in my head.

 Turns out this actually works in my initial tests:

 https://github.com/Bigpet/FFmpeg/commit/93864dd0373bc6561be8e45f14f835453c74e832

 It looks reasonable, but I'd expect there is a reason we didn't do this 
 originally?
 Have you tested in the normal console, cygwin console, with stdin redirection 
 etc?


Unfortunately, the original change does not really explain anything on
the hows and whys.
However, accessing FILE internals was always a terrible solution since
its a private struct, so any improvements on that part are welcome,
and from the documentation I read on the subject, this change seem
sensible.

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


Re: [FFmpeg-devel] [PATCH] doc/filters: Add some random examples for fftfilt

2015-03-07 Thread Timothy Gu
On Sat, Mar 7, 2015 at 2:29 PM Michael Niedermayer michae...@gmx.at wrote:

 Signed-off-by: Michael Niedermayer michae...@gmx.at
 ---
  doc/filters.texi |   23 +++
  1 file changed, 23 insertions(+)

 diff --git a/doc/filters.texi b/doc/filters.texi
 index b15087c..9149ae5 100644
 --- a/doc/filters.texi
 +++ b/doc/filters.texi
 @@ -4629,6 +4629,29 @@ The coordinates of the current sample.
  The width and height of the image.
  @end table

 +@subsection Examples
 +
 +@itemize
 +@item



 +Highpass:


High-pass:


 +@example
 +fftfilt=dc_Y=128:weight_Y='squish(1-(Y+X)/100)'
 +
 +@end example
 +



 +Lowpass


add @item and ':'
also Low-pass


 +@example
 +fftfilt=dc_Y=0:weight_Y='squish((Y+X)/100-1)'
 +@end example
 +
 +@item
 +Sharpen:
 +@example
 +fftfilt=dc_Y=0:weight_Y='1+squish(1-(Y+X)/100)'
 +@end example
 +
 +@end itemize
 +
  @section field

  Extract a single field from an interlaced image using stride
 --
 1.7.9.5

 ___
 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 5/5] avcodec/vc1_mc: optimize get_chroma_mv, and add get_luma_mv

2015-03-07 Thread Michael Niedermayer
On Sat, Mar 07, 2015 at 11:17:53PM +0800, zhaoxiu.zeng wrote:
 From 8936ad9561a44fa71126a07efc2ca8096d209600 Mon Sep 17 00:00:00 2001
 From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
 Date: Sat, 7 Mar 2015 22:08:35 +0800
 Subject: [PATCH 5/5] avcodec/vc1_mc: optimize get_chroma_mv, and add 
 get_luma_mv
 
 Test results:
 
 before:
   fate-suite/vc1/SA10091.vc1: 1062 decicycles in ff_vc1_mc_4mv_chroma's get 
 mv, 4089 runs, 7 skips 
   fate-suite/vc1/SA10143.vc1: 1112 decicycles in ff_vc1_mc_4mv_luma's get mv, 
 4096 runs, 0 skips
   fate-suite/vc1/SA20021.vc1: 991 decicycles in ff_vc1_mc_4mv_chroma get mv, 
 8192 runs, 0 skips
 
 after:
   fate-suite/vc1/SA10091.vc1: 940 decicycles in ff_vc1_mc_4mv_chroma's get 
 mv, 4096 runs, 0 skips
   fate-suite/vc1/SA10143.vc1: 786 decicycles in ff_vc1_mc_4mv_luma's get mv, 
 4096 runs, 0 skips
   fate-suite/vc1/SA20021.vc1: 876 decicycles in ff_vc1_mc_4mv_chroma get mv, 
 8189 runs, 3 skips
 
 Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com
 ---
  libavcodec/vc1_mc.c | 181 
 ++--
  1 file changed, 75 insertions(+), 106 deletions(-)

applied

thanks

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