[FFmpeg-cvslog] lavc/Makefile: add missing ADPCM_THP_LE objs

2016-09-09 Thread Rodger Combs
ffmpeg | branch: master | Rodger Combs  | Wed Feb  3 
08:21:27 2016 -0600| [7c5fed15a8dfb6192960a14e876afa913d4f86fd] | committer: 
Rodger Combs

lavc/Makefile: add missing ADPCM_THP_LE objs

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

 libavcodec/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index fa2318a..9c7302a 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -753,6 +753,7 @@ OBJS-$(CONFIG_ADPCM_SBPRO_4_DECODER)  += adpcm.o 
adpcm_data.o
 OBJS-$(CONFIG_ADPCM_SWF_DECODER)  += adpcm.o adpcm_data.o
 OBJS-$(CONFIG_ADPCM_SWF_ENCODER)  += adpcmenc.o adpcm_data.o
 OBJS-$(CONFIG_ADPCM_THP_DECODER)  += adpcm.o adpcm_data.o
+OBJS-$(CONFIG_ADPCM_THP_LE_DECODER)   += adpcm.o adpcm_data.o
 OBJS-$(CONFIG_ADPCM_VIMA_DECODER) += vima.o adpcm_data.o
 OBJS-$(CONFIG_ADPCM_XA_DECODER)   += adpcm.o adpcm_data.o
 OBJS-$(CONFIG_ADPCM_YAMAHA_DECODER)   += adpcm.o adpcm_data.o

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


[FFmpeg-cvslog] lavc/Makefile: g729dec: fix missing file

2016-09-09 Thread Rodger Combs
ffmpeg | branch: master | Rodger Combs  | Wed Feb  3 
07:14:33 2016 -0600| [1177e42121360a50fa864bab1897468b2e0d1d22] | committer: 
Rodger Combs

lavc/Makefile: g729dec: fix missing file

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

 libavcodec/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 7396468..fa2318a 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -297,7 +297,7 @@ OBJS-$(CONFIG_G723_1_DECODER)  += g723_1dec.o 
g723_1.o \
   acelp_vectors.o celp_filters.o 
celp_math.o
 OBJS-$(CONFIG_G723_1_ENCODER)  += g723_1enc.o g723_1.o \
   acelp_vectors.o celp_filters.o 
celp_math.o
-OBJS-$(CONFIG_G729_DECODER)+= g729dec.o lsp.o celp_math.o 
acelp_filters.o acelp_pitch_delay.o acelp_vectors.o g729postfilter.o
+OBJS-$(CONFIG_G729_DECODER)+= g729dec.o lsp.o celp_math.o 
celp_filters.o acelp_filters.o acelp_pitch_delay.o acelp_vectors.o 
g729postfilter.o
 OBJS-$(CONFIG_GIF_DECODER) += gifdec.o lzw.o
 OBJS-$(CONFIG_GIF_ENCODER) += gif.o lzwenc.o
 OBJS-$(CONFIG_GSM_DECODER) += gsmdec.o gsmdec_data.o msgsmdec.o

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


[FFmpeg-cvslog] tests/fate-run.sh: Analyze file generated in transcode()

2016-09-09 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri 
Sep  9 23:17:02 2016 +0200| [24b391890139b26ff4cbeb244b6bf7ee878aff52] | 
committer: Michael Niedermayer

tests/fate-run.sh: Analyze file generated in transcode()

This should be much more informative than a plain md5 difference

Signed-off-by: Michael Niedermayer 

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

 tests/fate-run.sh|  2 ++
 tests/ref/fate/copy-trac236  | 22 +
 tests/ref/fate/copy-trac4914 | 46 ++
 tests/ref/fate/copy-trac4914-avi | 70 
 4 files changed, 140 insertions(+)

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 8c3938a..cff 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -205,6 +205,8 @@ transcode(){
 -f $enc_fmt -y $tencfile || return
 do_md5sum $encfile
 echo $(wc -c $encfile)
+ffmpeg $DEC_OPTS -i $encfile $ENC_OPTS $FLAGS \
+-f framecrc - || return
 }
 
 lavffatetest(){
diff --git a/tests/ref/fate/copy-trac236 b/tests/ref/fate/copy-trac236
index 320c51e..439b980 100644
--- a/tests/ref/fate/copy-trac236
+++ b/tests/ref/fate/copy-trac236
@@ -1,2 +1,24 @@
 9b95afdb39b426a33bc962889f820aed *tests/data/fate/copy-trac236.mov
 630802 tests/data/fate/copy-trac236.mov
+#tb 0: 100/2997
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 720x480
+#sar 0: 10/11
+#tb 1: 1/48000
+#media_type 1: audio
+#codec_id 1: pcm_s16le
+#sample_rate 1: 48000
+#channel_layout 1: 3
+0,  0,  0,1,   518400, 0x81ab2140
+1,  0,  0, 1024, 4096, 0x67dc99a3
+1,   1024,   1024, 1024, 4096, 0xf115a681
+0,  1,  1,1,   518400, 0x81ab2140
+1,   2048,   2048, 1024, 4096, 0xf455b597
+1,   3072,   3072, 1024, 4096, 0x67dc99a3
+0,  2,  2,1,   518400, 0x81ab2140
+1,   4096,   4096, 1024, 4096, 0xf115a681
+0,  3,  3,1,   518400, 0x81ab2140
+1,   5120,   5120, 1024, 4096, 0xf455b597
+1,   6144,   6144,  759, 3036, 0xa291a36d
+0,  4,  4,1,   518400, 0x81ab2140
diff --git a/tests/ref/fate/copy-trac4914 b/tests/ref/fate/copy-trac4914
index c977f30..3a6eee4 100644
--- a/tests/ref/fate/copy-trac4914
+++ b/tests/ref/fate/copy-trac4914
@@ -1,2 +1,48 @@
 8868ae16d99ed03916e9dc7105285471 *tests/data/fate/copy-trac4914.mxf
 560697 tests/data/fate/copy-trac4914.mxf
+#tb 0: 1001/3
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 480x270
+#sar 0: 1/1
+#tb 1: 1/48000
+#media_type 1: audio
+#codec_id 1: pcm_s16le
+#sample_rate 1: 48000
+#channel_layout 1: 3
+0,  0,  0,1,   259200, 0xf36957da
+1,  0,  0, 1602, 6408, 0x1dd7b37c
+0,  1,  1,1,   259200, 0x29a1f586
+1,   1602,   1602, 1601, 6404, 0xb6854846
+1,   3203,   3203, 1602, 6408, 0x4d3ea85e
+0,  2,  2,1,   259200, 0x5578d9c3
+0,  3,  3,1,   259200, 0x83938b61
+1,   4805,   4805, 1601, 6404, 0x5eb15a6d
+1,   6406,   6406, 1602, 6408, 0x059d21a0
+0,  4,  4,1,   259200, 0xa6ce7618
+0,  5,  5,1,   259200, 0x4892a0f5
+1,   8008,   8008, 1602, 6408, 0xd8352572
+0,  6,  6,1,   259200, 0x921c6051
+1,   9610,   9610, 1601, 6404, 0xf69be875
+1,  11211,  11211, 1602, 6408, 0x41e75601
+0,  7,  7,1,   259200, 0x618c0026
+0,  8,  8,1,   259200, 0xdbc3ca4d
+1,  12813,  12813, 1601, 6404, 0x75e3196d
+1,  14414,  14414, 1602, 6408, 0xb46bad29
+0,  9,  9,1,   259200, 0xf088c731
+0, 10, 10,1,   259200, 0xce77ddee
+1,  16016,  16016, 1602, 6408, 0x41e6ceac
+0, 11, 11,1,   259200, 0x798565eb
+1,  17618,  17618, 1601, 6404, 0x2258734e
+1,  19219,  19219, 1602, 6408, 0xc46d9103
+0, 12, 12,1,   259200, 0x57185dc8
+0, 13, 13,1,   259200, 0x607a9086
+1,  20821,  20821, 1601, 6404, 0xd7c07892
+1,  22422,  22422, 1602, 6408, 0x2aaad91d
+0, 14, 14,1,   259200, 0x59bd5c34
+0, 15, 15,1,   259200, 0xadb1da77
+1,  24024,  24024, 1602, 6408, 0x69bfb643
+0, 16, 16,1,   259200, 0x1f7d7b14
+1,  25626,  25626, 1601, 6404, 0x0e644904
+1,  27227,  27227, 1602, 6408, 0x06e92ea2
+0, 17, 17,1,   259200, 0xcdd45467
diff --git 

[FFmpeg-cvslog] avformat/movenc: Check first DTS similar to dts difference

2016-09-09 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri 
Sep  9 13:11:43 2016 +0200| [68f4c2163ec6d4534ae1756dbcf259845f2e4d2c] | 
committer: Michael Niedermayer

avformat/movenc: Check first DTS similar to dts difference

Fixes assertion failure
Fixes: 
b84b53855a0b74560e64c6f45f505a13/signal_sigabrt_76ae7c37_3837_ef4e243ea5b4fa8d0becf4afe9166604.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 

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

 libavformat/movenc.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index b82bfea..319ff57 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -4682,6 +4682,13 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket 
*pkt)
 pkt->dts = trk->cluster[trk->entry - 1].dts + 1;
 pkt->pts = AV_NOPTS_VALUE;
 }
+} else if (pkt->dts <= INT_MIN || pkt->dts >= INT_MAX) {
+av_log(s, AV_LOG_ERROR, "Application provided initial timestamp: 
%"PRId64" is out of range for mov/mp4 format\n",
+pkt->dts
+);
+
+pkt->dts = 0;
+pkt->pts = AV_NOPTS_VALUE;
 }
 if (pkt->duration < 0 || pkt->duration > INT_MAX) {
 av_log(s, AV_LOG_ERROR, "Application provided duration: %"PRId64" is 
invalid\n", pkt->duration);

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


[FFmpeg-cvslog] fate: Add copy-trac2211-avi test

2016-09-09 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri 
Sep  9 23:53:32 2016 +0200| [ae7d4e17eb3b51528abe7dfecac02d6f48a8699c] | 
committer: Michael Niedermayer

fate: Add copy-trac2211-avi test

Signed-off-by: Michael Niedermayer 

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

 tests/fate/ffmpeg.mak|  5 
 tests/ref/fate/copy-trac2211-avi | 54 
 2 files changed, 59 insertions(+)

diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak
index e9c0563..7bad2e5 100644
--- a/tests/fate/ffmpeg.mak
+++ b/tests/fate/ffmpeg.mak
@@ -66,6 +66,11 @@ fate-copy-trac4914-avi: 
$(TARGET_SAMPLES)/mpeg2/xdcam8mp2-1s_small.ts
 fate-copy-trac4914-avi: CMD = transcode mpegts 
$(TARGET_SAMPLES)/mpeg2/xdcam8mp2-1s_small.ts\
   avi "-c:a copy -c:v copy"
 
+FATE_STREAMCOPY-$(call ALLYES, H264_DEMUXER AVI_MUXER) += 
fate-copy-trac2211-avi
+fate-copy-trac2211-avi: $(TARGET_SAMPLES)/h264/bbc2.sample.h264
+fate-copy-trac2211-avi: CMD = transcode "h264 -r 14" 
$(TARGET_SAMPLES)/h264/bbc2.sample.h264\
+  avi "-c:a copy -c:v copy"
+
 FATE_STREAMCOPY-$(call DEMMUX, OGG, OGG) += fate-limited_input_seek 
fate-limited_input_seek-copyts
 fate-limited_input_seek: $(TARGET_SAMPLES)/vorbis/moog_small.ogg
 fate-limited_input_seek: CMD = md5 -ss 1.5 -t 1.3 -i 
$(TARGET_SAMPLES)/vorbis/moog_small.ogg -c:a copy -fflags +bitexact -f ogg
diff --git a/tests/ref/fate/copy-trac2211-avi b/tests/ref/fate/copy-trac2211-avi
new file mode 100644
index 000..c22ca3d
--- /dev/null
+++ b/tests/ref/fate/copy-trac2211-avi
@@ -0,0 +1,54 @@
+dd199ecb167b2fa0fc0c17638a655e1c *tests/data/fate/copy-trac2211-avi.avi
+1777926 tests/data/fate/copy-trac2211-avi.avi
+#tb 0: 1/14
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 1440x1080
+#sar 0: 4/3
+0,  5,  5,1,  2332800, 0xa9dcb2ac
+0,  6,  6,1,  2332800, 0x9b17af27
+0,  7,  7,1,  2332800, 0x02da3196
+0,  8,  8,1,  2332800, 0x9c78ed62
+0,  9,  9,1,  2332800, 0xa6e926a0
+0, 10, 10,1,  2332800, 0x324e51d2
+0, 11, 11,1,  2332800, 0xd8289620
+0, 12, 12,1,  2332800, 0xfc3619f9
+0, 13, 13,1,  2332800, 0x6b8d2560
+0, 14, 14,1,  2332800, 0x5714dca0
+0, 15, 15,1,  2332800, 0x246e2842
+0, 16, 16,1,  2332800, 0x59bc0b2e
+0, 17, 17,1,  2332800, 0x24fe5cfa
+0, 18, 18,1,  2332800, 0xb9607c3e
+0, 19, 19,1,  2332800, 0x663669c9
+0, 21, 21,1,  2332800, 0xd37fd62f
+0, 23, 23,1,  2332800, 0x2d7db904
+0, 25, 25,1,  2332800, 0x79a53eba
+0, 27, 27,1,  2332800, 0x3b0c7e19
+0, 29, 29,1,  2332800, 0xd12f64c5
+0, 31, 31,1,  2332800, 0xacdb407f
+0, 33, 33,1,  2332800, 0x829d7e61
+0, 35, 35,1,  2332800, 0x7932b82f
+0, 37, 37,1,  2332800, 0x61f81627
+0, 39, 39,1,  2332800, 0xa1a2e000
+0, 41, 41,1,  2332800, 0x93aad5e9
+0, 43, 43,1,  2332800, 0x9993b5b5
+0, 45, 45,1,  2332800, 0x6ac48232
+0, 47, 47,1,  2332800, 0x5738f9c0
+0, 49, 49,1,  2332800, 0x82a59d01
+0, 51, 51,1,  2332800, 0xc4664862
+0, 53, 53,1,  2332800, 0xf0e6222d
+0, 55, 55,1,  2332800, 0xd29e7100
+0, 57, 57,1,  2332800, 0xe093ef85
+0, 59, 59,1,  2332800, 0x28c68a65
+0, 61, 61,1,  2332800, 0x49a6b21e
+0, 63, 63,1,  2332800, 0xfb28a097
+0, 65, 65,1,  2332800, 0xade1e336
+0, 67, 67,1,  2332800, 0xe5118412
+0, 69, 69,1,  2332800, 0x58750176
+0, 71, 71,1,  2332800, 0xacb99939
+0, 73, 73,1,  2332800, 0x80b968d3
+0, 75, 75,1,  2332800, 0xa45f4e6f
+0, 77, 77,1,  2332800, 0xe0fcbade
+0, 78, 78,1,  2332800, 0x19568f4d
+0, 79, 79,1,  2332800, 0x33c53f59
+0, 80, 80,1,  2332800, 0xbdbe8fbf

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


[FFmpeg-cvslog] avfilter/vf_histogram: set foreground alpha if possible in destination format

2016-09-09 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sat Sep 10 00:28:28 
2016 +0200| [c784b5cfdc7ee1e26d0032d5b9593647def30688] | committer: Paul B Mahol

avfilter/vf_histogram: set foreground alpha if possible in destination format

Signed-off-by: Paul B Mahol 

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

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

diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c
index c6b308a..f04f5de 100644
--- a/libavfilter/vf_histogram.c
+++ b/libavfilter/vf_histogram.c
@@ -35,6 +35,7 @@ typedef struct HistogramContext {
 inthistogram_size;
 intmult;
 intncomp;
+intdncomp;
 uint8_tbg_color[4];
 uint8_tfg_color[4];
 intlevel_height;
@@ -236,6 +237,7 @@ static int config_output(AVFilterLink *outlink)
 outlink->h = (h->level_height + h->scale_height) * FFMAX(ncomp * 
h->display_mode, 1);
 
 h->odesc = av_pix_fmt_desc_get(outlink->format);
+h->dncomp = h->odesc->nb_components;
 outlink->sample_aspect_ratio = (AVRational){1,1};
 
 return 0;
@@ -319,7 +321,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 if (h->histogram_size <= 256) {
 for (j = h->level_height - 1; j >= col_height; j--) {
 if (h->display_mode) {
-for (l = 0; l < h->ncomp; l++)
+for (l = 0; l < h->dncomp; l++)
 out->data[l][(j + start) * out->linesize[l] + i] = 
h->fg_color[l];
 } else {
 out->data[p][(j + start) * out->linesize[p] + i] = 255;
@@ -332,7 +334,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 
 for (j = h->level_height - 1; j >= col_height; j--) {
 if (h->display_mode) {
-for (l = 0; l < h->ncomp; l++)
+for (l = 0; l < h->dncomp; l++)
 AV_WN16(out->data[l] + (j + start) * 
out->linesize[l] + i * 2, h->fg_color[l] * mult);
 } else {
 AV_WN16(out->data[p] + (j + start) * out->linesize[p] 
+ i * 2, 255 * mult);

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


[FFmpeg-cvslog] doc/filters: add missing palette* options

2016-09-09 Thread Lou Logan
ffmpeg | branch: master | Lou Logan  | Fri Sep  9 09:37:26 2016 
-0800| [915abab25c5b28a23767029713bb175c63be7cc7] | committer: Lou Logan

doc/filters: add missing palette* options

Introduced in b7e78c7 and 93ae68d.

Fixes #5835.

The paletteuse debug options that are not part of the official API are
not included (debug_kdtree and color_search).

Signed-off-by: Lou Logan 

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

 doc/filters.texi | 5 +
 1 file changed, 5 insertions(+)

diff --git a/doc/filters.texi b/doc/filters.texi
index 5c7146a..2acf770 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -10419,6 +10419,8 @@ Compute full frame histograms.
 Compute histograms only for the part that differs from previous frame. This
 might be relevant to give more importance to the moving part of your input if
 the background is static.
+@item single
+Compute new histogram for each frame.
 @end table
 
 Default value is @var{full}.
@@ -10490,6 +10492,9 @@ much, and as a result less moving noise and better GIF 
compression).
 @end table
 
 Default is @var{none}.
+
+@item new
+Take new palette for each output frame.
 @end table
 
 @subsection Examples

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


[FFmpeg-cvslog] avcodec/cuvid: check for and warn about invalid pkt_timebase

2016-09-09 Thread Timo Rothenpieler
ffmpeg | branch: master | Timo Rothenpieler  | Fri Sep  
9 16:35:48 2016 +0200| [b91e0e59874d28f35a28acb4f886ab1e7d80cacb] | committer: 
Timo Rothenpieler

avcodec/cuvid: check for and warn about invalid pkt_timebase

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

 libavcodec/cuvid.c | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/libavcodec/cuvid.c b/libavcodec/cuvid.c
index 120b045..de75960 100644
--- a/libavcodec/cuvid.c
+++ b/libavcodec/cuvid.c
@@ -258,7 +258,10 @@ static int cuvid_decode_frame(AVCodecContext *avctx, void 
*data, int *got_frame,
 
 if (avpkt->pts != AV_NOPTS_VALUE) {
 cupkt.flags = CUVID_PKT_TIMESTAMP;
-cupkt.timestamp = av_rescale_q(avpkt->pts, avctx->pkt_timebase, 
(AVRational){1, 1000});
+if (avctx->pkt_timebase.num && avctx->pkt_timebase.den)
+cupkt.timestamp = av_rescale_q(avpkt->pts, 
avctx->pkt_timebase, (AVRational){1, 1000});
+else
+cupkt.timestamp = avpkt->pts;
 }
 } else {
 cupkt.flags = CUVID_PKT_ENDOFSTREAM;
@@ -363,7 +366,10 @@ static int cuvid_decode_frame(AVCodecContext *avctx, void 
*data, int *got_frame,
 
 frame->width = avctx->width;
 frame->height = avctx->height;
-frame->pts = av_rescale_q(dispinfo.timestamp, (AVRational){1, 
1000}, avctx->pkt_timebase);
+if (avctx->pkt_timebase.num && avctx->pkt_timebase.den)
+frame->pts = av_rescale_q(dispinfo.timestamp, (AVRational){1, 
1000}, avctx->pkt_timebase);
+else
+frame->pts = dispinfo.timestamp;
 
 /* CUVIDs opaque reordering breaks the internal pkt logic.
  * So set pkt_pts and clear all the other pkt_ fields.
@@ -679,6 +685,9 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx)
 
 ctx->ever_flushed = 0;
 
+if (!avctx->pkt_timebase.num || !avctx->pkt_timebase.den)
+av_log(avctx, AV_LOG_WARNING, "Invalid pkt_timebase, passing 
timestamps as-is.\n");
+
 return 0;
 
 error:

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


[FFmpeg-cvslog] avcodec/cuvid: use pkt_timebase instead of time_base

2016-09-09 Thread Timo Rothenpieler
ffmpeg | branch: master | Timo Rothenpieler  | Fri Sep  
9 16:15:45 2016 +0200| [132adf73af31a1a5a8c7c0798b09f7012d73bd4c] | committer: 
Timo Rothenpieler

avcodec/cuvid: use pkt_timebase instead of time_base

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

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

diff --git a/libavcodec/cuvid.c b/libavcodec/cuvid.c
index 7cc1331..120b045 100644
--- a/libavcodec/cuvid.c
+++ b/libavcodec/cuvid.c
@@ -258,7 +258,7 @@ static int cuvid_decode_frame(AVCodecContext *avctx, void 
*data, int *got_frame,
 
 if (avpkt->pts != AV_NOPTS_VALUE) {
 cupkt.flags = CUVID_PKT_TIMESTAMP;
-cupkt.timestamp = av_rescale_q(avpkt->pts, avctx->time_base, 
(AVRational){1, 1000});
+cupkt.timestamp = av_rescale_q(avpkt->pts, avctx->pkt_timebase, 
(AVRational){1, 1000});
 }
 } else {
 cupkt.flags = CUVID_PKT_ENDOFSTREAM;
@@ -363,7 +363,7 @@ static int cuvid_decode_frame(AVCodecContext *avctx, void 
*data, int *got_frame,
 
 frame->width = avctx->width;
 frame->height = avctx->height;
-frame->pts = av_rescale_q(dispinfo.timestamp, (AVRational){1, 
1000}, avctx->time_base);
+frame->pts = av_rescale_q(dispinfo.timestamp, (AVRational){1, 
1000}, avctx->pkt_timebase);
 
 /* CUVIDs opaque reordering breaks the internal pkt logic.
  * So set pkt_pts and clear all the other pkt_ fields.

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


[FFmpeg-cvslog] lavc/alsdec: use get_bitsz() to simplify reading of the mantissa

2016-09-09 Thread Thilo Borgmann
ffmpeg | branch: master | Thilo Borgmann  | Fri Sep  9 
12:29:23 2016 +0200| [4d48add89b2c5124d660b5672f5d2c549cd65bc6] | committer: 
James Almer

lavc/alsdec: use get_bitsz() to simplify reading of the mantissa

Signed-off-by: James Almer 

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

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

diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 8c4ff53..3986347 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1527,7 +1527,7 @@ static int read_diff_float_data(ALSDecContext *ctx, 
unsigned int ra_frame) {
 if (!get_bits1(gb)) { //uncompressed
 for (i = 0; i < frame_length; ++i) {
 if (ctx->raw_samples[c][i] != 0) {
-raw_mantissa[c][i] = nbits[i] ? get_bits(gb, nbits[i]) 
: 0;
+raw_mantissa[c][i] = get_bitsz(gb, nbits[i]);
 }
 }
 } else { //compressed

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


[FFmpeg-cvslog] tests/fate/ffmpeg: regroup stream copy tests under a fate-streamcopy rule

2016-09-09 Thread Clément Bœsch
ffmpeg | branch: master | Clément Bœsch  | Fri Sep  9 
16:47:11 2016 +0200| [6d6077024716eb6c6e04cae4ce1b40ec0614cbd1] | committer: 
Clément Bœsch

tests/fate/ffmpeg: regroup stream copy tests under a fate-streamcopy rule

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

 tests/fate/ffmpeg.mak | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak
index 158d988..e9c0563 100644
--- a/tests/fate/ffmpeg.mak
+++ b/tests/fate/ffmpeg.mak
@@ -51,23 +51,27 @@ fate-unknown_layout-ac3: CMD = md5 \
   -guess_layout_max 0 -f s16le -ac 1 -ar 44100 -i $(TARGET_PATH)/$(AREF) \
   -f ac3 -flags +bitexact -c ac3_fixed
 
-FATE_SAMPLES_FFMPEG-$(call ALLYES, MOV_DEMUXER MOV_MUXER) += fate-copy-trac236
+FATE_STREAMCOPY-$(call ALLYES, MOV_DEMUXER MOV_MUXER) += fate-copy-trac236
 fate-copy-trac236: $(TARGET_SAMPLES)/mov/fcp_export8-236.mov
 fate-copy-trac236: CMD = transcode mov 
$(TARGET_SAMPLES)/mov/fcp_export8-236.mov\
  mov "-codec copy -map 0"
 
-FATE_SAMPLES_FFMPEG-$(call ALLYES, MPEGTS_DEMUXER MXF_MUXER PCM_S16LE_ENCODER) 
+= fate-copy-trac4914
+FATE_STREAMCOPY-$(call ALLYES, MPEGTS_DEMUXER MXF_MUXER PCM_S16LE_ENCODER) += 
fate-copy-trac4914
 fate-copy-trac4914: $(TARGET_SAMPLES)/mpeg2/xdcam8mp2-1s_small.ts
 fate-copy-trac4914: CMD = transcode mpegts 
$(TARGET_SAMPLES)/mpeg2/xdcam8mp2-1s_small.ts\
   mxf "-c:a pcm_s16le -c:v copy"
 
-FATE_SAMPLES_FFMPEG-$(call ALLYES, MPEGTS_DEMUXER AVI_MUXER) += 
fate-copy-trac4914-avi
+FATE_STREAMCOPY-$(call ALLYES, MPEGTS_DEMUXER AVI_MUXER) += 
fate-copy-trac4914-avi
 fate-copy-trac4914-avi: $(TARGET_SAMPLES)/mpeg2/xdcam8mp2-1s_small.ts
 fate-copy-trac4914-avi: CMD = transcode mpegts 
$(TARGET_SAMPLES)/mpeg2/xdcam8mp2-1s_small.ts\
   avi "-c:a copy -c:v copy"
 
-FATE_SAMPLES_FFMPEG-$(call DEMMUX, OGG, OGG) += fate-limited_input_seek 
fate-limited_input_seek-copyts
+FATE_STREAMCOPY-$(call DEMMUX, OGG, OGG) += fate-limited_input_seek 
fate-limited_input_seek-copyts
 fate-limited_input_seek: $(TARGET_SAMPLES)/vorbis/moog_small.ogg
 fate-limited_input_seek: CMD = md5 -ss 1.5 -t 1.3 -i 
$(TARGET_SAMPLES)/vorbis/moog_small.ogg -c:a copy -fflags +bitexact -f ogg
 fate-limited_input_seek-copyts: $(TARGET_SAMPLES)/vorbis/moog_small.ogg
 fate-limited_input_seek-copyts: CMD = md5 -ss 1.5 -t 1.3 -i 
$(TARGET_SAMPLES)/vorbis/moog_small.ogg -c:a copy -copyts -fflags +bitexact -f 
ogg
+
+fate-streamcopy: $(FATE_STREAMCOPY-yes)
+
+FATE_SAMPLES_FFMPEG-yes += $(FATE_STREAMCOPY-yes)

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


[FFmpeg-cvslog] lavc/hevc: store VPS/SPS/PPS data

2016-09-09 Thread Matthieu Bouron
ffmpeg | branch: master | Matthieu Bouron  | Wed 
Sep  7 11:36:10 2016 +0200| [bf011695fd3a9cd717d5c13a6aa342d5e9c8840c] | 
committer: Matthieu Bouron

lavc/hevc: store VPS/SPS/PPS data

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

 libavcodec/hevc.h|  9 +
 libavcodec/hevc_ps.c | 36 
 2 files changed, 45 insertions(+)

diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h
index be91010..6a3c750 100644
--- a/libavcodec/hevc.h
+++ b/libavcodec/hevc.h
@@ -387,6 +387,9 @@ typedef struct HEVCVPS {
 uint8_t vps_poc_proportional_to_timing_flag;
 int vps_num_ticks_poc_diff_one; ///< vps_num_ticks_poc_diff_one_minus1 + 1
 int vps_num_hrd_parameters;
+
+uint8_t data[4096];
+int data_size;
 } HEVCVPS;
 
 typedef struct ScalingList {
@@ -483,6 +486,9 @@ typedef struct HEVCSPS {
 int vshift[3];
 
 int qp_bd_offset;
+
+uint8_t data[4096];
+int data_size;
 } HEVCSPS;
 
 typedef struct HEVCPPS {
@@ -557,6 +563,9 @@ typedef struct HEVCPPS {
 int *tile_pos_rs;   ///< TilePosRS
 int *min_tb_addr_zs;///< MinTbAddrZS
 int *min_tb_addr_zs_tab;///< MinTbAddrZS
+
+uint8_t data[4096];
+int data_size;
 } HEVCPPS;
 
 typedef struct HEVCParamSets {
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 83f2ec2..d08ba34 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -399,6 +399,7 @@ int ff_hevc_decode_nal_vps(GetBitContext *gb, 
AVCodecContext *avctx,
 {
 int i,j;
 int vps_id = 0;
+ptrdiff_t nal_size;
 HEVCVPS *vps;
 AVBufferRef *vps_buf = av_buffer_allocz(sizeof(*vps));
 
@@ -408,6 +409,17 @@ int ff_hevc_decode_nal_vps(GetBitContext *gb, 
AVCodecContext *avctx,
 
 av_log(avctx, AV_LOG_DEBUG, "Decoding VPS\n");
 
+nal_size = gb->buffer_end - gb->buffer;
+if (nal_size > sizeof(vps->data)) {
+av_log(avctx, AV_LOG_WARNING, "Truncating likely oversized VPS "
+   "(%"PTRDIFF_SPECIFIER" > %"SIZE_SPECIFIER")\n",
+   nal_size, sizeof(vps->data));
+vps->data_size = sizeof(vps->data);
+} else {
+vps->data_size = nal_size;
+}
+memcpy(vps->data, gb->buffer, vps->data_size);
+
 vps_id = get_bits(gb, 4);
 if (vps_id >= MAX_VPS_COUNT) {
 av_log(avctx, AV_LOG_ERROR, "VPS id out of range: %d\n", vps_id);
@@ -1177,6 +1189,7 @@ int ff_hevc_decode_nal_sps(GetBitContext *gb, 
AVCodecContext *avctx,
 AVBufferRef *sps_buf = av_buffer_allocz(sizeof(*sps));
 unsigned int sps_id;
 int ret;
+ptrdiff_t nal_size;
 
 if (!sps_buf)
 return AVERROR(ENOMEM);
@@ -1184,6 +1197,17 @@ int ff_hevc_decode_nal_sps(GetBitContext *gb, 
AVCodecContext *avctx,
 
 av_log(avctx, AV_LOG_DEBUG, "Decoding SPS\n");
 
+nal_size = gb->buffer_end - gb->buffer;
+if (nal_size > sizeof(sps->data)) {
+av_log(avctx, AV_LOG_WARNING, "Truncating likely oversized SPS "
+   "(%"PTRDIFF_SPECIFIER" > %"SIZE_SPECIFIER")\n",
+   nal_size, sizeof(sps->data));
+sps->data_size = sizeof(sps->data);
+} else {
+sps->data_size = nal_size;
+}
+memcpy(sps->data, gb->buffer, sps->data_size);
+
 ret = ff_hevc_parse_sps(sps, gb, _id,
 apply_defdispwin,
 ps->vps_list, avctx);
@@ -1407,6 +1431,7 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, 
AVCodecContext *avctx,
 HEVCSPS  *sps = NULL;
 int i, ret = 0;
 unsigned int pps_id = 0;
+ptrdiff_t nal_size;
 
 AVBufferRef *pps_buf;
 HEVCPPS *pps = av_mallocz(sizeof(*pps));
@@ -1423,6 +1448,17 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, 
AVCodecContext *avctx,
 
 av_log(avctx, AV_LOG_DEBUG, "Decoding PPS\n");
 
+nal_size = gb->buffer_end - gb->buffer;
+if (nal_size > sizeof(pps->data)) {
+av_log(avctx, AV_LOG_WARNING, "Truncating likely oversized PPS "
+   "(%"PTRDIFF_SPECIFIER" > %"SIZE_SPECIFIER")\n",
+   nal_size, sizeof(pps->data));
+pps->data_size = sizeof(pps->data);
+} else {
+pps->data_size = nal_size;
+}
+memcpy(pps->data, gb->buffer, pps->data_size);
+
 // Default values
 pps->loop_filter_across_tiles_enabled_flag = 1;
 pps->num_tile_columns  = 1;

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


[FFmpeg-cvslog] avfilter/vf_datascope: cleanup code a little

2016-09-09 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Fri Sep  9 14:16:22 
2016 +0200| [7055b28d988a59acb529b8043c70cd8cc65505e6] | committer: Paul B Mahol

avfilter/vf_datascope: cleanup code a little

Make few helper functions.

Signed-off-by: Paul B Mahol 

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

 libavfilter/vf_datascope.c | 90 --
 1 file changed, 56 insertions(+), 34 deletions(-)

diff --git a/libavfilter/vf_datascope.c b/libavfilter/vf_datascope.c
index 57478fd..01a5d99 100644
--- a/libavfilter/vf_datascope.c
+++ b/libavfilter/vf_datascope.c
@@ -47,6 +47,8 @@ typedef struct DatascopeContext {
 FFDrawColor black;
 FFDrawColor gray;
 
+void (*pick_color)(FFDrawContext *draw, FFDrawColor *color, AVFrame *in, 
int x, int y, int *value);
+void (*reverse_color)(FFDrawContext *draw, FFDrawColor *color, FFDrawColor 
*reverse);
 int (*filter)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
 } DatascopeContext;
 
@@ -97,54 +99,66 @@ static void draw_text(DatascopeContext *s, AVFrame *frame, 
FFDrawColor *color,
 }
 }
 
-static void pick_color(FFDrawContext *draw, FFDrawColor *color, AVFrame *in, 
int x, int y, int *value)
+static void pick_color8(FFDrawContext *draw, FFDrawColor *color, AVFrame *in, 
int x, int y, int *value)
 {
 int p, i;
 
 color->rgba[3] = 255;
 for (p = 0; p < draw->nb_planes; p++) {
-if (draw->desc->comp[p].depth == 8) {
-if (draw->nb_planes == 1) {
-for (i = 0; i < 4; i++) {
-value[i] = in->data[0][y * in->linesize[0] + x * 
draw->pixelstep[0] + i];
-color->comp[0].u8[i] = value[i];
-}
-} else {
-value[p] = in->data[p][(y >> draw->vsub[p]) * in->linesize[p] 
+ (x >> draw->hsub[p])];
-color->comp[p].u8[0] = value[p];
+if (draw->nb_planes == 1) {
+for (i = 0; i < 4; i++) {
+value[i] = in->data[0][y * in->linesize[0] + x * 
draw->pixelstep[0] + i];
+color->comp[0].u8[i] = value[i];
 }
 } else {
-if (draw->nb_planes == 1) {
-for (i = 0; i < 4; i++) {
-value[i] = AV_RL16(in->data[0] + y * in->linesize[0] + x * 
draw->pixelstep[0] + i * 2);
-color->comp[0].u16[i] = value[i];
-}
-} else {
-value[p] = AV_RL16(in->data[p] + (y >> draw->vsub[p]) * 
in->linesize[p] + (x >> draw->hsub[p]) * 2);
-color->comp[p].u16[0] = value[p];
+value[p] = in->data[p][(y >> draw->vsub[p]) * in->linesize[p] + (x 
>> draw->hsub[p])];
+color->comp[p].u8[0] = value[p];
+}
+}
+}
+
+static void pick_color16(FFDrawContext *draw, FFDrawColor *color, AVFrame *in, 
int x, int y, int *value)
+{
+int p, i;
+
+color->rgba[3] = 255;
+for (p = 0; p < draw->nb_planes; p++) {
+if (draw->nb_planes == 1) {
+for (i = 0; i < 4; i++) {
+value[i] = AV_RL16(in->data[0] + y * in->linesize[0] + x * 
draw->pixelstep[0] + i * 2);
+color->comp[0].u16[i] = value[i];
 }
+} else {
+value[p] = AV_RL16(in->data[p] + (y >> draw->vsub[p]) * 
in->linesize[p] + (x >> draw->hsub[p]) * 2);
+color->comp[p].u16[0] = value[p];
 }
 }
 }
 
-static void reverse_color(FFDrawContext *draw, FFDrawColor *color, FFDrawColor 
*reverse)
+static void reverse_color8(FFDrawContext *draw, FFDrawColor *color, 
FFDrawColor *reverse)
 {
 int p;
 
 reverse->rgba[3] = 255;
 for (p = 0; p < draw->nb_planes; p++) {
-if (draw->desc->comp[p].depth == 8) {
-reverse->comp[p].u8[0] = color->comp[p].u8[0] > 127 ? 0 : 255;
-reverse->comp[p].u8[1] = color->comp[p].u8[1] > 127 ? 0 : 255;
-reverse->comp[p].u8[2] = color->comp[p].u8[2] > 127 ? 0 : 255;
-} else {
-const unsigned max = (1 << draw->desc->comp[p].depth) - 1;
-const unsigned mid = (max + 1) / 2;
+reverse->comp[p].u8[0] = color->comp[p].u8[0] > 127 ? 0 : 255;
+reverse->comp[p].u8[1] = color->comp[p].u8[1] > 127 ? 0 : 255;
+reverse->comp[p].u8[2] = color->comp[p].u8[2] > 127 ? 0 : 255;
+}
+}
 
-reverse->comp[p].u16[0] = color->comp[p].u16[0] > mid ? 0 : max;
-reverse->comp[p].u16[1] = color->comp[p].u16[1] > mid ? 0 : max;
-reverse->comp[p].u16[2] = color->comp[p].u16[2] > mid ? 0 : max;
-}
+static void reverse_color16(FFDrawContext *draw, FFDrawColor *color, 
FFDrawColor *reverse)
+{
+int p;
+
+reverse->rgba[3] = 255;
+for (p = 0; p < draw->nb_planes; p++) {
+const unsigned max = (1 << draw->desc->comp[p].depth) - 1;
+const unsigned mid = (max + 1) / 2;
+
+

[FFmpeg-cvslog] fate: add hstack and vstack

2016-09-09 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Fri Sep  9 12:49:15 
2016 +0200| [5556392b3b3ccfedfc780a541431b6b83881f7e4] | committer: Paul B Mahol

fate: add hstack and vstack

Signed-off-by: Paul B Mahol 

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

 tests/fate/filter-video.mak  |  8 +++
 tests/filtergraphs/hstack|  1 +
 tests/filtergraphs/vstack|  1 +
 tests/ref/fate/filter-hstack | 55 
 tests/ref/fate/filter-vstack | 55 
 5 files changed, 120 insertions(+)

diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 39b10f0..e2513f5 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -152,6 +152,14 @@ FATE_FILTER_VSYNTH-$(CONFIG_MERGEPLANES_FILTER) += 
fate-filter-mergeplanes
 fate-filter-mergeplanes: tests/data/filtergraphs/mergeplanes
 fate-filter-mergeplanes: CMD = framecrc -c:v pgmyuv -i $(SRC) -c:v pgmyuv -i 
$(SRC) -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/mergeplanes
 
+FATE_FILTER_VSYNTH-$(CONFIG_HSTACK_FILTER) += fate-filter-hstack
+fate-filter-hstack: tests/data/filtergraphs/hstack
+fate-filter-hstack: CMD = framecrc -c:v pgmyuv -i $(SRC) -c:v pgmyuv -i $(SRC) 
-filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/hstack
+
+FATE_FILTER_VSYNTH-$(CONFIG_VSTACK_FILTER) += fate-filter-vstack
+fate-filter-vstack: tests/data/filtergraphs/vstack
+fate-filter-vstack: CMD = framecrc -c:v pgmyuv -i $(SRC) -c:v pgmyuv -i $(SRC) 
-filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/vstack
+
 FATE_FILTER_VSYNTH-$(CONFIG_OVERLAY_FILTER) += fate-filter-overlay
 fate-filter-overlay: tests/data/filtergraphs/overlay
 fate-filter-overlay: CMD = framecrc -c:v pgmyuv -i $(SRC) -c:v pgmyuv -i 
$(SRC) -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/overlay
diff --git a/tests/filtergraphs/hstack b/tests/filtergraphs/hstack
new file mode 100644
index 000..ebee1ab
--- /dev/null
+++ b/tests/filtergraphs/hstack
@@ -0,0 +1 @@
+hstack
diff --git a/tests/filtergraphs/vstack b/tests/filtergraphs/vstack
new file mode 100644
index 000..9f0e13c
--- /dev/null
+++ b/tests/filtergraphs/vstack
@@ -0,0 +1 @@
+vstack
diff --git a/tests/ref/fate/filter-hstack b/tests/ref/fate/filter-hstack
new file mode 100644
index 000..889afe5
--- /dev/null
+++ b/tests/ref/fate/filter-hstack
@@ -0,0 +1,55 @@
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 704x288
+#sar 0: 0/1
+0,  0,  0,1,   304128, 0x901a13ed
+0,  1,  1,1,   304128, 0x793ccaa2
+0,  2,  2,1,   304128, 0x9eafeca3
+0,  3,  3,1,   304128, 0x18f0016f
+0,  4,  4,1,   304128, 0xc90f6cb3
+0,  5,  5,1,   304128, 0x82d751db
+0,  6,  6,1,   304128, 0x7cd2f846
+0,  7,  7,1,   304128, 0xb3801767
+0,  8,  8,1,   304128, 0x3372005b
+0,  9,  9,1,   304128, 0x822a722a
+0, 10, 10,1,   304128, 0x05908ec0
+0, 11, 11,1,   304128, 0xabbbf9b9
+0, 12, 12,1,   304128, 0x1b345ad1
+0, 13, 13,1,   304128, 0x6ccd4455
+0, 14, 14,1,   304128, 0xad541bc9
+0, 15, 15,1,   304128, 0x16231e0a
+0, 16, 16,1,   304128, 0xb2b29c30
+0, 17, 17,1,   304128, 0x5c6d7190
+0, 18, 18,1,   304128, 0x733cd598
+0, 19, 19,1,   304128, 0x605fb80d
+0, 20, 20,1,   304128, 0x9f21eaef
+0, 21, 21,1,   304128, 0xb6f14824
+0, 22, 22,1,   304128, 0x78933ab2
+0, 23, 23,1,   304128, 0x3fd2d1de
+0, 24, 24,1,   304128, 0x62c1f3bb
+0, 25, 25,1,   304128, 0x2d06327b
+0, 26, 26,1,   304128, 0xdbd22d79
+0, 27, 27,1,   304128, 0x9dc9b11d
+0, 28, 28,1,   304128, 0x059148b9
+0, 29, 29,1,   304128, 0x04a1ca1c
+0, 30, 30,1,   304128, 0xba39d594
+0, 31, 31,1,   304128, 0xc38e8a4b
+0, 32, 32,1,   304128, 0x2ea7f929
+0, 33, 33,1,   304128, 0xfd96f460
+0, 34, 34,1,   304128, 0x952b86f0
+0, 35, 35,1,   304128, 0x6bd82a05
+0, 36, 36,1,   304128, 0x40b96f56
+0, 37, 37,1,   304128, 0x867003f0
+0, 38, 38,1,   304128, 0xe6feb298
+0, 39, 39,1,   304128, 0xec409dba
+0, 40, 40,1,  

[FFmpeg-cvslog] fate: add weave

2016-09-09 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Fri Sep  9 11:55:45 
2016 +0200| [ac3f9be330f39e18edb4d720b461b01c8da10684] | committer: Paul B Mahol

fate: add weave

Signed-off-by: Paul B Mahol 

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

 tests/fate/filter-video.mak |  3 +++
 tests/ref/fate/filter-weave | 30 ++
 2 files changed, 33 insertions(+)

diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index fc71b94..39b10f0 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -256,6 +256,9 @@ FATE_FILTER_VSYNTH-$(CONFIG_REMOVEGRAIN_FILTER) += 
$(FATE_REMOVEGRAIN)
 FATE_FILTER_VSYNTH-$(CONFIG_SEPARATEFIELDS_FILTER) += 
fate-filter-separatefields
 fate-filter-separatefields: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf 
separatefields
 
+FATE_FILTER_VSYNTH-$(CONFIG_WEAVE_FILTER) += fate-filter-weave
+fate-filter-weave: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf weave
+
 FATE_FILTER_VSYNTH-$(CONFIG_SELECT_FILTER) += fate-filter-select-alternate
 fate-filter-select-alternate: tests/data/filtergraphs/select-alternate
 fate-filter-select-alternate: CMD = framecrc -c:v pgmyuv -i $(SRC) 
-filter_script $(TARGET_PATH)/tests/data/filtergraphs/select-alternate
diff --git a/tests/ref/fate/filter-weave b/tests/ref/fate/filter-weave
new file mode 100644
index 000..428fc3a
--- /dev/null
+++ b/tests/ref/fate/filter-weave
@@ -0,0 +1,30 @@
+#tb 0: 2/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 352x576
+#sar 0: 0/1
+0,  0,  0,1,   304128, 0x4f96ef40
+0,  1,  1,1,   304128, 0xbd857709
+0,  2,  2,1,   304128, 0x37d05f47
+0,  3,  3,1,   304128, 0x867807de
+0,  4,  4,1,   304128, 0x1838b93b
+0,  5,  5,1,   304128, 0x97fa
+0,  6,  6,1,   304128, 0x55854f93
+0,  7,  7,1,   304128, 0xe6d39ce2
+0,  8,  8,1,   304128, 0x51ec86e0
+0,  9,  9,1,   304128, 0xcb5346da
+0, 10, 10,1,   304128, 0xc5de1991
+0, 11, 11,1,   304128, 0x71168648
+0, 12, 12,1,   304128, 0x500a931b
+0, 13, 13,1,   304128, 0xeb3e6f4b
+0, 14, 14,1,   304128, 0xf8600972
+0, 15, 15,1,   304128, 0x2d8d2ff7
+0, 16, 16,1,   304128, 0x136676cc
+0, 17, 17,1,   304128, 0xd73cd873
+0, 18, 18,1,   304128, 0xd19339a3
+0, 19, 19,1,   304128, 0x63e8a829
+0, 20, 20,1,   304128, 0x45e6f72d
+0, 21, 21,1,   304128, 0x0ae6e095
+0, 22, 22,1,   304128, 0xd89d82e4
+0, 23, 23,1,   304128, 0x9c0819d0
+0, 24, 24,1,   304128, 0x65a48d7c

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


[FFmpeg-cvslog] avfilter/vf_weave: do not leak unused frame

2016-09-09 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Fri Sep  9 11:58:18 
2016 +0200| [653ca058079ccf65f487abd5f30f479903ec82ac] | committer: Paul B Mahol

avfilter/vf_weave: do not leak unused frame

Signed-off-by: Paul B Mahol 

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

 libavfilter/vf_weave.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/libavfilter/vf_weave.c b/libavfilter/vf_weave.c
index 2f0784e..a5fc1b7 100644
--- a/libavfilter/vf_weave.c
+++ b/libavfilter/vf_weave.c
@@ -115,6 +115,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 return ff_filter_frame(outlink, out);
 }
 
+static av_cold void uninit(AVFilterContext *ctx)
+{
+WeaveContext *s = ctx->priv;
+
+av_frame_free(>prev);
+}
+
 static const AVFilterPad weave_inputs[] = {
 {
 .name = "default",
@@ -138,6 +145,7 @@ AVFilter ff_vf_weave = {
 .description   = NULL_IF_CONFIG_SMALL("Weave input video fields into 
frames."),
 .priv_size = sizeof(WeaveContext),
 .priv_class= _class,
+.uninit= uninit,
 .inputs= weave_inputs,
 .outputs   = weave_outputs,
 };

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


[FFmpeg-cvslog] avcodec/ccaption_dec: Use simple array instead of AVBuffer

2016-09-09 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri 
Sep  9 10:26:15 2016 +0200| [752e6dfa3ea97e7901870bdd9e5a51f860607240] | 
committer: Michael Niedermayer

avcodec/ccaption_dec: Use simple array instead of AVBuffer

This is simpler and fixes an out of array read, fixing it with AVBuffers
would be more complex

Fixes: 
e00d9e6e50e5495cc93fea41147b97bb/asan_heap-oob_12dcdbb_8798_b32a97ea722dd37bb5066812cc674552.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 

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

 libavcodec/ccaption_dec.c | 27 +++
 1 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index b38a391..33e2130 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -247,7 +247,8 @@ typedef struct CCaptionSubContext {
 int64_t last_real_time;
 char prev_cmd[2];
 /* buffer to store pkt data */
-AVBufferRef *pktbuf;
+uint8_t *pktbuf;
+int pktbuf_size;
 int readorder;
 } CCaptionSubContext;
 
@@ -274,11 +275,7 @@ static av_cold int init_decoder(AVCodecContext *avctx)
 if (ret < 0) {
 return ret;
 }
-/* allocate pkt buffer */
-ctx->pktbuf = av_buffer_alloc(128);
-if (!ctx->pktbuf) {
-ret = AVERROR(ENOMEM);
-}
+
 return ret;
 }
 
@@ -286,7 +283,8 @@ static av_cold int close_decoder(AVCodecContext *avctx)
 {
 CCaptionSubContext *ctx = avctx->priv_data;
 av_bprint_finalize(>buffer, NULL);
-av_buffer_unref(>pktbuf);
+av_freep(>pktbuf);
+ctx->pktbuf_size = 0;
 return 0;
 }
 
@@ -759,16 +757,13 @@ static int decode(AVCodecContext *avctx, void *data, int 
*got_sub, AVPacket *avp
 int ret = 0;
 int i;
 
-if (ctx->pktbuf->size < len) {
-ret = av_buffer_realloc(>pktbuf, len);
- if (ret < 0) {
-av_log(ctx, AV_LOG_WARNING, "Insufficient Memory of %d truncated 
to %d\n", len, ctx->pktbuf->size);
-len = ctx->pktbuf->size;
-ret = 0;
-}
+av_fast_padded_malloc(>pktbuf, >pktbuf_size, len);
+if (!ctx->pktbuf) {
+av_log(ctx, AV_LOG_WARNING, "Insufficient Memory of %d truncated to 
%d\n", len, ctx->pktbuf_size);
+return AVERROR(ENOMEM);
 }
-memcpy(ctx->pktbuf->data, avpkt->data, len);
-bptr = ctx->pktbuf->data;
+memcpy(ctx->pktbuf, avpkt->data, len);
+bptr = ctx->pktbuf;
 
 for (i  = 0; i < len; i += 3) {
 uint8_t cc_type = *(bptr + i) & 3;

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