[FFmpeg-cvslog] avformat/matroskaenc: fix MAX_CUEPOINT_SIZE calculation

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat Aug  9 
04:49:09 2014 +0200| [64d029de41ed556b765df50c7080b06fd5a86417] | committer: 
Michael Niedermayer

avformat/matroskaenc: fix MAX_CUEPOINT_SIZE calculation

Fixes assertion failure
Fixes Ticket3822

as a side-effect this makes some mkv files a few bytes smaller

Signed-off-by: Michael Niedermayer 

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

 libavformat/matroskaenc.c |   15 ++-
 tests/ref/lavf/mkv|4 ++--
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index db7c2af..3ec8ef2 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -445,8 +445,21 @@ static int64_t mkv_write_cues(AVFormatContext *s, mkv_cues 
*cues, mkv_track *tra
 ebml_master cuepoint, track_positions;
 mkv_cuepoint *entry = &cues->entries[i];
 uint64_t pts = entry->pts;
+int ctp_nb = 0;
 
-cuepoint = start_ebml_master(pb, MATROSKA_ID_POINTENTRY, 
MAX_CUEPOINT_SIZE(num_tracks));
+// Calculate the number of entries, so we know the element size
+for (j = 0; j < num_tracks; j++)
+tracks[j].has_cue = 0;
+for (j = 0; j < cues->num_entries - i && entry[j].pts == pts; j++) {
+int tracknum = entry[j].stream_idx;
+av_assert0(tracknum>=0 && tracknumstreams[tracknum]->codec->codec_type != AVMEDIA_TYPE_SUBTITLE)
+continue;
+tracks[tracknum].has_cue = 1;
+ctp_nb ++;
+}
+
+cuepoint = start_ebml_master(pb, MATROSKA_ID_POINTENTRY, 
MAX_CUEPOINT_SIZE(ctp_nb));
 put_ebml_uint(pb, MATROSKA_ID_CUETIME, pts);
 
 // put all the entries from different tracks that have the exact same
diff --git a/tests/ref/lavf/mkv b/tests/ref/lavf/mkv
index 97c9864..edbfe60 100644
--- a/tests/ref/lavf/mkv
+++ b/tests/ref/lavf/mkv
@@ -1,5 +1,5 @@
-bda342503392d517955e1112def7b03a *./tests/data/lavf/lavf.mkv
-472671 ./tests/data/lavf/lavf.mkv
+bab98f5a04a9f7991fb960041c996478 *./tests/data/lavf/lavf.mkv
+472668 ./tests/data/lavf/lavf.mkv
 ./tests/data/lavf/lavf.mkv CRC=0xec6c3c68
 c93950920d4ee57eb3ff5ba0cf0c8b19 *./tests/data/lavf/lavf.mkv
 320412 ./tests/data/lavf/lavf.mkv

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


[FFmpeg-cvslog] avformat/movenc: write reel_name metadata to tmcd atom

2014-08-08 Thread Mark Reid
ffmpeg | branch: master | Mark Reid  | Fri Aug  8 10:37:06 
2014 -0700| [d6af706eee48cf8e1c545b3097b2bebcffa7ab1d] | committer: Michael 
Niedermayer

avformat/movenc: write reel_name metadata to tmcd atom

Signed-off-by: Michael Niedermayer 

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

 libavformat/movenc.c |   25 +++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 86dbe7f..6a38e89 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1340,12 +1340,23 @@ static int mov_write_rtp_tag(AVIOContext *pb, MOVTrack 
*track)
 return update_size(pb, pos);
 }
 
+static int mov_write_source_reference_tag(AVIOContext *pb, MOVTrack *track, 
const char *reel_name){
+int64_t pos = avio_tell(pb);
+avio_wb32(pb, 0);  /* size */
+ffio_wfourcc(pb, "name");  /* Data format */
+avio_wb16(pb, strlen(reel_name));  /* string size */
+avio_wb16(pb, track->language);/* langcode */
+avio_write(pb, reel_name, strlen(reel_name));  /* reel name */
+return update_size(pb,pos);
+}
+
 static int mov_write_tmcd_tag(AVIOContext *pb, MOVTrack *track)
 {
 int64_t pos = avio_tell(pb);
 #if 1
 int frame_duration = av_rescale(track->timescale, 
track->enc->time_base.num, track->enc->time_base.den);
 int nb_frames = 1.0/av_q2d(track->enc->time_base) + 0.5;
+AVDictionaryEntry *t = NULL;
 
 if (nb_frames > 255) {
 av_log(NULL, AV_LOG_ERROR, "fps %d is too large\n", nb_frames);
@@ -1361,8 +1372,15 @@ static int mov_write_tmcd_tag(AVIOContext *pb, MOVTrack 
*track)
 avio_wb32(pb, track->timescale);/* Timescale */
 avio_wb32(pb, frame_duration);  /* Frame duration */
 avio_w8(pb, nb_frames); /* Number of frames */
-avio_wb24(pb, 0);   /* Reserved */
-/* TODO: source reference string */
+avio_w8(pb, 0); /* Reserved */
+
+if (track->st)
+t = av_dict_get(track->st->metadata, "reel_name", NULL, 0);
+
+if (t && utf8len(t->value))
+mov_write_source_reference_tag(pb, track, t->value);
+else
+avio_wb16(pb, 0); /* zero size */
 #else
 
 avio_wb32(pb, 0); /* size */
@@ -3809,6 +3827,9 @@ static int mov_create_timecode_track(AVFormatContext *s, 
int index, int src_inde
 if (tc.flags & AV_TIMECODE_FLAG_DROPFRAME)
 track->timecode_flags |= MOV_TIMECODE_FLAG_DROPFRAME;
 
+/* set st to src_st for metadata access*/
+track->st = src_st;
+
 /* encode context: tmcd data stream */
 track->enc = avcodec_alloc_context3(NULL);
 track->enc->codec_type = AVMEDIA_TYPE_DATA;

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


[FFmpeg-cvslog] Autodetect jpeg-ls files.

2014-08-08 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Fri Aug  8 
21:19:29 2014 +0200| [4b63bcef907b410facfb337340fb81fe9f1e58f7] | committer: 
Carl Eugen Hoyos

Autodetect jpeg-ls files.

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

 libavformat/Makefile |1 +
 libavformat/allformats.c |1 +
 libavformat/img2dec.c|   10 ++
 libavformat/version.h|2 +-
 4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/libavformat/Makefile b/libavformat/Makefile
index 37f81ed..11d3e9c 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -192,6 +192,7 @@ OBJS-$(CONFIG_IMAGE_BMP_PIPE_DEMUXER) += img2dec.o 
img2.o
 OBJS-$(CONFIG_IMAGE_DPX_PIPE_DEMUXER) += img2dec.o img2.o
 OBJS-$(CONFIG_IMAGE_EXR_PIPE_DEMUXER) += img2dec.o img2.o
 OBJS-$(CONFIG_IMAGE_J2K_PIPE_DEMUXER) += img2dec.o img2.o
+OBJS-$(CONFIG_IMAGE_JPEGLS_PIPE_DEMUXER)  += img2dec.o img2.o
 OBJS-$(CONFIG_IMAGE_PICTOR_PIPE_DEMUXER)  += img2dec.o img2.o
 OBJS-$(CONFIG_IMAGE_PNG_PIPE_DEMUXER) += img2dec.o img2.o
 OBJS-$(CONFIG_IMAGE_SGI_PIPE_DEMUXER) += img2dec.o img2.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 32bd348..c3b9ba5 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -325,6 +325,7 @@ void av_register_all(void)
 REGISTER_DEMUXER (IMAGE_DPX_PIPE,image_dpx_pipe);
 REGISTER_DEMUXER (IMAGE_EXR_PIPE,image_exr_pipe);
 REGISTER_DEMUXER (IMAGE_J2K_PIPE,image_j2k_pipe);
+REGISTER_DEMUXER (IMAGE_JPEGLS_PIPE, image_jpegls_pipe);
 REGISTER_DEMUXER (IMAGE_PICTOR_PIPE, image_pictor_pipe);
 REGISTER_DEMUXER (IMAGE_PNG_PIPE,image_png_pipe);
 REGISTER_DEMUXER (IMAGE_SGI_PIPE,image_sgi_pipe);
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 272adac..b9a1bcf 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -609,6 +609,15 @@ static int j2k_probe(AVProbeData *p)
 return 0;
 }
 
+static int jpegls_probe(AVProbeData *p)
+{
+const uint8_t *b = p->buf;
+
+if (AV_RB32(b) == 0xffd8fff7)
+ return AVPROBE_SCORE_EXTENSION + 1;
+return 0;
+}
+
 static int pictor_probe(AVProbeData *p)
 {
 const uint8_t *b = p->buf;
@@ -690,6 +699,7 @@ IMAGEAUTO_DEMUXER(bmp, AV_CODEC_ID_BMP)
 IMAGEAUTO_DEMUXER(dpx, AV_CODEC_ID_DPX)
 IMAGEAUTO_DEMUXER(exr, AV_CODEC_ID_EXR)
 IMAGEAUTO_DEMUXER(j2k, AV_CODEC_ID_JPEG2000)
+IMAGEAUTO_DEMUXER(jpegls,  AV_CODEC_ID_JPEGLS)
 IMAGEAUTO_DEMUXER(pictor,  AV_CODEC_ID_PICTOR)
 IMAGEAUTO_DEMUXER(png, AV_CODEC_ID_PNG)
 IMAGEAUTO_DEMUXER(sgi, AV_CODEC_ID_SGI)
diff --git a/libavformat/version.h b/libavformat/version.h
index 4fbce9a..140848d 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
 
 #define LIBAVFORMAT_VERSION_MAJOR 55
 
-#define LIBAVFORMAT_VERSION_MINOR 54
+#define LIBAVFORMAT_VERSION_MINOR 55
 #define LIBAVFORMAT_VERSION_MICRO 100
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

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


[FFmpeg-cvslog] [ffmpeg-web] branch master updated. 2a4f40b web/olddownload: add FFmpeg 1.1.13

2014-08-08 Thread gitolite
The branch, master has been updated
   via  2a4f40b0208e623604e7d656b32bd35a6241fae7 (commit)
  from  017200dd6a71bfe9b81e8f69492336b4ad04efa2 (commit)


- Log -
commit 2a4f40b0208e623604e7d656b32bd35a6241fae7
Author: Michael Niedermayer 
AuthorDate: Fri Aug 8 23:56:57 2014 +0200
Commit: Michael Niedermayer 
CommitDate: Fri Aug 8 23:56:57 2014 +0200

web/olddownload: add FFmpeg 1.1.13

diff --git a/src/olddownload b/src/olddownload
index ade5665..0625f14 100644
--- a/src/olddownload
+++ b/src/olddownload
@@ -43,13 +43,13 @@ libpostproc52.  3.100
  
 
 
-  FFmpeg 1.1.12 "Fire Flower"
+  FFmpeg 1.1.13 "Fire Flower"
 
 
-  1.1.12 was released on 2014-06-26. It is the latest stable FFmpeg release
+  1.1.13 was released on 2014-08-08. It is the latest stable FFmpeg release
   from the 1.1 release branch, which was cut from master on 2013-01-06.
   Amongst lots of other changes, it includes all changes from
-  ffmpeg-mt, libav master of 2013-01-06, libav 9.13 as of 2014-06-25.
+  ffmpeg-mt, libav master of 2013-01-06, libav 9.14 as of 2014-08-08.
 
 It includes the following library versions:
 
@@ -66,15 +66,15 @@ libpostproc52.  2.100
 
 
   
-Download 
bzip2 tarball
-PGP 
signature
+Download 
bzip2 tarball
+PGP 
signature

   
-Download 
gzip tarball
-PGP 
signature
+Download 
gzip tarball
+PGP 
signature

   
-http://git.videolan.org/?p=ffmpeg.git;a=shortlog;h=n1.1.12";>Changelog
+http://git.videolan.org/?p=ffmpeg.git;a=shortlog;h=n1.1.13";>Changelog

  
 

---

Summary of changes:
 src/olddownload |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)


hooks/post-receive
-- 

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


[FFmpeg-cvslog] Tag n1.1.13 : FFmpeg 1.1.13 release

2014-08-08 Thread git
[ffmpeg] [branch: refs/tags/n1.1.13]
Tag:0a42c096844d92a34a63a95331f802d6ad5a5a4b
> http://git.videolan.org/gitweb.cgi/ffmpeg.git?a=tag;h=0a42c096844d92a34a63a95331f802d6ad5a5a4b

Tagger: Michael Niedermayer 
Date:   Fri Aug  8 23:52:05 2014 +0200

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


Re: [FFmpeg-cvslog] configure: Check if libwebp compilation will succeed.

2014-08-08 Thread Clément Bœsch
On Fri, Aug 08, 2014 at 09:05:20PM +, Carl Eugen Hoyos wrote:
> Clément Bœsch  pkh.me> writes:
> 
> > It's simpler, it's faster, it explicits the 
> > required version,
> 
> > and I can test it for you if you don't want to.
> 
> There is no need for another test:
> With your change, some working versions would fail 
> configure.

Non released version, so probably not a good idea to use them, and
probably not packaged.

0.2.0 is very old btw.

-- 
Clément B.


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


Re: [FFmpeg-cvslog] configure: Check if libwebp compilation will succeed.

2014-08-08 Thread Carl Eugen Hoyos
Clément Bœsch  pkh.me> writes:

> It's simpler, it's faster, it explicits the 
> required version,

> and I can test it for you if you don't want to.

There is no need for another test:
With your change, some working versions would fail 
configure.

Carl Eugen

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


Re: [FFmpeg-cvslog] configure: Check if libwebp compilation will succeed.

2014-08-08 Thread Clément Bœsch
On Fri, Aug 08, 2014 at 08:40:33PM +, Carl Eugen Hoyos wrote:
> Clément Bœsch  pkh.me> writes:
> 
> > enabled libwebp && require_pkg_config "libwebp >= 0.2.0"
> 
> Sorry, I honestly cannot understand why you want to 
> replace an exact check (that I tested) against one 
> that is (not even) an approximation and would at 
> least in theory break compilation for some users 
> without any benefit.
> Or do you mean I should just update the error 
> message to request at least 0.2.0?
> 

It's simpler, it's faster, it explicits the required version, and I can
test it for you if you don't want to.

[...]

-- 
Clément B.


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


[FFmpeg-cvslog] update for 1.1.13

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 22:45:52 2014 +0200| [41e859151543a25652b217f637ac62f55f7b256e] | committer: 
Michael Niedermayer

update for 1.1.13

Signed-off-by: Michael Niedermayer 

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

 RELEASE  |2 +-
 VERSION  |2 +-
 doc/Doxyfile |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/RELEASE b/RELEASE
index ccad953..9ea63db 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1 +1 @@
-1.1.12
+1.1.13
diff --git a/VERSION b/VERSION
index ccad953..9ea63db 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.1.12
+1.1.13
diff --git a/doc/Doxyfile b/doc/Doxyfile
index 8731640..ec41e77 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME   = FFmpeg
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER = 1.1.12
+PROJECT_NUMBER = 1.1.13
 
 # With the PROJECT_LOGO tag one can specify an logo or icon that is included
 # in the documentation. The maximum height of the logo should not exceed 55

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


Re: [FFmpeg-cvslog] configure: Check if libwebp compilation will succeed.

2014-08-08 Thread Carl Eugen Hoyos
Clément Bœsch  pkh.me> writes:

> enabled libwebp && require_pkg_config "libwebp >= 0.2.0"

Sorry, I honestly cannot understand why you want to 
replace an exact check (that I tested) against one 
that is (not even) an approximation and would at 
least in theory break compilation for some users 
without any benefit.
Or do you mean I should just update the error 
message to request at least 0.2.0?

Carl Eugen

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


[FFmpeg-cvslog] xvididct: Ensure that the scantable permutation is always set correctly

2014-08-08 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Fri Aug  8 
03:10:05 2014 -0700| [84d173d3de97c753234ab0c0b50551d51413d663] | committer: 
Diego Biurrun

xvididct: Ensure that the scantable permutation is always set correctly

This fixes cases where the scantable permuation would get overwritten by
the general idctdsp initialization.

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

 libavcodec/x86/idctdsp_init.c  |6 ++
 libavcodec/x86/xvididct_init.c |   15 ++-
 libavcodec/xvididct.c  |2 ++
 3 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/libavcodec/x86/idctdsp_init.c b/libavcodec/x86/idctdsp_init.c
index a0d681a..853c6a3 100644
--- a/libavcodec/x86/idctdsp_init.c
+++ b/libavcodec/x86/idctdsp_init.c
@@ -37,6 +37,8 @@ static const uint8_t simple_mmx_permutation[64] = {
 0x32, 0x3A, 0x36, 0x3B, 0x33, 0x3E, 0x37, 0x3F,
 };
 
+static const uint8_t idct_sse2_row_perm[8] = { 0, 4, 1, 5, 2, 6, 3, 7 };
+
 av_cold int ff_init_scantable_permutation_x86(uint8_t *idct_permutation,
   enum idct_permutation_type 
perm_type)
 {
@@ -47,6 +49,10 @@ av_cold int ff_init_scantable_permutation_x86(uint8_t 
*idct_permutation,
 for (i = 0; i < 64; i++)
 idct_permutation[i] = simple_mmx_permutation[i];
 return 1;
+case FF_IDCT_PERM_SSE2:
+for (i = 0; i < 64; i++)
+idct_permutation[i] = (i & 0x38) | idct_sse2_row_perm[i & 7];
+return 1;
 }
 
 return 0;
diff --git a/libavcodec/x86/xvididct_init.c b/libavcodec/x86/xvididct_init.c
index 3112fb5..d5d8ac9 100644
--- a/libavcodec/x86/xvididct_init.c
+++ b/libavcodec/x86/xvididct_init.c
@@ -25,17 +25,6 @@
 #include "idct_xvid.h"
 #include "idctdsp.h"
 
-static const uint8_t idct_sse2_row_perm[8] = { 0, 4, 1, 5, 2, 6, 3, 7 };
-
-static av_cold void init_scantable_permutation_sse2(uint8_t *idct_permutation,
-enum idct_permutation_type 
perm_type)
-{
-int i;
-
-for (i = 0; i < 64; i++)
-idct_permutation[i] = (i & 0x38) | idct_sse2_row_perm[i & 7];
-}
-
 av_cold void ff_xvididct_init_x86(IDCTDSPContext *c)
 {
 int cpu_flags = av_get_cpu_flags();
@@ -44,12 +33,14 @@ av_cold void ff_xvididct_init_x86(IDCTDSPContext *c)
 c->idct_put  = ff_idct_xvid_mmx_put;
 c->idct_add  = ff_idct_xvid_mmx_add;
 c->idct  = ff_idct_xvid_mmx;
+c->perm_type = FF_IDCT_PERM_NONE;
 }
 
 if (INLINE_MMXEXT(cpu_flags)) {
 c->idct_put  = ff_idct_xvid_mmxext_put;
 c->idct_add  = ff_idct_xvid_mmxext_add;
 c->idct  = ff_idct_xvid_mmxext;
+c->perm_type = FF_IDCT_PERM_NONE;
 }
 
 if (INLINE_SSE2(cpu_flags)) {
@@ -57,7 +48,5 @@ av_cold void ff_xvididct_init_x86(IDCTDSPContext *c)
 c->idct_add  = ff_idct_xvid_sse2_add;
 c->idct  = ff_idct_xvid_sse2;
 c->perm_type = FF_IDCT_PERM_SSE2;
-
-init_scantable_permutation_sse2(c->idct_permutation, c->perm_type);
 }
 }
diff --git a/libavcodec/xvididct.c b/libavcodec/xvididct.c
index 1453e51..7e8edc2 100644
--- a/libavcodec/xvididct.c
+++ b/libavcodec/xvididct.c
@@ -33,4 +33,6 @@ av_cold void ff_xvididct_init(IDCTDSPContext *c, 
AVCodecContext *avctx)
 
 if (ARCH_X86)
 ff_xvididct_init_x86(c);
+
+ff_init_scantable_permutation(c->idct_permutation, c->perm_type);
 }

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


[FFmpeg-cvslog] Merge commit '84d173d3de97c753234ab0c0b50551d51413d663'

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug  8 
22:00:29 2014 +0200| [0dcebb9f6345ecc7fa2f184c48cc5a21a3011b93] | committer: 
Michael Niedermayer

Merge commit '84d173d3de97c753234ab0c0b50551d51413d663'

* commit '84d173d3de97c753234ab0c0b50551d51413d663':
  xvididct: Ensure that the scantable permutation is always set correctly

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] idct: cosmetics: Drop one unnecessary if-block level

2014-08-08 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Thu Aug  7 
15:04:39 2014 -0700| [6f1960ab71b4f18551243ce22d01913108265233] | committer: 
Diego Biurrun

idct: cosmetics: Drop one unnecessary if-block level

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

 libavcodec/idctdsp.c |   32 +++-
 1 file changed, 15 insertions(+), 17 deletions(-)

diff --git a/libavcodec/idctdsp.c b/libavcodec/idctdsp.c
index 9dbeba1..6beb2b2 100644
--- a/libavcodec/idctdsp.c
+++ b/libavcodec/idctdsp.c
@@ -162,23 +162,21 @@ av_cold void ff_idctdsp_init(IDCTDSPContext *c, 
AVCodecContext *avctx)
 c->idct_add  = ff_simple_idct_add_10;
 c->idct  = ff_simple_idct_10;
 c->perm_type = FF_IDCT_PERM_NONE;
-} else {
-if (avctx->idct_algo == FF_IDCT_INT) {
-c->idct_put  = jref_idct_put;
-c->idct_add  = jref_idct_add;
-c->idct  = ff_j_rev_dct;
-c->perm_type = FF_IDCT_PERM_LIBMPEG2;
-} else if (avctx->idct_algo == FF_IDCT_FAAN) {
-c->idct_put  = ff_faanidct_put;
-c->idct_add  = ff_faanidct_add;
-c->idct  = ff_faanidct;
-c->perm_type = FF_IDCT_PERM_NONE;
-} else { // accurate/default
-c->idct_put  = ff_simple_idct_put_8;
-c->idct_add  = ff_simple_idct_add_8;
-c->idct  = ff_simple_idct_8;
-c->perm_type = FF_IDCT_PERM_NONE;
-}
+} else if (avctx->idct_algo == FF_IDCT_INT) {
+c->idct_put  = jref_idct_put;
+c->idct_add  = jref_idct_add;
+c->idct  = ff_j_rev_dct;
+c->perm_type = FF_IDCT_PERM_LIBMPEG2;
+} else if (avctx->idct_algo == FF_IDCT_FAAN) {
+c->idct_put  = ff_faanidct_put;
+c->idct_add  = ff_faanidct_add;
+c->idct  = ff_faanidct;
+c->perm_type = FF_IDCT_PERM_NONE;
+} else { // accurate/default
+c->idct_put  = ff_simple_idct_put_8;
+c->idct_add  = ff_simple_idct_add_8;
+c->idct  = ff_simple_idct_8;
+c->perm_type = FF_IDCT_PERM_NONE;
 }
 
 c->put_pixels_clamped= put_pixels_clamped_c;

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


[FFmpeg-cvslog] Merge commit '6f1960ab71b4f18551243ce22d01913108265233'

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug  8 
21:53:20 2014 +0200| [5ff2b33401ec0ac6a238d02e56100b7bce8afefe] | committer: 
Michael Niedermayer

Merge commit '6f1960ab71b4f18551243ce22d01913108265233'

* commit '6f1960ab71b4f18551243ce22d01913108265233':
  idct: cosmetics: Drop one unnecessary if-block level

Conflicts:
libavcodec/idctdsp.c

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] configure: Die if gas is unavailable under aarch64 as well as ARM

2014-08-08 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Wed Aug  6 
05:38:43 2014 -0700| [0026e356d044e72b6e743b234708b8b8af457ac0] | committer: 
Diego Biurrun

configure: Die if gas is unavailable under aarch64 as well as ARM

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

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

diff --git a/configure b/configure
index 26ea230..924fd46 100755
--- a/configure
+++ b/configure
@@ -3778,7 +3778,7 @@ EOF
 }
 
 if enabled asm; then
-enabled arm aarch64 && nogas=die
+enabled_any arm aarch64 && nogas=die
 enabled_all ppc altivec && nogas=warn
 
 if ! check_gas ; then

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


[FFmpeg-cvslog] Merge commit '444c73583d2848a542330c03949e1f933ac68f53'

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug  8 
21:38:32 2014 +0200| [eb2def0ff2c40033e871e7be8a37a53cd4ac45b8] | committer: 
Michael Niedermayer

Merge commit '444c73583d2848a542330c03949e1f933ac68f53'

* commit '444c73583d2848a542330c03949e1f933ac68f53':
  configure: Only run gas checks on ARM and PowerPC

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] configure: Only run gas checks on ARM and PowerPC

2014-08-08 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Wed Aug  6 
05:55:33 2014 -0700| [444c73583d2848a542330c03949e1f933ac68f53] | committer: 
Diego Biurrun

configure: Only run gas checks on ARM and PowerPC

Standalone GNU assembly is not used on x86.

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

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

diff --git a/configure b/configure
index 924fd46..c128b29 100755
--- a/configure
+++ b/configure
@@ -3777,7 +3777,7 @@ EOF
 return 0
 }
 
-if enabled asm; then
+if enabled_any arm aarch64 || enabled_all ppc altivec && enabled asm; then
 enabled_any arm aarch64 && nogas=die
 enabled_all ppc altivec && nogas=warn
 

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


[FFmpeg-cvslog] Merge commit '0026e356d044e72b6e743b234708b8b8af457ac0'

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug  8 
21:38:12 2014 +0200| [0472c5f8a1f1d267bad6c3418a1d071c4824f285] | committer: 
Michael Niedermayer

Merge commit '0026e356d044e72b6e743b234708b8b8af457ac0'

* commit '0026e356d044e72b6e743b234708b8b8af457ac0':
  configure: Die if gas is unavailable under aarch64 as well as ARM

Conflicts:
configure

Merged-by: Michael Niedermayer 

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



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


Re: [FFmpeg-cvslog] configure: Check if libwebp compilation will succeed.

2014-08-08 Thread Clément Bœsch
On Fri, Aug 08, 2014 at 05:05:00PM +, Carl Eugen Hoyos wrote:
> Clément Bœsch  pkh.me> writes:
> 
> > > + { check_code cc webp/encode.h "WebPPicture wp; wp.use_argb++" ||
> > > +   die "ERROR: libwebp too old."; }
> > 
> > ... ?
> > 
> > Why don't you just include the version check in the libwebp name?
> 
> I didn't find a version bump near the relevant commit.
> 

I suppose this is related to:

commit dd1081763c914914aedc36bc6d46a3a158e24777
Author: Pascal Massimino 
Date:   Wed Jul 18 21:58:53 2012 +

rename 'use_argb_input' to 'use_argb'

long name, and there's not really an 'output' equivalent

Change-Id: I9133ff734ae8d6572cb2f607211361f011fc0bc1

So...

[~/src/libwebp]☭ git checkout dd1081763c914914aedc36bc6d46a3a158e2477
[~/src/libwebp]☭ git describe
v0.1.3-606-gdd10817
[~/src/libwebp]☭ git tag
v0.1.2
v0.1.3
v0.1.99
v0.2.0
v0.2.0-rc1
v0.2.1
v0.3.0
v0.3.0-rc6
v0.3.0-rc7
v0.3.1
v0.3.1-rc1
v0.3.1-rc2
v0.4.0
v0.4.0-rc1
v0.4.1
v0.4.1-rc1

I suppose the next version is v0.1.99 but it sounds like a beta or something.
So I'd just pick 0.2.0.

Which basically translates to:

enabled libwebp   && require_pkg_config "libwebp >= 0.2.0" 
webp/encode.h WebPGetEncoderVersion

[...]

-- 
Clément B.


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


[FFmpeg-cvslog] mpeg: K&R formatting cosmetics

2014-08-08 Thread Luca Barbato
ffmpeg | branch: master | Luca Barbato  | Wed Aug  6 
05:01:15 2014 +0200| [e4c9e59a4547adaaa0ce9f25b0d0c5b91ae15472] | committer: 
Diego Biurrun

mpeg: K&R formatting cosmetics

Signed-off-by: Diego Biurrun 

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

 libavformat/mpegenc.c |  647 +
 1 file changed, 335 insertions(+), 312 deletions(-)

diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 13d5b03..d020c9d 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -26,7 +26,9 @@
 #include "libavutil/log.h"
 #include "libavutil/mathematics.h"
 #include "libavutil/opt.h"
+
 #include "libavcodec/put_bits.h"
+
 #include "avformat.h"
 #include "internal.h"
 #include "mpeg.h"
@@ -78,7 +80,7 @@ typedef struct {
 int is_dvd;
 int64_t last_scr; /* current system clock */
 
-double vcd_padding_bitrate; //FIXME floats
+double vcd_padding_bitrate; // FIXME floats
 int64_t vcd_padding_bytes_written;
 
 int preload;
@@ -89,8 +91,8 @@ extern AVOutputFormat ff_mpeg2dvd_muxer;
 extern AVOutputFormat ff_mpeg2svcd_muxer;
 extern AVOutputFormat ff_mpeg2vob_muxer;
 
-static int put_pack_header(AVFormatContext *ctx,
-   uint8_t *buf, int64_t timestamp)
+static int put_pack_header(AVFormatContext *ctx, uint8_t *buf,
+   int64_t timestamp)
 {
 MpegMuxContext *s = ctx->priv_data;
 PutBitContext pb;
@@ -98,21 +100,19 @@ static int put_pack_header(AVFormatContext *ctx,
 init_put_bits(&pb, buf, 128);
 
 put_bits32(&pb, PACK_START_CODE);
-if (s->is_mpeg2) {
+if (s->is_mpeg2)
 put_bits(&pb, 2, 0x1);
-} else {
+else
 put_bits(&pb, 4, 0x2);
-}
-put_bits(&pb, 3,  (uint32_t)((timestamp >> 30) & 0x07));
-put_bits(&pb, 1, 1);
+put_bits(&pb,  3, (uint32_t)((timestamp >> 30) & 0x07));
+put_bits(&pb,  1, 1);
 put_bits(&pb, 15, (uint32_t)((timestamp >> 15) & 0x7fff));
-put_bits(&pb, 1, 1);
-put_bits(&pb, 15, (uint32_t)((timestamp  ) & 0x7fff));
-put_bits(&pb, 1, 1);
-if (s->is_mpeg2) {
+put_bits(&pb,  1, 1);
+put_bits(&pb, 15, (uint32_t)((timestamp)   & 0x7fff));
+put_bits(&pb,  1, 1);
+if (s->is_mpeg2)
 /* clock extension */
 put_bits(&pb, 9, 0);
-}
 put_bits(&pb, 1, 1);
 put_bits(&pb, 22, s->mux_rate);
 put_bits(&pb, 1, 1);
@@ -125,7 +125,8 @@ static int put_pack_header(AVFormatContext *ctx,
 return put_bits_ptr(&pb) - pb.buf;
 }
 
-static int put_system_header(AVFormatContext *ctx, uint8_t *buf,int 
only_for_stream_id)
+static int put_system_header(AVFormatContext *ctx, uint8_t *buf,
+ int only_for_stream_id)
 {
 MpegMuxContext *s = ctx->priv_data;
 int size, i, private_stream_coded, id;
@@ -137,20 +138,22 @@ static int put_system_header(AVFormatContext *ctx, 
uint8_t *buf,int only_for_str
 put_bits(&pb, 16, 0);
 put_bits(&pb, 1, 1);
 
-put_bits(&pb, 22, s->mux_rate); /* maximum bit rate of the multiplexed 
stream */
+/* maximum bit rate of the multiplexed stream */
+put_bits(&pb, 22, s->mux_rate);
 put_bits(&pb, 1, 1); /* marker */
-if (s->is_vcd && only_for_stream_id==VIDEO_ID) {
-/* This header applies only to the video stream (see VCD standard p. 
IV-7)*/
+if (s->is_vcd && only_for_stream_id == VIDEO_ID) {
+/* This header applies only to the video stream
+ * (see VCD standard p. IV-7) */
 put_bits(&pb, 6, 0);
 } else
 put_bits(&pb, 6, s->audio_bound);
 
 if (s->is_vcd) {
-/* see VCD standard, p. IV-7*/
+/* see VCD standard, p. IV-7 */
 put_bits(&pb, 1, 0);
 put_bits(&pb, 1, 1);
 } else {
-put_bits(&pb, 1, 0); /* variable bitrate*/
+put_bits(&pb, 1, 0); /* variable bitrate */
 put_bits(&pb, 1, 0); /* non constrainted bit stream */
 }
 
@@ -166,7 +169,8 @@ static int put_system_header(AVFormatContext *ctx, uint8_t 
*buf,int only_for_str
 put_bits(&pb, 1, 1); /* marker */
 
 if (s->is_vcd && (only_for_stream_id & 0xe0) == AUDIO_ID) {
-/* This header applies only to the audio stream (see VCD standard p. 
IV-7)*/
+/* This header applies only to the audio stream
+ * (see VCD standard p. IV-7) */
 put_bits(&pb, 5, 0);
 } else
 put_bits(&pb, 5, s->video_bound);
@@ -178,25 +182,27 @@ static int put_system_header(AVFormatContext *ctx, 
uint8_t *buf,int only_for_str
 put_bits(&pb, 8, 0xff); /* reserved byte */
 
 /* DVD-Video Stream_bound entries
-id (0xB9) video, maximum P-STD for stream 0xE0. (P-STD_buffer_bound_scale 
= 1)
-id (0xB8) audio, maximum P-STD for any MPEG audio (0xC0 to 0xC7) streams. 
If there are none set to 4096 (32x128). (P-STD_buffer_bound_scale = 0)
-id (0xBD) private stream 1 (audio other than MPEG and subpictures). 
(P-STD_buffer_bou

[FFmpeg-cvslog] Merge commit '454697603e4efdfc04fadec40518d56c7dc1e5dd'

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug  8 
21:25:32 2014 +0200| [fd1e4d66f18372ad21de51bae223a2b699fed885] | committer: 
Michael Niedermayer

Merge commit '454697603e4efdfc04fadec40518d56c7dc1e5dd'

* commit '454697603e4efdfc04fadec40518d56c7dc1e5dd':
  mpegts: Use av_free() to free memory allocated by av_strdup()

Conflicts:
libavformat/mpegtsenc.c

See: 92deb28945a5f2b58908d383f183cfc1bc1d7fae
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit 'e4c9e59a4547adaaa0ce9f25b0d0c5b91ae15472'

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug  8 
21:31:54 2014 +0200| [a698efbc9df3c6e503f395f040f5170de3f5cb85] | committer: 
Michael Niedermayer

Merge commit 'e4c9e59a4547adaaa0ce9f25b0d0c5b91ae15472'

* commit 'e4c9e59a4547adaaa0ce9f25b0d0c5b91ae15472':
  mpeg: K&R formatting cosmetics

Conflicts:
libavformat/mpegenc.c

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] mpegts: Use av_free() to free memory allocated by av_strdup()

2014-08-08 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Fri Aug  8 
02:46:21 2014 -0700| [454697603e4efdfc04fadec40518d56c7dc1e5dd] | committer: 
Diego Biurrun

mpegts: Use av_free() to free memory allocated by av_strdup()

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

 libavformat/mpegtsenc.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 67bc7eb..457b2e7 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -434,9 +434,9 @@ static MpegTSService *mpegts_add_service(MpegTSWrite *ts, 
int sid,
 service->provider_name = av_strdup(provider_name);
 service->name  = av_strdup(name);
 if (!service->provider_name || !service->name) {
-free(service->provider_name);
-free(service->name);
-free(service);
+av_free(service->provider_name);
+av_free(service->name);
+av_free(service);
 return NULL;
 }
 dynarray_add(&ts->services, &ts->nb_services, service);

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


[FFmpeg-cvslog] avformat/matroskadec: Check avpriv_new_chapter() for failure

2014-08-08 Thread Justin Jacobs
ffmpeg | branch: master | Justin Jacobs  | Wed Aug  6 
20:04:38 2014 -0400| [87dc8b3af9135f0cfcdf3c0520e3f29e7b0d92c6] | committer: 
Michael Niedermayer

avformat/matroskadec: Check avpriv_new_chapter() for failure

Fixes null pointer dereference

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index dbec9ee..31ee456 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2161,8 +2161,10 @@ static int matroska_read_header(AVFormatContext *s)
(AVRational) { 1, 10 },
chapters[i].start, chapters[i].end,
chapters[i].title);
-av_dict_set(&chapters[i].chapter->metadata,
-"title", chapters[i].title, 0);
+if (chapters[i].chapter) {
+av_dict_set(&chapters[i].chapter->metadata,
+"title", chapters[i].title, 0);
+}
 max_start = chapters[i].start;
 }
 

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


[FFmpeg-cvslog] avfilter/dctdnoiz: remove forward declarations after previous commit

2014-08-08 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Fri Aug  8 19:46:49 
2014 +0200| [eb16a6d2294cb81d60fb592c4d4439522f0b21eb] | committer: Clément 
Bœsch

avfilter/dctdnoiz: remove forward declarations after previous commit

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

 libavfilter/vf_dctdnoiz.c |  170 +
 1 file changed, 78 insertions(+), 92 deletions(-)

diff --git a/libavfilter/vf_dctdnoiz.c b/libavfilter/vf_dctdnoiz.c
index d9fa39b..cbfbe53 100644
--- a/libavfilter/vf_dctdnoiz.c
+++ b/libavfilter/vf_dctdnoiz.c
@@ -396,19 +396,84 @@ static void filter_freq_expr_##bsize(DCTdnoizContext *s,
 DEF_FILTER_FREQ_FUNCS(8)
 DEF_FILTER_FREQ_FUNCS(16)
 
-// TODO: remove
-static void color_decorrelation_rgb(float **dst, int dst_linesize,
-const uint8_t *src, int src_linesize,
-int w, int h);
-static void color_correlation_rgb(uint8_t *dst, int dst_linesize,
-  float **src, int src_linesize,
-  int w, int h);
-static void color_decorrelation_bgr(float **dst, int dst_linesize,
-const uint8_t *src, int src_linesize,
-int w, int h);
-static void color_correlation_bgr(uint8_t *dst, int dst_linesize,
-  float **src, int src_linesize,
-  int w, int h);
+#define DCT3X3_0_0  0.5773502691896258f /*  1/sqrt(3) */
+#define DCT3X3_0_1  0.5773502691896258f /*  1/sqrt(3) */
+#define DCT3X3_0_2  0.5773502691896258f /*  1/sqrt(3) */
+#define DCT3X3_1_0  0.7071067811865475f /*  1/sqrt(2) */
+#define DCT3X3_1_2 -0.7071067811865475f /* -1/sqrt(2) */
+#define DCT3X3_2_0  0.4082482904638631f /*  1/sqrt(6) */
+#define DCT3X3_2_1 -0.8164965809277261f /* -2/sqrt(6) */
+#define DCT3X3_2_2  0.4082482904638631f /*  1/sqrt(6) */
+
+static av_always_inline void color_decorrelation(float **dst, int dst_linesize,
+ const uint8_t *src, int 
src_linesize,
+ int w, int h,
+ int r, int g, int b)
+{
+int x, y;
+float *dstp_r = dst[0];
+float *dstp_g = dst[1];
+float *dstp_b = dst[2];
+
+for (y = 0; y < h; y++) {
+const uint8_t *srcp = src;
+
+for (x = 0; x < w; x++) {
+dstp_r[x] = srcp[r] * DCT3X3_0_0 + srcp[g] * DCT3X3_0_1 + srcp[b] 
* DCT3X3_0_2;
+dstp_g[x] = srcp[r] * DCT3X3_1_0 +srcp[b] 
* DCT3X3_1_2;
+dstp_b[x] = srcp[r] * DCT3X3_2_0 + srcp[g] * DCT3X3_2_1 + srcp[b] 
* DCT3X3_2_2;
+srcp += 3;
+}
+src += src_linesize;
+dstp_r += dst_linesize;
+dstp_g += dst_linesize;
+dstp_b += dst_linesize;
+}
+}
+
+static av_always_inline void color_correlation(uint8_t *dst, int dst_linesize,
+   float **src, int src_linesize,
+   int w, int h,
+   int r, int g, int b)
+{
+int x, y;
+const float *src_r = src[0];
+const float *src_g = src[1];
+const float *src_b = src[2];
+
+for (y = 0; y < h; y++) {
+uint8_t *dstp = dst;
+
+for (x = 0; x < w; x++) {
+dstp[r] = av_clip_uint8(src_r[x] * DCT3X3_0_0 + src_g[x] * 
DCT3X3_1_0 + src_b[x] * DCT3X3_2_0);
+dstp[g] = av_clip_uint8(src_r[x] * DCT3X3_0_1 +
 src_b[x] * DCT3X3_2_1);
+dstp[b] = av_clip_uint8(src_r[x] * DCT3X3_0_2 + src_g[x] * 
DCT3X3_1_2 + src_b[x] * DCT3X3_2_2);
+dstp += 3;
+}
+dst += dst_linesize;
+src_r += src_linesize;
+src_g += src_linesize;
+src_b += src_linesize;
+}
+}
+
+#define DECLARE_COLOR_FUNCS(name, r, g, b) 
 \
+static void color_decorrelation_##name(float **dst, int dst_linesize,  
 \
+   const uint8_t *src, int src_linesize,   
 \
+   int w, int h)   
 \
+{  
 \
+color_decorrelation(dst, dst_linesize, src, src_linesize, w, h, r, g, b);  
 \
+}  
 \
+   
 \
+static void color_correlation_##name(uint8_t *dst, int dst_linesize,   
 \
+ float **src, int src_linesize,
 \
+ int w, int h) 
 \
+{

[FFmpeg-cvslog] avfilter/dctdnoiz: make color [de]correlation less clumsy

2014-08-08 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Fri Aug  8 19:44:40 
2014 +0200| [aaf82dc0fa47334718e56cfee00ccf08f232fbd0] | committer: Clément 
Bœsch

avfilter/dctdnoiz: make color [de]correlation less clumsy

This has no impact on overall performance, since the block DCT taking
most of the time anyway.

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

 libavfilter/vf_dctdnoiz.c |  105 ++---
 1 file changed, 79 insertions(+), 26 deletions(-)

diff --git a/libavfilter/vf_dctdnoiz.c b/libavfilter/vf_dctdnoiz.c
index 1e2d2b7..d9fa39b 100644
--- a/libavfilter/vf_dctdnoiz.c
+++ b/libavfilter/vf_dctdnoiz.c
@@ -31,7 +31,6 @@
 #include "libavutil/avassert.h"
 #include "libavutil/eval.h"
 #include "libavutil/opt.h"
-#include "drawutils.h"
 #include "internal.h"
 
 static const char *const var_names[] = { "c", NULL };
@@ -48,7 +47,6 @@ typedef struct DCTdnoizContext {
 int pr_width, pr_height;// width and height to process
 float sigma;// used when no expression are st
 float th;   // threshold (3*sigma)
-float color_dct[3][3];  // 3x3 DCT for color decorrelation
 float *cbuf[2][3];  // two planar rgb color buffers
 float *weights; // dct coeff are cumulated with overlapping; 
these values are used for averaging
 int p_linesize; // line sizes for color and weights
@@ -59,6 +57,12 @@ typedef struct DCTdnoizContext {
 void (*filter_freq_func)(struct DCTdnoizContext *s,
  const float *src, int src_linesize,
  float *dst, int dst_linesize);
+void (*color_decorrelation)(float **dst, int dst_linesize,
+const uint8_t *src, int src_linesize,
+int w, int h);
+void (*color_correlation)(uint8_t *dst, int dst_linesize,
+  float **src, int src_linesize,
+  int w, int h);
 } DCTdnoizContext;
 
 #define MIN_NBITS 3 /* blocksize = 1<<3 =  8 */
@@ -392,23 +396,39 @@ static void filter_freq_expr_##bsize(DCTdnoizContext *s,
 DEF_FILTER_FREQ_FUNCS(8)
 DEF_FILTER_FREQ_FUNCS(16)
 
+// TODO: remove
+static void color_decorrelation_rgb(float **dst, int dst_linesize,
+const uint8_t *src, int src_linesize,
+int w, int h);
+static void color_correlation_rgb(uint8_t *dst, int dst_linesize,
+  float **src, int src_linesize,
+  int w, int h);
+static void color_decorrelation_bgr(float **dst, int dst_linesize,
+const uint8_t *src, int src_linesize,
+int w, int h);
+static void color_correlation_bgr(uint8_t *dst, int dst_linesize,
+  float **src, int src_linesize,
+  int w, int h);
+
 static int config_input(AVFilterLink *inlink)
 {
 AVFilterContext *ctx = inlink->dst;
 DCTdnoizContext *s = ctx->priv;
 int i, x, y, bx, by, linesize, *iweights;
 const int bsize = 1 << s->n;
-const float dct_3x3[3][3] = {
-{ 1./sqrt(3),  1./sqrt(3),  1./sqrt(3) },
-{ 1./sqrt(2),   0, -1./sqrt(2) },
-{ 1./sqrt(6), -2./sqrt(6),  1./sqrt(6) },
-};
-uint8_t rgba_map[4];
 
-ff_fill_rgba_map(rgba_map, inlink->format);
-for (y = 0; y < 3; y++)
-for (x = 0; x < 3; x++)
-s->color_dct[y][x] = dct_3x3[rgba_map[y]][rgba_map[x]];
+switch (inlink->format) {
+case AV_PIX_FMT_BGR24:
+s->color_decorrelation = color_decorrelation_bgr;
+s->color_correlation   = color_correlation_bgr;
+break;
+case AV_PIX_FMT_RGB24:
+s->color_decorrelation = color_decorrelation_rgb;
+s->color_correlation   = color_correlation_rgb;
+break;
+default:
+av_assert0(0);
+}
 
 s->pr_width  = inlink->w - (inlink->w - bsize) % s->step;
 s->pr_height = inlink->h - (inlink->h - bsize) % s->step;
@@ -495,8 +515,19 @@ static int query_formats(AVFilterContext *ctx)
 return 0;
 }
 
-static void color_decorrelation(float dct3ch[3][3], float **dst, int 
dst_linesize,
-const uint8_t *src, int src_linesize, int w, 
int h)
+#define DCT3X3_0_0  0.5773502691896258f /*  1/sqrt(3) */
+#define DCT3X3_0_1  0.5773502691896258f /*  1/sqrt(3) */
+#define DCT3X3_0_2  0.5773502691896258f /*  1/sqrt(3) */
+#define DCT3X3_1_0  0.7071067811865475f /*  1/sqrt(2) */
+#define DCT3X3_1_2 -0.7071067811865475f /* -1/sqrt(2) */
+#define DCT3X3_2_0  0.4082482904638631f /*  1/sqrt(6) */
+#define DCT3X3_2_1 -0.8164965809277261f /* -2/sqrt(6) */
+#define DCT3X3_2_2  0.4082482904638631f /*  1/sqrt(6) */
+
+static av_always_inline void color_decorrelation(float **dst, int dst_linesize,
+

[FFmpeg-cvslog] avfilter/dctdnoiz: use 32-bit (float) operations instead of 64 (double) for DCTs

2014-08-08 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Fri Aug  8 19:59:15 
2014 +0200| [1ba7c6ead24f1485ad537cfdedb2a6cf5ca8e869] | committer: Clément 
Bœsch

avfilter/dctdnoiz: use 32-bit (float) operations instead of 64 (double) for DCTs

This makes the code about 1.5x faster without any noticeable difference
in the output.

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

 libavfilter/vf_dctdnoiz.c |  272 ++---
 1 file changed, 136 insertions(+), 136 deletions(-)

diff --git a/libavfilter/vf_dctdnoiz.c b/libavfilter/vf_dctdnoiz.c
index cbfbe53..83a38ed 100644
--- a/libavfilter/vf_dctdnoiz.c
+++ b/libavfilter/vf_dctdnoiz.c
@@ -102,20 +102,20 @@ static void av_always_inline fdct8_1d(float *dst, const 
float *src,
 const float x09 = x01 + x02;
 const float x0a = x00 - x03;
 const float x0b = x01 - x02;
-const float x0c = 1.38703984532215*x04 + 0.275899379282943*x07;
-const float x0d = 1.17587560241936*x05 + 0.785694958387102*x06;
-const float x0e = -0.785694958387102*x05 + 1.17587560241936*x06;
-const float x0f = 0.275899379282943*x04 - 1.38703984532215*x07;
-const float x10 = 0.353553390593274 * (x0c - x0d);
-const float x11 = 0.353553390593274 * (x0e - x0f);
-dst[0*dst_stridea] = 0.353553390593274 * (x08 + x09);
-dst[1*dst_stridea] = 0.353553390593274 * (x0c + x0d);
-dst[2*dst_stridea] = 0.461939766255643*x0a + 0.191341716182545*x0b;
-dst[3*dst_stridea] = 0.707106781186547 * (x10 - x11);
-dst[4*dst_stridea] = 0.353553390593274 * (x08 - x09);
-dst[5*dst_stridea] = 0.707106781186547 * (x10 + x11);
-dst[6*dst_stridea] = 0.191341716182545*x0a - 0.461939766255643*x0b;
-dst[7*dst_stridea] = 0.353553390593274 * (x0e + x0f);
+const float x0c = 1.38703984532215f*x04 + 0.275899379282943f*x07;
+const float x0d = 1.17587560241936f*x05 + 0.785694958387102f*x06;
+const float x0e = -0.785694958387102f*x05 + 1.17587560241936f*x06;
+const float x0f = 0.275899379282943f*x04 - 1.38703984532215f*x07;
+const float x10 = 0.353553390593274f * (x0c - x0d);
+const float x11 = 0.353553390593274f * (x0e - x0f);
+dst[0*dst_stridea] = 0.353553390593274f * (x08 + x09);
+dst[1*dst_stridea] = 0.353553390593274f * (x0c + x0d);
+dst[2*dst_stridea] = 0.461939766255643f*x0a + 0.191341716182545f*x0b;
+dst[3*dst_stridea] = 0.707106781186547f * (x10 - x11);
+dst[4*dst_stridea] = 0.353553390593274f * (x08 - x09);
+dst[5*dst_stridea] = 0.707106781186547f * (x10 + x11);
+dst[6*dst_stridea] = 0.191341716182545f*x0a - 0.461939766255643f*x0b;
+dst[7*dst_stridea] = 0.353553390593274f * (x0e + x0f);
 dst += dst_strideb;
 src += src_strideb;
 }
@@ -129,37 +129,37 @@ static void av_always_inline idct8_1d(float *dst, const 
float *src,
 int i;
 
 for (i = 0; i < 8; i++) {
-const float x00 = 1.4142135623731*src[0*src_stridea];
-const float x01 = 1.38703984532215*src[1*src_stridea] + 
0.275899379282943*src[7*src_stridea];
-const float x02 = 1.30656296487638*src[2*src_stridea] + 
0.541196100146197*src[6*src_stridea];
-const float x03 = 1.17587560241936*src[3*src_stridea] + 
0.785694958387102*src[5*src_stridea];
-const float x04 = 1.4142135623731*src[4*src_stridea];
-const float x05 = -0.785694958387102*src[3*src_stridea] + 
1.17587560241936*src[5*src_stridea];
-const float x06 = 0.541196100146197*src[2*src_stridea] - 
1.30656296487638*src[6*src_stridea];
-const float x07 = -0.275899379282943*src[1*src_stridea] + 
1.38703984532215*src[7*src_stridea];
+const float x00 =  1.4142135623731f  *src[0*src_stridea];
+const float x01 =  1.38703984532215f *src[1*src_stridea] + 
0.275899379282943f*src[7*src_stridea];
+const float x02 =  1.30656296487638f *src[2*src_stridea] + 
0.541196100146197f*src[6*src_stridea];
+const float x03 =  1.17587560241936f *src[3*src_stridea] + 
0.785694958387102f*src[5*src_stridea];
+const float x04 =  1.4142135623731f  *src[4*src_stridea];
+const float x05 = -0.785694958387102f*src[3*src_stridea] + 
1.17587560241936f*src[5*src_stridea];
+const float x06 =  0.541196100146197f*src[2*src_stridea] - 
1.30656296487638f*src[6*src_stridea];
+const float x07 = -0.275899379282943f*src[1*src_stridea] + 
1.38703984532215f*src[7*src_stridea];
 const float x09 = x00 + x04;
 const float x0a = x01 + x03;
-const float x0b = 1.4142135623731*x02;
+const float x0b = 1.4142135623731f*x02;
 const float x0c = x00 - x04;
 const float x0d = x01 - x03;
-const float x0e = 0.353553390593274 * (x09 - x0b);
-const float x0f = 0.353553390593274 * (x0c + x0d);
-const float x10 = 0.353553390593274 * (x0c - x0d);
-   

Re: [FFmpeg-cvslog] configure: Check if libwebp compilation will succeed.

2014-08-08 Thread Carl Eugen Hoyos
Clément Bœsch  pkh.me> writes:

> > + { check_code cc webp/encode.h "WebPPicture wp; wp.use_argb++" ||
> > +   die "ERROR: libwebp too old."; }
> 
> ... ?
> 
> Why don't you just include the version check in the libwebp name?

I didn't find a version bump near the relevant commit.

> What's "too old"?

Do you have a better suggestion?

Carl Eugen

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


[FFmpeg-cvslog] avfilter/showcqt: add and extend tlength and volume options

2014-08-08 Thread Muhammad Faiz
ffmpeg | branch: master | Muhammad Faiz  | Fri Aug  8 
21:58:35 2014 +0700| [94494dab910133106e80ece0f79935d78138e415] | committer: 
Michael Niedermayer

avfilter/showcqt: add and extend tlength and volume options

Add a tlength option with frequency and timeclamp variable

Add to the volume option support for frequency and timeclamp variable,
   a_weighting, b_weighting and c_weighting functions

Signed-off-by: Michael Niedermayer 

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

 doc/filters.texi  |   42 --
 libavfilter/avf_showcqt.c |   87 -
 2 files changed, 119 insertions(+), 10 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index f59926a..e0759fc 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -10515,8 +10515,34 @@ The filter accepts the following options:
 
 @table @option
 @item volume
-Specify the transform volume (multiplier). Acceptable value is [1.0, 100.0].
-Default value is @code{16.0}.
+Specify transform volume (multiplier) expression. The expression can contain
+variables:
+@table @option
+@item frequency, freq, f
+the frequency where transform is evaluated
+@item timeclamp, tc
+value of timeclamp option
+@end table
+and functions:
+@table @option
+@item a_weighting(f)
+A-weighting of equal loudness
+@item b_weighting(f)
+B-weighting of equal loudness
+@item c_weighting(f)
+C-weighting of equal loudness
+@end table
+Default value is @code{16}.
+
+@item tlength
+Specify transform length expression. The expression can contain variables:
+@table @option
+@item frequency, freq, f
+the frequency where transform is evaluated
+@item timeclamp, tc
+value of timeclamp option
+@end table
+Default value is @code{384/f*tc/(384/f+tc)}.
 
 @item timeclamp
 Specify the transform timeclamp. At low frequency, there is trade-off between
@@ -10587,6 +10613,18 @@ ffplay -f lavfi 
'aevalsrc=0.1*sin(2*PI*55*t)+0.1*sin(4*PI*55*t)+0.1*sin(6*PI*55*
  asplit[a][out1]; [a] showcqt=timeclamp=0.5 [out0]'
 @end example
 
+@item
+B-weighting of equal loudness
+@example
+volume=16*b_weighting(f)
+@end example
+
+@item
+Lower Q factor
+@example
+tlength=100/f*tc/(100/f+tc)
+@end example
+
 @end itemize
 
 @section showspectrum
diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
index 60e8129..012362b 100644
--- a/libavfilter/avf_showcqt.c
+++ b/libavfilter/avf_showcqt.c
@@ -26,6 +26,7 @@
 #include "libavutil/xga_font_data.h"
 #include "libavutil/qsort.h"
 #include "libavutil/time.h"
+#include "libavutil/eval.h"
 #include "avfilter.h"
 #include "internal.h"
 
@@ -49,6 +50,10 @@
 #define SPECTOGRAM_START (VIDEO_HEIGHT-SPECTOGRAM_HEIGHT)
 #define BASE_FREQ 20.051392800492
 #define COEFF_CLAMP 1.0e-4
+#define TLENGTH_MIN 0.001
+#define TLENGTH_DEFAULT "384/f*tc/(384/f+tc)"
+#define VOLUME_MIN 1e-10
+#define VOLUME_MAX 100.0
 
 typedef struct {
 FFTSample value;
@@ -75,7 +80,8 @@ typedef struct {
 int fft_bits;
 int req_fullfilled;
 int remaining_fill;
-double volume;
+char *tlength;
+char *volume;
 double timeclamp;   /* lower timeclamp, time-accurate, higher timeclamp, 
freq-accurate (at low freq)*/
 float coeffclamp;   /* lower coeffclamp, more precise, higher coeffclamp, 
faster */
 int fullhd; /* if true, output video is at full HD resolution, 
otherwise it will be halved */
@@ -88,7 +94,8 @@ typedef struct {
 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
 static const AVOption showcqt_options[] = {
-{ "volume", "set volume", OFFSET(volume), AV_OPT_TYPE_DOUBLE, { .dbl = 16 
}, 0.1, 100, FLAGS },
+{ "volume", "set volume", OFFSET(volume), AV_OPT_TYPE_STRING, { .str = 
"16" }, CHAR_MIN, CHAR_MAX, FLAGS },
+{ "tlength", "set transform length", OFFSET(tlength), AV_OPT_TYPE_STRING, 
{ .str = TLENGTH_DEFAULT }, CHAR_MIN, CHAR_MAX, FLAGS },
 { "timeclamp", "set timeclamp", OFFSET(timeclamp), AV_OPT_TYPE_DOUBLE, { 
.dbl = 0.17 }, 0.1, 1.0, FLAGS },
 { "coeffclamp", "set coeffclamp", OFFSET(coeffclamp), AV_OPT_TYPE_FLOAT, { 
.dbl = 1 }, 0.1, 10, FLAGS },
 { "gamma", "set gamma", OFFSET(gamma), AV_OPT_TYPE_FLOAT, { .dbl = 3 }, 1, 
7, FLAGS },
@@ -246,6 +253,28 @@ static void load_freetype_font(AVFilterContext *ctx)
 }
 #endif
 
+static double a_weighting(void *p, double f)
+{
+double ret = 12200.0*12200.0 * (f*f*f*f);
+ret /= (f*f + 20.6*20.6) * (f*f + 12200.0*12200.0) *
+   sqrt((f*f + 107.7*107.7) * (f*f + 737.9*737.9));
+return ret;
+}
+
+static double b_weighting(void *p, double f)
+{
+double ret = 12200.0*12200.0 * (f*f*f);
+ret /= (f*f + 20.6*20.6) * (f*f + 12200.0*12200.0) * sqrt(f*f + 
158.5*158.5);
+return ret;
+}
+
+static double c_weighting(void *p, double f)
+{
+double ret = 12200.0*12200.0 * (f*f);
+ret /= (f*f + 20.6*20.6) * (f*f + 12200.0*12200.0);
+return ret;
+}
+
 static inline int qsort_sparsecoef

[FFmpeg-cvslog] avformat/mov: Support reading Avid's metadata for DNXHD codec.

2014-08-08 Thread Marek Fort
ffmpeg | branch: master | Marek Fort  | Thu Aug  7 
14:27:19 2014 +0200| [d1e750cd512a49a080424379e1e03ec935277b39] | committer: 
Michael Niedermayer

avformat/mov: Support reading Avid's metadata for DNXHD codec.

The AALP atom is necessary to properly decode the alpha channel.
Needed for ticket #3707

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index ec554c6..b2ef482 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1007,7 +1007,10 @@ static int mov_read_jp2h(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 
 static int mov_read_avid(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 {
-return mov_read_extradata(c, pb, atom, AV_CODEC_ID_AVUI);
+int ret = mov_read_extradata(c, pb, atom, AV_CODEC_ID_AVUI);
+if(ret == 0)
+ret = mov_read_extradata(c, pb, atom, AV_CODEC_ID_DNXHD);
+return ret;
 }
 
 static int mov_read_targa_y216(MOVContext *c, AVIOContext *pb, MOVAtom atom)

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


Re: [FFmpeg-cvslog] configure: Check if libwebp compilation will succeed.

2014-08-08 Thread Clément Bœsch
On Fri, Aug 08, 2014 at 05:23:43PM +0200, Carl Eugen Hoyos wrote:
> ffmpeg | branch: master | Carl Eugen Hoyos  | Fri Aug  8 
> 16:06:10 2014 +0200| [e4d983e2db0e73e711ae63dc9495316e121ec3da] | committer: 
> Carl Eugen Hoyos
> 
> configure: Check if libwebp compilation will succeed.
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e4d983e2db0e73e711ae63dc9495316e121ec3da
> ---
> 
>  configure |4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index b6c7c79..65fdd15 100755
> --- a/configure
> +++ b/configure
> @@ -4810,7 +4810,9 @@ enabled libvpx&& {
>  enabled libvpx_vp9_decoder && { check_lib2 "vpx/vpx_decoder.h 
> vpx/vp8dx.h" "vpx_codec_vp9_dx" -lvpx || disable libvpx_vp9_decoder; }
>  enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h 
> vpx/vp8cx.h" "vpx_codec_vp9_cx VP9E_SET_SVC" -lvpx || disable 
> libvpx_vp9_encoder; } }
>  enabled libwavpack&& require libwavpack wavpack/wavpack.h 
> WavpackOpenFileOutput  -lwavpack
> -enabled libwebp   && require_pkg_config libwebp webp/encode.h 
> WebPGetEncoderVersion
> +enabled libwebp   && require_pkg_config libwebp webp/encode.h 
> WebPGetEncoderVersion &&
> + { check_code cc webp/encode.h "WebPPicture wp; 
> wp.use_argb++" ||
> +   die "ERROR: libwebp too old."; }

... ?

Why don't you just include the version check in the libwebp name? What's
"too old"?

[...]

-- 
Clément B.


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


[FFmpeg-cvslog] configure: Check if libwebp compilation will succeed.

2014-08-08 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Fri Aug  8 
16:06:10 2014 +0200| [e4d983e2db0e73e711ae63dc9495316e121ec3da] | committer: 
Carl Eugen Hoyos

configure: Check if libwebp compilation will succeed.

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

 configure |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index b6c7c79..65fdd15 100755
--- a/configure
+++ b/configure
@@ -4810,7 +4810,9 @@ enabled libvpx&& {
 enabled libvpx_vp9_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" 
"vpx_codec_vp9_dx" -lvpx || disable libvpx_vp9_decoder; }
 enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" 
"vpx_codec_vp9_cx VP9E_SET_SVC" -lvpx || disable libvpx_vp9_encoder; } }
 enabled libwavpack&& require libwavpack wavpack/wavpack.h 
WavpackOpenFileOutput  -lwavpack
-enabled libwebp   && require_pkg_config libwebp webp/encode.h 
WebPGetEncoderVersion
+enabled libwebp   && require_pkg_config libwebp webp/encode.h 
WebPGetEncoderVersion &&
+ { check_code cc webp/encode.h "WebPPicture wp; 
wp.use_argb++" ||
+   die "ERROR: libwebp too old."; }
 enabled libx264   && require libx264 x264.h x264_encoder_encode -lx264 
&&
  { check_cpp_condition x264.h "X264_BUILD >= 118" 
||
die "ERROR: libx264 must be installed and 
version must be >= 0.118."; }

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


[FFmpeg-cvslog] Autodetect webp files.

2014-08-08 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Fri Aug  8 
16:14:18 2014 +0200| [f73d75384f1d270eb12542940640d9bee50033e0] | committer: 
Carl Eugen Hoyos

Autodetect webp files.

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

 libavformat/Makefile |1 +
 libavformat/allformats.c |1 +
 libavformat/img2dec.c|   11 +++
 libavformat/version.h|2 +-
 4 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/libavformat/Makefile b/libavformat/Makefile
index a31f0be..37f81ed 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -197,6 +197,7 @@ OBJS-$(CONFIG_IMAGE_PNG_PIPE_DEMUXER) += img2dec.o 
img2.o
 OBJS-$(CONFIG_IMAGE_SGI_PIPE_DEMUXER) += img2dec.o img2.o
 OBJS-$(CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER) += img2dec.o img2.o
 OBJS-$(CONFIG_IMAGE_TIFF_PIPE_DEMUXER)+= img2dec.o img2.o
+OBJS-$(CONFIG_IMAGE_WEBP_PIPE_DEMUXER)+= img2dec.o img2.o
 OBJS-$(CONFIG_INGENIENT_DEMUXER) += ingenientdec.o rawdec.o
 OBJS-$(CONFIG_IPMOVIE_DEMUXER)   += ipmovie.o
 OBJS-$(CONFIG_IRCAM_DEMUXER) += ircamdec.o ircam.o pcm.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 5599bae..32bd348 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -330,6 +330,7 @@ void av_register_all(void)
 REGISTER_DEMUXER (IMAGE_SGI_PIPE,image_sgi_pipe);
 REGISTER_DEMUXER (IMAGE_SUNRAST_PIPE,image_sunrast_pipe);
 REGISTER_DEMUXER (IMAGE_TIFF_PIPE,   image_tiff_pipe);
+REGISTER_DEMUXER (IMAGE_WEBP_PIPE,   image_webp_pipe);
 
 
 /* protocols */
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 259f90b..272adac 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -658,6 +658,16 @@ static int tiff_probe(AVProbeData *p)
 return 0;
 }
 
+static int webp_probe(AVProbeData *p)
+{
+const uint8_t *b = p->buf;
+
+if (AV_RB32(b) == 0x52494646 &&
+AV_RB32(b + 8) == 0x57454250)
+return AVPROBE_SCORE_MAX - 1;
+return 0;
+}
+
 #define IMAGEAUTO_DEMUXER(imgname, codecid)\
 static const AVClass imgname ## _class = {\
 .class_name = AV_STRINGIFY(imgname) " demuxer",\
@@ -685,3 +695,4 @@ IMAGEAUTO_DEMUXER(png, AV_CODEC_ID_PNG)
 IMAGEAUTO_DEMUXER(sgi, AV_CODEC_ID_SGI)
 IMAGEAUTO_DEMUXER(sunrast, AV_CODEC_ID_SUNRAST)
 IMAGEAUTO_DEMUXER(tiff,AV_CODEC_ID_TIFF)
+IMAGEAUTO_DEMUXER(webp,AV_CODEC_ID_WEBP)
diff --git a/libavformat/version.h b/libavformat/version.h
index a10e14e..4fbce9a 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
 
 #define LIBAVFORMAT_VERSION_MAJOR 55
 
-#define LIBAVFORMAT_VERSION_MINOR 53
+#define LIBAVFORMAT_VERSION_MINOR 54
 #define LIBAVFORMAT_VERSION_MICRO 100
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

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


[FFmpeg-cvslog] avcodec/dvdsub_parser: Check buf_size before reading 32bit packet size

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Sat Aug 
 2 01:15:37 2014 +0200| [1298aa83180edeb49cf7e4038e5a5edfc245cf43] | committer: 
Michael Niedermayer

avcodec/dvdsub_parser: Check buf_size before reading 32bit packet size

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

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/dvdsub_parser.c b/libavcodec/dvdsub_parser.c
index 9a6457e..07ed4f7 100644
--- a/libavcodec/dvdsub_parser.c
+++ b/libavcodec/dvdsub_parser.c
@@ -45,8 +45,9 @@ static int dvdsub_parse(AVCodecParserContext *s,
 DVDSubParseContext *pc = s->priv_data;
 
 if (pc->packet_index == 0) {
-if (buf_size < 2)
+if (buf_size < 2 || AV_RB16(buf) && buf_size < 6) {
 return buf_size;
+}
 pc->packet_len = AV_RB16(buf);
 if (pc->packet_len == 0) /* HD-DVD subpicture packet */
 pc->packet_len = AV_RB32(buf+2);

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


[FFmpeg-cvslog] avcodec/dvdsub_parser: print message if packet is smaller than the packet size field

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Sat Aug 
 2 01:16:14 2014 +0200| [a04bb8d6e7f726040bb56f972b7b106f4ba86cae] | committer: 
Michael Niedermayer

avcodec/dvdsub_parser: print message if packet is smaller than the packet size 
field

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

Signed-off-by: Michael Niedermayer 

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

 libavcodec/dvdsub_parser.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/dvdsub_parser.c b/libavcodec/dvdsub_parser.c
index 07ed4f7..32a945e 100644
--- a/libavcodec/dvdsub_parser.c
+++ b/libavcodec/dvdsub_parser.c
@@ -46,6 +46,8 @@ static int dvdsub_parse(AVCodecParserContext *s,
 
 if (pc->packet_index == 0) {
 if (buf_size < 2 || AV_RB16(buf) && buf_size < 6) {
+if (buf_size)
+av_log(avctx, AV_LOG_DEBUG, "Parser input %d too small\n", 
buf_size);
 return buf_size;
 }
 pc->packet_len = AV_RB16(buf);

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


[FFmpeg-cvslog] avcodec/dvdsub_parser: never return 0 when the input isnt 0

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Sat Aug 
 2 00:27:23 2014 +0200| [e5fcc16a1fa7386e89277387f47f1b20b297304b] | committer: 
Michael Niedermayer

avcodec/dvdsub_parser: never return 0 when the input isnt 0

Fixes a infinite loop
Fixes Ticket3804

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

Signed-off-by: Michael Niedermayer 

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

 libavcodec/dvdsub_parser.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dvdsub_parser.c b/libavcodec/dvdsub_parser.c
index e50c339..9a6457e 100644
--- a/libavcodec/dvdsub_parser.c
+++ b/libavcodec/dvdsub_parser.c
@@ -46,7 +46,7 @@ static int dvdsub_parse(AVCodecParserContext *s,
 
 if (pc->packet_index == 0) {
 if (buf_size < 2)
-return 0;
+return buf_size;
 pc->packet_len = AV_RB16(buf);
 if (pc->packet_len == 0) /* HD-DVD subpicture packet */
 pc->packet_len = AV_RB32(buf+2);

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


[FFmpeg-cvslog] avformat/utils: do not wait for packets from discarded streams for genpts

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Sun Jul 
13 01:07:59 2014 +0200| [fe461238d33e3b1ea9a8fdd8925d0ac584474fb6] | committer: 
Michael Niedermayer

avformat/utils: do not wait for packets from discarded streams for genpts

Fixes long loop
Fixes Ticket3208

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

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 48882be..e42c1fc 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1532,7 +1532,8 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt)
 }
 
 /* read packet from packet buffer, if there is data */
-if (!(next_pkt->pts == AV_NOPTS_VALUE &&
+st = s->streams[next_pkt->stream_index];
+if (!(next_pkt->pts == AV_NOPTS_VALUE && st->discard < 
AVDISCARD_ALL &&
   next_pkt->dts != AV_NOPTS_VALUE && !eof)) {
 ret = read_from_packet_buffer(&s->packet_buffer,
&s->packet_buffer_end, pkt);

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


[FFmpeg-cvslog] error_concealment: avoid using the picture if not fully setup

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Wed Aug 
 6 18:19:57 2014 +0100| [52254067b312e78d30bbe79fc33dbdf995b22b4e] | committer: 
Anton Khirnov

error_concealment: avoid using the picture if not fully setup

Fixes state becoming inconsistent and a null pointer dereference.

CC: libav-sta...@libav.org
Bug-Id: CVE-2013-0860
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara 
Signed-off-by: Anton Khirnov 

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

 libavcodec/error_resilience.c |6 ++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index ae9ef68..73b69af 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -896,6 +896,12 @@ void ff_er_frame_end(MpegEncContext *s)
 return;
 };
 
+if (s->picture_structure == PICT_FRAME &&
+s->current_picture.f.linesize[0] != 
s->current_picture_ptr->f.linesize[0]) {
+av_log(s->avctx, AV_LOG_ERROR, "Error concealment not possible, frame 
not fully initialized\n");
+return;
+}
+
 if (s->current_picture.f.motion_val[0] == NULL) {
 av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n");
 

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


[FFmpeg-cvslog] Merge commit '52254067b312e78d30bbe79fc33dbdf995b22b4e' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 16:06:27 2014 +0200| [b65c290f7fecde65755cfb4ae1e452dcd0f07464] | committer: 
Michael Niedermayer

Merge commit '52254067b312e78d30bbe79fc33dbdf995b22b4e' into release/1.1

* commit '52254067b312e78d30bbe79fc33dbdf995b22b4e':
  error_concealment: avoid using the picture if not fully setup

Conflicts:
libavcodec/error_resilience.c

See: 68a0477bc0af026db971ddba22541029a9e8715b
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Update Changelog for v9.15

2014-08-08 Thread Reinhard Tartler
ffmpeg | branch: release/1.1 | Reinhard Tartler  | Wed Aug 
 6 20:07:33 2014 -0400| [ecda9b90eccc687202fe9fa20f7ca61d92d816b4] | committer: 
Reinhard Tartler

Update Changelog for v9.15

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

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

diff --git a/Changelog b/Changelog
index b23f5ef..96171c9 100644
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,23 @@
 Releases are sorted from youngest to oldest.
 
+version 9.15:
+- error_concealment: avoid using the picture if not fully setup (CVE-2013-0860)
+- svq1: do not modify the input packet
+- cdgraphics: do not return 0 from the decode function
+- cdgraphics: switch to bytestream2 (CVE-2013-3674)
+- huffyuvdec: check width size for yuv422p (CVE-2013-0848)
+- mmvideo: check horizontal coordinate too (CVE-2013-3672)
+- wmalosslessdec: fix mclms_coeffs* array size (CVE-2014-2098)
+- lavc: Check the image size before calling get_buffer (CVE-2011-3935)
+- huffyuv: Check and propagate function return values (CVE-2013-0868)
+- h264: prevent theoretical infinite loop in SEI parsing (CVE-2011-3946)
+- h264_sei: check SEI size
+- pgssubdec: Check RLE size before copying (CVE-2013-0852)
+- fate: Add dependencies for dct/fft/mdct/rdft tests
+- video4linux2: Avoid a floating point exception
+- vf_select: Drop a debug av_log with an unchecked double to enum conversion
+- eamad: use the bytestream2 API instead of AV_RL (CVE-2013-0851)
+
 version 9.14:
 - adpcm: Write the proper predictor in trellis mode in IMA QT
 - adpcm: Avoid reading out of bounds in the IMA QT trellis encoder

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


[FFmpeg-cvslog] Merge commit 'ecda9b90eccc687202fe9fa20f7ca61d92d816b4' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 16:08:16 2014 +0200| [b52952c6e96b7f1464a3829da9d9fec28ed262b3] | committer: 
Michael Niedermayer

Merge commit 'ecda9b90eccc687202fe9fa20f7ca61d92d816b4' into release/1.1

* commit 'ecda9b90eccc687202fe9fa20f7ca61d92d816b4':
  Update Changelog for v9.15

Conflicts:
Changelog

Not merged as the changelog doesnt apply 1:1 to FFmpeg

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit '80c268eaaee402695a74d14acf76063100692a99' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 15:47:30 2014 +0200| [06f7e87e15a6dd15a9fe0e1f0bfa9f72c8886475] | committer: 
Michael Niedermayer

Merge commit '80c268eaaee402695a74d14acf76063100692a99' into release/1.1

* commit '80c268eaaee402695a74d14acf76063100692a99':
  cdgraphics: do not return 0 from the decode function

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit 'af9b62654d5aa023a96906215365532d18541a09' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 15:48:57 2014 +0200| [e4b1cffadef2396746f29ed30fe340b33ab9fa82] | committer: 
Michael Niedermayer

Merge commit 'af9b62654d5aa023a96906215365532d18541a09' into release/1.1

* commit 'af9b62654d5aa023a96906215365532d18541a09':
  svq1: do not modify the input packet

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit '8cd67ddde46a42a33149e7d42a2ab47852ff2a83' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 15:45:19 2014 +0200| [420f63984b39dbc847295126ee2e701df068dd53] | committer: 
Michael Niedermayer

Merge commit '8cd67ddde46a42a33149e7d42a2ab47852ff2a83' into release/1.1

* commit '8cd67ddde46a42a33149e7d42a2ab47852ff2a83':
  cdgraphics: switch to bytestream2

Conflicts:
libavcodec/cdgraphics.c

See: ad002e1a13a8df934bd6cb2c84175a4780ab8942
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] svq1: do not modify the input packet

2014-08-08 Thread Anton Khirnov
ffmpeg | branch: release/1.1 | Anton Khirnov  | Sun Aug  3 
10:14:48 2014 +0200| [af9b62654d5aa023a96906215365532d18541a09] | committer: 
Anton Khirnov

svq1: do not modify the input packet

The input data must remain constant, make a copy instead. This is in
theory a performance hit, but since I failed to find any samples
using this feature, this should not matter in practice.

Also, check the size of the header, avoiding invalid reads on truncated
data.

CC:libav-sta...@libav.org
(cherry picked from commit 7b588bb691644e1b3c168b99accf74248a24e3cf)
Signed-off-by: Anton Khirnov 

Conflicts:
libavcodec/svq1dec.c

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

 libavcodec/svq1dec.c |   24 +++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 82f9301..75eb6b2 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -61,6 +61,10 @@ typedef struct SVQ1Context {
 DSPContext dsp;
 GetBitContext gb;
 AVFrame *cur, *prev;
+
+uint8_t *pkt_swapped;
+int pkt_swapped_allocated;
+
 int width;
 int height;
 int frame_code;
@@ -630,7 +634,24 @@ static int svq1_decode_frame(AVCodecContext *avctx, void 
*data,
 
 /* swap some header bytes (why?) */
 if (s->frame_code != 0x20) {
-uint32_t *src = (uint32_t *)(buf + 4);
+uint32_t *src;
+
+if (buf_size < 9 * 4) {
+av_log(avctx, AV_LOG_ERROR, "Input packet too small\n");
+return AVERROR_INVALIDDATA;
+}
+
+av_fast_malloc(s->pkt_swapped, &s->pkt_swapped_allocated,
+   buf_size);
+if (!s->pkt_swapped)
+return AVERROR(ENOMEM);
+
+memcpy(s->pkt_swapped, buf, buf_size);
+buf = s->pkt_swapped;
+init_get_bits(&s->gb, buf, buf_size * 8);
+skip_bits(&s->gb, 22);
+
+src = (uint32_t *)(s->pkt_swapped + 4);
 
 for (i = 0; i < 4; i++)
 src[i] = ((src[i] << 16) | (src[i] >> 16)) ^ src[7 - i];
@@ -803,6 +824,7 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx)
 avctx->release_buffer(avctx, s->prev);
 avcodec_free_frame(&s->cur);
 avcodec_free_frame(&s->prev);
+av_freep(&s->pkt_swapped);
 
 return 0;
 }

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


[FFmpeg-cvslog] cdgraphics: do not return 0 from the decode function

2014-08-08 Thread Anton Khirnov
ffmpeg | branch: release/1.1 | Anton Khirnov  | Wed Aug  6 
10:56:34 2014 +| [80c268eaaee402695a74d14acf76063100692a99] | committer: 
Anton Khirnov

cdgraphics: do not return 0 from the decode function

0 means no data consumed, so it can trigger an infinite loop in the
caller.

CC:libav-sta...@libav.org
(cherry picked from commit c7d9b473e28238d4a4ef1b7e8b42c1cca256da36)
Signed-off-by: Anton Khirnov 

Conflicts:
libavcodec/cdgraphics.c

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

 libavcodec/cdgraphics.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c
index 8dbcd42..9eb91b9 100644
--- a/libavcodec/cdgraphics.c
+++ b/libavcodec/cdgraphics.c
@@ -349,11 +349,10 @@ static int cdg_decode_frame(AVCodecContext *avctx,
 *got_frame = 1;
 } else {
 *got_frame = 0;
-buf_size   = 0;
 }
 
 *(AVFrame *) data = cc->frame;
-return buf_size;
+return avpkt->size;
 }
 
 static av_cold int cdg_decode_end(AVCodecContext *avctx)

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


[FFmpeg-cvslog] avcodec/svq1dec: Fix multiple bugs from "svq1: do not modify the input packet"

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Thu Aug 
 7 02:27:07 2014 +0200| [09e3fe79fc09459e62db73350909bda138792019] | committer: 
Michael Niedermayer

avcodec/svq1dec: Fix multiple bugs from "svq1: do not modify the input packet"

Add padding, clear size, use the correct pointer.

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

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 9aac8c7..d5f7581 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -639,7 +639,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, void 
*data,
 return AVERROR_INVALIDDATA;
 }
 
-av_fast_malloc(s->pkt_swapped, &s->pkt_swapped_allocated,
+av_fast_padded_malloc(&s->pkt_swapped, &s->pkt_swapped_allocated,
buf_size);
 if (!s->pkt_swapped)
 return AVERROR(ENOMEM);
@@ -826,6 +826,7 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx)
 avcodec_free_frame(&s->cur);
 avcodec_free_frame(&s->prev);
 av_freep(&s->pkt_swapped);
+s->pkt_swapped_allocated = 0;
 
 return 0;
 }

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


[FFmpeg-cvslog] cdgraphics: switch to bytestream2

2014-08-08 Thread Anton Khirnov
ffmpeg | branch: release/1.1 | Anton Khirnov  | Wed Aug  6 
10:46:50 2014 +| [8cd67ddde46a42a33149e7d42a2ab47852ff2a83] | committer: 
Anton Khirnov

cdgraphics: switch to bytestream2

Fixes possible invalid memory accesses on corrupted data.

CC:libav-sta...@libav.org
Bug-ID: CVE-2013-3674
(cherry picked from commit a1599f3f7ea8478d1f6a95e59e3bc6bc86d5f812)
Signed-off-by: Anton Khirnov 

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

 libavcodec/cdgraphics.c |   16 +++-
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c
index e4ed83b..8dbcd42 100644
--- a/libavcodec/cdgraphics.c
+++ b/libavcodec/cdgraphics.c
@@ -269,7 +269,7 @@ static void cdg_scroll(CDGraphicsContext *cc, uint8_t *data,
 static int cdg_decode_frame(AVCodecContext *avctx,
 void *data, int *got_frame, AVPacket *avpkt)
 {
-const uint8_t *buf = avpkt->data;
+GetByteContext gb;
 int buf_size   = avpkt->size;
 int ret;
 uint8_t command, inst;
@@ -277,10 +277,8 @@ static int cdg_decode_frame(AVCodecContext *avctx,
 AVFrame new_frame;
 CDGraphicsContext *cc = avctx->priv_data;
 
-if (buf_size < CDG_MINIMUM_PKT_SIZE) {
-av_log(avctx, AV_LOG_ERROR, "buffer too small for decoder\n");
-return AVERROR(EINVAL);
-}
+bytestream2_init(&gb, avpkt->data, avpkt->size);
+
 
 ret = avctx->reget_buffer(avctx, &cc->frame);
 if (ret) {
@@ -288,11 +286,11 @@ static int cdg_decode_frame(AVCodecContext *avctx,
 return ret;
 }
 
-command = bytestream_get_byte(&buf);
-inst= bytestream_get_byte(&buf);
+command = bytestream2_get_byte(&gb);
+inst= bytestream2_get_byte(&gb);
 inst&= CDG_MASK;
-buf += 2;  /// skipping 2 unneeded bytes
-bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE);
+bytestream2_skip(&gb, 2);
+bytestream2_get_buffer(&gb, cdg_data, sizeof(cdg_data));
 
 if ((command & CDG_MASK) == CDG_COMMAND) {
 switch (inst) {

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


[FFmpeg-cvslog] Merge commit 'c53effc41b9359261b17c8da3b7062369cafd686' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 15:19:40 2014 +0200| [91437631d76f8ba966c370df56795bf1cf2045ad] | committer: 
Michael Niedermayer

Merge commit 'c53effc41b9359261b17c8da3b7062369cafd686' into release/1.1

* commit 'c53effc41b9359261b17c8da3b7062369cafd686':
  huffyuvdec: check width size for yuv422p

Conflicts:
libavcodec/huffyuvdec.c

See: 6abb9a901fca27da14d4fffbb01948288b5da3ba
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] huffyuvdec: check width size for yuv422p

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Sun Aug 
 3 00:54:33 2014 +0100| [c53effc41b9359261b17c8da3b7062369cafd686] | committer: 
Anton Khirnov

huffyuvdec: check width size for yuv422p

Avoid out of array accesses.

CC: libav-sta...@libav.org
Bug-Id: CVE-2013-0848
Signed-off-by: Vittorio Giovara 
Signed-off-by: Anton Khirnov 
(cherry picked from commit a7153444df9040bf6ae103e0bbf6104b66f974cb)
Signed-off-by: Anton Khirnov 

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

 libavcodec/huffyuvdec.c |7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c
index f471b28..18e4c87 100644
--- a/libavcodec/huffyuvdec.c
+++ b/libavcodec/huffyuvdec.c
@@ -341,6 +341,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
 return AVERROR_INVALIDDATA;
 }
 
+if (s->predictor == MEDIAN && avctx->pix_fmt == AV_PIX_FMT_YUV422P &&
+avctx->width % 4) {
+av_log(avctx, AV_LOG_ERROR, "width must be multiple of 4 "
+   "for this combination of colorspace and predictor type.\n");
+return AVERROR_INVALIDDATA;
+}
+
 if ((ret = ff_huffyuv_alloc_temp(s)) < 0)
 return ret;
 

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


[FFmpeg-cvslog] mmvideo: check horizontal coordinate too

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Sun Aug 
 3 19:24:18 2014 +0100| [ede738880032db62b7dc5b3712f769d3826f5974] | committer: 
Anton Khirnov

mmvideo: check horizontal coordinate too

Fixes out of array accesses.

Bug-Id: CVE-2013-3672
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara 
Signed-off-by: Anton Khirnov 
(cherry picked from commit 70cd3b8e659c3522eea5c16a65d14b8658894a94)
Signed-off-by: Anton Khirnov 

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

 libavcodec/mmvideo.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
index 784b939..e1ae991 100644
--- a/libavcodec/mmvideo.c
+++ b/libavcodec/mmvideo.c
@@ -150,6 +150,8 @@ static int mm_decode_inter(MmContext * s, int half_horiz, 
int half_vert)
 int replace_array = bytestream2_get_byte(&s->gb);
 for(j=0; j<8; j++) {
 int replace = (replace_array >> (7-j)) & 1;
+if (x + half_horiz >= s->avctx->width)
+return AVERROR_INVALIDDATA;
 if (replace) {
 int color = bytestream2_get_byte(&data_ptr);
 s->frame.data[0][y*s->frame.linesize[0] + x] = color;

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


[FFmpeg-cvslog] Merge commit 'ede738880032db62b7dc5b3712f769d3826f5974' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 15:16:43 2014 +0200| [0d6ed2f13faf3b31ee5688c0def762506f39542b] | committer: 
Michael Niedermayer

Merge commit 'ede738880032db62b7dc5b3712f769d3826f5974' into release/1.1

* commit 'ede738880032db62b7dc5b3712f769d3826f5974':
  mmvideo: check horizontal coordinate too

See: See: 8d3c99e825317b7efda5fd12e69896b47c700303
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit '146b187113e3cc20c2a97c5f264da13e701ca247' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 14:45:18 2014 +0200| [02018a359e05ebca8ded672166b80dad47ab2de1] | committer: 
Michael Niedermayer

Merge commit '146b187113e3cc20c2a97c5f264da13e701ca247' into release/1.1

* commit '146b187113e3cc20c2a97c5f264da13e701ca247':
  lavc: Check the image size before calling get_buffer

Conflicts:
libavcodec/utils.c

See: 668494acd8b20f974c7722895d4a6a14c1005f1e
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] wmalosslessdec: fix mclms_coeffs* array size

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Feb 
 7 15:07:23 2014 +0100| [36d8914f1b94e4731d2fc67162902839c106e72e] | committer: 
Anton Khirnov

wmalosslessdec: fix mclms_coeffs* array size

Fixes corruption of context

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-sta...@libav.org
Bug-Id: CVE-2014-2098
Signed-off-by: Anton Khirnov 
(cherry picked from commit 849b9d34c7ef70b370c53e7af3940f51cbc07d0f)
Signed-off-by: Anton Khirnov 

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

 libavcodec/wmalosslessdec.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 747ac37..8060d27 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -127,8 +127,8 @@ typedef struct WmallDecodeCtx {
 
 int8_t  mclms_order;
 int8_t  mclms_scaling;
-int16_t mclms_coeffs[128];
-int16_t mclms_coeffs_cur[4];
+int16_t mclms_coeffs[WMALL_MAX_CHANNELS * WMALL_MAX_CHANNELS * 32];
+int16_t mclms_coeffs_cur[WMALL_MAX_CHANNELS * WMALL_MAX_CHANNELS];
 int16_t mclms_prevvalues[WMALL_MAX_CHANNELS * 2 * 32];
 int16_t mclms_updates[WMALL_MAX_CHANNELS * 2 * 32];
 int mclms_recent;

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


[FFmpeg-cvslog] Merge commit '36d8914f1b94e4731d2fc67162902839c106e72e' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 14:56:58 2014 +0200| [a88236f3d59c07183fff0c7f526bbc84cdd6fa51] | committer: 
Michael Niedermayer

Merge commit '36d8914f1b94e4731d2fc67162902839c106e72e' into release/1.1

* commit '36d8914f1b94e4731d2fc67162902839c106e72e':
  wmalosslessdec: fix mclms_coeffs* array size

See: ec9578d54d09b64bf112c2bf7a34b1ef3b93dbd3
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] lavc: Check the image size before calling get_buffer

2014-08-08 Thread Luca Barbato
ffmpeg | branch: release/1.1 | Luca Barbato  | Mon Aug  4 
14:15:45 2014 +0200| [146b187113e3cc20c2a97c5f264da13e701ca247] | committer: 
Luca Barbato

lavc: Check the image size before calling get_buffer

Bug-Id: CVE-2011-3935
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

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

 libavcodec/utils.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 19c8a99..42be645 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -465,6 +465,8 @@ int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
 {
 switch (avctx->codec_type) {
 case AVMEDIA_TYPE_VIDEO:
+if (av_image_check_size(avctx->width, avctx->height, 0, avctx))
+ return AVERROR_INVALIDDATA;
 frame->width   = avctx->width;
 frame->height  = avctx->height;
 frame->format  = avctx->pix_fmt;

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


[FFmpeg-cvslog] h264: prevent theoretical infinite loop in SEI parsing

2014-08-08 Thread Vittorio Giovara
ffmpeg | branch: release/1.1 | Vittorio Giovara  | 
Wed Jul 30 19:33:36 2014 +0100| [512354191328c559fcff56070dab897ee2a1b4c1] | 
committer: Vittorio Giovara

h264: prevent theoretical infinite loop in SEI parsing

Properly address CVE-2011-3946 and parse bitstream as described in the spec.

CC: libav-sta...@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

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

 libavcodec/h264_sei.c |   23 ++-
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
index 5995a8e..776ce57 100644
--- a/libavcodec/h264_sei.c
+++ b/libavcodec/h264_sei.c
@@ -165,17 +165,22 @@ int ff_h264_decode_sei(H264Context *h){
 MpegEncContext * const s = &h->s;
 
 while (get_bits_left(&s->gb) > 16) {
-int size, type;
+int type = 0;
+int size = 0;
+int last = 0;
 
-type=0;
-do{
-type+= show_bits(&s->gb, 8);
-}while(get_bits(&s->gb, 8) == 255);
+while (get_bits_left(&s->gb) >= 8 &&
+   (last = get_bits(&s->gb, 8)) == 255) {
+type += 255;
+}
+type += last;
 
-size=0;
-do{
-size+= show_bits(&s->gb, 8);
-}while(get_bits(&s->gb, 8) == 255);
+last = 0;
+while (get_bits_left(&s->gb) >= 8 &&
+   (last = get_bits(&s->gb, 8)) == 255) {
+size += 255;
+}
+size += last;
 
 if (size > get_bits_left(&s->gb) / 8) {
 av_log(s->avctx, AV_LOG_ERROR, "SEI type %d truncated at %d\n",

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


[FFmpeg-cvslog] Merge commit '43d676432740c6d5e5234ed343f13902909fd124' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 14:38:20 2014 +0200| [451bc8ee2fceaf9a3290ed5a6c65b6734ab51b8c] | committer: 
Michael Niedermayer

Merge commit '43d676432740c6d5e5234ed343f13902909fd124' into release/1.1

* commit '43d676432740c6d5e5234ed343f13902909fd124':
  huffyuv: Check and propagate function return values

Conflicts:
libavcodec/huffyuvdec.c

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] huffyuv: Check and propagate function return values

2014-08-08 Thread Diego Biurrun
ffmpeg | branch: release/1.1 | Diego Biurrun  | Sun Aug  3 
12:19:10 2014 -0700| [43d676432740c6d5e5234ed343f13902909fd124] | committer: 
Diego Biurrun

huffyuv: Check and propagate function return values

Bug-Id: CVE-2013-0868

inspired by a patch from Michael Niedermayer 
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

(cherry picked from commit 744b406ff3474e77543bcf86125a2f7bc7deaa18)
Signed-off-by: Diego Biurrun 

Conflicts:
libavcodec/huffyuvdec.c

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

 libavcodec/huffyuvdec.c |  106 +++
 1 file changed, 61 insertions(+), 45 deletions(-)

diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c
index 0946d3d..f471b28 100644
--- a/libavcodec/huffyuvdec.c
+++ b/libavcodec/huffyuvdec.c
@@ -105,11 +105,13 @@ static int read_len_table(uint8_t *dst, GetBitContext *gb)
 return 0;
 }
 
-static void generate_joint_tables(HYuvContext *s)
+static int generate_joint_tables(HYuvContext *s)
 {
 uint16_t symbols[1 << VLC_BITS];
 uint16_t bits[1 << VLC_BITS];
 uint8_t len[1 << VLC_BITS];
+int ret;
+
 if (s->bitstream_bpp < 24) {
 int p, i, y, u;
 for (p = 0; p < 3; p++) {
@@ -130,8 +132,9 @@ static void generate_joint_tables(HYuvContext *s)
 }
 }
 ff_free_vlc(&s->vlc[3 + p]);
-ff_init_vlc_sparse(&s->vlc[3 + p], VLC_BITS, i, len, 1, 1,
-   bits, 2, 2, symbols, 2, 2, 0);
+if ((ret = ff_init_vlc_sparse(&s->vlc[3 + p], VLC_BITS, i, len, 1, 
1,
+  bits, 2, 2, symbols, 2, 2, 0)) < 0)
+return ret;
 }
 } else {
 uint8_t (*map)[4] = (uint8_t(*)[4])s->pix_bgr_map;
@@ -172,29 +175,34 @@ static void generate_joint_tables(HYuvContext *s)
 }
 }
 ff_free_vlc(&s->vlc[3]);
-init_vlc(&s->vlc[3], VLC_BITS, i, len, 1, 1, bits, 2, 2, 0);
+if ((ret = init_vlc(&s->vlc[3], VLC_BITS, i, len, 1, 1,
+bits, 2, 2, 0)) < 0)
+return ret;
 }
+return 0;
 }
 
 static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length)
 {
 GetBitContext gb;
-int i;
+int i, ret;
 
-init_get_bits(&gb, src, length * 8);
+if ((ret = init_get_bits(&gb, src, length * 8)) < 0)
+return ret;
 
 for (i = 0; i < 3; i++) {
-if (read_len_table(s->len[i], &gb) < 0)
-return -1;
-if (ff_huffyuv_generate_bits_table(s->bits[i], s->len[i]) < 0) {
-return -1;
-}
+if ((ret = read_len_table(s->len[i], &gb)) < 0)
+return ret;
+if ((ret = ff_huffyuv_generate_bits_table(s->bits[i], s->len[i])) < 0)
+return ret;
 ff_free_vlc(&s->vlc[i]);
-init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
- s->bits[i], 4, 4, 0);
+if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
+s->bits[i], 4, 4, 0)) < 0)
+return ret;
 }
 
-generate_joint_tables(s);
+if ((ret = generate_joint_tables(s)) < 0)
+return ret;
 
 return (get_bits_count(&gb) + 7) / 8;
 }
@@ -202,17 +210,19 @@ static int read_huffman_tables(HYuvContext *s, const 
uint8_t *src, int length)
 static int read_old_huffman_tables(HYuvContext *s)
 {
 GetBitContext gb;
-int i;
+int i, ret;
 
-init_get_bits(&gb, classic_shift_luma,
-  classic_shift_luma_table_size * 8);
-if (read_len_table(s->len[0], &gb) < 0)
-return -1;
+if ((ret = init_get_bits(&gb, classic_shift_luma,
+ classic_shift_luma_table_size * 8)) < 0)
+return ret;
+if ((ret = read_len_table(s->len[0], &gb)) < 0)
+return ret;
 
-init_get_bits(&gb, classic_shift_chroma,
-  classic_shift_chroma_table_size * 8);
-if (read_len_table(s->len[1], &gb) < 0)
-return -1;
+if ((ret = init_get_bits(&gb, classic_shift_chroma,
+ classic_shift_chroma_table_size * 8)) < 0)
+return ret;
+if ((ret = read_len_table(s->len[1], &gb)) < 0)
+return ret;
 
 for(i=0; i<256; i++) s->bits[0][i] = classic_add_luma  [i];
 for(i=0; i<256; i++) s->bits[1][i] = classic_add_chroma[i];
@@ -226,11 +236,13 @@ static int read_old_huffman_tables(HYuvContext *s)
 
 for (i = 0; i < 3; i++) {
 ff_free_vlc(&s->vlc[i]);
-init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
- s->bits[i], 4, 4, 0);
+if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
+s->bits[i], 4, 4, 0)) < 0)
+return ret;
 }
 
-generate_joint_tables(s);
+if ((ret = generate_joint_tables(s)) < 0)
+return ret;
 
 return 0;
 }
@@ -238,6 +250,7 @@ static int r

[FFmpeg-cvslog] Merge commit '512354191328c559fcff56070dab897ee2a1b4c1' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 14:33:02 2014 +0200| [ae7ea2eabf35a28be592b45719e7bd4f7ca4b622] | committer: 
Michael Niedermayer

Merge commit '512354191328c559fcff56070dab897ee2a1b4c1' into release/1.1

* commit '512354191328c559fcff56070dab897ee2a1b4c1':
  h264: prevent theoretical infinite loop in SEI parsing

Conflicts:
libavcodec/h264_sei.c

See: 9decfc17bb76da34734296048d390b176abf404c
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit '01f9540320279954b2764645ab7136847d53d89f' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 14:24:54 2014 +0200| [0bcf514198bfcb5ae99744bd82842ae37a5a55ad] | committer: 
Michael Niedermayer

Merge commit '01f9540320279954b2764645ab7136847d53d89f' into release/1.1

* commit '01f9540320279954b2764645ab7136847d53d89f':
  h264_sei: check SEI size

Conflicts:
libavcodec/h264_sei.c

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] h264_sei: check SEI size

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Thu Sep 
19 16:26:25 2013 +0200| [01f9540320279954b2764645ab7136847d53d89f] | committer: 
Vittorio Giovara

h264_sei: check SEI size

Signed-off-by: Anton Khirnov 
Signed-off-by: Vittorio Giovara 

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

 libavcodec/h264_sei.c |6 ++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
index 2e5fb65..5995a8e 100644
--- a/libavcodec/h264_sei.c
+++ b/libavcodec/h264_sei.c
@@ -177,6 +177,12 @@ int ff_h264_decode_sei(H264Context *h){
 size+= show_bits(&s->gb, 8);
 }while(get_bits(&s->gb, 8) == 255);
 
+if (size > get_bits_left(&s->gb) / 8) {
+av_log(s->avctx, AV_LOG_ERROR, "SEI type %d truncated at %d\n",
+   type, get_bits_left(&s->gb));
+return AVERROR_INVALIDDATA;
+}
+
 switch(type){
 case SEI_TYPE_PIC_TIMING: // Picture timing SEI
 if(decode_picture_timing(h) < 0)

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


[FFmpeg-cvslog] Merge commit '00915d3cd2ce61db3d6dc11f63566630a9aff4ec' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 14:19:24 2014 +0200| [1ee5e2ce3d6d28d0e2999afe073bc00ddb96c171] | committer: 
Michael Niedermayer

Merge commit '00915d3cd2ce61db3d6dc11f63566630a9aff4ec' into release/1.1

* commit '00915d3cd2ce61db3d6dc11f63566630a9aff4ec':
  pgssubdec: Check RLE size before copying

See: c0d68be555f5858703383040e04fcd6529777061
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] pgssubdec: Check RLE size before copying

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Wed Jul 
30 21:31:19 2014 -0400| [00915d3cd2ce61db3d6dc11f63566630a9aff4ec] | committer: 
Diego Biurrun

pgssubdec: Check RLE size before copying

Make sure the buffer size does not exceed the expected
RLE size.

Prevent an out of array bound write.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
Bug-Id: CVE-2013-0852

Signed-off-by: Luca Barbato 
(cherry picked from commit a1f7844a11010d8552c75424d1a831b37a0ae5d9)
Signed-off-by: Diego Biurrun 

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

 libavcodec/pgssubdec.c |7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c
index f22088a..a462978 100644
--- a/libavcodec/pgssubdec.c
+++ b/libavcodec/pgssubdec.c
@@ -194,6 +194,13 @@ static int parse_picture_segment(AVCodecContext *avctx,
 /* Decode rle bitmap length, stored size includes width/height data */
 rle_bitmap_len = bytestream_get_be24(&buf) - 2*2;
 
+if (buf_size > rle_bitmap_len) {
+av_log(avctx, AV_LOG_ERROR,
+   "Buffer dimension %d larger than the expected RLE data %d\n",
+   buf_size, rle_bitmap_len);
+return AVERROR_INVALIDDATA;
+}
+
 /* Get bitmap dimensions from data */
 width  = bytestream_get_be16(&buf);
 height = bytestream_get_be16(&buf);

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


[FFmpeg-cvslog] video4linux2: Avoid a floating point exception

2014-08-08 Thread Bernhard Übelacker
ffmpeg | branch: release/1.1 | Bernhard Übelacker  | Sun 
Jul 27 08:38:59 2014 -0700| [d16515ae5fe7daa6327d903cafb9a5ee43477b1e] | 
committer: Diego Biurrun

video4linux2: Avoid a floating point exception

This avoids a segfault in avconv_opt.c:opt_target when trying to
determine the norm.

(cherry picked from commit dc71f1958846bb1d96de43a4603983dc8450cfcc)
Signed-off-by: Diego Biurrun 

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

 avconv_opt.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/avconv_opt.c b/avconv_opt.c
index d6a6f8f..17ec0d9 100644
--- a/avconv_opt.c
+++ b/avconv_opt.c
@@ -1520,7 +1520,8 @@ static int opt_target(void *optctx, const char *opt, 
const char *arg)
 for (j = 0; j < nb_input_files; j++) {
 for (i = 0; i < input_files[j]->nb_streams; i++) {
 AVCodecContext *c = input_files[j]->ctx->streams[i]->codec;
-if (c->codec_type != AVMEDIA_TYPE_VIDEO)
+if (c->codec_type != AVMEDIA_TYPE_VIDEO ||
+!c->time_base.num)
 continue;
 fr = c->time_base.den * 1000 / c->time_base.num;
 if (fr == 25000) {

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


[FFmpeg-cvslog] fate: Add dependencies for dct/fft/mdct/rdft tests

2014-08-08 Thread Diego Biurrun
ffmpeg | branch: release/1.1 | Diego Biurrun  | Wed Jun 25 
17:09:13 2014 -0700| [58d7b835e3cec48ab5a2393405fe82dee72c06a0] | committer: 
Diego Biurrun

fate: Add dependencies for dct/fft/mdct/rdft tests

(cherry picked from commit d396987c303bdc4eea7d1a1ff6776475d9bbd9ea)
Signed-off-by: Diego Biurrun 

Conflicts:
libavcodec/fft-test.c

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

 libavcodec/fft-test.c |   22 ++
 tests/fate/fft.mak|   32 
 2 files changed, 38 insertions(+), 16 deletions(-)

diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c
index 1e46750..74b4b6f 100644
--- a/libavcodec/fft-test.c
+++ b/libavcodec/fft-test.c
@@ -112,6 +112,7 @@ static void fft_ref(FFTComplex *tabr, FFTComplex *tab, int 
nbits)
 }
 }
 
+#if CONFIG_MDCT
 static void imdct_ref(FFTSample *out, FFTSample *in, int nbits)
 {
 int n = 1> 1;
 if (do_inverse) {
@@ -406,6 +419,8 @@ int main(int argc, char **argv)
 err = check_diff((float *)tab_ref, (float *)tab2, fft_size, 1.0);
 }
 break;
+#endif /* CONFIG_RDFT */
+#if CONFIG_DCT
 case TRANSFORM_DCT:
 memcpy(tab, tab1, fft_size * sizeof(FFTComplex));
 d->dct_calc(d, tab);
@@ -416,6 +431,7 @@ int main(int argc, char **argv)
 }
 err = check_diff((float *)tab_ref, (float *)tab, fft_size, 1.0);
 break;
+#endif /* CONFIG_DCT */
 #endif
 }
 
@@ -467,19 +483,25 @@ int main(int argc, char **argv)
 }
 
 switch (transform) {
+#if CONFIG_MDCT
 case TRANSFORM_MDCT:
 ff_mdct_end(m);
 break;
+#endif /* CONFIG_MDCT */
 case TRANSFORM_FFT:
 ff_fft_end(s);
 break;
 #if CONFIG_FFT_FLOAT
+#if CONFIG_RDFT
 case TRANSFORM_RDFT:
 ff_rdft_end(r);
 break;
+#endif /* CONFIG_RDFT */
+#if CONFIG_DCT
 case TRANSFORM_DCT:
 ff_dct_end(d);
 break;
+#endif /* CONFIG_DCT */
 #endif
 }
 
diff --git a/tests/fate/fft.mak b/tests/fate/fft.mak
index 20d5638..d2a3904 100644
--- a/tests/fate/fft.mak
+++ b/tests/fate/fft.mak
@@ -1,8 +1,8 @@
 define DEF_FFT
-FATE_FFT += fate-fft-$(1)   fate-ifft-$(1)   \
-fate-mdct-$(1)  fate-imdct-$(1)  \
-fate-rdft-$(1)  fate-irdft-$(1)  \
-fate-dct1d-$(1) fate-idct1d-$(1)
+FATE_FFT-$(CONFIG_DCT)  += fate-dct1d-$(1) fate-idct1d-$(1)
+FATE_FFT-$(CONFIG_FFT)  += fate-fft-$(1)   fate-ifft-$(1)
+FATE_FFT-$(CONFIG_MDCT) += fate-mdct-$(1)  fate-imdct-$(1)
+FATE_FFT-$(CONFIG_RDFT) += fate-rdft-$(1)  fate-irdft-$(1)
 
 fate-fft-$(N):ARGS = -n$(1)
 fate-ifft-$(N):   ARGS = -n$(1) -i
@@ -16,14 +16,14 @@ endef
 
 $(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_FFT,$(N
 
-fate-fft-test: $(FATE_FFT)
-$(FATE_FFT): libavcodec/fft-test$(EXESUF)
-$(FATE_FFT): CMD = run libavcodec/fft-test $(CPUFLAGS:%=-c%) $(ARGS)
-$(FATE_FFT): REF = /dev/null
+fate-fft-float: $(FATE_FFT-yes)
+$(FATE_FFT-yes): libavcodec/fft-test$(EXESUF)
+$(FATE_FFT-yes): CMD = run libavcodec/fft-test $(CPUFLAGS:%=-c%) $(ARGS)
+$(FATE_FFT-yes): REF = /dev/null
 
 define DEF_FFT_FIXED
-FATE_FFT_FIXED += fate-fft-fixed-$(1)   fate-ifft-fixed-$(1)  \
-  fate-mdct-fixed-$(1) fate-imdct-fixed-$(1)
+FATE_FFT_FIXED-$(CONFIG_FFT)  += fate-fft-fixed-$(1)  fate-ifft-fixed-$(1)
+FATE_FFT_FIXED-$(CONFIG_MDCT) += fate-mdct-fixed-$(1) fate-imdct-fixed-$(1)
 
 fate-fft-fixed-$(1):   ARGS = -n$(1)
 fate-ifft-fixed-$(1):  ARGS = -n$(1) -i
@@ -33,10 +33,10 @@ endef
 
 $(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_FFT_FIXED,$(N
 
-fate-fft-fixed-test: $(FATE_FFT_FIXED)
-$(FATE_FFT_FIXED): libavcodec/fft-fixed-test$(EXESUF)
-$(FATE_FFT_FIXED): CMD = run libavcodec/fft-fixed-test $(CPUFLAGS:%=-c%) 
$(ARGS)
-$(FATE_FFT_FIXED): REF = /dev/null
+fate-fft-fixed: $(FATE_FFT_FIXED-yes)
+$(FATE_FFT_FIXED-yes): libavcodec/fft-fixed-test$(EXESUF)
+$(FATE_FFT_FIXED-yes): CMD = run libavcodec/fft-fixed-test $(CPUFLAGS:%=-c%) 
$(ARGS)
+$(FATE_FFT_FIXED-yes): REF = /dev/null
 
-FATE-$(call ALLYES, AVCODEC FFT) += $(FATE_FFT) $(FATE_FFT_FIXED)
-fate-fft: $(FATE_FFT) $(FATE_FFT_FIXED)
+FATE-$(CONFIG_AVCODEC) += $(FATE_FFT-yes) $(FATE_FFT_FIXED-yes)
+fate-fft: $(FATE_FFT-yes) $(FATE_FFT_FIXED-yes)

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


[FFmpeg-cvslog] vf_select: Drop a debug av_log with an unchecked double to enum conversion

2014-08-08 Thread Diego Biurrun
ffmpeg | branch: release/1.1 | Diego Biurrun  | Tue Jul 29 
05:43:04 2014 -0700| [3a6bc3e381647bb4434317113f131f7e0ab5bf83] | committer: 
Diego Biurrun

vf_select: Drop a debug av_log with an unchecked double to enum conversion

CC: libav-sta...@libav.org
(cherry picked from commit a8d803a320fb08b3ad5db4fffc79abd401206905)
Signed-off-by: Diego Biurrun 

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

 libavfilter/vf_select.c |   13 -
 1 file changed, 13 deletions(-)

diff --git a/libavfilter/vf_select.c b/libavfilter/vf_select.c
index 674151d..924dc1d 100644
--- a/libavfilter/vf_select.c
+++ b/libavfilter/vf_select.c
@@ -203,19 +203,6 @@ static int select_frame(AVFilterContext *ctx, 
AVFilterBufferRef *picref)
 select->var_values[VAR_PICT_TYPE] = picref->video->pict_type;
 
 res = av_expr_eval(select->expr, select->var_values, NULL);
-av_log(inlink->dst, AV_LOG_DEBUG,
-   "n:%d pts:%d t:%f pos:%d interlace_type:%c key:%d pict_type:%c "
-   "-> select:%f\n",
-   (int)select->var_values[VAR_N],
-   (int)select->var_values[VAR_PTS],
-   select->var_values[VAR_T],
-   (int)select->var_values[VAR_POS],
-   select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_P ? 'P' :
-   select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_T ? 'T' :
-   select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_B ? 'B' : 
'?',
-   (int)select->var_values[VAR_KEY],
-   av_get_picture_type_char(select->var_values[VAR_PICT_TYPE]),
-   res);
 
 select->var_values[VAR_N] += 1.0;
 

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


[FFmpeg-cvslog] Merge commit 'd16515ae5fe7daa6327d903cafb9a5ee43477b1e' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 14:06:51 2014 +0200| [a4de70df20f094c23d6e3a6cbf6ca85c096b0e03] | committer: 
Michael Niedermayer

Merge commit 'd16515ae5fe7daa6327d903cafb9a5ee43477b1e' into release/1.1

* commit 'd16515ae5fe7daa6327d903cafb9a5ee43477b1e':
  video4linux2: Avoid a floating point exception

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit '58d7b835e3cec48ab5a2393405fe82dee72c06a0' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 14:14:06 2014 +0200| [6e83c266201adb15971bc3ad5c6c41fedace08ac] | committer: 
Michael Niedermayer

Merge commit '58d7b835e3cec48ab5a2393405fe82dee72c06a0' into release/1.1

* commit '58d7b835e3cec48ab5a2393405fe82dee72c06a0':
  fate: Add dependencies for dct/fft/mdct/rdft tests

Conflicts:
libavcodec/fft-test.c

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit '3a6bc3e381647bb4434317113f131f7e0ab5bf83' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 14:06:36 2014 +0200| [eaf64192d83270d4b3267e89c5606d385d5a1930] | committer: 
Michael Niedermayer

Merge commit '3a6bc3e381647bb4434317113f131f7e0ab5bf83' into release/1.1

* commit '3a6bc3e381647bb4434317113f131f7e0ab5bf83':
  vf_select: Drop a debug av_log with an unchecked double to enum conversion

Conflicts:
libavfilter/f_select.c

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Prepare for 9.14 Release

2014-08-08 Thread Reinhard Tartler
ffmpeg | branch: release/1.1 | Reinhard Tartler  | Thu Jun 
26 21:23:39 2014 -0400| [5e8eaa26b227255505f52b4d980c7a3c2f52b1fd] | committer: 
Reinhard Tartler

Prepare for 9.14 Release

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

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

diff --git a/RELEASE b/RELEASE
index 2645a7f..3f678b4 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1 +1 @@
-9.13
+9.14

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


[FFmpeg-cvslog] Update Changelog for v9.14

2014-08-08 Thread Reinhard Tartler
ffmpeg | branch: release/1.1 | Reinhard Tartler  | Thu Jun 
26 21:27:56 2014 -0400| [3ecbd911ff9177097820e5d00401c9bf29e5d167] | committer: 
Reinhard Tartler

Update Changelog for v9.14

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

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

diff --git a/Changelog b/Changelog
index 8a74804..b23f5ef 100644
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,13 @@
 Releases are sorted from youngest to oldest.
 
+version 9.14:
+- adpcm: Write the proper predictor in trellis mode in IMA QT
+- adpcm: Avoid reading out of bounds in the IMA QT trellis encoder
+- Check mp3 header before calling avpriv_mpegaudio_decode_header() (bug/705)
+- Check if an mp3 header is using a reserved sample rate
+- lzo: Handle integer overflow (bug/704)
+- avconv: make -shortest work with streamcopy
+
 Version 9.13:
 - swscale: Fix an undefined behaviour
 - matroska: add the Opus mapping

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


[FFmpeg-cvslog] eamad: use the bytestream2 API instead of AV_RL

2014-08-08 Thread Anton Khirnov
ffmpeg | branch: release/1.1 | Anton Khirnov  | Sun Jul 20 
12:06:47 2014 +| [e8ff7972064631afbdf240ec6bfd9dec30cf2ce8] | committer: 
Diego Biurrun

eamad: use the bytestream2 API instead of AV_RL

This is safer and possibly fixes invalid reads on truncated data.
(cherry-picked from commit 541427ab4d5b4b6f5a90a687a06decdb78e7bc3c)

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

Conflicts:
libavcodec/eamad.c

(cherry picked from commit f9204ec56a4cf73843d1e5b8563d3584c2c05b47)
Signed-off-by: Diego Biurrun 

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

 libavcodec/eamad.c |   37 -
 1 file changed, 20 insertions(+), 17 deletions(-)

diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index bb4c7ba..405cc2a 100644
--- a/libavcodec/eamad.c
+++ b/libavcodec/eamad.c
@@ -29,6 +29,7 @@
  */
 
 #include "avcodec.h"
+#include "bytestream.h"
 #include "get_bits.h"
 #include "dsputil.h"
 #include "aandcttab.h"
@@ -224,29 +225,31 @@ static int decode_frame(AVCodecContext *avctx,
 {
 const uint8_t *buf = avpkt->data;
 int buf_size   = avpkt->size;
-const uint8_t *buf_end = buf+buf_size;
 MadContext *s = avctx->priv_data;
+GetByteContext gb;
 int width, height;
 int chunk_type;
 int inter;
 
-if (buf_size < 17) {
-av_log(avctx, AV_LOG_ERROR, "Input buffer too small\n");
-*got_frame = 0;
-return -1;
-}
+bytestream2_init(&gb, buf, buf_size);
 
-chunk_type = AV_RL32(&buf[0]);
+chunk_type = bytestream2_get_le32(&gb);
 inter = (chunk_type == MADm_TAG || chunk_type == MADe_TAG);
-buf += 8;
+bytestream2_skip(&gb, 10);
 
 av_reduce(&avctx->time_base.num, &avctx->time_base.den,
-  AV_RL16(&buf[6]), 1000, 1<<30);
+  bytestream2_get_le16(&gb), 1000, 1<<30);
+
+width  = bytestream2_get_le16(&gb);
+height = bytestream2_get_le16(&gb);
+bytestream2_skip(&gb, 1);
+calc_quant_matrix(s, bytestream2_get_byte(&gb));
+bytestream2_skip(&gb, 2);
 
-width  = AV_RL16(&buf[8]);
-height = AV_RL16(&buf[10]);
-calc_quant_matrix(s, buf[13]);
-buf += 16;
+if (bytestream2_get_bytes_left(&gb) < 2) {
+av_log(avctx, AV_LOG_ERROR, "Input data too small\n");
+return AVERROR_INVALIDDATA;
+}
 
 if (avctx->width != width || avctx->height != height) {
 if (av_image_check_size(width, height, 0, avctx) < 0)
@@ -280,12 +283,12 @@ static int decode_frame(AVCodecContext *avctx,
 }
 
 av_fast_padded_malloc(&s->bitstream_buf, &s->bitstream_buf_size,
-  buf_end - buf);
+  bytestream2_get_bytes_left(&gb));
 if (!s->bitstream_buf)
 return AVERROR(ENOMEM);
-s->dsp.bswap16_buf(s->bitstream_buf, (const uint16_t*)buf, 
(buf_end-buf)/2);
-init_get_bits(&s->gb, s->bitstream_buf, 8*(buf_end-buf));
-
+s->dsp.bswap16_buf(s->bitstream_buf, (const uint16_t *)(buf + 
bytestream2_tell(&gb)),
+ bytestream2_get_bytes_left(&gb) / 2);
+init_get_bits(&s->gb, s->bitstream_buf, 
8*(bytestream2_get_bytes_left(&gb)));
 for (s->mb_y=0; s->mb_y < (avctx->height+15)/16; s->mb_y++)
 for (s->mb_x=0; s->mb_x < (avctx->width +15)/16; s->mb_x++)
 decode_mb(s, inter);

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


[FFmpeg-cvslog] Merge commit '3ecbd911ff9177097820e5d00401c9bf29e5d167' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 13:47:08 2014 +0200| [53c3abc1083d630cb50427e09783cf6ce84d4a45] | committer: 
Michael Niedermayer

Merge commit '3ecbd911ff9177097820e5d00401c9bf29e5d167' into release/1.1

* commit '3ecbd911ff9177097820e5d00401c9bf29e5d167':
  Update Changelog for v9.14
  Prepare for 9.14 Release

Conflicts:
Changelog
RELEASE

Not merged as this doesnt apply 1:1 to our releases

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit 'e8ff7972064631afbdf240ec6bfd9dec30cf2ce8' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 13:51:59 2014 +0200| [c074feed292eb1d9371aaa3c63136d4cb241f8c5] | committer: 
Michael Niedermayer

Merge commit 'e8ff7972064631afbdf240ec6bfd9dec30cf2ce8' into release/1.1

* commit 'e8ff7972064631afbdf240ec6bfd9dec30cf2ce8':
  eamad: use the bytestream2 API instead of AV_RL

Conflicts:
libavcodec/eamad.c

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit '744e7eea5d815efea777b6179d96e8d94b63ccfa' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 13:30:17 2014 +0200| [5fa56e6e623948e7316c2d3d1a221e4ab48f6cc4] | committer: 
Michael Niedermayer

Merge commit '744e7eea5d815efea777b6179d96e8d94b63ccfa' into release/1.1

* commit '744e7eea5d815efea777b6179d96e8d94b63ccfa':
  adpcm: Avoid reading out of bounds in the IMA QT trellis encoder

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Merge commit '21d3e0ac9e1719d8444b3f5466983587ac0ad240' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 13:32:51 2014 +0200| [6333c6c17d1f43df0a5f07fdcaee40122fddcd60] | committer: 
Michael Niedermayer

Merge commit '21d3e0ac9e1719d8444b3f5466983587ac0ad240' into release/1.1

* commit '21d3e0ac9e1719d8444b3f5466983587ac0ad240':
  adpcm: Write the proper predictor in trellis mode in IMA QT

Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] adpcm: Write the proper predictor in trellis mode in IMA QT

2014-08-08 Thread Martin Storsjö
ffmpeg | branch: release/1.1 | Martin Storsjö  | Thu Jun  5 
14:49:14 2014 +0300| [21d3e0ac9e1719d8444b3f5466983587ac0ad240] | committer: 
Luca Barbato

adpcm: Write the proper predictor in trellis mode in IMA QT

The actual predictor value, set by the trellis code, never
was written back into the variable that was written into
the block header. This was accidentally removed in b304244b.

This significantly improves the audio quality of the trellis
case, which was plain broken since b304244b.

Encoding IMA QT with trellis still actually gives a slightly
worse quality than without trellis, since the trellis encoder
doesn't use the exact same way of rounding as in
adpcm_ima_qt_compress_sample and adpcm_ima_qt_expand_nibble.

CC: libav-sta...@libav.org
Signed-off-by: Martin Storsjö 
(cherry picked from commit 0776e0ef6ba4160281ef3fabea43e670f3792b4a)
Signed-off-by: Luca Barbato 

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

 libavcodec/adpcmenc.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 116458b..aa88395 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -561,6 +561,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, 
AVPacket *avpkt,
64, 1);
 for (i = 0; i < 64; i++)
 put_bits(&pb, 4, buf[i ^ 1]);
+status->prev_sample = status->predictor;
 } else {
 for (i = 0; i < 64; i += 2) {
 int t1, t2;

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


[FFmpeg-cvslog] adpcm: Avoid reading out of bounds in the IMA QT trellis encoder

2014-08-08 Thread Martin Storsjö
ffmpeg | branch: release/1.1 | Martin Storsjö  | Thu Jun  5 
11:48:53 2014 +0300| [744e7eea5d815efea777b6179d96e8d94b63ccfa] | committer: 
Luca Barbato

adpcm: Avoid reading out of bounds in the IMA QT trellis encoder

This was broken in 095be4fb - samples+ch (for the previous
non-planar case) equals &samples_p[ch][0]. The confusion
probably stemmed from the IMA WAV case where it originally
was &samples[avctx->channels + ch], which was correctly
changed into &samples_p[ch][1].

CC: libav-sta...@libav.org
Signed-off-by: Martin Storsjö 
(cherry picked from commit 3d79d0c93e5b37a35b1b22d6c18699c233aad1ba)
Signed-off-by: Luca Barbato 

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

 libavcodec/adpcmenc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index f81d7fd..116458b 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -557,7 +557,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, 
AVPacket *avpkt,
 put_bits(&pb, 7,  status->step_index);
 if (avctx->trellis > 0) {
 uint8_t buf[64];
-adpcm_compress_trellis(avctx, &samples_p[ch][1], buf, status,
+adpcm_compress_trellis(avctx, &samples_p[ch][0], buf, status,
64, 1);
 for (i = 0; i < 64; i++)
 put_bits(&pb, 4, buf[i ^ 1]);

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


[FFmpeg-cvslog] Check mp3 header before calling avpriv_mpegaudio_decode_header().

2014-08-08 Thread Justin Ruggles
ffmpeg | branch: release/1.1 | Justin Ruggles  | Sun 
Jun 22 13:19:36 2014 -0400| [d7dbc687e312a91ef2ccf797d57b95c61d0e8a2f] | 
committer: Luca Barbato

Check mp3 header before calling avpriv_mpegaudio_decode_header().

As indicated in the function documentation, the header MUST be
checked prior to calling it because no consistency check is done
there.

CC:libav-sta...@libav.org
(cherry picked from commit f2f2e7627f0c878d13275af5d166ec5932665e28)
Signed-off-by: Luca Barbato 

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

 libavcodec/libmp3lame.c |8 +++-
 libavformat/mp3enc.c|   17 ++---
 2 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 2e501ca..5f6704d 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -190,6 +190,7 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, 
AVPacket *avpkt,
 MPADecodeHeader hdr;
 int len, ret, ch;
 int lame_result;
+uint32_t h;
 
 if (frame) {
 switch (avctx->sample_fmt) {
@@ -245,7 +246,12 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, 
AVPacket *avpkt,
determine the frame size. */
 if (s->buffer_index < 4)
 return 0;
-if (avpriv_mpegaudio_decode_header(&hdr, AV_RB32(s->buffer))) {
+h = AV_RB32(s->buffer);
+if (ff_mpa_check_header(h) < 0) {
+av_log(avctx, AV_LOG_ERROR, "Invalid mp3 header at start of buffer\n");
+return AVERROR_BUG;
+}
+if (avpriv_mpegaudio_decode_header(&hdr, h)) {
 av_log(avctx, AV_LOG_ERROR, "free format output not supported\n");
 return -1;
 }
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index e37abf5..631705c 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -251,13 +251,16 @@ static int mp3_write_audio_packet(AVFormatContext *s, 
AVPacket *pkt)
 
 if (mp3->xing_offset && pkt->size >= 4) {
 MPADecodeHeader c;
-
-avpriv_mpegaudio_decode_header(&c, AV_RB32(pkt->data));
-
-if (!mp3->initial_bitrate)
-mp3->initial_bitrate = c.bit_rate;
-if ((c.bit_rate == 0) || (mp3->initial_bitrate != c.bit_rate))
-mp3->has_variable_bitrate = 1;
+uint32_t h;
+
+h = AV_RB32(pkt->data);
+if (ff_mpa_check_header(h) == 0) {
+avpriv_mpegaudio_decode_header(&c, h);
+if (!mp3->initial_bitrate)
+mp3->initial_bitrate = c.bit_rate;
+if ((c.bit_rate == 0) || (mp3->initial_bitrate != c.bit_rate))
+mp3->has_variable_bitrate = 1;
+}
 
 mp3_xing_add_frame(mp3, pkt);
 }

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


[FFmpeg-cvslog] Merge commit 'd7dbc687e312a91ef2ccf797d57b95c61d0e8a2f' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 12:50:57 2014 +0200| [cf7f798984a9d93a2297ecbf203b85a660317e31] | committer: 
Michael Niedermayer

Merge commit 'd7dbc687e312a91ef2ccf797d57b95c61d0e8a2f' into release/1.1

* commit 'd7dbc687e312a91ef2ccf797d57b95c61d0e8a2f':
  Check mp3 header before calling avpriv_mpegaudio_decode_header().

Conflicts:
libavformat/mp3enc.c

See: See: 2dd0da787ce5008d4d1b8f461fbd1288c32e2c38
Merged-by: Michael Niedermayer 

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



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


[FFmpeg-cvslog] Check if an mp3 header is using a reserved sample rate.

2014-08-08 Thread Justin Ruggles
ffmpeg | branch: release/1.1 | Justin Ruggles  | Sun 
Jun 22 13:11:32 2014 -0400| [7997acee0542f6e0bb9ea42ff783f80b70878a2f] | 
committer: Luca Barbato

Check if an mp3 header is using a reserved sample rate.

Fixes an invalid read past the end of avpriv_mpa_freq_tab.
Fixes divide-by-zero due to sample_rate being set to 0.

Bug-Id: 705

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

Conflicts:
libavcodec/mpegaudiodecheader.c

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

 libavcodec/mpegaudiodecheader.c |4 
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/mpegaudiodecheader.c b/libavcodec/mpegaudiodecheader.c
index f8fc833..e789d46 100644
--- a/libavcodec/mpegaudiodecheader.c
+++ b/libavcodec/mpegaudiodecheader.c
@@ -25,6 +25,8 @@
  */
 
 //#define DEBUG
+#include "libavutil/common.h"
+
 #include "avcodec.h"
 #include "mpegaudio.h"
 #include "mpegaudiodata.h"
@@ -46,6 +48,8 @@ int avpriv_mpegaudio_decode_header(MPADecodeHeader *s, 
uint32_t header)
 s->layer = 4 - ((header >> 17) & 3);
 /* extract frequency */
 sample_rate_index = (header >> 10) & 3;
+if (sample_rate_index >= FF_ARRAY_ELEMS(avpriv_mpa_freq_tab))
+sample_rate_index = 0;
 sample_rate = avpriv_mpa_freq_tab[sample_rate_index] >> (s->lsf + mpeg25);
 sample_rate_index += 3 * (s->lsf + mpeg25);
 s->sample_rate_index = sample_rate_index;

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


[FFmpeg-cvslog] Merge commit '7997acee0542f6e0bb9ea42ff783f80b70878a2f' into release/1.1

2014-08-08 Thread Michael Niedermayer
ffmpeg | branch: release/1.1 | Michael Niedermayer  | Fri Aug 
 8 12:48:51 2014 +0200| [244a58fff0adabcce3f9ea80d848a562ff377843] | committer: 
Michael Niedermayer

Merge commit '7997acee0542f6e0bb9ea42ff783f80b70878a2f' into release/1.1

* commit '7997acee0542f6e0bb9ea42ff783f80b70878a2f':
  Check if an mp3 header is using a reserved sample rate.

Merged-by: Michael Niedermayer 

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



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