[FFmpeg-cvslog] avformat/yuv4mpegdec: fix seeking for partial files

2016-03-03 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Wed Mar  2 20:56:01 
2016 +0100| [dd2ea5cbfb30a0a2ff112d6e48adc42a30484fe9] | committer: Paul B Mahol

avformat/yuv4mpegdec: fix seeking for partial files

Signed-off-by: Paul B Mahol 

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

 libavformat/yuv4mpegdec.c|3 ++-
 tests/ref/seek/lavf-yuv4mpeg |   24 
 2 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/libavformat/yuv4mpegdec.c b/libavformat/yuv4mpegdec.c
index ea1ae25..db07566 100644
--- a/libavformat/yuv4mpegdec.c
+++ b/libavformat/yuv4mpegdec.c
@@ -307,7 +307,8 @@ static int yuv4_read_packet(AVFormatContext *s, AVPacket 
*pkt)
 static int yuv4_read_seek(AVFormatContext *s, int stream_index,
   int64_t pts, int flags)
 {
-avio_seek(s->pb, pts * s->packet_size + s->internal->data_offset, 
SEEK_SET);
+if (avio_seek(s->pb, pts * s->packet_size + s->internal->data_offset, 
SEEK_SET) < 0)
+return -1;
 return 0;
 }
 
diff --git a/tests/ref/seek/lavf-yuv4mpeg b/tests/ref/seek/lavf-yuv4mpeg
index 60c3036..6be9ba9 100644
--- a/tests/ref/seek/lavf-yuv4mpeg
+++ b/tests/ref/seek/lavf-yuv4mpeg
@@ -1,53 +1,45 @@
 ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 64 
size:152064
-ret: 0 st:-1 flags:0  ts:-1.00
-ret: 0 st: 0 flags:1 dts: 0.04 pts: 0.04 pos: 152134 
size:152064
+ret:-1 st:-1 flags:0  ts:-1.00
 ret: 0 st:-1 flags:1  ts: 1.894167
 ret:-EOF
 ret: 0 st: 0 flags:0  ts: 0.80
 ret: 0 st: 0 flags:1 dts: 0.80 pts: 0.80 pos:3041464 
size:152064
-ret: 0 st: 0 flags:1  ts:-0.32
-ret: 0 st: 0 flags:1 dts: 0.84 pts: 0.84 pos:3193534 
size:152064
+ret:-1 st: 0 flags:1  ts:-0.32
 ret: 0 st:-1 flags:0  ts: 2.576668
 ret:-EOF
 ret: 0 st:-1 flags:1  ts: 1.470835
 ret:-EOF
 ret: 0 st: 0 flags:0  ts: 0.36
 ret: 0 st: 0 flags:1 dts: 0.36 pts: 0.36 pos:1368694 
size:152064
-ret: 0 st: 0 flags:1  ts:-0.76
-ret: 0 st: 0 flags:1 dts: 0.40 pts: 0.40 pos:1520764 
size:152064
+ret:-1 st: 0 flags:1  ts:-0.76
 ret: 0 st:-1 flags:0  ts: 2.153336
 ret:-EOF
 ret: 0 st:-1 flags:1  ts: 1.047503
 ret:-EOF
-ret: 0 st: 0 flags:0  ts:-0.04
-ret:-EOF
+ret:-1 st: 0 flags:0  ts:-0.04
 ret: 0 st: 0 flags:1  ts: 2.84
 ret:-EOF
 ret: 0 st:-1 flags:0  ts: 1.730004
 ret:-EOF
 ret: 0 st:-1 flags:1  ts: 0.624171
 ret: 0 st: 0 flags:1 dts: 0.64 pts: 0.64 pos:2433184 
size:152064
-ret: 0 st: 0 flags:0  ts:-0.48
-ret: 0 st: 0 flags:1 dts: 0.68 pts: 0.68 pos:2585254 
size:152064
+ret:-1 st: 0 flags:0  ts:-0.48
 ret: 0 st: 0 flags:1  ts: 2.40
 ret:-EOF
 ret: 0 st:-1 flags:0  ts: 1.306672
 ret:-EOF
 ret: 0 st:-1 flags:1  ts: 0.200839
 ret: 0 st: 0 flags:1 dts: 0.20 pts: 0.20 pos: 760414 
size:152064
-ret: 0 st: 0 flags:0  ts:-0.92
-ret: 0 st: 0 flags:1 dts: 0.24 pts: 0.24 pos: 912484 
size:152064
+ret:-1 st: 0 flags:0  ts:-0.92
 ret: 0 st: 0 flags:1  ts: 2.00
 ret:-EOF
 ret: 0 st:-1 flags:0  ts: 0.883340
 ret: 0 st: 0 flags:1 dts: 0.88 pts: 0.88 pos:3345604 
size:152064
-ret: 0 st:-1 flags:1  ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.92 pts: 0.92 pos:3497674 
size:152064
+ret:-1 st:-1 flags:1  ts:-0.222493
 ret: 0 st: 0 flags:0  ts: 2.68
 ret:-EOF
 ret: 0 st: 0 flags:1  ts: 1.56
 ret:-EOF
 ret: 0 st:-1 flags:0  ts: 0.460008
 ret: 0 st: 0 flags:1 dts: 0.48 pts: 0.48 pos:1824904 
size:152064
-ret: 0 st:-1 flags:1  ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.52 pts: 0.52 pos:1976974 
size:152064
+ret:-1 st:-1 flags:1  ts:-0.645825

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


[FFmpeg-cvslog] lavfi/drawutils: Add some missing GBRP pix_fmts.

2016-03-03 Thread Carl Eugen Hoyos
ffmpeg | branch: master | Carl Eugen Hoyos  | Thu Mar  3 
11:15:30 2016 +0100| [8653d6e1a6681c441b84ccfeb910dac1e3f2a73f] | committer: 
Carl Eugen Hoyos

lavfi/drawutils: Add some missing GBRP pix_fmts.

Fixes for example extractplanes with GBRAP16.

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

 libavfilter/drawutils.c |   10 ++
 1 file changed, 10 insertions(+)

diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index 1ce0366..d37c83e 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -54,10 +54,20 @@ int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat 
pix_fmt)
 case AV_PIX_FMT_BGR0:
 case AV_PIX_FMT_BGR24: rgba_map[BLUE ] = 0; rgba_map[GREEN] = 1; 
rgba_map[RED  ] = 2; rgba_map[ALPHA] = 3; break;
 case AV_PIX_FMT_GBRP9LE:
+case AV_PIX_FMT_GBRP9BE:
 case AV_PIX_FMT_GBRP10LE:
+case AV_PIX_FMT_GBRP10BE:
 case AV_PIX_FMT_GBRP12LE:
+case AV_PIX_FMT_GBRP12BE:
 case AV_PIX_FMT_GBRP14LE:
+case AV_PIX_FMT_GBRP14BE:
+case AV_PIX_FMT_GBRP16LE:
+case AV_PIX_FMT_GBRP16BE:
 case AV_PIX_FMT_GBRAP:
+case AV_PIX_FMT_GBRAP12LE:
+case AV_PIX_FMT_GBRAP12BE:
+case AV_PIX_FMT_GBRAP16LE:
+case AV_PIX_FMT_GBRAP16BE:
 case AV_PIX_FMT_GBRP:  rgba_map[GREEN] = 0; rgba_map[BLUE ] = 1; 
rgba_map[RED  ] = 2; rgba_map[ALPHA] = 3; break;
 default:/* unsupported */
 return AVERROR(EINVAL);

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


[FFmpeg-cvslog] avfilter: add ciescope filter

2016-03-03 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Mon Feb  1 21:05:16 
2016 +0100| [256fa2ab1b2878b116d3cf366832c046fc52d0b0] | committer: Paul B Mahol

avfilter: add ciescope filter

Signed-off-by: Paul B Mahol 

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

 Changelog |1 +
 doc/filters.texi  |   55 ++
 libavfilter/Makefile  |1 +
 libavfilter/allfilters.c  |1 +
 libavfilter/version.h |2 +-
 libavfilter/vf_ciescope.c | 1509 +
 6 files changed, 1568 insertions(+), 1 deletion(-)

diff --git a/Changelog b/Changelog
index 0677b33..d6459a8 100644
--- a/Changelog
+++ b/Changelog
@@ -9,6 +9,7 @@ version :
 - firequalizer filter
 - datascope filter
 - bench and abench filters
+- ciescope filter
 
 
 version 3.0:
diff --git a/doc/filters.texi b/doc/filters.texi
index 6f378d7..a1591c6 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -4553,6 +4553,61 @@ ffmpeg -f lavfi -i color=c=black:s=1280x720 -i video.mp4 
-shortest -filter_compl
 @end example
 @end itemize
 
+@section ciescope
+
+Display CIE color diagram with pixels overlaid onto it.
+
+The filter acccepts the following options:
+
+@table @option
+@item system
+Set color system.
+
+@table @samp
+@item ntsc, 470m
+@item ebu, 470bg
+@item smpte
+@item 240m
+@item apple
+@item widergb
+@item cie1931
+@item rec709, hdtv
+@item uhdtv, rec2020
+@end table
+
+@item cie
+Set CIE system.
+
+@table @samp
+@item xyy
+@item ucs
+@item luv
+@end table
+
+@item gamuts
+Set what gamuts to draw.
+
+See @code{system} option for avaiable values.
+
+@item size, s
+Set ciescope size, by default set to 512.
+
+@item intensity, i
+Set intensity used to map input pixel values to CIE diagram.
+
+@item contrast
+Set contrast used to draw tongue colors that are out of active color system 
gamut.
+
+@item corrgamma
+Correct gamma displayed on scope, by default enabled.
+
+@item showwhite
+Show white point on CIE diagram, by default disabled.
+
+@item gamma
+Set input gamma. Used only with XYZ input color space.
+@end table
+
 @section codecview
 
 Visualize information exported by some codecs.
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index be4b3c1..956a077 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -124,6 +124,7 @@ OBJS-$(CONFIG_BLEND_FILTER)  += vf_blend.o 
dualinput.o framesync
 OBJS-$(CONFIG_BOXBLUR_FILTER)+= vf_boxblur.o
 OBJS-$(CONFIG_BWDIF_FILTER)  += vf_bwdif.o
 OBJS-$(CONFIG_CHROMAKEY_FILTER)  += vf_chromakey.o
+OBJS-$(CONFIG_CIESCOPE_FILTER)   += vf_ciescope.o
 OBJS-$(CONFIG_CODECVIEW_FILTER)  += vf_codecview.o
 OBJS-$(CONFIG_COLORBALANCE_FILTER)   += vf_colorbalance.o
 OBJS-$(CONFIG_COLORCHANNELMIXER_FILTER)  += vf_colorchannelmixer.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index d6145d6..e5080b5 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -145,6 +145,7 @@ void avfilter_register_all(void)
 REGISTER_FILTER(BOXBLUR,boxblur,vf);
 REGISTER_FILTER(BWDIF,  bwdif,  vf);
 REGISTER_FILTER(CHROMAKEY,  chromakey,  vf);
+REGISTER_FILTER(CIESCOPE,   ciescope,   vf);
 REGISTER_FILTER(CODECVIEW,  codecview,  vf);
 REGISTER_FILTER(COLORBALANCE,   colorbalance,   vf);
 REGISTER_FILTER(COLORCHANNELMIXER, colorchannelmixer, vf);
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 2611084..2cfba6b 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -30,7 +30,7 @@
 #include "libavutil/version.h"
 
 #define LIBAVFILTER_VERSION_MAJOR   6
-#define LIBAVFILTER_VERSION_MINOR  38
+#define LIBAVFILTER_VERSION_MINOR  39
 #define LIBAVFILTER_VERSION_MICRO 100
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
diff --git a/libavfilter/vf_ciescope.c b/libavfilter/vf_ciescope.c
new file mode 100644
index 000..d693ff7
--- /dev/null
+++ b/libavfilter/vf_ciescope.c
@@ -0,0 +1,1509 @@
+/*
+ * Copyright (c) 2000 John Walker
+ * Copyright (c) 2016 Paul B Mahol
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavut

[FFmpeg-cvslog] avcodec/dca: simplify condition

2016-03-03 Thread foo86
ffmpeg | branch: master | foo86  | Wed Mar  2 22:32:10 2016 
+0300| [00e3717b4a21d93bdf822588a9f6fbfd1fca27a5] | committer: Michael 
Niedermayer

avcodec/dca: simplify condition

Reviewed-by: Hendrik Leppkes 
Signed-off-by: Michael Niedermayer 

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

 libavcodec/dca_xll.c |   17 ++---
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c
index ffe8ef3..5e6cf35 100644
--- a/libavcodec/dca_xll.c
+++ b/libavcodec/dca_xll.c
@@ -460,19 +460,14 @@ static int chs_parse_band_data(DCAXllDecoder *s, 
DCAXllChSet *c, int band, int s
 // Unpack Rice coding flag
 // 0 - linear code, 1 - Rice code
 c->rice_code_flag[i] = get_bits1(&s->gb);
-if (!c->seg_common && c->rice_code_flag[i]) {
-// Unpack Hybrid Rice coding flag
-// 0 - Rice code, 1 - Hybrid Rice code
-if (get_bits1(&s->gb))
-// Unpack binary code length for isolated samples
-c->bitalloc_hybrid_linear[i] = get_bits(&s->gb, c->nabits) 
+ 1;
-else
-// 0 indicates no Hybrid Rice coding
-c->bitalloc_hybrid_linear[i] = 0;
-} else {
+// Unpack Hybrid Rice coding flag
+// 0 - Rice code, 1 - Hybrid Rice code
+if (!c->seg_common && c->rice_code_flag[i] && get_bits1(&s->gb))
+// Unpack binary code length for isolated samples
+c->bitalloc_hybrid_linear[i] = get_bits(&s->gb, c->nabits) + 1;
+else
 // 0 indicates no Hybrid Rice coding
 c->bitalloc_hybrid_linear[i] = 0;
-}
 }
 
 // Unpack coding parameters

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


[FFmpeg-cvslog] avcodec/dca: fix av_cold placement in declarations

2016-03-03 Thread foo86
ffmpeg | branch: master | foo86  | Wed Mar  2 22:31:46 2016 
+0300| [89813487491afbca5472e8a4af262eedb4aead02] | committer: Michael 
Niedermayer

avcodec/dca: fix av_cold placement in declarations

Reviewed-by: Hendrik Leppkes 
Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c
index cd1af81..ffe8ef3 100644
--- a/libavcodec/dca_xll.c
+++ b/libavcodec/dca_xll.c
@@ -602,7 +602,7 @@ static int chs_parse_band_data(DCAXllDecoder *s, 
DCAXllChSet *c, int band, int s
 return 0;
 }
 
-static void av_cold chs_clear_band_data(DCAXllDecoder *s, DCAXllChSet *c, int 
band, int seg)
+static av_cold void chs_clear_band_data(DCAXllDecoder *s, DCAXllChSet *c, int 
band, int seg)
 {
 DCAXllBand *b = &c->bands[band];
 int i, offset, nsamples;
@@ -1242,7 +1242,7 @@ static void scale_down_mix(DCAXllDecoder *s, DCAXllChSet 
*o, int band)
 
 // Clear all band data and replace non-residual encoded channels with lossy
 // counterparts
-static void av_cold force_lossy_output(DCAXllDecoder *s, DCAXllChSet *c)
+static av_cold void force_lossy_output(DCAXllDecoder *s, DCAXllChSet *c)
 {
 DCAContext *dca = s->avctx->priv_data;
 int band, ch;

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


[FFmpeg-cvslog] avfilter/vf_zscale: unbreak RGB support

2016-03-03 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Thu Mar  3 13:24:50 
2016 +0100| [f5f34ee0de8c587587fe86af1f24d5ebb6116ca7] | committer: Paul B Mahol

avfilter/vf_zscale: unbreak RGB support

Signed-off-by: Paul B Mahol 

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

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

diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c
index 939775a..5a7ffc3 100644
--- a/libavfilter/vf_zscale.c
+++ b/libavfilter/vf_zscale.c
@@ -453,8 +453,8 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
 s->src_format.pixel_type = desc->comp[0].depth > 8 ? ZIMG_PIXEL_WORD : 
ZIMG_PIXEL_BYTE;
 s->src_format.color_family = (desc->flags & AV_PIX_FMT_FLAG_RGB) ? 
ZIMG_COLOR_RGB : ZIMG_COLOR_YUV;
 s->src_format.matrix_coefficients = (desc->flags & 
AV_PIX_FMT_FLAG_RGB) ? ZIMG_MATRIX_RGB : s->colorspace_in == -1 ? 
convert_matrix(in->colorspace) : s->colorspace_in;
-s->src_format.transfer_characteristics = (desc->flags & 
AV_PIX_FMT_FLAG_RGB) ? ZIMG_TRANSFER_UNSPECIFIED : s->trc_in == - 1 ? 
convert_trc(in->color_trc) : s->trc_in;
-s->src_format.color_primaries = (desc->flags & AV_PIX_FMT_FLAG_RGB) ? 
ZIMG_PRIMARIES_UNSPECIFIED : s->primaries_in == -1 ? 
convert_primaries(in->color_primaries) : s->primaries_in;
+s->src_format.transfer_characteristics = s->trc_in == - 1 ? 
convert_trc(in->color_trc) : s->trc_in;
+s->src_format.color_primaries = s->primaries_in == -1 ? 
convert_primaries(in->color_primaries) : s->primaries_in;
 s->src_format.pixel_range = (desc->flags & AV_PIX_FMT_FLAG_RGB) ? 
ZIMG_RANGE_FULL : s->range_in == -1 ? convert_range(in->color_range) : 
s->range_in;
 
 s->dst_format.width = out->width;
@@ -465,8 +465,8 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
 s->dst_format.pixel_type = odesc->comp[0].depth > 8 ? ZIMG_PIXEL_WORD 
: ZIMG_PIXEL_BYTE;
 s->dst_format.color_family = (odesc->flags & AV_PIX_FMT_FLAG_RGB) ? 
ZIMG_COLOR_RGB : ZIMG_COLOR_YUV;
 s->dst_format.matrix_coefficients = (odesc->flags & 
AV_PIX_FMT_FLAG_RGB) ? ZIMG_MATRIX_RGB : s->colorspace == -1 ? 
convert_matrix(out->colorspace) : s->colorspace;
-s->dst_format.transfer_characteristics = (odesc->flags & 
AV_PIX_FMT_FLAG_RGB) ? ZIMG_TRANSFER_UNSPECIFIED : s->trc == -1 ? 
convert_trc(out->color_trc) : s->trc;
-s->dst_format.color_primaries = (odesc->flags & AV_PIX_FMT_FLAG_RGB) ? 
ZIMG_PRIMARIES_UNSPECIFIED : s->primaries == -1 ? 
convert_primaries(out->color_primaries) : s->primaries;
+s->dst_format.transfer_characteristics = s->trc == -1 ? 
convert_trc(out->color_trc) : s->trc;
+s->dst_format.color_primaries = s->primaries == -1 ? 
convert_primaries(out->color_primaries) : s->primaries;
 s->dst_format.pixel_range = (odesc->flags & AV_PIX_FMT_FLAG_RGB) ? 
ZIMG_RANGE_FULL : s->range == -1 ? convert_range(out->color_range) : s->range;
 
 if (s->colorspace != -1)

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


[FFmpeg-cvslog] fate: fix filter-hls tests dependencies

2016-03-03 Thread James Almer
ffmpeg | branch: master | James Almer  | Thu Mar  3 00:46:07 
2016 -0300| [0786b28425ee1f3719a90e9d0d50b8c721ad1c66] | committer: James Almer

fate: fix filter-hls tests dependencies

Reviewed-by: Michael Niedermayer 
Signed-off-by: James Almer 

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

 tests/fate/filter-audio.mak|   15 +--
 tests/ref/fate/{filter-hls2 => filter-hls} |0
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
index fee48fb..b7bc979 100644
--- a/tests/fate/filter-audio.mak
+++ b/tests/fate/filter-audio.mak
@@ -3,12 +3,15 @@ fate-filter-adelay: tests/data/asynth-44100-2.wav
 fate-filter-adelay: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
 fate-filter-adelay: CMD = framecrc -i $(SRC) -af adelay=42
 
-FATE_AFILTER-$(call ALLYES, HLS_DEMUXER MPEGTS_MUXER MPEGTS_DEMUXER 
AEVALSRC_FILTER LAVFI_INDEV MP2FIXED_ENCODER) += fate-filter-hls1 
fate-filter-hls2
-fate-filter-hls1: CMD = run ffmpeg -f lavfi -i 
"aevalsrc=cos(2*PI*t)*sin(2*PI*(440+4*t)*t)::d=20" -f segment -segment_time 10 
-map 0 -flags +bitexact -codec:a mp2fixed \
-   -segment_list 
$(TARGET_PATH)/tests/data/hls-list.m3u8 
$(TARGET_PATH)/tests/data/hls-out-%03d.ts
-fate-filter-hls1: REF = /dev/null
-fate-filter-hls2: fate-filter-hls1
-fate-filter-hls2: CMD = framecrc -flags +bitexact -i 
$(TARGET_PATH)/tests/data/hls-list.m3u8
+tests/data/hls-list.m3u8: TAG = GEN
+tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
+   $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \
+-f lavfi -i "aevalsrc=cos(2*PI*t)*sin(2*PI*(440+4*t)*t)::d=20" -f 
segment -segment_time 10 -map 0 -flags +bitexact -codec:a mp2fixed \
+-segment_list $(TARGET_PATH)/$@ -y 
$(TARGET_PATH)/tests/data/hls-out-%03d.ts 2>/dev/null
+
+FATE_AFILTER-$(call ALLYES, HLS_DEMUXER MPEGTS_MUXER MPEGTS_DEMUXER 
AEVALSRC_FILTER LAVFI_INDEV MP2FIXED_ENCODER) += fate-filter-hls
+fate-filter-hls: tests/data/hls-list.m3u8
+fate-filter-hls: CMD = framecrc -flags +bitexact -i 
$(TARGET_PATH)/tests/data/hls-list.m3u8
 
 FATE_AMIX += fate-filter-amix-simple
 fate-filter-amix-simple: CMD = ffmpeg -filter_complex amix -i $(SRC) -ss 3 -i 
$(SRC1) -f f32le -
diff --git a/tests/ref/fate/filter-hls2 b/tests/ref/fate/filter-hls
similarity index 100%
rename from tests/ref/fate/filter-hls2
rename to tests/ref/fate/filter-hls

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


[FFmpeg-cvslog] avfilter/vf_ciescope: Fix "incompatible pointer type" warnings

2016-03-03 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu 
Mar  3 14:53:08 2016 +0100| [50208a0424fa1edbab9f325af0091498a65b8b96] | 
committer: Michael Niedermayer

avfilter/vf_ciescope: Fix "incompatible pointer type" warnings

Signed-off-by: Michael Niedermayer 

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

 libavfilter/vf_ciescope.c |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavfilter/vf_ciescope.c b/libavfilter/vf_ciescope.c
index d693ff7..c9456a3 100644
--- a/libavfilter/vf_ciescope.c
+++ b/libavfilter/vf_ciescope.c
@@ -1229,7 +1229,7 @@ static int draw_background(AVFilterContext *ctx)
 
 tongue_outline(pixels, s->f->linesize[0] / 2, w, h, 65535, s->cie);
 
-fill_in_tongue(pixels, s->f->linesize[0] / 2, w, h, 65535, cs, s->i, 
s->cie,
+fill_in_tongue(pixels, s->f->linesize[0] / 2, w, h, 65535, cs, (const 
double (*)[3])s->i, s->cie,
s->correct_gamma, s->contrast);
 
 return 0;
@@ -1244,7 +1244,7 @@ static void filter_rgb48(AVFilterContext *ctx, AVFrame 
*in, double *cx, double *
 double b = src[2] / 65535.;
 double cz;
 
-rgb_to_xy(r, g, b, cx, cy, &cz, s->m);
+rgb_to_xy(r, g, b, cx, cy, &cz, (const double (*)[3])s->m);
 }
 
 static void filter_rgba64(AVFilterContext *ctx, AVFrame *in, double *cx, 
double *cy, int x, int y)
@@ -1256,7 +1256,7 @@ static void filter_rgba64(AVFilterContext *ctx, AVFrame 
*in, double *cx, double
 double b = src[2] / 65535.;
 double cz;
 
-rgb_to_xy(r, g, b, cx, cy, &cz, s->m);
+rgb_to_xy(r, g, b, cx, cy, &cz, (const double (*)[3])s->m);
 }
 
 static void filter_rgb24(AVFilterContext *ctx, AVFrame *in, double *cx, double 
*cy, int x, int y)
@@ -1268,7 +1268,7 @@ static void filter_rgb24(AVFilterContext *ctx, AVFrame 
*in, double *cx, double *
 double b = src[2] / 255.;
 double cz;
 
-rgb_to_xy(r, g, b, cx, cy, &cz, s->m);
+rgb_to_xy(r, g, b, cx, cy, &cz, (const double (*)[3])s->m);
 }
 
 static void filter_rgba(AVFilterContext *ctx, AVFrame *in, double *cx, double 
*cy, int x, int y)
@@ -1280,7 +1280,7 @@ static void filter_rgba(AVFilterContext *ctx, AVFrame 
*in, double *cx, double *c
 double b = src[2] / 255.;
 double cz;
 
-rgb_to_xy(r, g, b, cx, cy, &cz, s->m);
+rgb_to_xy(r, g, b, cx, cy, &cz, (const double (*)[3])s->m);
 }
 
 static void filter_xyz(AVFilterContext *ctx, AVFrame *in, double *cx, double 
*cy, int x, int y)

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


[FFmpeg-cvslog] ffmpeg_vdpau: Free ctx on error path

2016-03-03 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu 
Mar  3 15:48:17 2016 +0100| [ba687ae0bdd168332261853a965576bc78c4f7e0] | 
committer: Michael Niedermayer

ffmpeg_vdpau: Free ctx on error path

Fixes CID1355118

Signed-off-by: Michael Niedermayer 

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

 ffmpeg_vdpau.c |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ffmpeg_vdpau.c b/ffmpeg_vdpau.c
index 59a5f70..cf2e83e 100644
--- a/ffmpeg_vdpau.c
+++ b/ffmpeg_vdpau.c
@@ -126,8 +126,10 @@ static int vdpau_alloc(AVCodecContext *s)
 return AVERROR(ENOMEM);
 
 device_priv = av_mallocz(sizeof(*device_priv));
-if (!device_priv)
+if (!device_priv) {
+av_freep(&ctx);
 goto fail;
+}
 
 ist->hwaccel_ctx   = ctx;
 ist->hwaccel_uninit= vdpau_uninit;

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


[FFmpeg-cvslog] Merge commit '8c0ceafb0f25da077ff23e394667119f031574fd'

2016-03-03 Thread Derek Buitenhuis
ffmpeg | branch: master | Derek Buitenhuis  | Thu 
Mar  3 16:12:16 2016 +| [510046c228cb1232313195c6a9b6a5345dddba0b] | 
committer: Derek Buitenhuis

Merge commit '8c0ceafb0f25da077ff23e394667119f031574fd'

This commit is a no-p. We already have a mechanism to do this.

* commit '8c0ceafb0f25da077ff23e394667119f031574fd':
  urlprotocol: receive a list of protocols from the caller

Merged-by: Derek Buitenhuis 

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



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


[FFmpeg-cvslog] urlprotocol: receive a list of protocols from the caller

2016-03-03 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Fri Feb 19 
18:02:45 2016 +0100| [8c0ceafb0f25da077ff23e394667119f031574fd] | committer: 
Anton Khirnov

urlprotocol: receive a list of protocols from the caller

This way, the decisions about which protocols are available for use in
any given situations can be delegated to the caller.

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

 libavformat/avio.c   |   42 +++---
 libavformat/aviobuf.c|   20 --
 libavformat/concat.c |2 +-
 libavformat/crypto.c |2 +-
 libavformat/gopher.c |2 +-
 libavformat/hlsproto.c   |2 +-
 libavformat/http.c   |4 ++--
 libavformat/icecast.c|3 ++-
 libavformat/md5proto.c   |3 ++-
 libavformat/mmsh.c   |4 ++--
 libavformat/mmst.c   |2 +-
 libavformat/rtmpcrypt.c  |2 +-
 libavformat/rtmphttp.c   |2 +-
 libavformat/rtmpproto.c  |4 ++--
 libavformat/rtpproto.c   |6 --
 libavformat/rtsp.c   |   33 +++---
 libavformat/rtsp.h   |2 ++
 libavformat/rtspdec.c|   10 +++--
 libavformat/sapdec.c |   11 +-
 libavformat/sapenc.c |   15 --
 libavformat/smoothstreamingenc.c |   24 +++---
 libavformat/srtpproto.c  |3 ++-
 libavformat/tls.c|2 +-
 libavformat/url.h|   16 +--
 24 files changed, 162 insertions(+), 54 deletions(-)

diff --git a/libavformat/avio.c b/libavformat/avio.c
index a9a399a..668e5ea 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -62,7 +62,8 @@ const AVClass ffurl_context_class = {
 
 static int url_alloc_for_protocol(URLContext **puc, const URLProtocol *up,
   const char *filename, int flags,
-  const AVIOInterruptCB *int_cb)
+  const AVIOInterruptCB *int_cb,
+  const URLProtocol **protocols)
 {
 URLContext *uc;
 int err;
@@ -83,6 +84,7 @@ static int url_alloc_for_protocol(URLContext **puc, const 
URLProtocol *up,
 uc->flags   = flags;
 uc->is_streamed = 0; /* default = not streamed */
 uc->max_packet_size = 0; /* default: stream file */
+uc->protocols   = protocols;
 if (up->priv_data_size) {
 uc->priv_data = av_mallocz(up->priv_data_size);
 if (!uc->priv_data) {
@@ -136,9 +138,9 @@ int ffurl_connect(URLContext *uc, AVDictionary **options)
 "0123456789+-."
 
 int ffurl_alloc(URLContext **puc, const char *filename, int flags,
-const AVIOInterruptCB *int_cb)
+const AVIOInterruptCB *int_cb,
+const URLProtocol **protocols)
 {
-const URLProtocol **protocols;
 char proto_str[128], proto_nested[128], *ptr;
 size_t proto_len = strspn(filename, URL_SCHEME_CHARS);
 int i;
@@ -153,27 +155,25 @@ int ffurl_alloc(URLContext **puc, const char *filename, 
int flags,
 if ((ptr = strchr(proto_nested, '+')))
 *ptr = '\0';
 
-protocols = ffurl_get_protocols(NULL, NULL);
 for (i = 0; protocols[i]; i++) {
 const URLProtocol *up = protocols[i];
-if (!strcmp(proto_str, up->name)) {
-av_freep(&protocols);
-return url_alloc_for_protocol(puc, up, filename, flags, int_cb);
-}
+if (!strcmp(proto_str, up->name))
+return url_alloc_for_protocol(puc, up, filename, flags, int_cb,
+  protocols);
 if (up->flags & URL_PROTOCOL_FLAG_NESTED_SCHEME &&
-!strcmp(proto_nested, up->name)) {
-av_freep(&protocols);
-return url_alloc_for_protocol(puc, up, filename, flags, int_cb);
-}
+!strcmp(proto_nested, up->name))
+return url_alloc_for_protocol(puc, up, filename, flags, int_cb,
+  protocols);
 }
 *puc = NULL;
 return AVERROR_PROTOCOL_NOT_FOUND;
 }
 
 int ffurl_open(URLContext **puc, const char *filename, int flags,
-   const AVIOInterruptCB *int_cb, AVDictionary **options)
+   const AVIOInterruptCB *int_cb, AVDictionary **options,
+   const URLProtocol **protocols)
 {
-int ret = ffurl_alloc(puc, filename, flags, int_cb);
+int ret = ffurl_alloc(puc, filename, flags, int_cb, protocols);
 if (ret)
 return ret;
 if (options && (*puc)->prot->priv_data_class &&
@@ -281,10 +281,19 @@ int ffurl_close(URLContext *h)
 
 int avio_check(const char *url, int flags)
 {
+const URLProtocol **protocols;
 URLContext *h;
-int ret = ffurl_alloc(&h, url, flags, NULL);
-if (ret)
+int ret;
+
+protocols = ffurl

[FFmpeg-cvslog] Add test for avpriv_get_trc_function_from_trc function

2016-03-03 Thread NagaChaitanya Vellanki
ffmpeg | branch: master | NagaChaitanya Vellanki 
 | Thu Mar  3 10:01:28 2016 -0800| 
[df4b5f076e67a537931b0ebea111fc9a15c6378b] | committer: Michael Niedermayer

Add test for avpriv_get_trc_function_from_trc function

Signed-off-by: Michael Niedermayer 

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

 libavutil/Makefile |1 +
 libavutil/color_utils.c|   29 +
 tests/fate/libavutil.mak   |4 +
 tests/ref/fate/color_utils |  285 
 4 files changed, 319 insertions(+)

diff --git a/libavutil/Makefile b/libavutil/Makefile
index a4d79cd..934564f 100644
--- a/libavutil/Makefile
+++ b/libavutil/Makefile
@@ -176,6 +176,7 @@ TESTPROGS = adler32 
\
 bprint  \
 cast5   \
 camellia\
+color_utils \
 cpu \
 crc \
 des \
diff --git a/libavutil/color_utils.c b/libavutil/color_utils.c
index b68b402..0bb7e3d 100644
--- a/libavutil/color_utils.c
+++ b/libavutil/color_utils.c
@@ -21,6 +21,7 @@
 #include 
 #include 
 
+#include "common.h"
 #include "libavutil/color_utils.h"
 #include "libavutil/pixfmt.h"
 
@@ -216,3 +217,31 @@ avpriv_trc_function avpriv_get_trc_function_from_trc(enum 
AVColorTransferCharact
 }
 return func;
 }
+
+#ifdef TEST
+// LCOV_EXCL_START
+
+int main(int argc, char *argv[])
+{
+  int i, j;
+  double test_data[] = {
+  -0.1, -0.018053968510807, -0.01, -0.00449, 0.0, 0.00316227760, 0.005,
+  0.009, 0.015, 0.1, 1.0, 52.37, 125.098765, 1999.11123, 6945.443,
+  15123.4567, 19845.88923, 98678.4231, 9.88
+  };
+
+  for(i = 0; i < AVCOL_TRC_NB; i++) {
+  avpriv_trc_function func = avpriv_get_trc_function_from_trc(i);
+  for(j = 0; j < FF_ARRAY_ELEMS(test_data); j++) {
+  if(func != NULL) {
+  double result = func(test_data[j]);
+  printf("AVColorTransferCharacteristic=%d calling func(%f) 
expected=%f\n",
+ i, test_data[j], result);
+  }
+  }
+  }
+
+}
+
+// LCOV_EXCL_STOP
+#endif
diff --git a/tests/fate/libavutil.mak b/tests/fate/libavutil.mak
index 022ae6a..a89bc1d 100644
--- a/tests/fate/libavutil.mak
+++ b/tests/fate/libavutil.mak
@@ -48,6 +48,10 @@ FATE_LIBAVUTIL += fate-crc
 fate-crc: libavutil/crc-test$(EXESUF)
 fate-crc: CMD = run libavutil/crc-test
 
+FATE_LIBAVUTIL += fate-color_utils
+fate-color_utils: libavutil/color_utils-test$(EXESUF)
+fate-color_utils: CMD = run libavutil/color_utils-test
+
 FATE_LIBAVUTIL += fate-des
 fate-des: libavutil/des-test$(EXESUF)
 fate-des: CMD = run libavutil/des-test
diff --git a/tests/ref/fate/color_utils b/tests/ref/fate/color_utils
new file mode 100644
index 000..6e80ebd
--- /dev/null
+++ b/tests/ref/fate/color_utils
@@ -0,0 +1,285 @@
+AVColorTransferCharacteristic=1 calling func(-0.10) expected=0.00
+AVColorTransferCharacteristic=1 calling func(-0.018054) expected=0.00
+AVColorTransferCharacteristic=1 calling func(-0.01) expected=0.00
+AVColorTransferCharacteristic=1 calling func(-0.004490) expected=0.00
+AVColorTransferCharacteristic=1 calling func(0.00) expected=0.00
+AVColorTransferCharacteristic=1 calling func(0.003162) expected=0.014230
+AVColorTransferCharacteristic=1 calling func(0.005000) expected=0.022500
+AVColorTransferCharacteristic=1 calling func(0.009000) expected=0.040500
+AVColorTransferCharacteristic=1 calling func(0.015000) expected=0.067500
+AVColorTransferCharacteristic=1 calling func(0.10) expected=0.290748
+AVColorTransferCharacteristic=1 calling func(1.00) expected=1.00
+AVColorTransferCharacteristic=1 calling func(52.37) expected=6.427531
+AVColorTransferCharacteristic=1 calling func(125.098765) expected=9.558517
+AVColorTransferCharacteristic=1 calling func(1999.111230) expected=33.512490
+AVColorTransferCharacteristic=1 calling func(6945.443000) expected=58.768794
+AVColorTransferCharacteristic=1 calling func(15123.456700) expected=83.452916
+AVColorTransferCharacteristic=1 calling func(19845.889230) expected=94.321297
+AVColorTransferCharacteristic=1 calling func(98678.423100) expected=194.219568
+AVColorTransferCharacteristic=1 calling func(9.88) expected=195.386306
+AVColorTransferCharacteristic=4 calling func(-0.10) expected=0.00
+AVColorTransferCharacteristic=4 calling func(-0.018054) expected=0.00
+AVColorTransferCharacteristic=4 calling func(-0.01) expected=0.00
+AVColorTransferCharacteristic=4 calling func(-0.004490) expected=0.00
+A

[FFmpeg-cvslog] avfilter/vf_vectorscope: add threshold option

2016-03-03 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Thu Mar  3 20:44:38 
2016 +0100| [768734a0ff248d2da1e27d8faa52cb7301286f82] | committer: Paul B Mahol

avfilter/vf_vectorscope: add threshold option

Useful to only display lows/mids/highs.

Signed-off-by: Paul B Mahol 

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

 doc/filters.texi |   14 +++
 libavfilter/vf_vectorscope.c |   84 --
 2 files changed, 95 insertions(+), 3 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index a1591c6..4ec7507 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -12639,6 +12639,20 @@ Draw graticule for black point.
 
 @item bgopacity, b
 Set background opacity.
+
+@item lthreshold, l
+Set low threshold for color component not represented on X or Y axis.
+Values lower than this value will be ignored. Default is 0.
+Note this value is multiplied with actual max possible value one pixel 
component
+can have. So for 8-bit input and low threshold value of 0.1 actual threshold
+is 0.1 * 255 = 25.
+
+@item hthreshold, h
+Set high threshold for color component not represented on X or Y axis.
+Values higher than this value will be ignored. Default is 1.
+Note this value is multiplied with actual max possible value one pixel 
component
+can have. So for 8-bit input and high threshold value of 0.9 actual threshold
+is 0.9 * 255 = 230.
 @end table
 
 @anchor{vidstabdetect}
diff --git a/libavfilter/vf_vectorscope.c b/libavfilter/vf_vectorscope.c
index 4a53bf0..35e6eb6 100644
--- a/libavfilter/vf_vectorscope.c
+++ b/libavfilter/vf_vectorscope.c
@@ -56,6 +56,10 @@ typedef struct VectorscopeContext {
 int graticule;
 float opacity;
 float bgopacity;
+float lthreshold;
+float hthreshold;
+int tmin;
+int tmax;
 int flags;
 int cs;
 uint8_t peak[1024][1024];
@@ -101,6 +105,10 @@ static const AVOption vectorscope_options[] = {
 {   "black", "draw black point", 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, 
FLAGS, "flags" },
 { "bgopacity", "set background opacity", OFFSET(bgopacity), 
AV_OPT_TYPE_FLOAT, {.dbl=0.3}, 0, 1, FLAGS},
 { "b", "set background opacity", OFFSET(bgopacity), 
AV_OPT_TYPE_FLOAT, {.dbl=0.3}, 0, 1, FLAGS},
+{ "lthreshold", "set low threshold",  OFFSET(lthreshold), 
AV_OPT_TYPE_FLOAT, {.dbl=0}, 0, 1, FLAGS},
+{ "l",  "set low threshold",  OFFSET(lthreshold), 
AV_OPT_TYPE_FLOAT, {.dbl=0}, 0, 1, FLAGS},
+{ "hthreshold", "set high threshold", OFFSET(hthreshold), 
AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 1, FLAGS},
+{ "h",  "set high threshold", OFFSET(hthreshold), 
AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 1, FLAGS},
 { NULL }
 };
 
@@ -371,6 +379,8 @@ static void vectorscope16(VectorscopeContext *s, AVFrame 
*in, AVFrame *out, int
 uint16_t *dpd = dst[pd];
 const int max = s->size - 1;
 const int mid = s->size / 2;
+const int tmin = s->tmin;
+const int tmax = s->tmax;
 int i, j, k;
 
 for (k = 0; k < 4 && dst[k]; k++) {
@@ -388,11 +398,16 @@ static void vectorscope16(VectorscopeContext *s, AVFrame 
*in, AVFrame *out, int
 for (i = 0; i < h; i++) {
 const int iwx = i * slinesizex;
 const int iwy = i * slinesizey;
+const int iwd = i * slinesized;
 for (j = 0; j < w; j++) {
 const int x = FFMIN(spx[iwx + j], max);
 const int y = FFMIN(spy[iwy + j], max);
+const int z = spd[iwd + j];
 const int pos = y * dlinesize + x;
 
+if (z < tmin || z > tmax)
+continue;
+
 dpd[pos] = FFMIN(dpd[pos] + intensity, max);
 if (dst[3])
 dst[3][pos] = max;
@@ -402,11 +417,16 @@ static void vectorscope16(VectorscopeContext *s, AVFrame 
*in, AVFrame *out, int
 for (i = 0; i < h; i++) {
 const int iwx = i * slinesizex;
 const int iwy = i * slinesizey;
+const int iwd = i * slinesized;
 for (j = 0; j < w; j++) {
 const int x = FFMIN(spx[iwx + j], max);
 const int y = FFMIN(spy[iwy + j], max);
+const int z = spd[iwd + j];
 const int pos = y * dlinesize + x;
 
+if (z < tmin || z > tmax)
+continue;
+
 dst[0][pos] = FFMIN(dst[0][pos] + intensity, max);
 dst[1][pos] = FFMIN(dst[1][pos] + intensity, max);
 dst[2][pos] = FFMIN(dst[2][pos] + intensity, max);
@@ -421,11 +441,16 @@ static void vectorscope16(VectorscopeContext *s, AVFrame 
*in, AVFrame *out, int
 for (i = 0; i < h; i++) {
 const int iw1 = i * slinesizex;
 const int iw2 = i * slinesizey;
+const int iwd = i * sl

[FFmpeg-cvslog] avfilter/vf_vectorscope: improve green graticule visibility

2016-03-03 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Thu Mar  3 21:03:23 
2016 +0100| [5e9f85925c6fd98b97883fae5457dc5a7c24097d] | committer: Paul B Mahol

avfilter/vf_vectorscope: improve green graticule visibility

Signed-off-by: Paul B Mahol 

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

 libavfilter/vf_vectorscope.c |   36 ++--
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/libavfilter/vf_vectorscope.c b/libavfilter/vf_vectorscope.c
index 35e6eb6..e3d6627 100644
--- a/libavfilter/vf_vectorscope.c
+++ b/libavfilter/vf_vectorscope.c
@@ -930,9 +930,9 @@ static void green_graticule16(VectorscopeContext *s, 
AVFrame *out, int X, int Y,
 int x = positions[P][i][X];
 int y = positions[P][i][Y];
 
-draw_dots16((uint16_t *)(out->data[D] + y * out->linesize[D] + x * 2), 
out->linesize[D] / 2, 128 * m, o);
-draw_dots16((uint16_t *)(out->data[X] + y * out->linesize[X] + x * 2), 
out->linesize[X] / 2, 0, o);
-draw_dots16((uint16_t *)(out->data[Y] + y * out->linesize[Y] + x * 2), 
out->linesize[Y] / 2, 0, o);
+draw_dots16((uint16_t *)(out->data[0] + y * out->linesize[0] + x * 2), 
out->linesize[0] / 2, 128 * m, o);
+draw_dots16((uint16_t *)(out->data[1] + y * out->linesize[1] + x * 2), 
out->linesize[1] / 2, 0, o);
+draw_dots16((uint16_t *)(out->data[2] + y * out->linesize[2] + x * 2), 
out->linesize[2] / 2, 0, o);
 if (out->data[3])
 draw_dots16((uint16_t *)(out->data[3] + y * out->linesize[3] + x * 
2), out->linesize[3] / 2, max, o);
 }
@@ -941,9 +941,9 @@ static void green_graticule16(VectorscopeContext *s, 
AVFrame *out, int X, int Y,
 int x = positions[P][12][X];
 int y = positions[P][12][Y];
 
-draw_dots16((uint16_t *)(out->data[D] + y * out->linesize[D] + x * 2), 
out->linesize[D] / 2, 128 * m, o);
-draw_dots16((uint16_t *)(out->data[X] + y * out->linesize[X] + x * 2), 
out->linesize[X] / 2, 0, o);
-draw_dots16((uint16_t *)(out->data[Y] + y * out->linesize[Y] + x * 2), 
out->linesize[Y] / 2, 0, o);
+draw_dots16((uint16_t *)(out->data[0] + y * out->linesize[0] + x * 2), 
out->linesize[0] / 2, 128 * m, o);
+draw_dots16((uint16_t *)(out->data[1] + y * out->linesize[1] + x * 2), 
out->linesize[1] / 2, 0, o);
+draw_dots16((uint16_t *)(out->data[2] + y * out->linesize[2] + x * 2), 
out->linesize[2] / 2, 0, o);
 if (out->data[3])
 draw_dots16((uint16_t *)(out->data[3] + y * out->linesize[3] + x * 
2), out->linesize[3] / 2, max, o);
 }
@@ -952,9 +952,9 @@ static void green_graticule16(VectorscopeContext *s, 
AVFrame *out, int X, int Y,
 int x = positions[P][13][X];
 int y = positions[P][13][Y];
 
-draw_dots16((uint16_t *)(out->data[D] + y * out->linesize[D] + x * 2), 
out->linesize[D] / 2, 128 * m, o);
-draw_dots16((uint16_t *)(out->data[X] + y * out->linesize[X] + x * 2), 
out->linesize[X] / 2, 0, o);
-draw_dots16((uint16_t *)(out->data[Y] + y * out->linesize[Y] + x * 2), 
out->linesize[Y] / 2, 0, o);
+draw_dots16((uint16_t *)(out->data[0] + y * out->linesize[0] + x * 2), 
out->linesize[0] / 2, 128 * m, o);
+draw_dots16((uint16_t *)(out->data[1] + y * out->linesize[1] + x * 2), 
out->linesize[1] / 2, 0, o);
+draw_dots16((uint16_t *)(out->data[2] + y * out->linesize[2] + x * 2), 
out->linesize[2] / 2, 0, o);
 if (out->data[3])
 draw_dots16((uint16_t *)(out->data[3] + y * out->linesize[3] + x * 
2), out->linesize[3] / 2, max, o);
 }
@@ -969,9 +969,9 @@ static void green_graticule(VectorscopeContext *s, AVFrame 
*out, int X, int Y, i
 int x = positions[P][i][X];
 int y = positions[P][i][Y];
 
-draw_dots(out->data[D] + y * out->linesize[D] + x, out->linesize[D], 
128, o);
-draw_dots(out->data[X] + y * out->linesize[X] + x, out->linesize[X], 
0, o);
-draw_dots(out->data[Y] + y * out->linesize[Y] + x, out->linesize[Y], 
0, o);
+draw_dots(out->data[0] + y * out->linesize[0] + x, out->linesize[0], 
128, o);
+draw_dots(out->data[1] + y * out->linesize[1] + x, out->linesize[1], 
0, o);
+draw_dots(out->data[2] + y * out->linesize[2] + x, out->linesize[2], 
0, o);
 if (out->data[3])
 draw_dots(out->data[3] + y * out->linesize[3] + x, 
out->linesize[3], 255, o);
 }
@@ -980,9 +980,9 @@ static void green_graticule(VectorscopeContext *s, AVFrame 
*out, int X, int Y, i
 int x = positions[P][12][X];
 int y = positions[P][12][Y];
 
-draw_dots(out->data[D] + y * out->linesize[D] + x, out->linesize[D], 
128, o);
-draw_dots(out->data[X] + y * out->linesize[X] + x, out->linesize[X], 
0, o);
-draw_dots(out->data[Y] + y * out->linesize[Y] + x, out->linesize[Y], 
0, o);
+draw_dots(out->data[0] + y * out->linesize[0] + x, out->linesize[0], 
128, o);
+ 

[FFmpeg-cvslog] [ffmpeg-web] branch master updated. 620e494 web/contact: Fix link.

2016-03-03 Thread ffmpeg-cvslog
The branch, master has been updated
   via  620e49476732fe02d4120bc1f7c8d92ddb5db0df (commit)
  from  a8164b5d2c8897d5e66696b94e149bf77af32cbd (commit)


- Log -
commit 620e49476732fe02d4120bc1f7c8d92ddb5db0df
Author: Simon Thelen 
AuthorDate: Thu Mar 3 21:09:46 2016 +0100
Commit: Michael Niedermayer 
CommitDate: Thu Mar 3 21:10:31 2016 +0100

web/contact: Fix link.

Signed-off-by: Simon Thelen 

diff --git a/src/contact b/src/contact
index 077f9ca..22c1e11 100644
--- a/src/contact
+++ b/src/contact
@@ -154,6 +154,6 @@
   
 http://ffmpeg.zeranoe.com/forum/";>FFmpeg on Windows
    
-http://ffmpeg.gusari.org/";>FFmpeg 
Support Forum
+http://ffmpeg.gusari.org/index.php";>FFmpeg Support Forum
   
  

---

Summary of changes:
 src/contact | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 

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


[FFmpeg-cvslog] avutil/color_utils: Mark test_data as static const

2016-03-03 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu 
Mar  3 21:04:08 2016 +0100| [9b0eabdcdfc53b624d1439f5d0a26b25fd3e453c] | 
committer: Michael Niedermayer

avutil/color_utils: Mark test_data as static const

Signed-off-by: Michael Niedermayer 

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

 libavutil/color_utils.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/color_utils.c b/libavutil/color_utils.c
index 0bb7e3d..6dba46a 100644
--- a/libavutil/color_utils.c
+++ b/libavutil/color_utils.c
@@ -224,7 +224,7 @@ avpriv_trc_function avpriv_get_trc_function_from_trc(enum 
AVColorTransferCharact
 int main(int argc, char *argv[])
 {
   int i, j;
-  double test_data[] = {
+  static const double test_data[] = {
   -0.1, -0.018053968510807, -0.01, -0.00449, 0.0, 0.00316227760, 0.005,
   0.009, 0.015, 0.1, 1.0, 52.37, 125.098765, 1999.11123, 6945.443,
   15123.4567, 19845.88923, 98678.4231, 9.88

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


[FFmpeg-cvslog] avfilter/vf_ciescope: Fix 'ISO C90 forbids mixed declarations and code'

2016-03-03 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu 
Mar  3 21:19:32 2016 +0100| [966eadeab3173f5c756aaae337f340c70545f4c6] | 
committer: Michael Niedermayer

avfilter/vf_ciescope: Fix 'ISO C90 forbids mixed declarations and code'

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavfilter/vf_ciescope.c b/libavfilter/vf_ciescope.c
index c9456a3..450c17b 100644
--- a/libavfilter/vf_ciescope.c
+++ b/libavfilter/vf_ciescope.c
@@ -772,6 +772,7 @@ static void invert_matrix3x3(double in[3][3], double 
out[3][3])
m10 = in[1][0], m11 = in[1][1], m12 = in[1][2],
m20 = in[2][0], m21 = in[2][1], m22 = in[2][2];
 int i, j;
+double det;
 
 out[0][0] =  (m11 * m22 - m21 * m12);
 out[0][1] = -(m01 * m22 - m21 * m02);
@@ -783,7 +784,7 @@ static void invert_matrix3x3(double in[3][3], double 
out[3][3])
 out[2][1] = -(m00 * m21 - m20 * m01);
 out[2][2] =  (m00 * m11 - m10 * m01);
 
-double det = m00 * out[0][0] + m10 * out[0][1] + m20 * out[0][2];
+det = m00 * out[0][0] + m10 * out[0][1] + m20 * out[0][2];
 det = 1.0 / det;
 
 for (i = 0; i < 3; i++) {

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


[FFmpeg-cvslog] avcodec/utils: Fix 'ISO C90 forbids mixed declarations and code'

2016-03-03 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu 
Mar  3 21:19:32 2016 +0100| [fbfd2601f6604fbdfcbd4906dad13ca099905b06] | 
committer: Michael Niedermayer

avcodec/utils: Fix 'ISO C90 forbids mixed declarations and code'

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index f435588..b993899 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -3682,9 +3682,9 @@ AVCPBProperties *ff_add_cpb_side_data(AVCodecContext 
*avctx)
 
 #ifdef TEST
 int main(void){
-avcodec_register_all();
 AVCodec *codec = NULL;
 int ret = 0;
+avcodec_register_all();
 
 while (codec = av_codec_next(codec)) {
 if (av_codec_is_encoder(codec)) {

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


[FFmpeg-cvslog] avfilter/af_sofalizer: print size of FFT that failed to init

2016-03-03 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Thu Mar  3 23:09:36 
2016 +0100| [3e491a1fb61330c66618d9af17aca1989d393051] | committer: Paul B Mahol

avfilter/af_sofalizer: print size of FFT that failed to init

Signed-off-by: Paul B Mahol 

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

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

diff --git a/libavfilter/af_sofalizer.c b/libavfilter/af_sofalizer.c
index 0f1231f..877f009 100644
--- a/libavfilter/af_sofalizer.c
+++ b/libavfilter/af_sofalizer.c
@@ -999,7 +999,7 @@ static int config_input(AVFilterLink *inlink)
 s->ifft[1] = av_fft_init(log2(s->n_fft), 1);
 
 if (!s->fft[0] || !s->fft[1] || !s->ifft[0] || !s->ifft[1]) {
-av_log(ctx, AV_LOG_ERROR, "Unable to create FFT contexts.\n");
+av_log(ctx, AV_LOG_ERROR, "Unable to create FFT contexts of size 
%d.\n", s->n_fft);
 return AVERROR(ENOMEM);
 }
 }

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


[FFmpeg-cvslog] avfilter/af_sofalizer: fix crash with odd IR size

2016-03-03 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Thu Mar  3 23:58:14 
2016 +0100| [21234c835d2d003d390d462b6e1b2622e7b02c39] | committer: Paul B Mahol

avfilter/af_sofalizer: fix crash with odd IR size

Signed-off-by: Paul B Mahol 

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

 libavfilter/af_sofalizer.c |   22 --
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/libavfilter/af_sofalizer.c b/libavfilter/af_sofalizer.c
index 877f009..33937d8 100644
--- a/libavfilter/af_sofalizer.c
+++ b/libavfilter/af_sofalizer.c
@@ -269,7 +269,7 @@ static int load_sofa(AVFilterContext *ctx, char *filename, 
int *samplingrate)
 sp_r = s->sofa.sp_r = av_malloc_array(m_dim, sizeof(float));
 /* delay and IR values required for each ear and measurement position: */
 data_delay = s->sofa.data_delay = av_calloc(m_dim, 2 * sizeof(int));
-data_ir = s->sofa.data_ir = av_malloc_array(m_dim * n_samples, 
sizeof(float) * 2);
+data_ir = s->sofa.data_ir = av_calloc(m_dim * FFALIGN(n_samples, 16), 
sizeof(float) * 2);
 
 if (!data_delay || !sp_a || !sp_e || !sp_r || !data_ir) {
 /* if memory could not be allocated */
@@ -352,6 +352,8 @@ static int load_sofa(AVFilterContext *ctx, char *filename, 
int *samplingrate)
 s->sofa.ncid = ncid; /* netCDF ID of SOFA file */
 nc_close(ncid); /* close SOFA file */
 
+av_log(ctx, AV_LOG_DEBUG, "m_dim: %d n_samples %d\n", m_dim, n_samples);
+
 return 0;
 
 error:
@@ -554,7 +556,7 @@ static int sofalizer_convolute(AVFilterContext *ctx, void 
*arg, int jobnr, int n
 /* LFE is an input channel but requires no convolution */
 /* apply gain to LFE signal and add to output buffer */
 *dst += *(buffer[s->lfe_channel] + wr) * s->gain_lfe;
-temp_ir += n_samples;
+temp_ir += FFALIGN(n_samples, 16);
 continue;
 }
 
@@ -574,7 +576,7 @@ static int sofalizer_convolute(AVFilterContext *ctx, void 
*arg, int jobnr, int n
 
 /* multiply signal and IR, and add up the results */
 dst[0] += s->fdsp->scalarproduct_float(temp_ir, temp_src, 
n_samples);
-temp_ir += n_samples;
+temp_ir += FFALIGN(n_samples, 16);
 }
 
 /* clippings counter */
@@ -812,8 +814,8 @@ static int load_data(AVFilterContext *ctx, int azim, int 
elev, float radius)
 s->temp_src[1] = av_calloc(FFALIGN(n_samples, 16), sizeof(float));
 
 /* get temporary IR for L and R channel */
-data_ir_l = av_malloc_array(n_conv * n_samples, sizeof(*data_ir_l));
-data_ir_r = av_malloc_array(n_conv * n_samples, sizeof(*data_ir_r));
+data_ir_l = av_calloc(n_conv * FFALIGN(n_samples, 16), 
sizeof(*data_ir_l));
+data_ir_r = av_calloc(n_conv * FFALIGN(n_samples, 16), 
sizeof(*data_ir_r));
 if (!data_ir_r || !data_ir_l || !s->temp_src[0] || !s->temp_src[1]) {
 av_free(data_ir_l);
 av_free(data_ir_r);
@@ -842,7 +844,7 @@ static int load_data(AVFilterContext *ctx, int azim, int 
elev, float radius)
 delay_r[i] = *(s->sofa.data_delay + 2 * m[i] + 1);
 
 if (s->type == TIME_DOMAIN) {
-offset = i * n_samples; /* no. samples already written */
+offset = i * FFALIGN(n_samples, 16); /* no. samples already 
written */
 for (j = 0; j < n_samples; j++) {
 /* load reversed IRs of the specified source position
  * sample-by-sample for left and right ear; and apply gain */
@@ -889,8 +891,8 @@ static int load_data(AVFilterContext *ctx, int azim, int 
elev, float radius)
 
 if (s->type == TIME_DOMAIN) {
 /* copy IRs and delays to allocated memory in the SOFAlizerContext 
struct: */
-memcpy(s->data_ir[0], data_ir_l, sizeof(float) * n_conv * n_samples);
-memcpy(s->data_ir[1], data_ir_r, sizeof(float) * n_conv * n_samples);
+memcpy(s->data_ir[0], data_ir_l, sizeof(float) * n_conv * 
FFALIGN(n_samples, 16));
+memcpy(s->data_ir[1], data_ir_r, sizeof(float) * n_conv * 
FFALIGN(n_samples, 16));
 
 av_freep(&data_ir_l); /* free temporary IR memory */
 av_freep(&data_ir_r);
@@ -1006,8 +1008,8 @@ static int config_input(AVFilterLink *inlink)
 
 /* Allocate memory for the impulse responses, delays and the ringbuffers */
 /* size: (longest IR) * (number of channels to convolute) */
-s->data_ir[0] = av_malloc_array(n_max_ir, sizeof(float) * s->n_conv);
-s->data_ir[1] = av_malloc_array(n_max_ir, sizeof(float) * s->n_conv);
+s->data_ir[0] = av_calloc(FFALIGN(n_max_ir, 16), sizeof(float) * 
s->n_conv);
+s->data_ir[1] = av_calloc(FFALIGN(n_max_ir, 16), sizeof(float) * 
s->n_conv);
 /* length:  number of channels to convolute */
 s->delay[0] = av_malloc_array(s->n_conv, sizeof(float));
 s->delay[1] = av_malloc_array(s->n_conv, sizeof(float));


[FFmpeg-cvslog] lavf/movenc: Add support for palette side data

2016-03-03 Thread Mats Peterson
ffmpeg | branch: master | Mats Peterson  | Thu Mar  3 
00:27:53 2016 +0100| [5111c1bef3899b27da28a3d4fca8e21b23a7c652] | committer: 
Michael Niedermayer

lavf/movenc: Add support for palette side data

Signed-off-by: Michael Niedermayer 

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

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

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 3295266..cb125d8 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1716,14 +1716,15 @@ static int mov_write_video_tag(AVIOContext *pb, 
MOVMuxContext *mov, MOVTrack *tr
 else
 avio_wb16(pb, 0x18); /* Reserved */
 
-if (track->is_unaligned_qt_rgb && track->enc->pix_fmt == AV_PIX_FMT_PAL8) {
+if (track->mode == MODE_MOV && track->enc->pix_fmt == AV_PIX_FMT_PAL8) {
+int pal_size = 1 << track->enc->bits_per_coded_sample;
 int i;
 avio_wb16(pb, 0); /* Color table ID */
 avio_wb32(pb, 0); /* Color table seed */
 avio_wb16(pb, 0x8000);/* Color table flags */
-avio_wb16(pb, 255);   /* Color table size (zero-relative) */
-for (i = 0; i < 256; i++) {
-uint32_t rgb = AV_RL32(&track->palette[i]);
+avio_wb16(pb, pal_size - 1);  /* Color table size (zero-relative) */
+for (i = 0; i < pal_size; i++) {
+uint32_t rgb = track->palette[i];
 uint16_t r = (rgb >> 16) & 0xff;
 uint16_t g = (rgb >> 8)  & 0xff;
 uint16_t b = rgb & 0xff;
@@ -4763,21 +4764,26 @@ static int mov_write_packet(AVFormatContext *s, 
AVPacket *pkt)
 }
 }
 
-if (trk->is_unaligned_qt_rgb) {
-const uint8_t *data = pkt->data;
-int size = pkt->size;
-int64_t bpc = trk->enc->bits_per_coded_sample != 15 ? 
trk->enc->bits_per_coded_sample : 16;
-int expected_stride = ((trk->enc->width * bpc + 15) >> 4)*2;
-int ret = ff_reshuffle_raw_rgb(s, &pkt, trk->enc, expected_stride);
-if (ret < 0)
-return ret;
-if (ret == CONTAINS_PAL && !trk->pal_done) {
-int pal_size = 1 << trk->enc->bits_per_coded_sample;
-memset(trk->palette, 0, AVPALETTE_SIZE);
-memcpy(trk->palette, data + size - 4*pal_size, 4*pal_size);
-trk->pal_done++;
-} else if (trk->enc->pix_fmt == AV_PIX_FMT_GRAY8 ||
-   trk->enc->pix_fmt == AV_PIX_FMT_MONOBLACK) {
+if (trk->mode == MODE_MOV && trk->enc->codec_type == 
AVMEDIA_TYPE_VIDEO) {
+AVPacket *opkt = pkt;
+int ret;
+if (trk->is_unaligned_qt_rgb) {
+int64_t bpc = trk->enc->bits_per_coded_sample != 15 ? 
trk->enc->bits_per_coded_sample : 16;
+int expected_stride = ((trk->enc->width * bpc + 15) >> 4)*2;
+ret = ff_reshuffle_raw_rgb(s, &pkt, trk->enc, expected_stride);
+if (ret < 0)
+return ret;
+} else
+ret = 0;
+if (trk->enc->pix_fmt == AV_PIX_FMT_PAL8 && !trk->pal_done) {
+int ret2 = ff_get_packet_palette(s, opkt, ret, trk->palette);
+if (ret2 < 0)
+return ret2;
+if (ret2)
+trk->pal_done++;
+} else if (trk->enc->codec_id == AV_CODEC_ID_RAWVIDEO &&
+   (trk->enc->pix_fmt == AV_PIX_FMT_GRAY8 ||
+   trk->enc->pix_fmt == AV_PIX_FMT_MONOBLACK)) {
 for (i = 0; i < pkt->size; i++)
 pkt->data[i] = ~pkt->data[i];
 }

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


[FFmpeg-cvslog] lavf/utils: Normalize AVPacket.data to native endian in ff_get_packet_palette()

2016-03-03 Thread Mats Peterson
ffmpeg | branch: master | Mats Peterson  | Thu Mar  3 
08:25:58 2016 +0100| [ba40b3520d91a3bff1637cbff54562e03b79bc2d] | committer: 
Michael Niedermayer

lavf/utils: Normalize AVPacket.data to native endian in ff_get_packet_palette()

Signed-off-by: Michael Niedermayer 

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

 libavformat/internal.h |7 +--
 libavformat/utils.c|   23 ---
 2 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/libavformat/internal.h b/libavformat/internal.h
index 63e0632..37a8591 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -588,9 +588,12 @@ int ff_reshuffle_raw_rgb(AVFormatContext *s, AVPacket 
**ppkt, AVCodecContext *en
  *
  * Use 0 for the ret parameter to check for side data only.
  *
- * @param pkt pointer to the packet before calling ff_reshuffle_raw_rgb()
+ * @param pkt pointer to packet before calling ff_reshuffle_raw_rgb()
  * @param ret return value from ff_reshuffle_raw_rgb(), or 0
+ * @param palette pointer to palette buffer
+ * @return negative error code or
+ * 1 if the packet has a palette, else 0
  */
-int ff_get_packet_palette(AVFormatContext *s, AVPacket *pkt, int ret, const 
uint8_t **palette);
+int ff_get_packet_palette(AVFormatContext *s, AVPacket *pkt, int ret, uint32_t 
*palette);
 
 #endif /* AVFORMAT_INTERNAL_H */
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 85702dd..7c14725 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -4782,18 +4782,27 @@ int ff_standardize_creation_time(AVFormatContext *s)
 return ret;
 }
 
-int ff_get_packet_palette(AVFormatContext *s, AVPacket *pkt, int ret, const 
uint8_t **palette)
+int ff_get_packet_palette(AVFormatContext *s, AVPacket *pkt, int ret, uint32_t 
*palette)
 {
+uint8_t *side_data;
 int size;
 
-*palette = av_packet_get_side_data(pkt, AV_PKT_DATA_PALETTE, &size);
-if (*palette && size != AVPALETTE_SIZE) {
-av_log(s, AV_LOG_ERROR, "Invalid palette side data\n");
-return AVERROR_INVALIDDATA;
+side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_PALETTE, &size);
+if (side_data) {
+if (size != AVPALETTE_SIZE) {
+av_log(s, AV_LOG_ERROR, "Invalid palette side data\n");
+return AVERROR_INVALIDDATA;
+}
+memcpy(palette, side_data, AVPALETTE_SIZE);
+return 1;
 }
 
-if (!*palette && ret == CONTAINS_PAL)
-*palette = pkt->data + pkt->size - AVPALETTE_SIZE;
+if (ret == CONTAINS_PAL) {
+int i;
+for (i = 0; i < AVPALETTE_COUNT; i++)
+palette[i] = AV_RL32(pkt->data + pkt->size - AVPALETTE_SIZE + i*4);
+return 1;
+}
 
 return 0;
 }

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


[FFmpeg-cvslog] fate: add qtrle/mace6 stream copy test

2016-03-03 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed 
Mar  2 22:10:09 2016 +0100| [2761e250cc87e950a8949dafc56b0877c14b53e8] | 
committer: Michael Niedermayer

fate: add qtrle/mace6 stream copy test

Signed-off-by: Michael Niedermayer 

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

 tests/fate/avformat.mak |1 +
 tests/lavf-regression.sh|6 ++
 tests/ref/lavf-fate/mov_qtrle_mace6 |3 +++
 3 files changed, 10 insertions(+)

diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak
index 54bfb97..02c1345 100644
--- a/tests/fate/avformat.mak
+++ b/tests/fate/avformat.mak
@@ -69,6 +69,7 @@ fate-lavf: $(FATE_LAVF)
 FATE_LAVF_FATE-$(call ALLYES, MATROSKA_DEMUXER   OGG_MUXER)  += ogg_vp3
 FATE_LAVF_FATE-$(call ALLYES, MOV_DEMUXERLATM_MUXER) += latm
 FATE_LAVF_FATE-$(call ALLYES, MP3_DEMUXERMP3_MUXER)  += mp3
+FATE_LAVF_FATE-$(call ALLYES, MOV_DEMUXERMOV_MUXER)  += 
mov_qtrle_mace6
 
 FATE_LAVF_FATE +=  $(FATE_LAVF_FATE-yes:%=fate-lavf-fate-%)
 $(FATE_LAVF_FATE): CMD = lavffatetest
diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh
index bedeb89..a219488 100755
--- a/tests/lavf-regression.sh
+++ b/tests/lavf-regression.sh
@@ -165,6 +165,12 @@ DEC_OPTS="$DEC_OPTS -idct auto"
 do_lavf_fate ogg "vp3/coeff_level64.mkv"
 fi
 
+if [ -n "$do_mov_qtrle_mace6" ] ; then
+DEC_OPTS="$DEC_OPTS -idct auto"
+do_lavf_fate mov "qtrle/Animation-16Greys.mov"
+fi
+
+
 if [ -n "$do_wtv" ] ; then
 do_lavf wtv "" "-acodec mp2 -threads 1"
 fi
diff --git a/tests/ref/lavf-fate/mov_qtrle_mace6 
b/tests/ref/lavf-fate/mov_qtrle_mace6
new file mode 100644
index 000..b6ecea5
--- /dev/null
+++ b/tests/ref/lavf-fate/mov_qtrle_mace6
@@ -0,0 +1,3 @@
+db3e70328340fcb3cd0e06c215fadaa3 *./tests/data/lavf-fate/lavf.mov
+1270387 ./tests/data/lavf-fate/lavf.mov
+./tests/data/lavf-fate/lavf.mov CRC=0x5ec66f68

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