[FFmpeg-cvslog] huffyuvdec: fix old (v1) rgba

2014-08-20 Thread Christophe Gisquet
ffmpeg | branch: master | Christophe Gisquet  | 
Wed Aug 20 23:19:48 2014 +| [331b1f7d813a0815ba0d57c3d4dccbed16c7a075] | 
committer: Michael Niedermayer

huffyuvdec: fix old (v1) rgba

Commit deadcf5e misplaced a hunk.

Fixes ticket #3877.

Signed-off-by: Michael Niedermayer 

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

 libavcodec/huffyuvdec.c |   17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c
index e4e5ea0..bc5ad15 100644
--- a/libavcodec/huffyuvdec.c
+++ b/libavcodec/huffyuvdec.c
@@ -729,7 +729,7 @@ static av_always_inline void decode_bgr_1(HYuvContext *s, 
int count,
 
 for (i = 0; i < count && BITS_LEFT(re, &s->gb) > 0; i++) {
 unsigned int index;
-int code, n;
+int code, n, nb_bits;
 
 UPDATE_CACHE(re, &s->gb);
 index = SHOW_UBITS(re, &s->gb, VLC_BITS);
@@ -740,7 +740,6 @@ static av_always_inline void decode_bgr_1(HYuvContext *s, 
int count,
 *(uint32_t *) &s->temp[0][4 * i] = s->pix_bgr_map[code];
 LAST_SKIP_BITS(re, &s->gb, n);
 } else {
-int nb_bits;
 if (decorrelate) {
 VLC_INTERN(s->temp[0][4 * i + G], s->vlc[1].table,
&s->gb, re, VLC_BITS, 3);
@@ -768,14 +767,14 @@ static av_always_inline void decode_bgr_1(HYuvContext *s, 
int count,
 VLC_INTERN(s->temp[0][4 * i + R], s->vlc[2].table,
&s->gb, re, VLC_BITS, 3);
 }
-if (alpha) {
-UPDATE_CACHE(re, &s->gb);
-index = SHOW_UBITS(re, &s->gb, VLC_BITS);
-VLC_INTERN(s->temp[0][4 * i + A], s->vlc[2].table,
-   &s->gb, re, VLC_BITS, 3);
-} else
-s->temp[0][4 * i + A] = 0;
 }
+if (alpha) {
+UPDATE_CACHE(re, &s->gb);
+index = SHOW_UBITS(re, &s->gb, VLC_BITS);
+VLC_INTERN(s->temp[0][4 * i + A], s->vlc[2].table,
+   &s->gb, re, VLC_BITS, 3);
+} else
+s->temp[0][4 * i + A] = 0;
 }
 CLOSE_READER(re, &s->gb);
 }

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


[FFmpeg-cvslog] fate: add test for old (v1) huffyuv and rgba

2014-08-20 Thread Christophe Gisquet
ffmpeg | branch: master | Christophe Gisquet  | 
Wed Aug 20 23:19:47 2014 +| [50a35f0d2e1a3bed856a465894a1e8ff5ca7e680] | 
committer: Michael Niedermayer

fate: add test for old (v1) huffyuv and rgba

Signed-off-by: Michael Niedermayer 

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

 tests/fate/vcodec.mak|4 +++-
 tests/ref/vsynth/vsynth1-huffyuvbgra |4 
 tests/ref/vsynth/vsynth2-huffyuvbgra |4 
 tests/ref/vsynth/vsynth3-huffyuvbgra |4 
 4 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak
index cefd4d3..ec3155a 100644
--- a/tests/fate/vcodec.mak
+++ b/tests/fate/vcodec.mak
@@ -91,11 +91,13 @@ fate-vsynth%-h263:   ENCOPTS = -qscale 10
 fate-vsynth%-h263-obmc:  ENCOPTS = -qscale 10 -obmc 1
 fate-vsynth%-h263p:  ENCOPTS = -qscale 2 -flags +aic -umv 1 -aiv 1 
-ps 300
 
-FATE_VCODEC-$(call ENCDEC, HUFFYUV, AVI) += huffyuv huffyuvbgr24
+FATE_VCODEC-$(call ENCDEC, HUFFYUV, AVI) += huffyuv huffyuvbgr24 huffyuvbgra
 fate-vsynth%-huffyuv:ENCOPTS = -vcodec huffyuv -pix_fmt yuv422p 
-sws_flags neighbor
 fate-vsynth%-huffyuv:DECOPTS = -sws_flags neighbor
 fate-vsynth%-huffyuvbgr24:   ENCOPTS = -vcodec huffyuv -pix_fmt bgr24 
-sws_flags neighbor
 fate-vsynth%-huffyuvbgr24:   DECOPTS = -sws_flags neighbor
+fate-vsynth%-huffyuvbgra:ENCOPTS = -vcodec huffyuv -pix_fmt bgr32 
-sws_flags neighbor
+fate-vsynth%-huffyuvbgra:DECOPTS = -sws_flags neighbor
 
 FATE_VCODEC-$(call ENCDEC, JPEGLS, AVI) += jpegls
 fate-vsynth%-jpegls: ENCOPTS = -sws_flags neighbor+full_chroma_int
diff --git a/tests/ref/vsynth/vsynth1-huffyuvbgra 
b/tests/ref/vsynth/vsynth1-huffyuvbgra
new file mode 100644
index 000..8578b81
--- /dev/null
+++ b/tests/ref/vsynth/vsynth1-huffyuvbgra
@@ -0,0 +1,4 @@
+0a441061598152cd44ddc308076671c3 *tests/data/fate/vsynth1-huffyuvbgra.avi
+14464166 tests/data/fate/vsynth1-huffyuvbgra.avi
+49c03ab1b73b7cd3cabc3c77a9479c9e 
*tests/data/fate/vsynth1-huffyuvbgra.out.rawvideo
+stddev:3.16 PSNR: 38.12 MAXDIFF:   50 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth2-huffyuvbgra 
b/tests/ref/vsynth/vsynth2-huffyuvbgra
new file mode 100644
index 000..b37b49f
--- /dev/null
+++ b/tests/ref/vsynth/vsynth2-huffyuvbgra
@@ -0,0 +1,4 @@
+e8c2dbe6ad5d273af2bdb2dc3a2a524d *tests/data/fate/vsynth2-huffyuvbgra.avi
+10139598 tests/data/fate/vsynth2-huffyuvbgra.avi
+0a8b7ddfec03622e37c869c5b552f9fc 
*tests/data/fate/vsynth2-huffyuvbgra.out.rawvideo
+stddev:1.24 PSNR: 46.26 MAXDIFF:   17 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth3-huffyuvbgra 
b/tests/ref/vsynth/vsynth3-huffyuvbgra
new file mode 100644
index 000..32eecd4
--- /dev/null
+++ b/tests/ref/vsynth/vsynth3-huffyuvbgra
@@ -0,0 +1,4 @@
+9d360ce029b5ec86f0f6c80c44edf9bd *tests/data/fate/vsynth3-huffyuvbgra.avi
+179598 tests/data/fate/vsynth3-huffyuvbgra.avi
+5d031d2e891b13593b8cd79e63d083b4 
*tests/data/fate/vsynth3-huffyuvbgra.out.rawvideo
+stddev:3.23 PSNR: 37.92 MAXDIFF:   50 bytes:86700/86700

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


[FFmpeg-cvslog] [ffmpeg-web] branch master updated. b3d5da4 web/index: mention 2.3.3 and a few other releases

2014-08-20 Thread gitolite
The branch, master has been updated
   via  b3d5da4914ddf248e7097d8d0a399f156f667b3a (commit)
   via  6dc154757bc64e31df8b45ca68d2a493758d381f (commit)
  from  89fd3c819a23fae94e8749e6ce463a620ca816a0 (commit)


- Log -
commit b3d5da4914ddf248e7097d8d0a399f156f667b3a
Author: Michael Niedermayer 
AuthorDate: Wed Aug 20 02:01:52 2014 +0200
Commit: Michael Niedermayer 
CommitDate: Wed Aug 20 02:01:52 2014 +0200

web/index: mention 2.3.3 and a few other releases

diff --git a/src/index b/src/index
index 40a8abf..f8224f1 100644
--- a/src/index
+++ b/src/index
@@ -36,6 +36,19 @@
 News
   
 
+  August 20, 2014, FFmpeg 2.3.3, 2.2.7, 1.2.8
+  
+We have made several new point releases (2.3.3,
+  2.2.7,
+  1.2.8).
+They fix various bugs, as well as CVE-2014-5271 and CVE-2014-5272.
+Please see the changelog for more details.
+  
+  
+We recommend users, distributors and system integrators to upgrade unless 
they use
+current git master.
+  
+
   July 29, 2014, Help us out securing our spot in 
OPW
   
 Following our previous post regarding our participation on this year's

commit 6dc154757bc64e31df8b45ca68d2a493758d381f
Author: Michael Niedermayer 
AuthorDate: Wed Aug 20 01:59:33 2014 +0200
Commit: Michael Niedermayer 
CommitDate: Wed Aug 20 01:59:33 2014 +0200

web/security: put CVE-2014-5271 in () for 1.2, as the encoder lacked alpha 
support back then

diff --git a/src/security b/src/security
index 1e0ecc7..8abf731 100644
--- a/src/security
+++ b/src/security
@@ -188,7 +188,7 @@ Fixes following vulnerabilities:
 
 
 CVE-2014-5272, abc1fa7c5a1dca1345b9471b81cfcda00c56220d / 
3539d6c63a16e1b2874bb037a86f317449c58770
-CVE-2014-5271, 18342848f7fa0c98f81049495adaf3d528b325f5 / 
52b81ff4635c077b2bc8b8d3637d933b6629d803
+(CVE-2014-5271, 18342848f7fa0c98f81049495adaf3d528b325f5 / 
52b81ff4635c077b2bc8b8d3637d933b6629d803)
 
 
 1.2.7

---

Summary of changes:
 src/index|   13 +
 src/security |2 +-
 2 files changed, 14 insertions(+), 1 deletions(-)


hooks/post-receive
-- 

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


[FFmpeg-cvslog] avfilter/showwaves: align const mode values (cosmetics)

2014-08-20 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Wed Aug 20 22:32:06 
2014 +0200| [e298b2f5d6db29f7fec60e6656d65e6c76ed4ebe] | committer: Clément 
Bœsch

avfilter/showwaves: align const mode values (cosmetics)

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

 libavfilter/avf_showwaves.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index 804badd..4cd225a 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -63,10 +63,10 @@ static const AVOption showwaves_options[] = {
 { "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = 
"600x240"}, 0, 0, FLAGS },
 { "s","set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = 
"600x240"}, 0, 0, FLAGS },
 { "mode", "select display mode", OFFSET(mode), AV_OPT_TYPE_INT, 
{.i64=MODE_POINT}, 0, MODE_NB-1, FLAGS, "mode"},
-{ "point", "draw a point for each sample", 0, AV_OPT_TYPE_CONST, 
{.i64=MODE_POINT}, .flags=FLAGS, .unit="mode"},
-{ "line",  "draw a line for each sample",  0, AV_OPT_TYPE_CONST, 
{.i64=MODE_LINE},  .flags=FLAGS, .unit="mode"},
-{ "p2p", "draw a line between samples", 0, AV_OPT_TYPE_CONST, 
{.i64=MODE_P2P}, .flags=FLAGS, .unit="mode"},
-{ "cline","draw a centered line for each sample", 0, 
AV_OPT_TYPE_CONST, {.i64=MODE_CENTERED_LINE}, .flags=FLAGS, .unit="mode"},
+{ "point", "draw a point for each sample", 0, 
AV_OPT_TYPE_CONST, {.i64=MODE_POINT}, .flags=FLAGS, .unit="mode"},
+{ "line",  "draw a line for each sample",  0, 
AV_OPT_TYPE_CONST, {.i64=MODE_LINE},  .flags=FLAGS, .unit="mode"},
+{ "p2p",   "draw a line between samples",  0, 
AV_OPT_TYPE_CONST, {.i64=MODE_P2P},   .flags=FLAGS, .unit="mode"},
+{ "cline", "draw a centered line for each sample", 0, 
AV_OPT_TYPE_CONST, {.i64=MODE_CENTERED_LINE}, .flags=FLAGS, .unit="mode"},
 { "n","set how many samples to show in the same point", OFFSET(n), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS },
 { "rate", "set video rate", OFFSET(rate), AV_OPT_TYPE_VIDEO_RATE, {.str = 
"25"}, 0, 0, FLAGS },
 { "r","set video rate", OFFSET(rate), AV_OPT_TYPE_VIDEO_RATE, {.str = 
"25"}, 0, 0, FLAGS },

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


[FFmpeg-cvslog] doc/filters: fix cline option name recently added

2014-08-20 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Wed Aug 20 22:30:38 
2014 +0200| [5abcc8e1a0e2e34067f4c27c31eafc39a5805f83] | committer: Clément 
Bœsch

doc/filters: fix cline option name recently added

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

 doc/filters.texi |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 47a1587..a20253a 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -10814,7 +10814,7 @@ Draw a vertical line for each sample.
 @item p2p
 Draw a point for each sample and a line between them.
 
-@item centered_line
+@item cline
 Draw a centered vertical line for each sample.
 @end table
 

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


[FFmpeg-cvslog] avfilter/showwaves: add "cline" mode (centered line)

2014-08-20 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Thu Dec 26 
12:08:24 2013 +0100| [f2f6d45dbd1795ae9f9b8ddf933201deff3d452a] | committer: 
Clément Bœsch

avfilter/showwaves: add "cline" mode (centered line)

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

 doc/filters.texi|3 +++
 libavfilter/avf_showwaves.c |   24 +++-
 2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 0ca1d6f..2d39fca 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -10813,6 +10813,9 @@ Draw a vertical line for each sample.
 
 @item p2p
 Draw a point for each sample and a line between them.
+
+@item centered_line
+Draw a centered vertical line for each sample.
 @end table
 
 Default value is @code{point}.
diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index e025663..6deb55e 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -36,6 +36,7 @@ enum ShowWavesMode {
 MODE_POINT,
 MODE_LINE,
 MODE_P2P,
+MODE_CENTERED_LINE,
 MODE_NB,
 };
 
@@ -62,6 +63,7 @@ static const AVOption showwaves_options[] = {
 { "point", "draw a point for each sample", 0, AV_OPT_TYPE_CONST, 
{.i64=MODE_POINT}, .flags=FLAGS, .unit="mode"},
 { "line",  "draw a line for each sample",  0, AV_OPT_TYPE_CONST, 
{.i64=MODE_LINE},  .flags=FLAGS, .unit="mode"},
 { "p2p", "draw a line between samples", 0, AV_OPT_TYPE_CONST, 
{.i64=MODE_P2P}, .flags=FLAGS, .unit="mode"},
+{ "cline","draw a centered line for each sample", 0, 
AV_OPT_TYPE_CONST, {.i64=MODE_CENTERED_LINE}, .flags=FLAGS, .unit="mode"},
 { "n","set how many samples to show in the same point", OFFSET(n), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS },
 { "rate", "set video rate", OFFSET(rate), AV_OPT_TYPE_VIDEO_RATE, {.str = 
"25"}, 0, 0, FLAGS },
 { "r","set video rate", OFFSET(rate), AV_OPT_TYPE_VIDEO_RATE, {.str = 
"25"}, 0, 0, FLAGS },
@@ -206,26 +208,30 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*insamples)
 memset(outpicref->data[0] + j * linesize, 0, outlink->w);
 }
 for (j = 0; j < nb_channels; j++) {
-h = showwaves->h/2 - av_rescale(*p++, showwaves->h/2, MAX_INT16);
+int start, end;
 switch (showwaves->mode) {
 case MODE_POINT:
+h = showwaves->h/2 - av_rescale(*p++, showwaves->h/2, 
MAX_INT16);
 if (h >= 0 && h < outlink->h)
 *(outpicref->data[0] + showwaves->buf_idx + h * linesize) 
+= x;
 break;
 
 case MODE_LINE:
-{
-int start = showwaves->h/2, end = av_clip(h, 0, outlink->h-1);
+h = showwaves->h/2 - av_rescale(*p++, showwaves->h/2, 
MAX_INT16);
+start = showwaves->h/2;
+end   = av_clip(h, 0, outlink->h-1);
 if (start > end) FFSWAP(int16_t, start, end);
 for (k = start; k < end; k++)
 *(outpicref->data[0] + showwaves->buf_idx + k * linesize) 
+= x;
 break;
-}
+
 case MODE_P2P:
+h = showwaves->h/2 - av_rescale(*p++, showwaves->h/2, 
MAX_INT16);
 if (h >= 0 && h < outlink->h) {
 *(outpicref->data[0] + showwaves->buf_idx + h * linesize) 
+= x;
 if (showwaves->buf_idy[j] && h != showwaves->buf_idy[j]) {
-int start = showwaves->buf_idy[j], end = av_clip(h, 0, 
outlink->h-1);
+start = showwaves->buf_idy[j];
+end = av_clip(h, 0, outlink->h-1);
 if (start > end)
 FFSWAP(int16_t, start, end);
 for (k = start + 1; k < end; k++)
@@ -233,6 +239,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*insamples)
 }
 }
 break;
+
+case MODE_CENTERED_LINE:
+h = av_rescale(abs(*p++), showwaves->h, UINT16_MAX);
+start = (showwaves->h - h) / 2;
+end   = start + h;
+for (k = start; k < end; k++)
+*(outpicref->data[0] + showwaves->buf_idx + k * linesize) 
+= x;
+break;
 }
 /* store current y coordinate for this channel */
 showwaves->buf_idy[j] = h;

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


[FFmpeg-cvslog] avfilter/showwaves: split out draw sample code

2014-08-20 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Thu Dec 26 
12:57:20 2013 +0100| [ba29746feb541f5cde4154795041ff2faa15bedf] | committer: 
Clément Bœsch

avfilter/showwaves: split out draw sample code

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

 libavfilter/avf_showwaves.c |  119 +++
 1 file changed, 74 insertions(+), 45 deletions(-)

diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index 6deb55e..3ffc4a2 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -51,6 +51,8 @@ typedef struct {
 int n;
 int sample_count_mod;
 enum ShowWavesMode mode;
+void (*draw_sample)(uint8_t *buf, int height, int linesize,
+int16_t sample, int16_t *prev_y, int intensity);
 } ShowWavesContext;
 
 #define OFFSET(x) offsetof(ShowWavesContext, x)
@@ -176,6 +178,57 @@ static int request_frame(AVFilterLink *outlink)
 
 #define MAX_INT16 ((1<<15) -1)
 
+static void draw_sample_point(uint8_t *buf, int height, int linesize,
+  int16_t sample, int16_t *prev_y, int intensity)
+{
+const int h = height/2 - av_rescale(sample, height/2, MAX_INT16);
+if (h >= 0 && h < height)
+buf[h * linesize] += intensity;
+}
+
+static void draw_sample_line(uint8_t *buf, int height, int linesize,
+ int16_t sample, int16_t *prev_y, int intensity)
+{
+int k;
+const int h = height/2 - av_rescale(sample, height/2, MAX_INT16);
+int start   = height/2;
+int end = av_clip(h, 0, height-1);
+if (start > end)
+FFSWAP(int16_t, start, end);
+for (k = start; k < end; k++)
+buf[k * linesize] += intensity;
+}
+
+static void draw_sample_p2p(uint8_t *buf, int height, int linesize,
+int16_t sample, int16_t *prev_y, int intensity)
+{
+int k;
+const int h = height/2 - av_rescale(sample, height/2, MAX_INT16);
+if (h >= 0 && h < height) {
+buf[h * linesize] += intensity;
+if (*prev_y && h != *prev_y) {
+int start = *prev_y;
+int end = av_clip(h, 0, height-1);
+if (start > end)
+FFSWAP(int16_t, start, end);
+for (k = start + 1; k < end; k++)
+buf[k * linesize] += intensity;
+}
+}
+*prev_y = h;
+}
+
+static void draw_sample_cline(uint8_t *buf, int height, int linesize,
+  int16_t sample, int16_t *prev_y, int intensity)
+{
+int k;
+const int h = av_rescale(abs(sample), height, UINT16_MAX);
+const int start = (height - h) / 2;
+const int end   = start + h;
+for (k = start; k < end; k++)
+buf[k * linesize] += intensity;
+}
+
 static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
 {
 AVFilterContext *ctx = inlink->dst;
@@ -186,7 +239,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*insamples)
 int linesize = outpicref ? outpicref->linesize[0] : 0;
 int16_t *p = (int16_t *)insamples->data[0];
 int nb_channels = inlink->channels;
-int i, j, k, h, ret = 0;
+int i, j, ret = 0;
 const int n = showwaves->n;
 const int x = 255 / (nb_channels * n); /* multiplication factor, 
pre-computed to avoid in-loop divisions */
 
@@ -207,50 +260,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*insamples)
 for (j = 0; j < outlink->h; j++)
 memset(outpicref->data[0] + j * linesize, 0, outlink->w);
 }
-for (j = 0; j < nb_channels; j++) {
-int start, end;
-switch (showwaves->mode) {
-case MODE_POINT:
-h = showwaves->h/2 - av_rescale(*p++, showwaves->h/2, 
MAX_INT16);
-if (h >= 0 && h < outlink->h)
-*(outpicref->data[0] + showwaves->buf_idx + h * linesize) 
+= x;
-break;
-
-case MODE_LINE:
-h = showwaves->h/2 - av_rescale(*p++, showwaves->h/2, 
MAX_INT16);
-start = showwaves->h/2;
-end   = av_clip(h, 0, outlink->h-1);
-if (start > end) FFSWAP(int16_t, start, end);
-for (k = start; k < end; k++)
-*(outpicref->data[0] + showwaves->buf_idx + k * linesize) 
+= x;
-break;
-
-case MODE_P2P:
-h = showwaves->h/2 - av_rescale(*p++, showwaves->h/2, 
MAX_INT16);
-if (h >= 0 && h < outlink->h) {
-*(outpicref->data[0] + showwaves->buf_idx + h * linesize) 
+= x;
-if (showwaves->buf_idy[j] && h != showwaves->buf_idy[j]) {
-start = showwaves->buf_idy[j];
-end = av_clip(h, 0, outlink->h-1);
-if (start > end)
-FFSWAP(int16_t, start, end);
-for (k = start + 1; k < end; k++)
- 

[FFmpeg-cvslog] avfilter/showwaves: add split_channels option

2014-08-20 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Thu Dec 26 
13:39:49 2013 +0100| [e35fb5add45ca27ab0568f3e0c2828246e8ff5c9] | committer: 
Clément Bœsch

avfilter/showwaves: add split_channels option

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

 doc/filters.texi|3 +++
 libavfilter/avf_showwaves.c |   14 ++
 libavfilter/version.h   |2 +-
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 2d39fca..47a1587 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -10830,6 +10830,9 @@ is not explicitly specified.
 Set the (approximate) output frame rate. This is done by setting the
 option @var{n}. Default value is "25".
 
+@item split_channels
+Set if channels should be drawn separately or overlap. Default value is 0.
+
 @end table
 
 @subsection Examples
diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index 3ffc4a2..804badd 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -51,6 +51,7 @@ typedef struct {
 int n;
 int sample_count_mod;
 enum ShowWavesMode mode;
+int split_channels;
 void (*draw_sample)(uint8_t *buf, int height, int linesize,
 int16_t sample, int16_t *prev_y, int intensity);
 } ShowWavesContext;
@@ -69,6 +70,7 @@ static const AVOption showwaves_options[] = {
 { "n","set how many samples to show in the same point", OFFSET(n), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS },
 { "rate", "set video rate", OFFSET(rate), AV_OPT_TYPE_VIDEO_RATE, {.str = 
"25"}, 0, 0, FLAGS },
 { "r","set video rate", OFFSET(rate), AV_OPT_TYPE_VIDEO_RATE, {.str = 
"25"}, 0, 0, FLAGS },
+{ "split_channels", "draw channels separately", OFFSET(split_channels), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, FLAGS },
 { NULL }
 };
 
@@ -241,7 +243,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*insamples)
 int nb_channels = inlink->channels;
 int i, j, ret = 0;
 const int n = showwaves->n;
-const int x = 255 / (nb_channels * n); /* multiplication factor, 
pre-computed to avoid in-loop divisions */
+const int x = 255 / ((showwaves->split_channels ? 1 : nb_channels) * n); 
/* multiplication factor, pre-computed to avoid in-loop divisions */
+const int ch_height = showwaves->split_channels ? outlink->h / nb_channels 
: outlink->h;
 
 /* draw data in the buffer */
 for (i = 0; i < nb_samples; i++) {
@@ -260,10 +263,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*insamples)
 for (j = 0; j < outlink->h; j++)
 memset(outpicref->data[0] + j * linesize, 0, outlink->w);
 }
-for (j = 0; j < nb_channels; j++)
-showwaves->draw_sample(outpicref->data[0] + showwaves->buf_idx,
-   outlink->h, linesize, *p++,
+for (j = 0; j < nb_channels; j++) {
+uint8_t *buf = outpicref->data[0] + showwaves->buf_idx;
+if (showwaves->split_channels)
+buf += j*ch_height*linesize;
+showwaves->draw_sample(buf, ch_height, linesize, *p++,
&showwaves->buf_idy[j], x);
+}
 
 showwaves->sample_count_mod++;
 if (showwaves->sample_count_mod == n) {
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 2003b76..28c510e 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -31,7 +31,7 @@
 
 #define LIBAVFILTER_VERSION_MAJOR  5
 #define LIBAVFILTER_VERSION_MINOR  0
-#define LIBAVFILTER_VERSION_MICRO 100
+#define LIBAVFILTER_VERSION_MICRO 101
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \

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


[FFmpeg-cvslog] x86/hecv_res_add: add ff_hevc_transform_add{8, 16, 32}_8_avx

2014-08-20 Thread James Almer
ffmpeg | branch: master | James Almer  | Tue Aug 19 23:52:05 
2014 -0300| [76a99d467fff3faf826c46ccde66bd1303876a0d] | committer: James Almer

x86/hecv_res_add: add ff_hevc_transform_add{8,16,32}_8_avx

~15% faster than sse2

Reviewed-by: Mickaël Raulet 
Reviewed-by: Christophe Gisquet 
Signed-off-by: James Almer 

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

 libavcodec/x86/hevc_res_add.asm |   15 +++
 libavcodec/x86/hevcdsp.h|4 
 libavcodec/x86/hevcdsp_init.c   |4 
 3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/libavcodec/x86/hevc_res_add.asm b/libavcodec/x86/hevc_res_add.asm
index 47022d3..feea50c 100644
--- a/libavcodec/x86/hevc_res_add.asm
+++ b/libavcodec/x86/hevc_res_add.asm
@@ -156,8 +156,8 @@ cglobal hevc_transform_add4_8, 3, 4, 6
 %endmacro
 
 
-INIT_XMM sse2
-; void ff_hevc_transform_add8_8_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t 
stride)
+%macro TRANSFORM_ADD_8 0
+; void ff_hevc_transform_add8_8_(uint8_t *dst, int16_t *coeffs, ptrdiff_t 
stride)
 cglobal hevc_transform_add8_8, 3, 4, 8
 lea   r3, [r2*3]
 TR_ADD_SSE_8_8
@@ -167,7 +167,7 @@ cglobal hevc_transform_add8_8, 3, 4, 8
 RET
 
 %if ARCH_X86_64
-; void ff_hevc_transform_add16_8_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t 
stride)
+; void ff_hevc_transform_add16_8_(uint8_t *dst, int16_t *coeffs, 
ptrdiff_t stride)
 cglobal hevc_transform_add16_8, 3, 4, 12
 lea   r3, [r2*3]
 TR_ADD_SSE_16_8
@@ -178,7 +178,7 @@ cglobal hevc_transform_add16_8, 3, 4, 12
 %endrep
 RET
 
-; void ff_hevc_transform_add16_8_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t 
stride)
+; void ff_hevc_transform_add32_8_(uint8_t *dst, int16_t *coeffs, 
ptrdiff_t stride)
 cglobal hevc_transform_add32_8, 3, 4, 12
 
 TR_ADD_SSE_32_8
@@ -190,6 +190,13 @@ cglobal hevc_transform_add32_8, 3, 4, 12
 RET
 
 %endif ;ARCH_X86_64
+%endmacro
+
+INIT_XMM sse2
+TRANSFORM_ADD_8
+INIT_XMM avx
+TRANSFORM_ADD_8
+
 ;-
 ; void ff_hevc_transform_add_10(pixel *dst, int16_t *block, int stride)
 ;-
diff --git a/libavcodec/x86/hevcdsp.h b/libavcodec/x86/hevcdsp.h
index 7ced22c..74b5173 100644
--- a/libavcodec/x86/hevcdsp.h
+++ b/libavcodec/x86/hevcdsp.h
@@ -139,6 +139,10 @@ void ff_hevc_transform_add8_8_sse2(uint8_t *dst, int16_t 
*coeffs, ptrdiff_t stri
 void ff_hevc_transform_add16_8_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t 
stride);
 void ff_hevc_transform_add32_8_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t 
stride);
 
+void ff_hevc_transform_add8_8_avx(uint8_t *dst, int16_t *coeffs, ptrdiff_t 
stride);
+void ff_hevc_transform_add16_8_avx(uint8_t *dst, int16_t *coeffs, ptrdiff_t 
stride);
+void ff_hevc_transform_add32_8_avx(uint8_t *dst, int16_t *coeffs, ptrdiff_t 
stride);
+
 void ff_hevc_transform_add4_10_mmxext(uint8_t *dst, int16_t *coeffs, ptrdiff_t 
stride);
 void ff_hevc_transform_add8_10_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t 
stride);
 void ff_hevc_transform_add16_10_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t 
stride);
diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c
index 0f9fe7d..f6f0a4b 100644
--- a/libavcodec/x86/hevcdsp_init.c
+++ b/libavcodec/x86/hevcdsp_init.c
@@ -509,7 +509,11 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int 
bit_depth)
 if (ARCH_X86_64) {
 c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_avx;
 c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_avx;
+
+c->transform_add[2]= ff_hevc_transform_add16_8_avx;
+c->transform_add[3]= ff_hevc_transform_add32_8_avx;
 }
+c->transform_add[1]= ff_hevc_transform_add8_8_avx;
 }
 if (EXTERNAL_AVX2(cpu_flags)) {
 c->idct_dc[2] = ff_hevc_idct16x16_dc_8_avx2;

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


[FFmpeg-cvslog] doc/ffmpeg: fix metadata language example

2014-08-20 Thread Lou Logan
ffmpeg | branch: master | Lou Logan  | Tue Aug 19 15:16:20 2014 
-0800| [d2163f5e2836090dc7827f43bef921dbe364ec8f] | committer: Lou Logan

doc/ffmpeg: fix metadata language example

Signed-off-by: Lou Logan 

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

 doc/ffmpeg.texi |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index 23ef668..69ffa87 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -339,7 +339,7 @@ ffmpeg -i in.avi -metadata title="my title" out.flv
 
 To set the language of the first audio stream:
 @example
-ffmpeg -i INPUT -metadata:s:a:1 language=eng OUTPUT
+ffmpeg -i INPUT -metadata:s:a:0 language=eng OUTPUT
 @end example
 
 @item -target @var{type} (@emph{output})

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


[FFmpeg-cvslog] avfilter/avf_showspectrum: fix colums typo

2014-08-20 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed Aug 20 
18:49:01 2014 +0200| [a5cbff22b203144c973644bd03422af990acf41a] | committer: 
Michael Niedermayer

avfilter/avf_showspectrum: fix colums typo

Signed-off-by: Michael Niedermayer 

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

 libavfilter/avf_showspectrum.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index bd4d818..24116da 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -68,7 +68,7 @@ static const AVOption showspectrum_options[] = {
 { "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = 
"640x512"}, 0, 0, FLAGS },
 { "s","set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = 
"640x512"}, 0, 0, FLAGS },
 { "slide", "set sliding mode", OFFSET(sliding), AV_OPT_TYPE_INT, {.i64 = 
0}, 0, NB_SLIDES, FLAGS, "slide" },
-{ "replace", "replace old colums with new", 0, AV_OPT_TYPE_CONST, 
{.i64=REPLACE}, 0, 0, FLAGS, "slide" },
+{ "replace", "replace old columns with new", 0, AV_OPT_TYPE_CONST, 
{.i64=REPLACE}, 0, 0, FLAGS, "slide" },
 { "scroll", "scroll from right to left", 0, AV_OPT_TYPE_CONST, 
{.i64=SCROLL}, 0, 0, FLAGS, "slide" },
 { "fullframe", "return full frames", 0, AV_OPT_TYPE_CONST, 
{.i64=FULLFRAME}, 0, 0, FLAGS, "slide" },
 { "mode", "set channel display mode", OFFSET(mode), AV_OPT_TYPE_INT, 
{.i64=COMBINED}, COMBINED, NB_MODES-1, FLAGS, "mode" },

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


[FFmpeg-cvslog] avformat/asfdec: Check av_new_packet()s return code

2014-08-20 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed Aug 20 
18:27:25 2014 +0200| [207609554981be37db35e4390f49d38d68e890d9] | committer: 
Michael Niedermayer

avformat/asfdec: Check av_new_packet()s return code

Fixes CID1041093

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 5fc293e..7f7bb4d 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -1195,6 +1195,8 @@ static int asf_parse_packet(AVFormatContext *s, 
AVIOContext *pb, AVPacket *pkt)
 if (asf_st->pkt.size != asf_st->packet_obj_size ||
 // FIXME is this condition sufficient?
 asf_st->frag_offset + asf->packet_frag_size > asf_st->pkt.size) {
+int ret;
+
 if (asf_st->pkt.data) {
 av_log(s, AV_LOG_INFO,
"freeing incomplete packet size %d, new %d\n",
@@ -1203,7 +1205,8 @@ static int asf_parse_packet(AVFormatContext *s, 
AVIOContext *pb, AVPacket *pkt)
 av_free_packet(&asf_st->pkt);
 }
 /* new packet */
-av_new_packet(&asf_st->pkt, asf_st->packet_obj_size);
+if ((ret = av_new_packet(&asf_st->pkt, asf_st->packet_obj_size)) < 
0)
+return ret;
 asf_st->seq  = asf->packet_seq;
 if (asf->ts_is_pts) {
 asf_st->pkt.pts  = asf->packet_frag_timestamp - 
asf->hdr.preroll;

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


[FFmpeg-cvslog] avformat/nutdec: always initialize event_flags

2014-08-20 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed Aug 20 
16:45:08 2014 +0200| [05dd5368a92718f3a25f97f4697acffbabc7458f] | committer: 
Michael Niedermayer

avformat/nutdec: always initialize event_flags

Fixes: CID1231990

Signed-off-by: Michael Niedermayer 

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

 libavformat/nutdec.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 057fdc7..1b00cdb 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -484,7 +484,7 @@ static int decode_info_header(NUTContext *nut)
 int64_t value, end;
 char name[256], str_value[1024], type_str[256];
 const char *type;
-int *event_flags;
+int *event_flags = NULL;
 AVChapter *chapter  = NULL;
 AVStream *st= NULL;
 AVDictionary **metadata = NULL;
@@ -560,7 +560,8 @@ static int decode_info_header(NUTContext *nut)
 
 if (metadata && av_strcasecmp(name, "Uses") &&
 av_strcasecmp(name, "Depends") && av_strcasecmp(name, 
"Replaces")) {
-*event_flags |= metadata_flag;
+if (event_flags)
+*event_flags |= metadata_flag;
 av_dict_set(metadata, name, str_value, 0);
 }
 }

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


[FFmpeg-cvslog] avcodec/hevc_ps: do cleanup in case of unsupported bit depth

2014-08-20 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed Aug 20 
03:38:30 2014 +0200| [7caacc50aed5e85070aa860f579be87fa4ff5ca5] | committer: 
Michael Niedermayer

avcodec/hevc_ps: do cleanup in case of unsupported bit depth

Fixes memleak
Fixes CID1231989

Reviewed-by: Timothy Gu 
Reviewed-by: Mickaël Raulet 
Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 163c5e4..2ccce5f 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -810,7 +810,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
 default:
 av_log(s->avctx, AV_LOG_ERROR,
"4:2:0, 4:2:2, 4:4:4 supports are currently specified for 8, 10 
and 12 bits.\n");
-return AVERROR_PATCHWELCOME;
+ret = AVERROR_PATCHWELCOME;
+goto err;
 }
 
 desc = av_pix_fmt_desc_get(sps->pix_fmt);

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


[FFmpeg-cvslog] lavfi/apad: fix if_( style

2014-08-20 Thread Stefano Sabatini
ffmpeg | branch: master | Stefano Sabatini  | Mon Aug 18 
14:52:38 2014 +0200| [cb0524f7a02f910ae2df163e655cb495ea9f2493] | committer: 
Stefano Sabatini

lavfi/apad: fix if_( style

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

 libavfilter/af_apad.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_apad.c b/libavfilter/af_apad.c
index 15ba8c4..6b2c8b1 100644
--- a/libavfilter/af_apad.c
+++ b/libavfilter/af_apad.c
@@ -101,7 +101,7 @@ static int request_frame(AVFilterLink *outlink)
 apad->pad_len -= n_out;
 }
 
-if(!n_out)
+if (!n_out)
 return AVERROR_EOF;
 
 outsamplesref = ff_get_audio_buffer(outlink, n_out);

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