[FFmpeg-cvslog] Treat all '*.pnm' files as non-text file

2014-12-02 Thread Reinhard Tartler
ffmpeg | branch: release/2.4 | Reinhard Tartler  | Fri Nov 
28 09:52:50 2014 -0500| [ce99ef48ea025e90351079964d63be815374f089] | committer: 
Reinhard Tartler

Treat all '*.pnm' files as non-text file

This convinces the pre-receive hook to not consider all *.pnm files as
text files to reduce the patch sizes and avoids triggering whitespace
checks,

Contains a correction by Janne Grunau 

(cherry picked from commit 0f257e29c5520b215e573e7e3abde8e5a4743309)
Signed-off-by: Reinhard Tartler 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce99ef48ea025e90351079964d63be815374f089
---

 .gitattributes |1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000..a900528
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.pnm -diff -text

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


[FFmpeg-cvslog] Merge commit 'ce99ef48ea025e90351079964d63be815374f089' into release/2.4

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Tue Dec 
 2 11:40:39 2014 +0100| [575dc3a1b2ee6b14972edb9cee5af7b08dfc1f94] | committer: 
Michael Niedermayer

Merge commit 'ce99ef48ea025e90351079964d63be815374f089' into release/2.4

* commit 'ce99ef48ea025e90351079964d63be815374f089':
  Treat all '*.pnm' files as non-text file

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=575dc3a1b2ee6b14972edb9cee5af7b08dfc1f94
---



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


[FFmpeg-cvslog] Merge commit 'b31a3c6f2670d4def5aa8bd3479da9c771ab09e2' into release/2.4

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Tue Dec 
 2 11:56:29 2014 +0100| [6607057d0e037f9bc87136210bcc681313738e57] | committer: 
Michael Niedermayer

Merge commit 'b31a3c6f2670d4def5aa8bd3479da9c771ab09e2' into release/2.4

* commit 'b31a3c6f2670d4def5aa8bd3479da9c771ab09e2':
  Replace lena.pnm

Conflicts:
tests/Makefile
tests/ref/seek/vsynth2-asv1
tests/ref/seek/vsynth2-asv2
tests/ref/seek/vsynth2-ffv1
tests/ref/seek/vsynth2-flashsv
tests/ref/seek/vsynth2-flv
tests/ref/seek/vsynth2-h261
tests/ref/seek/vsynth2-h263
tests/ref/seek/vsynth2-h263p
tests/ref/seek/vsynth2-huffyuv
tests/ref/seek/vsynth2-ljpeg
tests/ref/seek/vsynth2-mjpeg
tests/ref/seek/vsynth2-mpeg1
tests/ref/seek/vsynth2-mpeg1b
tests/ref/seek/vsynth2-mpeg2-422
tests/ref/seek/vsynth2-mpeg2-idct-int
tests/ref/seek/vsynth2-mpeg2-ilace
tests/ref/seek/vsynth2-mpeg2-ivlc-qprd
tests/ref/seek/vsynth2-mpeg2-thread
tests/ref/seek/vsynth2-mpeg2-thread-ivlc
tests/ref/seek/vsynth2-mpeg4
tests/ref/seek/vsynth2-mpeg4-adap
tests/ref/seek/vsynth2-mpeg4-error
tests/ref/seek/vsynth2-mpeg4-nr
tests/ref/seek/vsynth2-mpeg4-qpel
tests/ref/seek/vsynth2-mpeg4-qprd
tests/ref/seek/vsynth2-mpeg4-rc
tests/ref/seek/vsynth2-mpeg4-thread
tests/ref/seek/vsynth2-msmpeg4
tests/ref/seek/vsynth2-msmpeg4v2
tests/ref/seek/vsynth2-roqvideo
tests/ref/seek/vsynth2-rv10
tests/ref/seek/vsynth2-rv20
tests/ref/seek/vsynth2-svq1
tests/ref/seek/vsynth2-wmv1
tests/ref/seek/vsynth2-wmv2
tests/ref/vsynth/vsynth2-asv1
tests/ref/vsynth/vsynth2-asv2
tests/ref/vsynth/vsynth2-cljr
tests/ref/vsynth/vsynth2-dnxhd-1080i
tests/ref/vsynth/vsynth2-dnxhd-720p
tests/ref/vsynth/vsynth2-dnxhd-720p-10bit
tests/ref/vsynth/vsynth2-dnxhd-720p-rd
tests/ref/vsynth/vsynth2-dv
tests/ref/vsynth/vsynth2-dv-411
tests/ref/vsynth/vsynth2-dv-50
tests/ref/vsynth/vsynth2-ffv1
tests/ref/vsynth/vsynth2-ffvhuff
tests/ref/vsynth/vsynth2-flashsv
tests/ref/vsynth/vsynth2-flv
tests/ref/vsynth/vsynth2-h261
tests/ref/vsynth/vsynth2-h263
tests/ref/vsynth/vsynth2-h263-obmc
tests/ref/vsynth/vsynth2-h263p
tests/ref/vsynth/vsynth2-huffyuv
tests/ref/vsynth/vsynth2-jpegls
tests/ref/vsynth/vsynth2-ljpeg
tests/ref/vsynth/vsynth2-mjpeg
tests/ref/vsynth/vsynth2-mpeg1
tests/ref/vsynth/vsynth2-mpeg1b
tests/ref/vsynth/vsynth2-mpeg2
tests/ref/vsynth/vsynth2-mpeg2-422
tests/ref/vsynth/vsynth2-mpeg2-idct-int
tests/ref/vsynth/vsynth2-mpeg2-ilace
tests/ref/vsynth/vsynth2-mpeg2-ivlc-qprd
tests/ref/vsynth/vsynth2-mpeg2-thread
tests/ref/vsynth/vsynth2-mpeg2-thread-ivlc
tests/ref/vsynth/vsynth2-mpeg4
tests/ref/vsynth/vsynth2-mpeg4-adap
tests/ref/vsynth/vsynth2-mpeg4-adv
tests/ref/vsynth/vsynth2-mpeg4-error
tests/ref/vsynth/vsynth2-mpeg4-nr
tests/ref/vsynth/vsynth2-mpeg4-qpel
tests/ref/vsynth/vsynth2-mpeg4-qprd
tests/ref/vsynth/vsynth2-mpeg4-rc
tests/ref/vsynth/vsynth2-mpeg4-thread
tests/ref/vsynth/vsynth2-msmpeg4
tests/ref/vsynth/vsynth2-msmpeg4v2
tests/ref/vsynth/vsynth2-prores
tests/ref/vsynth/vsynth2-qtrle
tests/ref/vsynth/vsynth2-rgb
tests/ref/vsynth/vsynth2-roqvideo
tests/ref/vsynth/vsynth2-rv10
tests/ref/vsynth/vsynth2-rv20
tests/ref/vsynth/vsynth2-svq1
tests/ref/vsynth/vsynth2-v210
tests/ref/vsynth/vsynth2-wmv1
tests/ref/vsynth/vsynth2-wmv2
tests/ref/vsynth/vsynth2-yuv

See: c4abee734dcbdb589925dd6da98041dcf663ce49
Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6607057d0e037f9bc87136210bcc681313738e57
---



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


[FFmpeg-cvslog] Prepare for 11.1 Release

2014-12-02 Thread Reinhard Tartler
ffmpeg | branch: release/2.4 | Reinhard Tartler  | Mon Dec 
 1 21:39:37 2014 -0500| [1cc6fef0671c5522c952671ee06bf973135a22c4] | committer: 
Reinhard Tartler

Prepare for 11.1 Release

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1cc6fef0671c5522c952671ee06bf973135a22c4
---

 RELEASE |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/RELEASE b/RELEASE
index b4de394..ef32e32 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1 +1 @@
-11
+11.1

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


[FFmpeg-cvslog] Merge commit '1cc6fef0671c5522c952671ee06bf973135a22c4' into release/2.4

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Tue Dec 
 2 12:42:38 2014 +0100| [db61d34e83099a22d02500986d9135e4b5bceae8] | committer: 
Michael Niedermayer

Merge commit '1cc6fef0671c5522c952671ee06bf973135a22c4' into release/2.4

* commit '1cc6fef0671c5522c952671ee06bf973135a22c4':
  Prepare for 11.1 Release

Conflicts:
RELEASE

Not merged, as our release numbers differ

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db61d34e83099a22d02500986d9135e4b5bceae8
---



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


[FFmpeg-cvslog] Update changelog for v11.1

2014-12-02 Thread Reinhard Tartler
ffmpeg | branch: release/2.4 | Reinhard Tartler  | Mon Dec 
 1 21:39:01 2014 -0500| [60ccc1a748bf3d26201411479146d0798e1ecff9] | committer: 
Reinhard Tartler

Update changelog for v11.1

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=60ccc1a748bf3d26201411479146d0798e1ecff9
---

 Changelog |   19 +++
 1 file changed, 19 insertions(+)

diff --git a/Changelog b/Changelog
index 73e8378..b9d8dd0 100644
--- a/Changelog
+++ b/Changelog
@@ -1,6 +1,25 @@
 Entries are sorted chronologically from oldest to youngest within each release,
 releases are sorted from youngest to oldest.
 
+version 11.1:
+
+- Replace lena.pnm (debian#771126)
+- Treat all '*.pnm' files as non-text file
+- opusdec: make sure all substreams have the same number of coded samples
+- lavu: fix memory leaks by using a mutex instead of atomics
+- lavu: add wrappers for the pthreads mutex API
+- mp3enc: fix a triggerable assert
+- resample: Avoid off-by-1 errors in PTS calcs. (libav#753)
+- imc: fix order of operations in coefficients read
+- hevc_mvs: make sure to always initialize the temporal MV fully
+- hevc_mvs: initialize the temporal MV in case of missing ref
+- h264: reset ret to avoid propagating minor failures (libav#750 / lp#905753)
+- hevc: Initialize mergecand_list to 0
+- mpeg12: Always invoke the get_format() callback
+- h264: Always invoke the get_format() callback
+- Update default FATE URL for release/11
+- apetag: Fix APE tag size check
+
 version 11:
 - libx265 encoder
 - shuffleplanes filter

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


[FFmpeg-cvslog] Merge commit '60ccc1a748bf3d26201411479146d0798e1ecff9' into release/2.4

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Tue Dec 
 2 12:40:20 2014 +0100| [309609ce4d75a7ff10c8c8a7b710f2bbb3eb99b3] | committer: 
Michael Niedermayer

Merge commit '60ccc1a748bf3d26201411479146d0798e1ecff9' into release/2.4

* commit '60ccc1a748bf3d26201411479146d0798e1ecff9':
  Update changelog for v11.1

Conflicts:
Changelog

Not merged, the changelog does not match FFmpeg

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=309609ce4d75a7ff10c8c8a7b710f2bbb3eb99b3
---



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


[FFmpeg-cvslog] avcodec/motion_est: use 2x8x8 for interlaced qpel

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: release/2.4 | Michael Niedermayer  | Mon Dec 
 1 13:23:24 2014 +0100| [93df243a59e4c0152b50c4da97a6bbe13d1ee357] | committer: 
Michael Niedermayer

avcodec/motion_est: use 2x8x8 for interlaced qpel

Fixes out of array read
Fixes Ticket4121

Signed-off-by: Michael Niedermayer 
(cherry picked from commit b50e003e1cb6a215df44ffa3354603bf600b4aa3)

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93df243a59e4c0152b50c4da97a6bbe13d1ee357
---

 libavcodec/motion_est.c |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 81ee2bd..aae215f 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -193,7 +193,13 @@ static av_always_inline int cmp_inline(MpegEncContext *s, 
const int x, const int
 int uvdxy;  /* no, it might not be used uninitialized */
 if(dxy){
 if(qpel){
-c->qpel_put[size][dxy](c->temp, ref[0] + x + y*stride, 
stride); //FIXME prototype (add h)
+if (h << size == 16) {
+c->qpel_put[size][dxy](c->temp, ref[0] + x + y*stride, 
stride); //FIXME prototype (add h)
+} else if (size == 0 && h == 8) {
+c->qpel_put[1][dxy](c->temp, ref[0] + x + y*stride
, stride);
+c->qpel_put[1][dxy](c->temp + 8, ref[0] + x + y*stride + 
8, stride);
+} else
+av_assert2(0);
 if(chroma){
 int cx= hx/2;
 int cy= hy/2;

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


[FFmpeg-cvslog] v4l2: Make use of the VIDIOC_ENUM_FRAMESIZES ioctl on OpenBSD

2014-12-02 Thread Brad Smith
ffmpeg | branch: release/2.4 | Brad Smith  | Mon Oct 20 
00:09:55 2014 -0400| [89dbef73296645b849371fa916b5656442406801] | committer: 
Michael Niedermayer

v4l2: Make use of the VIDIOC_ENUM_FRAMESIZES ioctl on OpenBSD

Make use of the V4L2 VIDIOC_ENUM_FRAMESIZES ioctl on OpenBSD.

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 04a4fb81b3d1a92f52b5404738da8971c018946f)

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=89dbef73296645b849371fa916b5656442406801
---

 configure |1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index 83983cc..c93876a 100755
--- a/configure
+++ b/configure
@@ -4944,6 +4944,7 @@ check_header linux/videodev2.h
 check_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; 
vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
 
 check_header sys/videoio.h
+check_code cc sys/videoio.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width 
= 0;" && enable_safe struct_v4l2_frmivalenum_discrete
 
 check_func_headers "windows.h vfw.h" capCreateCaptureWindow 
"$vfwcap_indev_extralibs"
 # check that WM_CAP_DRIVER_CONNECT is defined to the proper value

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


[FFmpeg-cvslog] libavutil/thread.h: Support OS/2 threads

2014-12-02 Thread Dave Yeo
ffmpeg | branch: release/2.2 | Dave Yeo  | Fri Nov 28 
23:34:20 2014 -0800| [7394e53f30cad96f7a6227a4665d737ce91b7712] | committer: 
Michael Niedermayer

libavutil/thread.h: Support OS/2 threads

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 090a7801a8817c1fbc6db0ed39070bf82255d8f2)

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7394e53f30cad96f7a6227a4665d737ce91b7712
---

 libavutil/thread.h |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavutil/thread.h b/libavutil/thread.h
index 62e1340..a004fba 100644
--- a/libavutil/thread.h
+++ b/libavutil/thread.h
@@ -24,10 +24,12 @@
 
 #include "config.h"
 
-#if HAVE_PTHREADS || HAVE_W32THREADS
+#if HAVE_PTHREADS || HAVE_W32THREADS || HAVE_OS2THREADS
 
 #if HAVE_PTHREADS
 #include 
+#elif HAVE_OS2THREADS
+#include "compat/os2threads.h"
 #else
 #include 
 #endif

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


[FFmpeg-cvslog] Merge commit '871d99ef77336069e5a8ece947c8160d9bc4d5ea' into release/2.2

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Tue Dec 
 2 13:14:06 2014 +0100| [9181faab68a6a6ee22c7490085e13ffac90d7119] | committer: 
Michael Niedermayer

Merge commit '871d99ef77336069e5a8ece947c8160d9bc4d5ea' into release/2.2

* commit '871d99ef77336069e5a8ece947c8160d9bc4d5ea':
  mp3enc: fix a triggerable assert

Conflicts:
libavformat/mp3enc.c

No change, the faulty assert was not in FFmpeg

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9181faab68a6a6ee22c7490085e13ffac90d7119
---



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


[FFmpeg-cvslog] lavu: add wrappers for the pthreads mutex API

2014-12-02 Thread Anton Khirnov
ffmpeg | branch: release/2.2 | Anton Khirnov  | Sun Nov 23 
21:25:05 2014 +0100| [7fe5d0a78df537542732aa7bd45962f7505255d0] | committer: 
Anton Khirnov

lavu: add wrappers for the pthreads mutex API

Also add no-op fallbacks when threading is disabled.

This helps keeping the code clean if Libav is compiled for targets
without threading. Since we assume that no threads of any kind are used
in such configurations, doing nothing is ok by definition.

Based on a patch by wm4 .

(cherry picked from commit 2443e522f0059176ff8717c9c753eb6fe7e7bbf1)
Signed-off-by: Anton Khirnov 
(cherry picked from commit 46a17d886b8559723c40b9f5cdf0e0c6b1c95180)
Signed-off-by: Anton Khirnov 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7fe5d0a78df537542732aa7bd45962f7505255d0
---

 libavutil/thread.h |   53 
 1 file changed, 53 insertions(+)

diff --git a/libavutil/thread.h b/libavutil/thread.h
new file mode 100644
index 000..07e3d4a
--- /dev/null
+++ b/libavutil/thread.h
@@ -0,0 +1,53 @@
+/*
+ * This file is part of Libav.
+ *
+ * Libav 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.
+ *
+ * Libav 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 Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+// This header should only be used to simplify code where
+// threading is optional, not as a generic threading abstraction.
+
+#ifndef AVUTIL_THREAD_H
+#define AVUTIL_THREAD_H
+
+#include "config.h"
+
+#if HAVE_PTHREADS || HAVE_W32THREADS
+
+#if HAVE_PTHREADS
+#include 
+#else
+#include 
+#endif
+
+#define AVMutex pthread_mutex_t
+
+#define ff_mutex_initpthread_mutex_init
+#define ff_mutex_lockpthread_mutex_lock
+#define ff_mutex_unlock  pthread_mutex_unlock
+#define ff_mutex_destroy pthread_mutex_destroy
+
+#else
+
+#define AVMutex char
+
+#define ff_mutex_init(mutex, attr) (0)
+#define ff_mutex_lock(mutex) (0)
+#define ff_mutex_unlock(mutex) (0)
+#define ff_mutex_destroy(mutex) (0)
+
+#endif
+
+#endif /* AVUTIL_THREAD_H */

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


[FFmpeg-cvslog] mp3enc: fix a triggerable assert

2014-12-02 Thread Anton Khirnov
ffmpeg | branch: release/2.2 | Anton Khirnov  | Fri Nov 14 
20:20:50 2014 +0100| [871d99ef77336069e5a8ece947c8160d9bc4d5ea] | committer: 
Anton Khirnov

mp3enc: fix a triggerable assert

We have to check against the number of bytes actually needed, not the
theoretical maximum size.

(cherry picked from commit 12700b0219521a5f20c8ba47b3ad7857ea9e0554)
Signed-off-by: Anton Khirnov 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=871d99ef77336069e5a8ece947c8160d9bc4d5ea
---

 libavformat/mp3enc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index 476d7f7..1eaa585 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -196,7 +196,7 @@ static void mp3_write_xing(AVFormatContext *s)
 
 avpriv_mpegaudio_decode_header(&mpah, header);
 
-av_assert0(mpah.frame_size >= XING_MAX_SIZE);
+av_assert0(mpah.frame_size >= bytes_needed);
 
 ffio_fill(s->pb, 0, xing_offset);
 mp3->xing_offset = avio_tell(s->pb);

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


[FFmpeg-cvslog] Merge commit '7fe5d0a78df537542732aa7bd45962f7505255d0' into release/2.2

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Tue Dec 
 2 13:36:11 2014 +0100| [9bbed55b106fff2a02fb21b903c622ff6b4f7614] | committer: 
Michael Niedermayer

Merge commit '7fe5d0a78df537542732aa7bd45962f7505255d0' into release/2.2

* commit '7fe5d0a78df537542732aa7bd45962f7505255d0':
  lavu: add wrappers for the pthreads mutex API

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9bbed55b106fff2a02fb21b903c622ff6b4f7614
---



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


[FFmpeg-cvslog] libavutil/threads.h: correct an include to be local

2014-12-02 Thread Dave Yeo
ffmpeg | branch: release/2.2 | Dave Yeo  | Fri Nov 28 
23:36:06 2014 -0800| [1579f14632223d7ec0da43d3b1090bee127e78f9] | committer: 
Michael Niedermayer

libavutil/threads.h: correct an include to be local

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 32eadfe453c32788ea57968e6e80f673f434739d)

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1579f14632223d7ec0da43d3b1090bee127e78f9
---

 libavutil/thread.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/thread.h b/libavutil/thread.h
index a004fba..9733661 100644
--- a/libavutil/thread.h
+++ b/libavutil/thread.h
@@ -31,7 +31,7 @@
 #elif HAVE_OS2THREADS
 #include "compat/os2threads.h"
 #else
-#include 
+#include "compat/w32pthreads.h"
 #endif
 
 #define AVMutex pthread_mutex_t

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


[FFmpeg-cvslog] avutil/buffer_internal: leave the buffer pool entries volatile

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Fri Nov 
28 01:17:56 2014 +0100| [dad7beaceb652864cd16747db4109e7b9b2b4ea1] | committer: 
Michael Niedermayer

avutil/buffer_internal: leave the buffer pool entries volatile

Theres no reason to remove the volatile keyword in a release branch

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 0e216ed40789e382eb6725d1cd0941927bfd1400)

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dad7beaceb652864cd16747db4109e7b9b2b4ea1
---

 libavutil/buffer_internal.h |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/buffer_internal.h b/libavutil/buffer_internal.h
index e653048..befeb68 100644
--- a/libavutil/buffer_internal.h
+++ b/libavutil/buffer_internal.h
@@ -69,12 +69,12 @@ typedef struct BufferPoolEntry {
 void (*free)(void *opaque, uint8_t *data);
 
 AVBufferPool *pool;
-struct BufferPoolEntry *next;
+struct BufferPoolEntry * volatile next;
 } BufferPoolEntry;
 
 struct AVBufferPool {
 AVMutex mutex;
-BufferPoolEntry *pool;
+BufferPoolEntry * volatile pool;
 
 /*
  * This is used to track when the pool is to be freed.

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


[FFmpeg-cvslog] lavu: fix memory leaks by using a mutex instead of atomics

2014-12-02 Thread wm4
ffmpeg | branch: release/2.2 | wm4  | Fri Nov 14 
13:34:50 2014 +0100| [c790e31ae46d4304af893d04806ec9e3bff5ae28] | committer: 
Anton Khirnov

lavu: fix memory leaks by using a mutex instead of atomics

The buffer pool has to atomically add and remove entries from the linked
list of available buffers. This was done by removing the entire list
with a CAS operation, working on it, and then setting it back again
(using a retry-loop in case another thread was doing the same thing).

This could effectively cause memory leaks: while a thread was working on
the buffer list, other threads would allocate new buffers, increasing
the pool's total size. There was no real leak, but since these extra
buffers were not needed, but not free'd either (except when the buffer
pool was destroyed), this had the same effects as a real leak. For some
reason, growth was exponential, and could easily kill the process due
to OOM in real-world uses.

Fix this by using a mutex to protect the list operations. The fancy
way atomics remove the whole list to work on it is not needed anymore,
which also avoids the situation which was causing the leak.

Signed-off-by: Anton Khirnov 
(cherry picked from commit fbd6c97f9ca858140df16dd07200ea0d4bdc1a83)
Signed-off-by: Anton Khirnov 
(cherry picked from commit 517ce1d09b5e6b72afc2ef9490b5f8ca42fa6a65)
Signed-off-by: Anton Khirnov 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c790e31ae46d4304af893d04806ec9e3bff5ae28
---

 libavutil/buffer.c  |   79 ++-
 libavutil/buffer_internal.h |6 ++--
 2 files changed, 29 insertions(+), 56 deletions(-)

diff --git a/libavutil/buffer.c b/libavutil/buffer.c
index 2b38081..1bc4a93 100644
--- a/libavutil/buffer.c
+++ b/libavutil/buffer.c
@@ -23,6 +23,7 @@
 #include "buffer_internal.h"
 #include "common.h"
 #include "mem.h"
+#include "thread.h"
 
 AVBufferRef *av_buffer_create(uint8_t *data, int size,
   void (*free)(void *opaque, uint8_t *data),
@@ -199,6 +200,8 @@ AVBufferPool *av_buffer_pool_init(int size, AVBufferRef* 
(*alloc)(int size))
 if (!pool)
 return NULL;
 
+ff_mutex_init(&pool->mutex, NULL);
+
 pool->size = size;
 pool->alloc= alloc ? alloc : av_buffer_alloc;
 
@@ -220,6 +223,7 @@ static void buffer_pool_free(AVBufferPool *pool)
 buf->free(buf->opaque, buf->data);
 av_freep(&buf);
 }
+ff_mutex_destroy(&pool->mutex);
 av_freep(&pool);
 }
 
@@ -236,47 +240,16 @@ void av_buffer_pool_uninit(AVBufferPool **ppool)
 buffer_pool_free(pool);
 }
 
-/* remove the whole buffer list from the pool and return it */
-static BufferPoolEntry *get_pool(AVBufferPool *pool)
-{
-BufferPoolEntry *cur = NULL, *last = NULL;
-
-do {
-FFSWAP(BufferPoolEntry*, cur, last);
-cur = avpriv_atomic_ptr_cas((void * volatile *)&pool->pool, last, 
NULL);
-if (!cur)
-return NULL;
-} while (cur != last);
-
-return cur;
-}
-
-static void add_to_pool(BufferPoolEntry *buf)
-{
-AVBufferPool *pool;
-BufferPoolEntry *cur, *end = buf;
-
-if (!buf)
-return;
-pool = buf->pool;
-
-while (end->next)
-end = end->next;
-
-while ((cur = avpriv_atomic_ptr_cas((void * volatile *)&pool->pool, NULL, 
buf))) {
-/* pool is not empty, retrieve it and append it to our list */
-cur = get_pool(pool);
-end->next = cur;
-while (end->next)
-end = end->next;
-}
-}
-
 static void pool_release_buffer(void *opaque, uint8_t *data)
 {
 BufferPoolEntry *buf = opaque;
 AVBufferPool *pool = buf->pool;
-add_to_pool(buf);
+
+ff_mutex_lock(&pool->mutex);
+buf->next = pool->pool;
+pool->pool = buf;
+ff_mutex_unlock(&pool->mutex);
+
 if (!avpriv_atomic_int_add_and_fetch(&pool->refcount, -1))
 buffer_pool_free(pool);
 }
@@ -306,8 +279,6 @@ static AVBufferRef *pool_alloc_buffer(AVBufferPool *pool)
 ret->buffer->opaque = buf;
 ret->buffer->free   = pool_release_buffer;
 
-avpriv_atomic_int_add_and_fetch(&pool->refcount, 1);
-
 return ret;
 }
 
@@ -316,22 +287,22 @@ AVBufferRef *av_buffer_pool_get(AVBufferPool *pool)
 AVBufferRef *ret;
 BufferPoolEntry *buf;
 
-/* check whether the pool is empty */
-buf = get_pool(pool);
-if (!buf)
-return pool_alloc_buffer(pool);
-
-/* keep the first entry, return the rest of the list to the pool */
-add_to_pool(buf->next);
-buf->next = NULL;
-
-ret = av_buffer_create(buf->data, pool->size, pool_release_buffer,
-   buf, 0);
-if (!ret) {
-add_to_pool(buf);
-return NULL;
+ff_mutex_lock(&pool->mutex);
+buf = pool->pool;
+if (buf) {
+ret = av_buffer_create(buf->data, pool->size, pool_release_buffer,
+   buf, 0);
+if (ret) {
+pool->pool = buf->next;
+buf->next = NULL;
+}
+

[FFmpeg-cvslog] Merge commit 'c790e31ae46d4304af893d04806ec9e3bff5ae28' into release/2.2

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Tue Dec 
 2 13:47:55 2014 +0100| [4ed83378bf856621141e555dccf75d2d333901d4] | committer: 
Michael Niedermayer

Merge commit 'c790e31ae46d4304af893d04806ec9e3bff5ae28' into release/2.2

* commit 'c790e31ae46d4304af893d04806ec9e3bff5ae28':
  lavu: fix memory leaks by using a mutex instead of atomics

Conflicts:
libavutil/buffer.c

The atomics code is left in place as a fallback for synchronization in the
absence of p/w32 threads. Our ABI did not requires applications to
only use threads (and matching ones) to what libavutil was build with
Our code also was not affected by the leak this change fixes, though
no question the atomics based implementation is not pretty at all.
First and foremost the code must work, being pretty comes after that.

If this causes problems, for example when libavutil is used by multiple
applications each using a different kind of threading system then the
default possibly has to be changed to the uglier atomics.

See: cea3a63ba3d89d8403eef008f7a7c54d645cff70
Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4ed83378bf856621141e555dccf75d2d333901d4
---



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


[FFmpeg-cvslog] avutil/buffer: use the old atomics based code for the release branch

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Fri Nov 
28 01:01:17 2014 +0100| [93360af0d7bf050a1d4c97b69e6d606e2ba12cc9] | committer: 
Michael Niedermayer

avutil/buffer: use the old atomics based code for the release branch

the old code worked fine for a long time and was not affected by
the bug the new code fixes and the new is not widely tested yet.
This can be reverted once the code received more testing in
master

Signed-off-by: Michael Niedermayer 
(cherry picked from commit f783259fdb37e288643fe54ac162d723b1bec548)

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93360af0d7bf050a1d4c97b69e6d606e2ba12cc9
---

 libavutil/buffer.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavutil/buffer.c b/libavutil/buffer.c
index 0f9f1a2..4e2a94b 100644
--- a/libavutil/buffer.c
+++ b/libavutil/buffer.c
@@ -25,7 +25,8 @@
 #include "mem.h"
 #include "thread.h"
 
-#define USE_ATOMICS !(HAVE_PTHREADS || HAVE_W32THREADS)
+//#define USE_ATOMICS !(HAVE_PTHREADS || HAVE_W32THREADS)
+#define USE_ATOMICS 1 // can be changed to the above once it received more 
testing in master
 
 AVBufferRef *av_buffer_create(uint8_t *data, int size,
   void (*free)(void *opaque, uint8_t *data),

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


[FFmpeg-cvslog] Merge commit '2bcd8f22f2fae253d87b11a5c9f8805d79253180' into release/2.2

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Tue Dec 
 2 14:14:34 2014 +0100| [afcd152b973e40763aa800dd1376925ce6b146b9] | committer: 
Michael Niedermayer

Merge commit '2bcd8f22f2fae253d87b11a5c9f8805d79253180' into release/2.2

* commit '2bcd8f22f2fae253d87b11a5c9f8805d79253180':
  Treat all '*.pnm' files as non-text file

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=afcd152b973e40763aa800dd1376925ce6b146b9
---



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


[FFmpeg-cvslog] Treat all '*.pnm' files as non-text file

2014-12-02 Thread Reinhard Tartler
ffmpeg | branch: release/2.2 | Reinhard Tartler  | Fri Nov 
28 09:52:50 2014 -0500| [2bcd8f22f2fae253d87b11a5c9f8805d79253180] | committer: 
Reinhard Tartler

Treat all '*.pnm' files as non-text file

This convinces the pre-receive hook to not consider all *.pnm files as
text files to reduce the patch sizes and avoids triggering whitespace
checks,

Contains a correction by Janne Grunau 

(cherry picked from commit b877814e09b9f25308ec205cf48bb9554b33e95c)
Signed-off-by: Reinhard Tartler 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2bcd8f22f2fae253d87b11a5c9f8805d79253180
---

 .gitattributes |1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000..a900528
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.pnm -diff -text

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


[FFmpeg-cvslog] Merge commit 'd1c2f86b21b96c27fac200209f52c98dcb2b3194' into release/2.2

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Tue Dec 
 2 14:46:30 2014 +0100| [5111c78eab4d10e75a842982a181ded27425bdb8] | committer: 
Michael Niedermayer

Merge commit 'd1c2f86b21b96c27fac200209f52c98dcb2b3194' into release/2.2

* commit 'd1c2f86b21b96c27fac200209f52c98dcb2b3194':
  Replace lena.pnm

Conflicts:
tests/Makefile
tests/ref/seek/vsynth2-ffv1
tests/ref/seek/vsynth2-flv
tests/ref/seek/vsynth2-h261
tests/ref/seek/vsynth2-h263
tests/ref/seek/vsynth2-h263p
tests/ref/seek/vsynth2-ljpeg
tests/ref/seek/vsynth2-mjpeg
tests/ref/seek/vsynth2-mpeg1
tests/ref/seek/vsynth2-mpeg1b
tests/ref/seek/vsynth2-mpeg2-422
tests/ref/seek/vsynth2-mpeg2-idct-int
tests/ref/seek/vsynth2-mpeg2-ilace
tests/ref/seek/vsynth2-mpeg2-ivlc-qprd
tests/ref/seek/vsynth2-mpeg2-thread
tests/ref/seek/vsynth2-mpeg2-thread-ivlc
tests/ref/seek/vsynth2-mpeg4
tests/ref/seek/vsynth2-mpeg4-adap
tests/ref/seek/vsynth2-mpeg4-error
tests/ref/seek/vsynth2-mpeg4-nr
tests/ref/seek/vsynth2-mpeg4-qpel
tests/ref/seek/vsynth2-mpeg4-qprd
tests/ref/seek/vsynth2-mpeg4-rc
tests/ref/seek/vsynth2-mpeg4-thread
tests/ref/seek/vsynth2-msmpeg4
tests/ref/seek/vsynth2-msmpeg4v2
tests/ref/seek/vsynth2-rv10
tests/ref/seek/vsynth2-rv20
tests/ref/seek/vsynth2-svq1
tests/ref/seek/vsynth2-wmv1
tests/ref/seek/vsynth2-wmv2
tests/ref/vsynth/vsynth2-cljr
tests/ref/vsynth/vsynth2-dnxhd-1080i
tests/ref/vsynth/vsynth2-dnxhd-720p
tests/ref/vsynth/vsynth2-dnxhd-720p-10bit
tests/ref/vsynth/vsynth2-dnxhd-720p-rd
tests/ref/vsynth/vsynth2-dv
tests/ref/vsynth/vsynth2-dv-411
tests/ref/vsynth/vsynth2-dv-50
tests/ref/vsynth/vsynth2-ffv1
tests/ref/vsynth/vsynth2-ffvhuff
tests/ref/vsynth/vsynth2-flashsv
tests/ref/vsynth/vsynth2-flv
tests/ref/vsynth/vsynth2-h261
tests/ref/vsynth/vsynth2-h263
tests/ref/vsynth/vsynth2-h263-obmc
tests/ref/vsynth/vsynth2-h263p
tests/ref/vsynth/vsynth2-huffyuv
tests/ref/vsynth/vsynth2-jpegls
tests/ref/vsynth/vsynth2-ljpeg
tests/ref/vsynth/vsynth2-mjpeg
tests/ref/vsynth/vsynth2-mpeg1
tests/ref/vsynth/vsynth2-mpeg1b
tests/ref/vsynth/vsynth2-mpeg2
tests/ref/vsynth/vsynth2-mpeg2-422
tests/ref/vsynth/vsynth2-mpeg2-ilace
tests/ref/vsynth/vsynth2-mpeg2-thread
tests/ref/vsynth/vsynth2-mpeg2-thread-ivlc
tests/ref/vsynth/vsynth2-mpeg4
tests/ref/vsynth/vsynth2-mpeg4-adap
tests/ref/vsynth/vsynth2-mpeg4-error
tests/ref/vsynth/vsynth2-mpeg4-nr
tests/ref/vsynth/vsynth2-mpeg4-qpel
tests/ref/vsynth/vsynth2-mpeg4-qprd
tests/ref/vsynth/vsynth2-mpeg4-rc
tests/ref/vsynth/vsynth2-mpeg4-thread
tests/ref/vsynth/vsynth2-msmpeg4
tests/ref/vsynth/vsynth2-msmpeg4v2
tests/ref/vsynth/vsynth2-prores
tests/ref/vsynth/vsynth2-qtrle
tests/ref/vsynth/vsynth2-rgb
tests/ref/vsynth/vsynth2-rv10
tests/ref/vsynth/vsynth2-rv20
tests/ref/vsynth/vsynth2-svq1
tests/ref/vsynth/vsynth2-wmv1
tests/ref/vsynth/vsynth2-wmv2
tests/ref/vsynth/vsynth2-yuv

See: c4abee734dcbdb589925dd6da98041dcf663ce49
Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5111c78eab4d10e75a842982a181ded27425bdb8
---



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


[FFmpeg-cvslog] lavc/dirac_arith: Only compile x86 asm if ARCH_X86 is set.

2014-12-02 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Tue Dec  2 
11:36:48 2014 +0100| [ea5423a01716f073d3a3af678742a572b18cb936] | committer: 
Carl Eugen Hoyos

lavc/dirac_arith: Only compile x86 asm if ARCH_X86 is set.

Fixes ticket #3544.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ea5423a01716f073d3a3af678742a572b18cb936
---

 libavcodec/dirac_arith.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dirac_arith.h b/libavcodec/dirac_arith.h
index a1fa96b..003430a 100644
--- a/libavcodec/dirac_arith.h
+++ b/libavcodec/dirac_arith.h
@@ -135,7 +135,7 @@ static inline int dirac_get_arith_bit(DiracArith *c, int 
ctx)
 
 range_times_prob = (c->range * prob_zero) >> 16;
 
-#if HAVE_FAST_CMOV && HAVE_INLINE_ASM && HAVE_6REGS
+#if ARCH_X86 && HAVE_FAST_CMOV && HAVE_INLINE_ASM && HAVE_6REGS
 low   -= range_times_prob << 16;
 range -= range_times_prob;
 bit = 0;

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


[FFmpeg-cvslog] lavf/qcp: Print unknown GUID on error.

2014-12-02 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Tue Dec  2 
11:40:01 2014 +0100| [f151f5415a1904bf26cf49555fd9b24e1e00ff02] | committer: 
Carl Eugen Hoyos

lavf/qcp: Print unknown GUID on error.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f151f5415a1904bf26cf49555fd9b24e1e00ff02
---

 libavformat/qcp.c |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/qcp.c b/libavformat/qcp.c
index 4d42197..ccfa047 100644
--- a/libavformat/qcp.c
+++ b/libavformat/qcp.c
@@ -30,6 +30,7 @@
 #include "libavutil/channel_layout.h"
 #include "libavutil/intreadwrite.h"
 #include "avformat.h"
+#include "riff.h"
 
 typedef struct {
 uint32_t data_size; ///< size of data chunk
@@ -106,7 +107,8 @@ static int qcp_read_header(AVFormatContext *s)
 } else if (!memcmp(buf, guid_smv, 16)) {
 st->codec->codec_id = AV_CODEC_ID_SMV;
 } else {
-av_log(s, AV_LOG_ERROR, "Unknown codec GUID.\n");
+av_log(s, AV_LOG_ERROR, "Unknown codec GUID "FF_PRI_GUID".\n",
+   FF_ARG_GUID(buf));
 return AVERROR_INVALIDDATA;
 }
 avio_skip(pb, 2 + 80); // codec-version + codec-name

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


[FFmpeg-cvslog] Also print GUIDs as shown in the Windows registry to ease debugging.

2014-12-02 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Tue Dec  2 
11:39:06 2014 +0100| [7f6515e49100d5dcb9971d05b0693e61e72024ad] | committer: 
Carl Eugen Hoyos

Also print GUIDs as shown in the Windows registry to ease debugging.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7f6515e49100d5dcb9971d05b0693e61e72024ad
---

 libavformat/riff.h |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/riff.h b/libavformat/riff.h
index 88a77b0..e925634 100644
--- a/libavformat/riff.h
+++ b/libavformat/riff.h
@@ -91,10 +91,13 @@ typedef struct AVCodecGuid {
 extern const AVCodecGuid ff_codec_wav_guids[];
 
 #define FF_PRI_GUID \
-"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x " \
+"{%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x}"
 
 #define FF_ARG_GUID(g) \
 g[0], g[1], g[2],  g[3],  g[4],  g[5],  g[6],  g[7], \
+g[8], g[9], g[10], g[11], g[12], g[13], g[14], g[15],\
+g[3], g[2], g[1],  g[0],  g[5],  g[4],  g[7],  g[6], \
 g[8], g[9], g[10], g[11], g[12], g[13], g[14], g[15]
 
 #define FF_MEDIASUBTYPE_BASE_GUID \

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


[FFmpeg-cvslog] apng: move shared header from avformat to avcodec.

2014-12-02 Thread Benoit Fouet
ffmpeg | branch: master | Benoit Fouet  | Tue Dec  2 
09:21:47 2014 +0100| [543fceba9ca9bb27afb0b81265578ae7b03a9dac] | committer: 
Michael Niedermayer

apng: move shared header from avformat to avcodec.

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=543fceba9ca9bb27afb0b81265578ae7b03a9dac
---

 {libavformat => libavcodec}/apng.h |6 +++---
 libavcodec/pngdec.c|2 +-
 libavformat/apngdec.c  |2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavformat/apng.h b/libavcodec/apng.h
similarity index 93%
rename from libavformat/apng.h
rename to libavcodec/apng.h
index 2abf011..41249e0 100644
--- a/libavformat/apng.h
+++ b/libavcodec/apng.h
@@ -24,8 +24,8 @@
  * APNG common header
  */
 
-#ifndef AVFORMAT_APNG_H
-#define AVFORMAT_APNG_H
+#ifndef AVCODEC_APNG_H
+#define AVCODEC_APNG_H
 
 enum {
APNG_DISPOSE_OP_NONE   = 0,
@@ -38,4 +38,4 @@ enum {
 APNG_BLEND_OP_OVER   = 1,
 };
 
-#endif /* AVFORMAT_APNG_H */
+#endif /* AVCODEC_APNG_H */
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 9e52d0b..229a6d6 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -26,10 +26,10 @@
 #include "avcodec.h"
 #include "bytestream.h"
 #include "internal.h"
+#include "apng.h"
 #include "png.h"
 #include "pngdsp.h"
 #include "thread.h"
-#include "libavformat/apng.h"
 
 #include 
 
diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index 276d765..189480e 100644
--- a/libavformat/apngdec.c
+++ b/libavformat/apngdec.c
@@ -26,13 +26,13 @@
  * @see http://www.w3.org/TR/PNG
  */
 
-#include "apng.h"
 #include "avformat.h"
 #include "avio_internal.h"
 #include "internal.h"
 #include "libavutil/imgutils.h"
 #include "libavutil/intreadwrite.h"
 #include "libavutil/opt.h"
+#include "libavcodec/apng.h"
 #include "libavcodec/png.h"
 #include "libavcodec/bytestream.h"
 

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


[FFmpeg-cvslog] avformat/apngdec: exit probing when skipping is not possible.

2014-12-02 Thread Benoit Fouet
ffmpeg | branch: master | Benoit Fouet  | Tue Dec  2 
11:24:21 2014 +0100| [d7716961a856e0d6fcd23d82a5cb87c3a8439e4b] | committer: 
Michael Niedermayer

avformat/apngdec: exit probing when skipping is not possible.

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d7716961a856e0d6fcd23d82a5cb87c3a8439e4b
---

 libavformat/apngdec.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index 189480e..d97b015 100644
--- a/libavformat/apngdec.c
+++ b/libavformat/apngdec.c
@@ -87,7 +87,7 @@ static int apng_probe(AVProbeData *p)
 /* we don't check IDAT size, as this is the last tag
  * we check, and it may be larger than the probe buffer */
 if (tag != MKTAG('I', 'D', 'A', 'T') &&
-len > bytestream2_get_bytes_left(&gb))
+len + 4 > bytestream2_get_bytes_left(&gb))
 return 0;
 
 switch (tag) {

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


[FFmpeg-cvslog] avcodec/ppc/lossless_audiodsp_altivec: POWER LE support for scalarproduct_and_madd_int16_altivec()

2014-12-02 Thread Rong Yan
ffmpeg | branch: master | Rong Yan  | Tue Dec  2 07:37:11 
2014 +| [b4d41beebe869210df4b37fb4b872b1518ae06ef] | committer: Michael 
Niedermayer

avcodec/ppc/lossless_audiodsp_altivec: POWER LE support for 
scalarproduct_and_madd_int16_altivec()

adds macro GET_T()

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4d41beebe869210df4b37fb4b872b1518ae06ef
---

 libavcodec/ppc/lossless_audiodsp_altivec.c |   31 +++-
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/libavcodec/ppc/lossless_audiodsp_altivec.c 
b/libavcodec/ppc/lossless_audiodsp_altivec.c
index 1ebb0f4..bdec252 100644
--- a/libavcodec/ppc/lossless_audiodsp_altivec.c
+++ b/libavcodec/ppc/lossless_audiodsp_altivec.c
@@ -29,6 +29,20 @@
 #include "libavutil/ppc/types_altivec.h"
 #include "libavcodec/lossless_audiodsp.h"
 
+#if HAVE_BIGENDIAN
+#define GET_T(tt0,tt1,src,a,b){   \
+a = vec_ld(16, src);  \
+tt0 = vec_perm(b, a, align);  \
+b = vec_ld(32, src);  \
+tt1 = vec_perm(a, b, align);  \
+ }
+#else
+#define GET_T(tt0,tt1,src,a,b){   \
+tt0 = vec_vsx_ld(0, src); \
+tt1 = vec_vsx_ld(16, src);\
+ }
+#endif
+
 #if HAVE_ALTIVEC
 static int32_t scalarproduct_and_madd_int16_altivec(int16_t *v1,
 const int16_t *v2,
@@ -38,26 +52,23 @@ static int32_t scalarproduct_and_madd_int16_altivec(int16_t 
*v1,
 LOAD_ZERO;
 vec_s16 *pv1 = (vec_s16 *) v1;
 register vec_s16 muls = { mul, mul, mul, mul, mul, mul, mul, mul };
-register vec_s16 t0, t1, i0, i1, i4;
-register vec_s16 i2 = vec_ld(0, v2), i3 = vec_ld(0, v3);
+register vec_s16 t0, t1, i0, i1, i4, i2, i3;
 register vec_s32 res = zero_s32v;
+#if HAVE_BIGENDIAN
 register vec_u8 align = vec_lvsl(0, v2);
+i2 = vec_ld(0, v2);
+i3 = vec_ld(0, v3);
+#endif
 int32_t ires;
 
 order >>= 4;
 do {
-i1 = vec_ld(16, v2);
-t0 = vec_perm(i2, i1, align);
-i2 = vec_ld(32, v2);
-t1 = vec_perm(i1, i2, align);
+GET_T(t0,t1,v2,i1,i2);
 i0 = pv1[0];
 i1 = pv1[1];
 res= vec_msum(t0, i0, res);
 res= vec_msum(t1, i1, res);
-i4 = vec_ld(16, v3);
-t0 = vec_perm(i3, i4, align);
-i3 = vec_ld(32, v3);
-t1 = vec_perm(i4, i3, align);
+GET_T(t0,t1,v3,i4,i3);
 pv1[0] = vec_mladd(t0, muls, i0);
 pv1[1] = vec_mladd(t1, muls, i1);
 pv1   += 2;

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


[FFmpeg-cvslog] avfilter/vf_tinterlace: Favor using standard timebases for the output

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon Dec  1 
20:52:10 2014 +0100| [59f1f764d6cd07ff7d1bb113d423b3e62b3510c1] | committer: 
Michael Niedermayer

avfilter/vf_tinterlace: Favor using standard timebases for the output

Reported-by: Vittorio Giovara 
Inspired by discussion with Kieran Kunhya 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=59f1f764d6cd07ff7d1bb113d423b3e62b3510c1
---

 libavfilter/tinterlace.h|1 +
 libavfilter/vf_tinterlace.c |   25 +++--
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/libavfilter/tinterlace.h b/libavfilter/tinterlace.h
index 41b78c5..fa0a83a 100644
--- a/libavfilter/tinterlace.h
+++ b/libavfilter/tinterlace.h
@@ -44,6 +44,7 @@ enum TInterlaceMode {
 typedef struct {
 const AVClass *class;
 enum TInterlaceMode mode;   ///< interlace mode selected
+AVRational preout_time_base;
 int flags;  ///< flags affecting interlacing algorithm
 int frame;  ///< number of the output frame
 int vsub;   ///< chroma vertical subsampling
diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c
index 133f073..c644895 100644
--- a/libavfilter/vf_tinterlace.c
+++ b/libavfilter/vf_tinterlace.c
@@ -35,6 +35,7 @@
 #define OFFSET(x) offsetof(TInterlaceContext, x)
 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 #define TINTERLACE_FLAG_VLPF 01
+#define TINTERLACE_FLAG_EXACT_TB 2
 
 static const AVOption tinterlace_options[] = {
 {"mode",  "select interlace mode", OFFSET(mode), 
AV_OPT_TYPE_INT, {.i64=MODE_MERGE}, 0, MODE_NB-1, FLAGS, "mode"},
@@ -49,6 +50,7 @@ static const AVOption tinterlace_options[] = {
 {"flags", "set flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 
= 0}, 0, INT_MAX, 0, "flags" },
 {"low_pass_filter",   "enable vertical low-pass filter",  0, 
AV_OPT_TYPE_CONST, {.i64 = TINTERLACE_FLAG_VLPF}, INT_MIN, INT_MAX, FLAGS, 
"flags" },
 {"vlpf",  "enable vertical low-pass filter",  0, 
AV_OPT_TYPE_CONST, {.i64 = TINTERLACE_FLAG_VLPF}, INT_MIN, INT_MAX, FLAGS, 
"flags" },
+{"exact_tb",  "force a timebase which can represent timestamps 
exactly", 0, AV_OPT_TYPE_CONST, {.i64 = TINTERLACE_FLAG_EXACT_TB}, INT_MIN, 
INT_MAX, FLAGS, "flags" },
 
 {NULL}
 };
@@ -62,6 +64,12 @@ static const enum AVPixelFormat full_scale_yuvj_pix_fmts[] = 
{
 FULL_SCALE_YUVJ_FORMATS, AV_PIX_FMT_NONE
 };
 
+static const AVRational standard_tbs[] = {
+{1, 25},
+{1, 30},
+{1001, 3},
+};
+
 static int query_formats(AVFilterContext *ctx)
 {
 static const enum AVPixelFormat pix_fmts[] = {
@@ -104,6 +112,7 @@ static int config_out_props(AVFilterLink *outlink)
 AVFilterLink *inlink = outlink->src->inputs[0];
 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(outlink->format);
 TInterlaceContext *tinterlace = ctx->priv;
+int i;
 
 tinterlace->vsub = desc->log2_chroma_h;
 outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
@@ -135,13 +144,23 @@ static int config_out_props(AVFilterLink *outlink)
 tinterlace->mode);
 tinterlace->flags &= ~TINTERLACE_FLAG_VLPF;
 }
+tinterlace->preout_time_base = inlink->time_base;
 if (tinterlace->mode == MODE_INTERLACEX2) {
-outlink->time_base.num = inlink->time_base.num;
-outlink->time_base.den = inlink->time_base.den * 2;
+tinterlace->preout_time_base.den *= 2;
 outlink->frame_rate = av_mul_q(inlink->frame_rate, (AVRational){2,1});
+outlink->time_base  = av_mul_q(inlink->time_base , (AVRational){1,2});
 } else if (tinterlace->mode != MODE_PAD) {
 outlink->frame_rate = av_mul_q(inlink->frame_rate, (AVRational){1,2});
+outlink->time_base  = av_mul_q(inlink->time_base , (AVRational){2,1});
+}
+
+for (i = 0; itime_base))
+break;
 }
+if (i == FF_ARRAY_ELEMS(standard_tbs) ||
+(tinterlace->flags & TINTERLACE_FLAG_EXACT_TB))
+outlink->time_base = tinterlace->preout_time_base;
 
 if (tinterlace->flags & TINTERLACE_FLAG_VLPF) {
 tinterlace->lowpass_line = lowpass_line_c;
@@ -326,6 +345,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*picref)
 if (cur->pts != AV_NOPTS_VALUE)
 out->pts = cur->pts*2;
 
+out->pts = av_rescale_q(out->pts, tinterlace->preout_time_base, 
outlink->time_base);
 if ((ret = ff_filter_frame(outlink, out)) < 0)
 return ret;
 
@@ -359,6 +379,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*picref)
 av_assert0(0);
 }
 
+out->pts = av_rescale_q(out->pts, tinterlace->preout_time_base, 
outlink->time_base);
 ret = ff_filter_frame(outlink, out);
 tinterlace->frame++;
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinf

[FFmpeg-cvslog] Revert "avfilter/vf_interlace: more accurate pts calculation"

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  2 
18:48:03 2014 +0100| [46b64e30989519b0a04cba3c32c34fa187687440] | committer: 
Michael Niedermayer

Revert "avfilter/vf_interlace: more accurate pts calculation"

This reverts commit df8248f66e362c3015d95ac86d1917dde8dc0a0c.

the revert produces a timebase and timestamps that are more close
to what users expect

Hoped-by: koda

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=46b64e30989519b0a04cba3c32c34fa187687440
---

 libavfilter/vf_interlace.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/vf_interlace.c b/libavfilter/vf_interlace.c
index a63f915..2828e36 100644
--- a/libavfilter/vf_interlace.c
+++ b/libavfilter/vf_interlace.c
@@ -109,6 +109,7 @@ static int config_out_props(AVFilterLink *outlink)
 outlink->time_base = inlink->time_base;
 outlink->frame_rate = inlink->frame_rate;
 // half framerate
+outlink->time_base.num *= 2;
 outlink->frame_rate.den *= 2;
 outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
 
@@ -204,6 +205,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
 av_frame_copy_props(out, s->cur);
 out->interlaced_frame = 1;
 out->top_field_first  = tff;
+out->pts /= 2;  // adjust pts to new framerate
 
 /* copy upper/lower field from cur */
 copy_picture_field(s, s->cur, out, inlink, tff ? FIELD_UPPER : 
FIELD_LOWER, s->lowpass);

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


[FFmpeg-cvslog] avcodec/aacdec: Use avpriv_float_dsp_alloc()

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  2 
19:16:02 2014 +0100| [68b8e21b8bac7eac5d8b7263806e29d2c8b3b2d4] | committer: 
Michael Niedermayer

avcodec/aacdec: Use avpriv_float_dsp_alloc()

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=68b8e21b8bac7eac5d8b7263806e29d2c8b3b2d4
---

 libavcodec/aac.h  |2 +-
 libavcodec/aacdec.c   |   54 ++---
 libavcodec/aacsbr.c   |6 ++---
 libavcodec/mips/aacdec_mips.c |   16 ++--
 4 files changed, 41 insertions(+), 37 deletions(-)

diff --git a/libavcodec/aac.h b/libavcodec/aac.h
index e8de1e8..a151737 100644
--- a/libavcodec/aac.h
+++ b/libavcodec/aac.h
@@ -295,7 +295,7 @@ struct AACContext {
 FFTContext mdct_ld;
 FFTContext mdct_ltp;
 FmtConvertContext fmt_conv;
-AVFloatDSPContext fdsp;
+AVFloatDSPContext *fdsp;
 int random_state;
 /** @} */
 
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 2793881..f74cf15 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -1137,7 +1137,10 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
 ff_aac_sbr_init();
 
 ff_fmt_convert_init(&ac->fmt_conv, avctx);
-avpriv_float_dsp_init(&ac->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
+ac->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+if (!ac->fdsp) {
+return AVERROR(ENOMEM);
+}
 
 ac->random_state = 0x1f2e3d4c;
 
@@ -1641,9 +1644,9 @@ static int decode_spectrum_and_dequant(AACContext *ac, 
float coef[1024],
 cfo[k] = ac->random_state;
 }
 
-band_energy = ac->fdsp.scalarproduct_float(cfo, cfo, 
off_len);
+band_energy = ac->fdsp->scalarproduct_float(cfo, cfo, 
off_len);
 scale = sf[idx] / sqrtf(band_energy);
-ac->fdsp.vector_fmul_scalar(cfo, cfo, scale, off_len);
+ac->fdsp->vector_fmul_scalar(cfo, cfo, scale, off_len);
 }
 } else {
 const float *vq = ff_aac_codebook_vector_vals[cbt_m1];
@@ -1789,7 +1792,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, 
float coef[1024],
 }
 } while (len -= 2);
 
-ac->fdsp.vector_fmul_scalar(cfo, cfo, sf[idx], 
off_len);
+ac->fdsp->vector_fmul_scalar(cfo, cfo, sf[idx], 
off_len);
 }
 }
 
@@ -2002,7 +2005,7 @@ static void apply_mid_side_stereo(AACContext *ac, 
ChannelElement *cpe)
 cpe->ch[0].band_type[idx] < NOISE_BT &&
 cpe->ch[1].band_type[idx] < NOISE_BT) {
 for (group = 0; group < ics->group_len[g]; group++) {
-ac->fdsp.butterflies_float(ch0 + group * 128 + offsets[i],
+ac->fdsp->butterflies_float(ch0 + group * 128 + offsets[i],
ch1 + group * 128 + offsets[i],
offsets[i+1] - offsets[i]);
 }
@@ -2041,7 +2044,7 @@ static void apply_intensity_stereo(AACContext *ac,
 c *= 1 - 2 * cpe->ms_mask[idx];
 scale = c * sce1->sf[idx];
 for (group = 0; group < ics->group_len[g]; group++)
-ac->fdsp.vector_fmul_scalar(coef1 + group * 128 + 
offsets[i],
+ac->fdsp->vector_fmul_scalar(coef1 + group * 128 + 
offsets[i],
 coef0 + group * 128 + 
offsets[i],
 scale,
 offsets[i + 1] - 
offsets[i]);
@@ -2409,15 +2412,15 @@ static void windowing_and_mdct_ltp(AACContext *ac, 
float *out,
 const float *swindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_short_128 : 
ff_sine_128;
 
 if (ics->window_sequence[0] != LONG_STOP_SEQUENCE) {
-ac->fdsp.vector_fmul(in, in, lwindow_prev, 1024);
+ac->fdsp->vector_fmul(in, in, lwindow_prev, 1024);
 } else {
 memset(in, 0, 448 * sizeof(float));
-ac->fdsp.vector_fmul(in + 448, in + 448, swindow_prev, 128);
+ac->fdsp->vector_fmul(in + 448, in + 448, swindow_prev, 128);
 }
 if (ics->window_sequence[0] != LONG_START_SEQUENCE) {
-ac->fdsp.vector_fmul_reverse(in + 1024, in + 1024, lwindow, 1024);
+ac->fdsp->vector_fmul_reverse(in + 1024, in + 1024, lwindow, 1024);
 } else {
-ac->fdsp.vector_fmul_reverse(in + 1024 + 448, in + 1024 + 448, 
swindow, 128);
+ac->fdsp->vector_fmul_reverse(in + 1024 + 448, in + 1024 + 448, 
swindow, 128);
 memset(in + 1024 + 576, 0, 448 * sizeof(float));
 }
 ac->mdct_ltp.mdct_calc(&ac->mdct_ltp, out, in);
@@ -2470,17 +2473,17 @@ static void update_ltp(AACContext *ac, 
Single

[FFmpeg-cvslog] configure: add a note about pkg-config --static.

2014-12-02 Thread Nicolas George
ffmpeg | branch: master | Nicolas George  | Tue Dec  2 
13:54:46 2014 +0100| [6c96aa06066db2a62667b6c537a38db7eab25f7f] | committer: 
Nicolas George

configure: add a note about pkg-config --static.

Try to detect "$cc -static" without "pkg-config --static".
Also, when a library detection using pkg-config fails,
make it explicit this was pkg-config.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6c96aa06066db2a62667b6c537a38db7eab25f7f
---

 configure |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 12f93f3..c046e34 100755
--- a/configure
+++ b/configure
@@ -1211,7 +1211,7 @@ use_pkg_config(){
 }
 
 require_pkg_config(){
-use_pkg_config "$@" || die "ERROR: $pkg not found"
+use_pkg_config "$@" || die "ERROR: $pkg not found using 
pkg-config$pkg_config_fail_message"
 }
 
 require_libfreetype(){
@@ -3070,9 +3070,13 @@ set_default arch cc cxx doxygen pkg_config ranlib strip 
sysinclude \
 enabled cross_compile || host_cc_default=$cc
 set_default host_cc
 
+pkg_config_fail_message=""
 if ! $pkg_config --version >/dev/null 2>&1; then
 warn "$pkg_config not found, library detection may fail."
 pkg_config=false
+elif is_in -static $cc $LDFLAGS && ! is_in --static $pkg_config 
$pkg_config_flags; then
+pkg_config_fail_message="
+Note: When building a static binary, add --pkg-config-flags=\"--static\"."
 fi
 
 if test $doxygen != $doxygen_default && \

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


[FFmpeg-cvslog] configure: add optional pkg-config helper and use it.

2014-12-02 Thread Nicolas George
ffmpeg | branch: master | Nicolas George  | Tue Dec  2 
13:29:47 2014 +0100| [cfcaf6b38e39ed6e788abb1a5a44f23660dce2f6] | committer: 
Nicolas George

configure: add optional pkg-config helper and use it.

The require variant dies if the package is not present.
The check variant does not import the flags to the used list.
The new variant imports the flags if the package is present
but does not die if it is not.
The new call graph is: require -> use -> check.

Use use_pkg_config for libx264 and libsmbclient: more readable
and three external call less per library.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cfcaf6b38e39ed6e788abb1a5a44f23660dce2f6
---

 configure |   16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/configure b/configure
index d4a86c0..12f93f3 100755
--- a/configure
+++ b/configure
@@ -1203,13 +1203,17 @@ require_cpp(){
 check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name not found"
 }
 
-require_pkg_config(){
+use_pkg_config(){
 pkg="$1"
-check_pkg_config "$@" || die "ERROR: $pkg not found"
+check_pkg_config "$@" || return 1
 add_cflags$(get_safe ${pkg}_cflags)
 add_extralibs $(get_safe ${pkg}_libs)
 }
 
+require_pkg_config(){
+use_pkg_config "$@" || die "ERROR: $pkg not found"
+}
+
 require_libfreetype(){
 log require_libfreetype "$@"
 pkg="freetype2"
@@ -4875,9 +4879,8 @@ enabled libquvi   && require_pkg_config libquvi 
quvi/quvi.h quvi_init
 enabled librtmp   && require_pkg_config librtmp librtmp/rtmp.h 
RTMP_Socket
 enabled libschroedinger   && require_pkg_config schroedinger-1.0 
schroedinger/schro.h schro_init
 enabled libshine  && require_pkg_config shine shine/layer3.h 
shine_encode_buffer
-enabled libsmbclient  && { { check_pkg_config smbclient libsmbclient.h 
smbc_init &&
- require_pkg_config smbclient libsmbclient.h 
smbc_init; } ||
- require smbclient libsmbclient.h smbc_init 
-lsmbclient; }
+enabled libsmbclient  && { check_pkg_config smbclient libsmbclient.h 
smbc_init ||
+   require smbclient libsmbclient.h smbc_init 
-lsmbclient; }
 enabled libsoxr   && require libsoxr soxr.h soxr_create -lsoxr
 enabled libssh&& require_pkg_config libssh libssh/sftp.h sftp_init
 enabled libspeex  && require_pkg_config speex speex/speex.h 
speex_decoder_init -lspeex
@@ -4903,8 +4906,7 @@ enabled libvpx&& {
 enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" 
"vpx_codec_vp9_cx VP9E_SET_AQ_MODE" -lvpx || disable libvpx_vp9_encoder; } }
 enabled libwavpack&& require libwavpack wavpack/wavpack.h 
WavpackOpenFileOutput  -lwavpack
 enabled libwebp   && require_pkg_config "libwebp >= 0.2.0" 
webp/encode.h WebPGetEncoderVersion
-enabled libx264   && { { check_pkg_config x264 "stdint.h x264.h" 
x264_encoder_encode &&
- require_pkg_config x264 "stdint.h x264.h" 
x264_encoder_encode; } ||
+enabled libx264   && { use_pkg_config x264 "stdint.h x264.h" 
x264_encoder_encode ||
{ require libx264 x264.h x264_encoder_encode 
-lx264 &&
  warn "using libx264 without pkg-config"; } } 
&&
  { check_cpp_condition x264.h "X264_BUILD >= 118" 
||

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


[FFmpeg-cvslog] Merge remote-tracking branch 'cigaes/master'

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  2 
19:48:01 2014 +0100| [9adc999d2a927123d4b37a2a0c6eeb0d37c12cef] | committer: 
Michael Niedermayer

Merge remote-tracking branch 'cigaes/master'

* cigaes/master:
  configure: add a note about pkg-config --static.
  configure: add optional pkg-config helper and use it.

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9adc999d2a927123d4b37a2a0c6eeb0d37c12cef
---



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


[FFmpeg-cvslog] aac: Simplify decode_mid_side_stereo

2014-12-02 Thread Luca Barbato
ffmpeg | branch: master | Luca Barbato  | Fri Nov 21 
12:57:36 2014 +| [7464e98f74c03d3efa0cdc8d7abad06e4c3c277a] | committer: 
Vittorio Giovara

aac: Simplify decode_mid_side_stereo

Might spare few cycles if the compiler is naive and
makes the function more readable.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7464e98f74c03d3efa0cdc8d7abad06e4c3c277a
---

 libavcodec/aacdec.c |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 76190e2..9c0a46d 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -1419,13 +1419,12 @@ static void decode_mid_side_stereo(ChannelElement *cpe, 
GetBitContext *gb,
int ms_present)
 {
 int idx;
+int max_idx = cpe->ch[0].ics.num_window_groups * cpe->ch[0].ics.max_sfb;
 if (ms_present == 1) {
-for (idx = 0;
- idx < cpe->ch[0].ics.num_window_groups * cpe->ch[0].ics.max_sfb;
- idx++)
+for (idx = 0; idx < max_idx; idx++)
 cpe->ms_mask[idx] = get_bits1(gb);
 } else if (ms_present == 2) {
-memset(cpe->ms_mask, 1, cpe->ch[0].ics.num_window_groups * 
cpe->ch[0].ics.max_sfb * sizeof(cpe->ms_mask[0]));
+memset(cpe->ms_mask, 1, max_idx * sizeof(cpe->ms_mask[0]));
 }
 }
 

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


[FFmpeg-cvslog] Merge commit '7464e98f74c03d3efa0cdc8d7abad06e4c3c277a'

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  2 
21:29:48 2014 +0100| [61d0a6dd9554ecd705518d38d531363cdabab7d3] | committer: 
Michael Niedermayer

Merge commit '7464e98f74c03d3efa0cdc8d7abad06e4c3c277a'

* commit '7464e98f74c03d3efa0cdc8d7abad06e4c3c277a':
  aac: Simplify decode_mid_side_stereo

Conflicts:
libavcodec/aacdec.c

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=61d0a6dd9554ecd705518d38d531363cdabab7d3
---



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


[FFmpeg-cvslog] rtsp: move the CONFIG_ macros to the beginning of the check

2014-12-02 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Nov 29 17:39:41 2014 +0100| [604c9b1196c70d79bbbc1f23e75f6a8253a74da3] | 
committer: Vittorio Giovara

rtsp: move the CONFIG_ macros to the beginning of the check

With --disable-optimizations, the DCE of some compilers does not remove
such unused code, causing linking failure.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=604c9b1196c70d79bbbc1f23e75f6a8253a74da3
---

 libavformat/rtsp.c |   26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 123d543..8276286 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -434,7 +434,7 @@ static void sdp_parse_line(AVFormatContext *s, 
SDPParseState *s1,
 if (!strcmp(ff_rtp_enc_name(rtsp_st->sdp_payload_type), "MP2T")) {
 /* no corresponding stream */
 if (rt->transport == RTSP_TRANSPORT_RAW) {
-if (!rt->ts && CONFIG_RTPDEC)
+if (CONFIG_RTPDEC && !rt->ts)
 rt->ts = ff_mpegts_parse_open(s);
 } else {
 RTPDynamicProtocolHandler *handler;
@@ -683,9 +683,9 @@ void ff_rtsp_undo_setup(AVFormatContext *s, int 
send_packets)
 avio_close(rtpctx->pb);
 }
 avformat_free_context(rtpctx);
-} else if (rt->transport == RTSP_TRANSPORT_RDT && CONFIG_RTPDEC)
+} else if (CONFIG_RTPDEC && rt->transport == RTSP_TRANSPORT_RDT)
 ff_rdt_parse_close(rtsp_st->transport_priv);
-else if (rt->transport == RTSP_TRANSPORT_RTP && CONFIG_RTPDEC)
+else if (CONFIG_RTPDEC && rt->transport == RTSP_TRANSPORT_RTP)
 ff_rtp_parse_close(rtsp_st->transport_priv);
 }
 rtsp_st->transport_priv = NULL;
@@ -723,7 +723,7 @@ void ff_rtsp_close_streams(AVFormatContext *s)
 if (rt->asf_ctx) {
 avformat_close_input(&rt->asf_ctx);
 }
-if (rt->ts && CONFIG_RTPDEC)
+if (CONFIG_RTPDEC && rt->ts)
 ff_mpegts_parse_close(rt->ts);
 av_free(rt->p);
 av_free(rt->recvbuf);
@@ -747,7 +747,7 @@ int ff_rtsp_open_transport_ctx(AVFormatContext *s, 
RTSPStream *rtsp_st)
 if (!st)
 s->ctx_flags |= AVFMTCTX_NOHEADER;
 
-if (s->oformat && CONFIG_RTSP_MUXER) {
+if (CONFIG_RTSP_MUXER && s->oformat) {
 int ret = ff_rtp_chain_mux_open((AVFormatContext 
**)&rtsp_st->transport_priv,
 s, st, rtsp_st->rtp_handle,
 RTSP_TCP_MAX_PACKET_SIZE,
@@ -759,7 +759,7 @@ int ff_rtsp_open_transport_ctx(AVFormatContext *s, 
RTSPStream *rtsp_st)
 st->time_base = 
((AVFormatContext*)rtsp_st->transport_priv)->streams[0]->time_base;
 } else if (rt->transport == RTSP_TRANSPORT_RAW) {
 return 0; // Don't need to open any parser here
-} else if (rt->transport == RTSP_TRANSPORT_RDT && CONFIG_RTPDEC)
+} else if (CONFIG_RTPDEC && rt->transport == RTSP_TRANSPORT_RDT)
 rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
 rtsp_st->dynamic_protocol_context,
 rtsp_st->dynamic_handler);
@@ -770,7 +770,7 @@ int ff_rtsp_open_transport_ctx(AVFormatContext *s, 
RTSPStream *rtsp_st)
 
 if (!rtsp_st->transport_priv) {
  return AVERROR(ENOMEM);
-} else if (rt->transport == RTSP_TRANSPORT_RTP && CONFIG_RTPDEC) {
+} else if (CONFIG_RTPDEC && rt->transport == RTSP_TRANSPORT_RTP) {
 if (rtsp_st->dynamic_handler) {
 ff_rtp_parse_set_dynamic_protocol(rtsp_st->transport_priv,
   
rtsp_st->dynamic_protocol_context,
@@ -1464,7 +1464,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const 
char *host, int port,
  transport);
 if (rt->accept_dynamic_rate)
 av_strlcat(cmd, "x-Dynamic-Rate: 0\r\n", sizeof(cmd));
-if (i == 0 && rt->server_type == RTSP_SERVER_REAL && CONFIG_RTPDEC) {
+if (CONFIG_RTPDEC && i == 0 && rt->server_type == RTSP_SERVER_REAL) {
 char real_res[41], real_csum[9];
 ff_rdt_calc_response_and_checksum(real_res, real_csum,
   real_challenge);
@@ -1529,8 +1529,8 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const 
char *host, int port,
  * potential NAT router by sending dummy packets.
  * RTP/RTCP dummy packets are used for RDT, too.
  */
-if (!(rt->server_type == RTSP_SERVER_WMS && i > 1) && s->iformat &&
-CONFIG_RTPDEC)
+if (CONFIG_RTPDEC &&
+!(rt->server_type == RTSP_SERVER_WMS && i > 1) && s->iformat)
 ff_rtp_send_punch_packets(rtsp_st->rtp_handle);
 break;
 }
@@ -1793,7 +1793,7 @@ redirect:
 break;
 }
 
-if (s->iformat && CONFIG_RTS

[FFmpeg-cvslog] Merge commit '604c9b1196c70d79bbbc1f23e75f6a8253a74da3'

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  2 
21:39:05 2014 +0100| [1537d0b432d8cad62b6c8af1960674ac452be7ac] | committer: 
Michael Niedermayer

Merge commit '604c9b1196c70d79bbbc1f23e75f6a8253a74da3'

* commit '604c9b1196c70d79bbbc1f23e75f6a8253a74da3':
  rtsp: move the CONFIG_ macros to the beginning of the check

Conflicts:
libavformat/rtsp.c

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1537d0b432d8cad62b6c8af1960674ac452be7ac
---



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


[FFmpeg-cvslog] mov: do not truncate the language-prefixed tag

2014-12-02 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Nov 29 17:51:12 2014 +0100| [5639ed9abb58311f82cf3499b682d228290adb09] | 
committer: Vittorio Giovara

mov: do not truncate the language-prefixed tag

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5639ed9abb58311f82cf3499b682d228290adb09
---

 libavformat/mov.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 39e6883..0f55052 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -256,7 +256,7 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 #ifdef MOV_EXPORT_ALL_METADATA
 char tmp_key[5];
 #endif
-char str[1024], key2[16], language[4] = {0};
+char str[1024], key2[32], language[4] = {0};
 const char *key = NULL;
 uint16_t langcode = 0;
 uint32_t data_type = 0, str_size;

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


[FFmpeg-cvslog] Merge commit '5639ed9abb58311f82cf3499b682d228290adb09'

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  2 
21:45:44 2014 +0100| [d0b0fe6691fc67a95f985cad10d7e66c9bc23587] | committer: 
Michael Niedermayer

Merge commit '5639ed9abb58311f82cf3499b682d228290adb09'

* commit '5639ed9abb58311f82cf3499b682d228290adb09':
  mov: do not truncate the language-prefixed tag

Conflicts:
libavformat/mov.c

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d0b0fe6691fc67a95f985cad10d7e66c9bc23587
---



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


[FFmpeg-cvslog] ffserver: use avcodec_copy_context to copy context

2014-12-02 Thread Lukasz Marek
ffmpeg | branch: master | Lukasz Marek  | Sat Nov 22 
02:33:29 2014 +0100| [8b0226f2a6d71d47c7578681e2580cb6b337adb9] | committer: 
Lukasz Marek

ffserver: use avcodec_copy_context to copy context

Copying context using dedicated function is safer that raw memcpy
which creates shallow copy.

Signed-off-by: Lukasz Marek 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b0226f2a6d71d47c7578681e2580cb6b337adb9
---

 ffserver.c |9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/ffserver.c b/ffserver.c
index 8ef51a1..ab3e6e9 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -3297,13 +3297,8 @@ static AVStream *add_av_stream1(FFServerStream *stream, 
AVCodecContext *codec, i
 if (!fst)
 return NULL;
 if (copy) {
-fst->codec = avcodec_alloc_context3(NULL);
-memcpy(fst->codec, codec, sizeof(AVCodecContext));
-if (codec->extradata_size) {
-fst->codec->extradata = av_mallocz(codec->extradata_size + 
FF_INPUT_BUFFER_PADDING_SIZE);
-memcpy(fst->codec->extradata, codec->extradata,
-codec->extradata_size);
-}
+fst->codec = avcodec_alloc_context3(codec->codec);
+avcodec_copy_context(fst->codec, codec);
 } else {
 /* live streams must use the actual feed's codec since it may be
  * updated later to carry extradata needed by them.

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


[FFmpeg-cvslog] ffserver_config: set defaults basing on absence of set value

2014-12-02 Thread Lukasz Marek
ffmpeg | branch: master | Lukasz Marek  | Wed Nov 26 
19:08:18 2014 +0100| [2f4233614a7fbe176b81de0ef14bf38bad8e6693] | committer: 
Lukasz Marek

ffserver_config: set defaults basing on absence of set value

This prevents the situation when user set option to 0 and ffserver
threats it as not set value, so applies the default.

Signed-off-by: Lukasz Marek 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f4233614a7fbe176b81de0ef14bf38bad8e6693
---

 ffserver_config.c |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/ffserver_config.c b/ffserver_config.c
index 7773e3c..053ab39 100644
--- a/ffserver_config.c
+++ b/ffserver_config.c
@@ -200,51 +200,51 @@ static void add_codec(FFServerStream *stream, 
AVCodecContext *av,
 /* compute default parameters */
 switch(av->codec_type) {
 case AVMEDIA_TYPE_AUDIO:
-if (av->bit_rate == 0) {
+if (!av_dict_get(recommended, "ab", NULL, 0)) {
 av->bit_rate = 64000;
 av_dict_set_int(&recommended, "ab", av->bit_rate, 0);
 }
-if (av->sample_rate == 0) {
+if (!av_dict_get(recommended, "ar", NULL, 0)) {
 av->sample_rate = 22050;
 av_dict_set_int(&recommended, "ar", av->sample_rate, 0);
 }
-if (av->channels == 0) {
+if (!av_dict_get(recommended, "ac", NULL, 0)) {
 av->channels = 1;
 av_dict_set_int(&recommended, "ac", av->channels, 0);
 }
 break;
 case AVMEDIA_TYPE_VIDEO:
-if (av->bit_rate == 0) {
+if (!av_dict_get(recommended, "b", NULL, 0)) {
 av->bit_rate = 64000;
 av_dict_set_int(&recommended, "b", av->bit_rate, 0);
 }
-if (av->time_base.num == 0){
+if (!av_dict_get(recommended, "time_base", NULL, 0)){
 av->time_base.den = 5;
 av->time_base.num = 1;
 av_dict_set(&recommended, "time_base", "1/5", 0);
 }
-if (av->width == 0 || av->height == 0) {
+if (!av_dict_get(recommended, "video_size", NULL, 0)) {
 av->width = 160;
 av->height = 128;
 av_dict_set(&recommended, "video_size", "160x128", 0);
 }
 /* Bitrate tolerance is less for streaming */
-if (av->bit_rate_tolerance == 0) {
+if (!av_dict_get(recommended, "bt", NULL, 0)) {
 av->bit_rate_tolerance = FFMAX(av->bit_rate / 4,
   
(int64_t)av->bit_rate*av->time_base.num/av->time_base.den);
 av_dict_set_int(&recommended, "bt", av->bit_rate_tolerance, 0);
 }
 
-if (!av->rc_eq) {
+if (!av_dict_get(recommended, "rc_eq", NULL, 0)) {
 av->rc_eq = av_strdup("tex^qComp");
 av_dict_set(&recommended, "rc_eq", "tex^qComp", 0);
 }
-if (!av->rc_max_rate) {
+if (!av_dict_get(recommended, "maxrate", NULL, 0)) {
 av->rc_max_rate = av->bit_rate * 2;
 av_dict_set_int(&recommended, "maxrate", av->rc_max_rate, 0);
 }
 
-if (av->rc_max_rate && !av->rc_buffer_size) {
+if (av->rc_max_rate && !av_dict_get(recommended, "bufsize", NULL, 0)) {
 av->rc_buffer_size = av->rc_max_rate;
 av_dict_set_int(&recommended, "bufsize", av->rc_buffer_size, 0);
 }

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


[FFmpeg-cvslog] ffserver_config: print warning when using default value

2014-12-02 Thread Lukasz Marek
ffmpeg | branch: master | Lukasz Marek  | Wed Nov 26 
19:41:24 2014 +0100| [302ed9c43f2d2a0764a9f9d2a4b2e512d2c9592f] | committer: 
Lukasz Marek

ffserver_config: print warning when using default value

Some of the defaults may be harmful (like buffer size).
It is good user is aware of that.

Signed-off-by: Lukasz Marek 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=302ed9c43f2d2a0764a9f9d2a4b2e512d2c9592f
---

 ffserver_config.c |   38 +++---
 1 file changed, 35 insertions(+), 3 deletions(-)

diff --git a/ffserver_config.c b/ffserver_config.c
index 053ab39..8ea86aa 100644
--- a/ffserver_config.c
+++ b/ffserver_config.c
@@ -40,6 +40,11 @@ static void vreport_config_error(const char *filename, int 
line_num, int log_lev
 static void report_config_error(const char *filename, int line_num, int 
log_level,
 int *errors, const char *fmt, ...);
 
+#define ERROR(...)   report_config_error(config->filename, config->line_num,\
+ AV_LOG_ERROR, &config->errors,  
__VA_ARGS__)
+#define WARNING(...) report_config_error(config->filename, config->line_num,\
+ AV_LOG_WARNING, &config->warnings, 
__VA_ARGS__)
+
 /* FIXME: make ffserver work with IPv6 */
 /* resolve host with also IP address parsing */
 static int resolve_host(struct in_addr *sin_addr, const char *hostname)
@@ -203,50 +208,80 @@ static void add_codec(FFServerStream *stream, 
AVCodecContext *av,
 if (!av_dict_get(recommended, "ab", NULL, 0)) {
 av->bit_rate = 64000;
 av_dict_set_int(&recommended, "ab", av->bit_rate, 0);
+WARNING("Setting default value for audio bit rate = %d. "
+"Use NoDefaults to disable it.\n",
+av->bit_rate);
 }
 if (!av_dict_get(recommended, "ar", NULL, 0)) {
 av->sample_rate = 22050;
 av_dict_set_int(&recommended, "ar", av->sample_rate, 0);
+WARNING("Setting default value for audio sample rate = %d. "
+"Use NoDefaults to disable it.\n",
+av->sample_rate);
 }
 if (!av_dict_get(recommended, "ac", NULL, 0)) {
 av->channels = 1;
 av_dict_set_int(&recommended, "ac", av->channels, 0);
+WARNING("Setting default value for audio channel count = %d. "
+"Use NoDefaults to disable it.\n",
+av->channels);
 }
 break;
 case AVMEDIA_TYPE_VIDEO:
 if (!av_dict_get(recommended, "b", NULL, 0)) {
 av->bit_rate = 64000;
 av_dict_set_int(&recommended, "b", av->bit_rate, 0);
+WARNING("Setting default value for video bit rate = %d. "
+"Use NoDefaults to disable it.\n",
+av->bit_rate);
 }
 if (!av_dict_get(recommended, "time_base", NULL, 0)){
 av->time_base.den = 5;
 av->time_base.num = 1;
 av_dict_set(&recommended, "time_base", "1/5", 0);
+WARNING("Setting default value for video frame rate = %d. "
+"Use NoDefaults to disable it.\n",
+av->time_base.den);
 }
 if (!av_dict_get(recommended, "video_size", NULL, 0)) {
 av->width = 160;
 av->height = 128;
 av_dict_set(&recommended, "video_size", "160x128", 0);
+WARNING("Setting default value for video size = %dx%d. "
+"Use NoDefaults to disable it.\n",
+av->width, av->height);
 }
 /* Bitrate tolerance is less for streaming */
 if (!av_dict_get(recommended, "bt", NULL, 0)) {
 av->bit_rate_tolerance = FFMAX(av->bit_rate / 4,
   
(int64_t)av->bit_rate*av->time_base.num/av->time_base.den);
 av_dict_set_int(&recommended, "bt", av->bit_rate_tolerance, 0);
+WARNING("Setting default value for video bit rate tolerance = %d. "
+"Use NoDefaults to disable it.\n",
+av->bit_rate_tolerance);
 }
 
 if (!av_dict_get(recommended, "rc_eq", NULL, 0)) {
 av->rc_eq = av_strdup("tex^qComp");
 av_dict_set(&recommended, "rc_eq", "tex^qComp", 0);
+WARNING("Setting default value for video rate control equation = 
%s. "
+"Use NoDefaults to disable it.\n",
+av->rc_eq);
 }
 if (!av_dict_get(recommended, "maxrate", NULL, 0)) {
 av->rc_max_rate = av->bit_rate * 2;
 av_dict_set_int(&recommended, "maxrate", av->rc_max_rate, 0);
+WARNING("Setting default value for video max rate = %d. "
+"Use NoDefaults to disable it.\n",
+av->rc_max_rate);
 }
 
 if (av->rc_max_rate && !av_dict_get(recommended, "bufsize", NULL, 

[FFmpeg-cvslog] ffserver_config: remove useless defaults

2014-12-02 Thread Lukasz Marek
ffmpeg | branch: master | Lukasz Marek  | Wed Nov 26 
18:54:16 2014 +0100| [c8ac46e9247551378e9787d0665050f15293d13a] | committer: 
Lukasz Marek

ffserver_config: remove useless defaults

Options are already set to its defaults by AVOption API.
The only difference is for qmin, new default is 2, ffserver set to 3.
It is dead code because if condition is not meet unless user set option to 0.
Meeting condition would mean that ffserver overwrites explicity set option.

Signed-off-by: Lukasz Marek 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c8ac46e9247551378e9787d0665050f15293d13a
---

 ffserver_config.c |   45 -
 1 file changed, 45 deletions(-)

diff --git a/ffserver_config.c b/ffserver_config.c
index 5f01e43..7773e3c 100644
--- a/ffserver_config.c
+++ b/ffserver_config.c
@@ -234,56 +234,11 @@ static void add_codec(FFServerStream *stream, 
AVCodecContext *av,
   
(int64_t)av->bit_rate*av->time_base.num/av->time_base.den);
 av_dict_set_int(&recommended, "bt", av->bit_rate_tolerance, 0);
 }
-if (av->qmin == 0) {
-av->qmin = 3;
-av_dict_set_int(&recommended, "qmin", av->qmin, 0);
-}
-if (av->qmax == 0) {
-av->qmax = 31;
-av_dict_set_int(&recommended, "qmax", av->qmax, 0);
-}
-if (av->max_qdiff == 0) {
-av->max_qdiff = 3;
-av_dict_set_int(&recommended, "qdiff", av->max_qdiff, 0);
-}
-/*FIXME: 0.5 is a default for these two, it is a dead code */
-av->qcompress = 0.5;
-av_dict_set(&recommended, "qcomp", "0.5", 0);
-av->qblur = 0.5;
-av_dict_set(&recommended, "qblur", "0.5", 0);
-
-if (!av->nsse_weight) {
-av->nsse_weight = 8;
-av_dict_set_int(&recommended, "nssew", av->nsse_weight, 0);
-}
-
-av->frame_skip_cmp = FF_CMP_DCTMAX;
-av_dict_set_int(&recommended, "skipcmp", FF_CMP_DCTMAX, 0);
-if (!av->me_method) {
-av->me_method = ME_EPZS;
-av_dict_set_int(&recommended, "me_method", ME_EPZS, 0);
-}
-
-/* FIXME: rc_buffer_aggressivity and rc_eq are deprecated */
-av->rc_buffer_aggressivity = 1.0;
-av_dict_set(&recommended, "rc_buf_aggressivity", "1.0", 0);
 
 if (!av->rc_eq) {
 av->rc_eq = av_strdup("tex^qComp");
 av_dict_set(&recommended, "rc_eq", "tex^qComp", 0);
 }
-if (!av->i_quant_factor) {
-av->i_quant_factor = -0.8;
-av_dict_set(&recommended, "i_qfactor", "-0.8", 0);
-}
-if (!av->b_quant_factor) {
-av->b_quant_factor = 1.25;
-av_dict_set(&recommended, "b_qfactor", "1.25", 0);
-}
-if (!av->b_quant_offset) {
-av->b_quant_offset = 1.25;
-av_dict_set(&recommended, "b_qoffset", "1.25", 0);
-}
 if (!av->rc_max_rate) {
 av->rc_max_rate = av->bit_rate * 2;
 av_dict_set_int(&recommended, "maxrate", av->rc_max_rate, 0);

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


[FFmpeg-cvslog] Merge commit 'e352b293712ff7cbde67eba3ce3f8510b037de09'

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  2 
22:00:02 2014 +0100| [781a5a392c4d0da5250c28a153c14f88aad09a73] | committer: 
Michael Niedermayer

Merge commit 'e352b293712ff7cbde67eba3ce3f8510b037de09'

* commit 'e352b293712ff7cbde67eba3ce3f8510b037de09':
  mov: Add an option for exporting all metadata

Conflicts:
libavformat/isom.h
libavformat/mov.c
libavformat/version.h

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=781a5a392c4d0da5250c28a153c14f88aad09a73
---



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


[FFmpeg-cvslog] mov: Add an option for exporting all metadata

2014-12-02 Thread Vittorio Giovara
ffmpeg | branch: master | Vittorio Giovara  | Sat 
Nov 29 17:51:13 2014 +0100| [e352b293712ff7cbde67eba3ce3f8510b037de09] | 
committer: Vittorio Giovara

mov: Add an option for exporting all metadata

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e352b293712ff7cbde67eba3ce3f8510b037de09
---

 libavformat/isom.h|2 ++
 libavformat/mov.c |   25 ++---
 libavformat/version.h |2 +-
 3 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/libavformat/isom.h b/libavformat/isom.h
index 0bc912a..7e60d8c 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -141,6 +141,7 @@ typedef struct MOVStreamContext {
 } MOVStreamContext;
 
 typedef struct MOVContext {
+const AVClass *class; ///< class for private options
 AVFormatContext *fc;
 int time_scale;
 int64_t duration; ///< duration of the longest track
@@ -155,6 +156,7 @@ typedef struct MOVContext {
 int itunes_metadata;  ///< metadata are itunes style
 int chapter_track;
 int64_t next_root_atom; ///< offset of the next root atom
+int export_all;
 } MOVContext;
 
 int ff_mp4_read_descr_len(AVIOContext *pb);
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 0f55052..4f1b88e 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -27,8 +27,6 @@
 #include 
 #include 
 
-//#define MOV_EXPORT_ALL_METADATA
-
 #include "libavutil/attributes.h"
 #include "libavutil/channel_layout.h"
 #include "libavutil/intreadwrite.h"
@@ -37,6 +35,7 @@
 #include "libavutil/time_internal.h"
 #include "libavutil/avstring.h"
 #include "libavutil/dict.h"
+#include "libavutil/opt.h"
 #include "libavcodec/ac3tab.h"
 #include "avformat.h"
 #include "internal.h"
@@ -253,9 +252,7 @@ static int mov_metadata_loci(MOVContext *c, AVIOContext 
*pb, unsigned len)
 
 static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 {
-#ifdef MOV_EXPORT_ALL_METADATA
 char tmp_key[5];
-#endif
 char str[1024], key2[32], language[4] = {0};
 const char *key = NULL;
 uint16_t langcode = 0;
@@ -329,12 +326,10 @@ static int mov_read_udta_string(MOVContext *c, 
AVIOContext *pb, MOVAtom atom)
 } else
 str_size = atom.size;
 
-#ifdef MOV_EXPORT_ALL_METADATA
-if (!key) {
+if (c->export_all && !key) {
 snprintf(tmp_key, 5, "%.4s", (char*)&atom.type);
 key = tmp_key;
 }
-#endif
 
 if (!key)
 return 0;
@@ -3420,9 +3415,25 @@ static int mov_read_seek(AVFormatContext *s, int 
stream_index, int64_t sample_ti
 return 0;
 }
 
+#define OFFSET(x) offsetof(MOVContext, x)
+#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
+static const AVOption mov_options[] = {
+{ "export_all", "Export unrecognized metadata entries", OFFSET(export_all),
+AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = FLAGS },
+{ NULL },
+};
+
+static const AVClass mov_class = {
+.class_name = "mov,mp4,m4a,3gp,3g2,mj2",
+.item_name  = av_default_item_name,
+.option = mov_options,
+.version= LIBAVUTIL_VERSION_INT,
+};
+
 AVInputFormat ff_mov_demuxer = {
 .name   = "mov,mp4,m4a,3gp,3g2,mj2",
 .long_name  = NULL_IF_CONFIG_SMALL("QuickTime / MOV"),
+.priv_class = &mov_class,
 .priv_data_size = sizeof(MOVContext),
 .extensions = "mov,mp4,m4a,3gp,3g2,mj2",
 .read_probe = mov_probe,
diff --git a/libavformat/version.h b/libavformat/version.h
index 6692777..b4d31dd 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
 
 #define LIBAVFORMAT_VERSION_MAJOR 56
 #define LIBAVFORMAT_VERSION_MINOR  7
-#define LIBAVFORMAT_VERSION_MICRO  0
+#define LIBAVFORMAT_VERSION_MICRO  1
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \

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


[FFmpeg-cvslog] Merge commit '3cec81f4d4f26b62bc2d22bb450bbf51ec3a7f09'

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  2 
22:26:40 2014 +0100| [02444f02f17d0ca059c19290788aa0fef2afac3a] | committer: 
Michael Niedermayer

Merge commit '3cec81f4d4f26b62bc2d22bb450bbf51ec3a7f09'

* commit '3cec81f4d4f26b62bc2d22bb450bbf51ec3a7f09':
  mov: allocate the tag value dynamically

Conflicts:
libavformat/mov.c

See: f31445a82d6acd0b8fab5a26c04e91645f4854d8
Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=02444f02f17d0ca059c19290788aa0fef2afac3a
---



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


[FFmpeg-cvslog] mov: allocate the tag value dynamically

2014-12-02 Thread Thilo Borgmann
ffmpeg | branch: master | Thilo Borgmann  | Sat Nov 29 
17:51:14 2014 +0100| [3cec81f4d4f26b62bc2d22bb450bbf51ec3a7f09] | committer: 
Vittorio Giovara

mov: allocate the tag value dynamically

This allows to load metadata entries longer than 1024 bytes.
Displaying them is still limited to 1024 characters, but applications
can load them fully now.

Signed-off-by: Vittorio Giovara 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3cec81f4d4f26b62bc2d22bb450bbf51ec3a7f09
---

 libavformat/mov.c |   15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 4f1b88e..13dc94b 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -253,10 +253,10 @@ static int mov_metadata_loci(MOVContext *c, AVIOContext 
*pb, unsigned len)
 static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 {
 char tmp_key[5];
-char str[1024], key2[32], language[4] = {0};
+char *str, key2[32], language[4] = {0};
 const char *key = NULL;
 uint16_t langcode = 0;
-uint32_t data_type = 0, str_size;
+uint32_t data_type = 0, str_size, str_size_alloc;
 int (*parse)(MOVContext*, AVIOContext*, unsigned, const char*) = NULL;
 
 switch (atom.type) {
@@ -336,13 +336,17 @@ static int mov_read_udta_string(MOVContext *c, 
AVIOContext *pb, MOVAtom atom)
 if (atom.size < 0)
 return AVERROR_INVALIDDATA;
 
-str_size = FFMIN3(sizeof(str)-1, str_size, atom.size);
+// allocate twice as much as worst-case
+str_size_alloc = str_size * 2;
+str = av_malloc(str_size_alloc);
+if (!str)
+return AVERROR(ENOMEM);
 
 if (parse)
 parse(c, pb, str_size, key);
 else {
 if (data_type == 3 || (data_type == 0 && (langcode < 0x400 || langcode 
== 0x7fff))) { // MAC Encoded
-mov_read_mac_string(c, pb, str_size, str, sizeof(str));
+mov_read_mac_string(c, pb, str_size, str, str_size_alloc);
 } else {
 avio_read(pb, str, str_size);
 str[str_size] = 0;
@@ -356,8 +360,9 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
 }
 av_dlog(c->fc, "lang \"%3s\" ", language);
 av_dlog(c->fc, "tag \"%s\" value \"%s\" atom \"%.4s\" %d %"PRId64"\n",
-key, str, (char*)&atom.type, str_size, atom.size);
+key, str, (char*)&atom.type, str_size_alloc, atom.size);
 
+av_freep(&str);
 return 0;
 }
 

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


[FFmpeg-cvslog] Add support for BDAV/m2ts-mode muxing

2014-12-02 Thread Fredrik Axelsson
ffmpeg | branch: master | Fredrik Axelsson  | Sat Nov 29 
17:53:45 2014 +0100| [8f8caca2242e1fe05f37493cfabcd3f4de198550] | committer: 
Vittorio Giovara

Add support for BDAV/m2ts-mode muxing

Signed-off-by: Fredrik Axelsson 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8f8caca2242e1fe05f37493cfabcd3f4de198550
---

 libavformat/mpegtsenc.c |   42 +++---
 1 file changed, 35 insertions(+), 7 deletions(-)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 1082650..e68ad1a 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -78,6 +78,7 @@ typedef struct MpegTSWrite {
 
 int pmt_start_pid;
 int start_pid;
+int m2ts_mode;
 
 int reemit_pat_pmt; // backward compatibility
 
@@ -465,9 +466,28 @@ static MpegTSService *mpegts_add_service(MpegTSWrite *ts, 
int sid,
 return service;
 }
 
+static int64_t get_pcr(const MpegTSWrite *ts, AVIOContext *pb)
+{
+return av_rescale(avio_tell(pb) + 11, 8 * PCR_TIME_BASE, ts->mux_rate) +
+   ts->first_pcr;
+}
+
+static void mpegts_prefix_m2ts_header(AVFormatContext *s)
+{
+MpegTSWrite *ts = s->priv_data;
+if (ts->m2ts_mode) {
+int64_t pcr = get_pcr(s->priv_data, s->pb);
+uint32_t tp_extra_header = pcr % 0x3fff;
+tp_extra_header = AV_RB32(&tp_extra_header);
+avio_write(s->pb, (unsigned char *) &tp_extra_header,
+   sizeof(tp_extra_header));
+}
+}
+
 static void section_write_packet(MpegTSSection *s, const uint8_t *packet)
 {
 AVFormatContext *ctx = s->opaque;
+mpegts_prefix_m2ts_header(ctx);
 avio_write(ctx->pb, packet, TS_PACKET_SIZE);
 }
 
@@ -665,6 +685,14 @@ static int mpegts_write_header(AVFormatContext *s)
service->pcr_packet_period,
ts->sdt_packet_period, ts->pat_packet_period);
 
+if (ts->m2ts_mode == -1) {
+if (av_match_ext(s->filename, "m2ts")) {
+ts->m2ts_mode = 1;
+} else {
+ts->m2ts_mode = 0;
+}
+}
+
 avio_flush(s->pb);
 
 return 0;
@@ -705,12 +733,6 @@ static void retransmit_si_info(AVFormatContext *s)
 }
 }
 
-static int64_t get_pcr(const MpegTSWrite *ts, AVIOContext *pb)
-{
-return av_rescale(avio_tell(pb) + 11, 8 * PCR_TIME_BASE, ts->mux_rate) +
-   ts->first_pcr;
-}
-
 static int write_pcr_bits(uint8_t *buf, int64_t pcr)
 {
 int64_t pcr_low = pcr % 300, pcr_high = pcr / 300;
@@ -737,6 +759,7 @@ static void mpegts_insert_null_packet(AVFormatContext *s)
 *q++ = 0xff;
 *q++ = 0x10;
 memset(q, 0x0FF, TS_PACKET_SIZE - (q - buf));
+mpegts_prefix_m2ts_header(s);
 avio_write(s->pb, buf, TS_PACKET_SIZE);
 }
 
@@ -762,6 +785,7 @@ static void mpegts_insert_pcr_only(AVFormatContext *s, 
AVStream *st)
 
 /* stuffing bytes */
 memset(q, 0xFF, TS_PACKET_SIZE - (q - buf));
+mpegts_prefix_m2ts_header(s);
 avio_write(s->pb, buf, TS_PACKET_SIZE);
 }
 
@@ -993,6 +1017,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream 
*st,
 memcpy(buf + TS_PACKET_SIZE - len, payload, len);
 payload  += len;
 payload_size -= len;
+mpegts_prefix_m2ts_header(s);
 avio_write(s->pb, buf, TS_PACKET_SIZE);
 }
 avio_flush(s->pb);
@@ -1206,6 +1231,9 @@ static const AVOption options[] = {
 { "mpegts_start_pid", "Set the first pid.",
   offsetof(MpegTSWrite, start_pid), AV_OPT_TYPE_INT,
   { .i64 = 0x0100 }, 0x0100, 0x0f00, AV_OPT_FLAG_ENCODING_PARAM },
+{"mpegts_m2ts_mode", "Enable m2ts mode.",
+  offsetof(MpegTSWrite, m2ts_mode), AV_OPT_TYPE_INT,
+  { .i64 = -1 }, -1, 1, AV_OPT_FLAG_ENCODING_PARAM},
 { "muxrate", NULL,
   offsetof(MpegTSWrite, mux_rate), AV_OPT_TYPE_INT,
   { .i64 = 1 }, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
@@ -1242,7 +1270,7 @@ AVOutputFormat ff_mpegts_muxer = {
 .name   = "mpegts",
 .long_name  = NULL_IF_CONFIG_SMALL("MPEG-TS (MPEG-2 Transport 
Stream)"),
 .mime_type  = "video/x-mpegts",
-.extensions = "ts,m2t",
+.extensions = "ts,m2t,m2ts",
 .priv_data_size = sizeof(MpegTSWrite),
 .audio_codec= AV_CODEC_ID_MP2,
 .video_codec= AV_CODEC_ID_MPEG2VIDEO,

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


[FFmpeg-cvslog] options_table: fix colorspace minimum option value

2014-12-02 Thread Jon Morley
ffmpeg | branch: master | Jon Morley  | Mon Nov 10 
10:43:42 2014 -0800| [26e20dfd06ac62da596a9549867f990f1200a04e] | committer: 
Vittorio Giovara

options_table: fix colorspace minimum option value

The min value for colorspace should be zero and not one since the first
valid index into the frame colorspace array is AVCOL_SPC_RGB which is 0.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=26e20dfd06ac62da596a9549867f990f1200a04e
---

 libavcodec/options_table.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 2cf82e6..91d7ff9 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -416,7 +416,7 @@ static const AVOption avcodec_options[] = {
 {"iec61966_2_1", "IEC 61966-2-1",0, AV_OPT_TYPE_CONST, {.i64 = 
AVCOL_TRC_IEC61966_2_1 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"},
 {"bt2020_10bit", "BT.2020 - 10 bit", 0, AV_OPT_TYPE_CONST, {.i64 = 
AVCOL_TRC_BT2020_10 },INT_MIN, INT_MAX, V|E|D, "color_trc_type"},
 {"bt2020_12bit", "BT.2020 - 12 bit", 0, AV_OPT_TYPE_CONST, {.i64 = 
AVCOL_TRC_BT2020_12 },INT_MIN, INT_MAX, V|E|D, "color_trc_type"},
-{"colorspace", "color space", OFFSET(colorspace), AV_OPT_TYPE_INT, {.i64 = 
AVCOL_SPC_UNSPECIFIED }, 1, AVCOL_SPC_NB-1, V|E|D, "colorspace_type"},
+{"colorspace", "color space", OFFSET(colorspace), AV_OPT_TYPE_INT, {.i64 = 
AVCOL_SPC_UNSPECIFIED }, 0, AVCOL_SPC_NB-1, V|E|D, "colorspace_type"},
 {"rgb", "RGB", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_RGB },  
   INT_MIN, INT_MAX, V|E|D, "colorspace_type"},
 {"bt709",   "BT.709",  0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_BT709 
},   INT_MIN, INT_MAX, V|E|D, "colorspace_type"},
 {"unspecified", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = 
AVCOL_SPC_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"},

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


[FFmpeg-cvslog] Merge commit '26e20dfd06ac62da596a9549867f990f1200a04e'

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  2 
22:34:06 2014 +0100| [fc469e5c7f4ab477af17bc11e32472a29cf050db] | committer: 
Michael Niedermayer

Merge commit '26e20dfd06ac62da596a9549867f990f1200a04e'

* commit '26e20dfd06ac62da596a9549867f990f1200a04e':
  options_table: fix colorspace minimum option value

See: 8c28a39c2c38fd9d13dc5247fca7bca8b3f2fcad
Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fc469e5c7f4ab477af17bc11e32472a29cf050db
---



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


[FFmpeg-cvslog] Merge commit '8f8caca2242e1fe05f37493cfabcd3f4de198550'

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  2 
22:39:01 2014 +0100| [d76adfae9cbcdfcfba6a11936feff22f9360dd49] | committer: 
Michael Niedermayer

Merge commit '8f8caca2242e1fe05f37493cfabcd3f4de198550'

* commit '8f8caca2242e1fe05f37493cfabcd3f4de198550':
  Add support for BDAV/m2ts-mode muxing

Conflicts:
libavformat/mpegtsenc.c

See: 09a858da7d5535e78e9cf942a468aec411ffbf19
Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d76adfae9cbcdfcfba6a11936feff22f9360dd49
---



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


[FFmpeg-cvslog] Merge commit '7319a47c7e7931ebf8f475cc2cffc7bcd333acee'

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  2 
22:53:22 2014 +0100| [b329460c5186d4520f1761211efa99fcf93cf538] | committer: 
Michael Niedermayer

Merge commit '7319a47c7e7931ebf8f475cc2cffc7bcd333acee'

* commit '7319a47c7e7931ebf8f475cc2cffc7bcd333acee':
  mpegtsenc: recognize .mts as MPEG Transport Stream

Conflicts:
libavformat/mpegtsenc.c

See: e2baaa21aabc7edb3c2275eac39ed1d40884b25a
Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b329460c5186d4520f1761211efa99fcf93cf538
---



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


[FFmpeg-cvslog] Merge commit '2e0935965b824bc641b7e0bafafcbb1e36027f79'

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue Dec  2 
22:55:14 2014 +0100| [ebc29e8625b0c3f9c39e2b1fb17a5eab2c939c49] | committer: 
Michael Niedermayer

Merge commit '2e0935965b824bc641b7e0bafafcbb1e36027f79'

* commit '2e0935965b824bc641b7e0bafafcbb1e36027f79':
  Drop the unofficial extension prefix for MPEG and MPEG-TS formats

See: fdcb2873e1c898cf26216f7e80d95d03387ba55b
Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ebc29e8625b0c3f9c39e2b1fb17a5eab2c939c49
---



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


[FFmpeg-cvslog] mpegtsenc: recognize .mts as MPEG Transport Stream

2014-12-02 Thread Jean-Baptiste Mardelle
ffmpeg | branch: master | Jean-Baptiste Mardelle  | Sat Nov 
29 17:53:46 2014 +0100| [7319a47c7e7931ebf8f475cc2cffc7bcd333acee] | committer: 
Vittorio Giovara

mpegtsenc: recognize .mts as MPEG Transport Stream

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7319a47c7e7931ebf8f475cc2cffc7bcd333acee
---

 libavformat/mpegtsenc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index e68ad1a..d49e6e2 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -1270,7 +1270,7 @@ AVOutputFormat ff_mpegts_muxer = {
 .name   = "mpegts",
 .long_name  = NULL_IF_CONFIG_SMALL("MPEG-TS (MPEG-2 Transport 
Stream)"),
 .mime_type  = "video/x-mpegts",
-.extensions = "ts,m2t,m2ts",
+.extensions = "ts,m2t,m2ts,mts",
 .priv_data_size = sizeof(MpegTSWrite),
 .audio_codec= AV_CODEC_ID_MP2,
 .video_codec= AV_CODEC_ID_MPEG2VIDEO,

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


[FFmpeg-cvslog] Drop the unofficial extension prefix for MPEG and MPEG-TS formats

2014-12-02 Thread Florent Le Coz
ffmpeg | branch: master | Florent Le Coz  | Sat Nov 
29 17:53:47 2014 +0100| [2e0935965b824bc641b7e0bafafcbb1e36027f79] | committer: 
Vittorio Giovara

Drop the unofficial extension prefix for MPEG and MPEG-TS formats

As per the RFCs:
http://tools.ietf.org/html/rfc3555#page-38
http://tools.ietf.org/html/rfc3003

CC: libav-sta...@libav.org

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2e0935965b824bc641b7e0bafafcbb1e36027f79
---

 libavformat/mp3enc.c|4 ++--
 libavformat/mpegtsenc.c |2 +-
 libavformat/rawenc.c|2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index bb96039..9cff9d3 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -435,7 +435,7 @@ static int mp3_write_trailer(struct AVFormatContext *s)
 AVOutputFormat ff_mp2_muxer = {
 .name  = "mp2",
 .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
-.mime_type = "audio/x-mpeg",
+.mime_type = "audio/mpeg",
 .extensions= "mp2,m2a,mpa",
 .audio_codec   = AV_CODEC_ID_MP2,
 .video_codec   = AV_CODEC_ID_NONE,
@@ -577,7 +577,7 @@ static int mp3_write_header(struct AVFormatContext *s)
 AVOutputFormat ff_mp3_muxer = {
 .name  = "mp3",
 .long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
-.mime_type = "audio/x-mpeg",
+.mime_type = "audio/mpeg",
 .extensions= "mp3",
 .priv_data_size= sizeof(MP3Context),
 .audio_codec   = AV_CODEC_ID_MP3,
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index d49e6e2..8fa1c3e 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -1269,7 +1269,7 @@ static const AVClass mpegts_muxer_class = {
 AVOutputFormat ff_mpegts_muxer = {
 .name   = "mpegts",
 .long_name  = NULL_IF_CONFIG_SMALL("MPEG-TS (MPEG-2 Transport 
Stream)"),
-.mime_type  = "video/x-mpegts",
+.mime_type  = "video/MP2T",
 .extensions = "ts,m2t,m2ts,mts",
 .priv_data_size = sizeof(MpegTSWrite),
 .audio_codec= AV_CODEC_ID_MP2,
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index eb50626..5d61646 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -222,7 +222,7 @@ AVOutputFormat ff_mlp_muxer = {
 AVOutputFormat ff_mpeg1video_muxer = {
 .name  = "mpeg1video",
 .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-1 video"),
-.mime_type = "video/x-mpeg",
+.mime_type = "video/mpeg",
 .extensions= "mpg,mpeg,m1v",
 .audio_codec   = AV_CODEC_ID_NONE,
 .video_codec   = AV_CODEC_ID_MPEG1VIDEO,

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


[FFmpeg-cvslog] Support muxing 4k AVC Intra in mov.

2014-12-02 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Tue Dec  2 
23:35:40 2014 +0100| [7a4be4315fd6c5e80cd24697d1a5b67c9a3cfcaf] | committer: 
Carl Eugen Hoyos

Support muxing 4k AVC Intra in mov.

Reported and tested by Rens Dijkshoorn, rens onlinemedia nl

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a4be4315fd6c5e80cd24697d1a5b67c9a3cfcaf
---

 libavformat/isom.h   |1 +
 libavformat/movenc.c |3 +++
 2 files changed, 4 insertions(+)

diff --git a/libavformat/isom.h b/libavformat/isom.h
index 074837f..e3160d0 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -246,6 +246,7 @@ void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id);
  (tag) == MKTAG('a', 'i', '1', '3') ||  \
  (tag) == MKTAG('a', 'i', '1', '5') ||  \
  (tag) == MKTAG('a', 'i', '1', '6') ||  \
+ (tag) == MKTAG('a', 'i', 'v', 'x') ||  \
  (tag) == MKTAG('A', 'V', 'i', 'n'))
 
 
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 6e51424..10e883c 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1278,6 +1278,9 @@ static int mov_get_h264_codec_tag(AVFormatContext *s, 
MOVTrack *track)
 else if (rate == 50) tag = MKTAG('a','i','1','5');
 else if (rate == 60) tag = MKTAG('a','i','1','6');
 }
+} else if (   track->enc->width == 4096 && track->enc->height == 2160
+   || track->enc->width == 3840 && track->enc->height == 2160) 
{
+tag = MKTAG('a','i','v','x');
 }
 }
 

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


[FFmpeg-cvslog] avdevice/decklink_common: fix heap corruption run time error

2014-12-02 Thread Jonathan Baecker
ffmpeg | branch: master | Jonathan Baecker  | Tue Dec  2 
20:10:41 2014 +0100| [5a57f389f45e9d6663746d7f060cccee7db04f16] | committer: 
Michael Niedermayer

avdevice/decklink_common: fix heap corruption run time error

Signed-off-by: Jonathan Baecker 
Reviewed-by: Ramiro Polla 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5a57f389f45e9d6663746d7f060cccee7db04f16
---

 libavdevice/decklink_common.cpp |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index 9a9e44b..6899bd2 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -69,9 +69,12 @@ static char *dup_wchar_to_utf8(wchar_t *w)
 }
 #define DECKLINK_STROLECHAR *
 #define DECKLINK_STRDUP dup_wchar_to_utf8
+#define DECKLINK_FREE(s) SysFreeString(s)
 #else
 #define DECKLINK_STRconst char *
 #define DECKLINK_STRDUP av_strdup
+/* free() is needed for a string returned by the DeckLink SDL. */
+#define DECKLINK_FREE(s) free((void *) s)
 #endif
 
 HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName)
@@ -81,8 +84,7 @@ HRESULT ff_decklink_get_display_name(IDeckLink *This, const 
char **displayName)
 if (hr != S_OK)
 return hr;
 *displayName = DECKLINK_STRDUP(tmpDisplayName);
-/* free() is needed for a string returned by the DeckLink SDL. */
-free((void *) tmpDisplayName);
+DECKLINK_FREE(tmpDisplayName);
 return hr;
 }
 

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


[FFmpeg-cvslog] ffmpeg: drop usage of coded_frame

2014-12-02 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed Dec  3 
03:06:43 2014 +0100| [242f1152bf906a4a3164a9a8e40bd52723bd5afe] | committer: 
Michael Niedermayer

ffmpeg: drop usage of coded_frame

It causes all kinds of problems and there is no code in the muxers that reads
this field

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=242f1152bf906a4a3164a9a8e40bd52723bd5afe
---

 ffmpeg.c |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index b44401f..eef774b 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1018,10 +1018,8 @@ static void do_video_out(AVFormatContext *s,
 /* raw pictures are written as AVPicture structure to
avoid any copies. We support temporarily the older
method. */
-mux_enc->coded_frame->interlaced_frame = in_picture->interlaced_frame;
-mux_enc->coded_frame->top_field_first  = in_picture->top_field_first;
-if (mux_enc->coded_frame->interlaced_frame)
-mux_enc->field_order = mux_enc->coded_frame->top_field_first ? 
AV_FIELD_TB:AV_FIELD_BT;
+if (in_picture->interlaced_frame)
+mux_enc->field_order = in_picture->top_field_first ? 
AV_FIELD_TB:AV_FIELD_BT;
 else
 mux_enc->field_order = AV_FIELD_PROGRESSIVE;
 pkt.data   = (uint8_t *)in_picture;

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