[FFmpeg-cvslog] avfilter/vf_shuffleframes: unbreak filter
ffmpeg | branch: master | Paul B Mahol | Thu Sep 8 10:53:43 2016 +0200| [ae31ab807001e6e90eac5a79ee0b61c5e727138c] | committer: Paul B Mahol avfilter/vf_shuffleframes: unbreak filter Regression since 736e2e2c30088d0c2a428a51372c78a0bfb7f356. Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ae31ab807001e6e90eac5a79ee0b61c5e727138c --- libavfilter/vf_shuffleframes.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libavfilter/vf_shuffleframes.c b/libavfilter/vf_shuffleframes.c index f49c9c6..bfbf4bd 100644 --- a/libavfilter/vf_shuffleframes.c +++ b/libavfilter/vf_shuffleframes.c @@ -84,14 +84,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) { AVFilterContext*ctx = inlink->dst; ShuffleFramesContext *s = ctx->priv; -int ret; +int ret = 0; if (s->in_frames < s->nb_frames) { s->frames[s->in_frames] = frame; s->pts[s->in_frames] = frame->pts; s->in_frames++; -ret = 0; -} else if (s->in_frames == s->nb_frames) { +} + +if (s->in_frames == s->nb_frames) { int n, x; for (n = 0; n < s->nb_frames; n++) { @@ -108,8 +109,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) for (n = 0; n < s->nb_frames; n++) av_frame_free(&s->frames[n]); -} else -av_assert0(0); +} return ret; } @@ -118,6 +118,11 @@ static av_cold void uninit(AVFilterContext *ctx) { ShuffleFramesContext *s = ctx->priv; +while (s->in_frames > 0) { +s->in_frames--; +av_frame_free(&s->frames[s->in_frames]); +} + av_freep(&s->frames); av_freep(&s->map); av_freep(&s->pts); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/filters: itemize shuffleframes & shuffleplanes examples
ffmpeg | branch: master | Paul B Mahol | Thu Sep 8 10:26:33 2016 +0200| [8cfe60ef3933c4e300cb088fec28b2511df45398] | committer: Paul B Mahol doc/filters: itemize shuffleframes & shuffleplanes examples Add one more shuffleframes example. Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8cfe60ef3933c4e300cb088fec28b2511df45398 --- doc/filters.texi | 16 1 file changed, 16 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 86a9599..2b5c25b 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -12113,11 +12113,22 @@ frames. Number of indexes also sets maximal value that each index may have. The first frame has the index 0. The default is to keep the input unchanged. +@subsection Examples + +@itemize +@item Swap second and third frame of every three frames of the input: @example ffmpeg -i INPUT -vf "shuffleframes=0 2 1" OUTPUT @end example +@item +Swap 10th and 1st frame of every ten frames of the input: +@example +ffmpeg -i INPUT -vf "shuffleframes=9 1 2 3 4 5 6 7 8 0" OUTPUT +@end example +@end itemize + @section shuffleplanes Reorder and/or duplicate video planes. @@ -12142,10 +12153,15 @@ The index of the input plane to be used as the fourth output plane. The first plane has the index 0. The default is to keep the input unchanged. +@subsection Examples + +@itemize +@item Swap the second and third planes of the input: @example ffmpeg -i INPUT -vf shuffleplanes=0:2:1:3 OUTPUT @end example +@end itemize @anchor{signalstats} @section signalstats ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: add shuffleframes test
ffmpeg | branch: master | Paul B Mahol | Thu Sep 8 11:14:42 2016 +0200| [26a19f8e92782fa803fc274b5501200d218c2735] | committer: Paul B Mahol fate: add shuffleframes test Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=26a19f8e92782fa803fc274b5501200d218c2735 --- tests/fate/filter-video.mak | 5 tests/ref/fate/filter-shuffleframes | 53 + 2 files changed, 58 insertions(+) diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index 0084802..ca0057b 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -264,6 +264,11 @@ FATE_FILTER_VSYNTH-$(call ALLYES, SETPTS_FILTER SETTB_FILTER) += fate-filter-se fate-filter-setpts: tests/data/filtergraphs/setpts fate-filter-setpts: CMD = framecrc -c:v pgmyuv -i $(SRC) -filter_script $(TARGET_PATH)/tests/data/filtergraphs/setpts +FATE_SHUFFLEFRAMES += fate-filter-shuffleframes +fate-filter-shuffleframes: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf shuffleframes="2|1|0" + +FATE_FILTER_VSYNTH-$(CONFIG_SHUFFLEFRAMES_FILTER) += $(FATE_SHUFFLEFRAMES) + FATE_SHUFFLEPLANES += fate-filter-shuffleplanes-dup-luma fate-filter-shuffleplanes-dup-luma: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf format=yuva444p,shuffleplanes=0:0:0:0 diff --git a/tests/ref/fate/filter-shuffleframes b/tests/ref/fate/filter-shuffleframes new file mode 100644 index 000..58d9854 --- /dev/null +++ b/tests/ref/fate/filter-shuffleframes @@ -0,0 +1,53 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 352x288 +#sar 0: 0/1 +0, 0, 0,1, 152064, 0x9dddf64a +0, 1, 1,1, 152064, 0x4bb46551 +0, 2, 2,1, 152064, 0x05b789ef +0, 3, 3,1, 152064, 0xedb5a8e6 +0, 4, 4,1, 152064, 0x4de3b652 +0, 5, 5,1, 152064, 0x2a8380b0 +0, 6, 6,1, 152064, 0x1f1b8026 +0, 7, 7,1, 152064, 0x5ab58bac +0, 8, 8,1, 152064, 0xe20f7c23 +0, 9, 9,1, 152064, 0x30f5fcd5 +0, 10, 10,1, 152064, 0x02344760 +0, 11, 11,1, 152064, 0x91373915 +0, 12, 12,1, 152064, 0x52a48ddd +0, 13, 13,1, 152064, 0x24eca223 +0, 14, 14,1, 152064, 0xc711ad61 +0, 15, 15,1, 152064, 0xb15d38c8 +0, 16, 16,1, 152064, 0x8e364e18 +0, 17, 17,1, 152064, 0xa91c0f05 +0, 18, 18,1, 152064, 0xfc7bf570 +0, 19, 19,1, 152064, 0xf34ddbff +0, 20, 20,1, 152064, 0xf25f6acc +0, 21, 21,1, 152064, 0x2f2768ef +0, 22, 22,1, 152064, 0x445d1d59 +0, 23, 23,1, 152064, 0x9dc72412 +0, 24, 24,1, 152064, 0x43d796b5 +0, 25, 25,1, 152064, 0x95579936 +0, 26, 26,1, 152064, 0xce09f9d6 +0, 27, 27,1, 152064, 0x6dc3650e +0, 28, 28,1, 152064, 0x76d2a455 +0, 29, 29,1, 152064, 0xd780d887 +0, 30, 30,1, 152064, 0xd766fc8d +0, 31, 31,1, 152064, 0xe295c51e +0, 32, 32,1, 152064, 0x0f9d6aca +0, 33, 33,1, 152064, 0xfa8d94fb +0, 34, 34,1, 152064, 0x7fea4378 +0, 35, 35,1, 152064, 0xe22f7a30 +0, 36, 36,1, 152064, 0x0b07594c +0, 37, 37,1, 152064, 0xa50d01f8 +0, 38, 38,1, 152064, 0x4c9737ab +0, 39, 39,1, 152064, 0xd4e49e08 +0, 40, 40,1, 152064, 0xd2735925 +0, 41, 41,1, 152064, 0x88734edd +0, 42, 42,1, 152064, 0xfd500471 +0, 43, 43,1, 152064, 0x575c20ec +0, 44, 44,1, 152064, 0x20cebfa9 +0, 45, 45,1, 152064, 0x6e88c5c2 +0, 46, 46,1, 152064, 0x09ef53ff +0, 47, 47,1, 152064, 0x61b47e73 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/mov: Fix potential integer overflow in mov_read_keys
ffmpeg | branch: master | Sergey Volk | Wed Sep 7 14:05:35 2016 -0700| [347cb14b7cba7560e53f4434b419b9d8800253e7] | committer: Michael Niedermayer avformat/mov: Fix potential integer overflow in mov_read_keys Actual allocation size is computed as (count + 1)*sizeof(meta_keys), so we need to check that (count + 1) won't cause overflow. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=347cb14b7cba7560e53f4434b419b9d8800253e7 --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index f499906..a7595c5 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3278,7 +3278,7 @@ static int mov_read_keys(MOVContext *c, AVIOContext *pb, MOVAtom atom) avio_skip(pb, 4); count = avio_rb32(pb); -if (count > UINT_MAX / sizeof(*c->meta_keys)) { +if (count > UINT_MAX / sizeof(*c->meta_keys) - 1) { av_log(c->fc, AV_LOG_ERROR, "The 'keys' atom with the invalid key count: %d\n", count); return AVERROR_INVALIDDATA; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/nvenc: use frame size instead of surface size
ffmpeg | branch: master | Timo Rothenpieler | Thu Sep 8 19:08:31 2016 +0200| [8ebe1dddfb5a5e4112f032d55d1a3c961034493d] | committer: Timo Rothenpieler avcodec/nvenc: use frame size instead of surface size > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8ebe1dddfb5a5e4112f032d55d1a3c961034493d --- libavcodec/nvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index bff204d..e3edd74 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -1311,7 +1311,7 @@ static int nvenc_copy_frame(AVCodecContext *avctx, NvencSurface *nv_surface, av_image_copy(dst_data, dst_linesize, (const uint8_t**)frame->data, frame->linesize, frame->format, - nv_surface->width, nv_surface->height); + avctx->width, avctx->height); return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/alsdec: Fix raw_mantissa memleak
ffmpeg | branch: master | Michael Niedermayer | Thu Sep 8 18:11:30 2016 +0200| [f2192e0f0399c7cbb1ac3f311726f2fa9cdf1dba] | committer: Michael Niedermayer avcodec/alsdec: Fix raw_mantissa memleak Fixes: 0cee183a09bff5aa5108429717c35a4d/asan_heap-oob_1d99eca_3702_9ef60e80de79082a778d3d9ce8ef3b64.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f2192e0f0399c7cbb1ac3f311726f2fa9cdf1dba --- libavcodec/alsdec.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index c31f733..1bb71f5 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1887,6 +1887,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, static av_cold int decode_end(AVCodecContext *avctx) { ALSDecContext *ctx = avctx->priv_data; +int i; av_freep(&ctx->sconf.chan_pos); @@ -1920,7 +1921,12 @@ static av_cold int decode_end(AVCodecContext *avctx) av_freep(&ctx->last_acf_mantissa); av_freep(&ctx->shift_value); av_freep(&ctx->last_shift_value); -av_freep(&ctx->raw_mantissa); +if (ctx->raw_mantissa) { +for (i = 0; i < avctx->channels; i++) { +av_freep(&ctx->raw_mantissa[i]); +} +av_freep(&ctx->raw_mantissa); +} av_freep(&ctx->larray); av_freep(&ctx->nbits); @@ -2064,7 +2070,7 @@ static av_cold int decode_init(AVCodecContext *avctx) ctx->shift_value = av_malloc_array(avctx->channels, sizeof(*ctx->shift_value)); ctx->last_shift_value = av_malloc_array(avctx->channels, sizeof(*ctx->last_shift_value)); ctx->last_acf_mantissa = av_malloc_array(avctx->channels, sizeof(*ctx->last_acf_mantissa)); -ctx->raw_mantissa = av_malloc_array(avctx->channels, sizeof(*ctx->raw_mantissa)); +ctx->raw_mantissa = av_mallocz_array(avctx->channels, sizeof(*ctx->raw_mantissa)); ctx->larray = av_malloc_array(ctx->cur_frame_length * 4, sizeof(*ctx->larray)); ctx->nbits = av_malloc_array(ctx->cur_frame_length, sizeof(*ctx->nbits)); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/alsdec: Fix mlz memleak
ffmpeg | branch: master | Michael Niedermayer | Thu Sep 8 18:04:13 2016 +0200| [837e72b01608f286c957c5ac3ca3a28cea76e6e0] | committer: Michael Niedermayer avcodec/alsdec: Fix mlz memleak Fixes: 0cee183a09bff5aa5108429717c35a4d/asan_heap-oob_1d99eca_3702_172c75af9868d4c2556a79cc2413f4cc.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=837e72b01608f286c957c5ac3ca3a28cea76e6e0 --- libavcodec/alsdec.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index f557f2b..c31f733 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1912,7 +1912,10 @@ static av_cold int decode_end(AVCodecContext *avctx) av_freep(&ctx->chan_data_buffer); av_freep(&ctx->reverted_channels); av_freep(&ctx->crc_buffer); -av_freep(&ctx->mlz); +if (ctx->mlz) { +av_freep(&ctx->mlz->dict); +av_freep(&ctx->mlz); +} av_freep(&ctx->acf); av_freep(&ctx->last_acf_mantissa); av_freep(&ctx->shift_value); @@ -2065,7 +2068,7 @@ static av_cold int decode_init(AVCodecContext *avctx) ctx->larray = av_malloc_array(ctx->cur_frame_length * 4, sizeof(*ctx->larray)); ctx->nbits = av_malloc_array(ctx->cur_frame_length, sizeof(*ctx->nbits)); -ctx->mlz= av_malloc(sizeof(*ctx->mlz)); +ctx->mlz= av_mallocz(sizeof(*ctx->mlz)); if (!ctx->mlz || !ctx->acf || !ctx->shift_value || !ctx->last_shift_value || !ctx->last_acf_mantissa || !ctx->raw_mantissa) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mlz: Check offset before writing
ffmpeg | branch: master | Michael Niedermayer | Thu Sep 8 19:48:06 2016 +0200| [c0fc83ed41edec476c1b9601e1bc0177967ce206] | committer: Michael Niedermayer avcodec/mlz: Check offset before writing Fixes: 0cee183a09bff5aa5108429717c35a4d/asan_heap-oob_1d99eca_3702_9ef60e80de79082a778d3d9ce8ef3b64.mp4 Affects no release Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c0fc83ed41edec476c1b9601e1bc0177967ce206 --- libavcodec/mlz.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/mlz.c b/libavcodec/mlz.c index acb0908..039635d 100644 --- a/libavcodec/mlz.c +++ b/libavcodec/mlz.c @@ -81,6 +81,10 @@ static int decode_string(MLZ* mlz, unsigned char *buff, int string_code, int *fi } else { offset = dict[current_code].match_len - 1; tmp_code = dict[current_code].char_code; +if (offset >= bufsize) { +av_log(mlz->context, AV_LOG_ERROR, "MLZ offset error.\n"); +return count; +} buff[offset] = tmp_code; count++; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mlz: clear dict on allocation to ensure there are no uninitialized values
ffmpeg | branch: master | Michael Niedermayer | Thu Sep 8 19:46:27 2016 +0200| [2f7a12fab5a2ea17bd78b155e9af965669fb9b52] | committer: Michael Niedermayer avcodec/mlz: clear dict on allocation to ensure there are no uninitialized values Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f7a12fab5a2ea17bd78b155e9af965669fb9b52 --- libavcodec/mlz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mlz.c b/libavcodec/mlz.c index 04b684d..acb0908 100644 --- a/libavcodec/mlz.c +++ b/libavcodec/mlz.c @@ -21,7 +21,7 @@ #include "mlz.h" av_cold void ff_mlz_init_dict(void* context, MLZ *mlz) { -mlz->dict = av_malloc_array(TABLE_SIZE, sizeof(*mlz->dict)); +mlz->dict = av_mallocz_array(TABLE_SIZE, sizeof(*mlz->dict)); mlz->flush_code= FLUSH_CODE; mlz->current_dic_index_max = DIC_INDEX_INIT; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/svq3: Reintroduce slice_type
ffmpeg | branch: master | Michael Niedermayer | Thu Sep 8 21:15:55 2016 +0200| [2d3099ad8ee67a4612633ea02c7fce10e5537579] | committer: Michael Niedermayer avcodec/svq3: Reintroduce slice_type Fixes out of array read Fixes: 1642cd3962249d6aaf0eec2836023fb6/signal_sigsegv_2557a72_2995_04efaf2ff57a052f609a3b4a2ea4e622.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=2d3099ad8ee67a4612633ea02c7fce10e5537579 --- libavcodec/svq3.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index 653a6db..5aedc1e 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -115,6 +115,7 @@ typedef struct SVQ3Context { int prev_frame_num; enum AVPictureType pict_type; +enum AVPictureType slice_type; int low_delay; int mb_x, mb_y; @@ -1070,7 +1071,7 @@ static int svq3_decode_slice_header(AVCodecContext *avctx) return -1; } -s->pict_type = ff_h264_golomb_to_pict_type[slice_id]; +s->slice_type = ff_h264_golomb_to_pict_type[slice_id]; if ((header & 0x9F) == 2) { i = (s->mb_num < 64) ? 6 : (1 + av_log2(s->mb_num - 1)); @@ -1439,6 +1440,8 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data, if (svq3_decode_slice_header(avctx)) return -1; +s->pict_type = s->slice_type; + if (s->pict_type != AV_PICTURE_TYPE_B) FFSWAP(SVQ3Frame*, s->next_pic, s->last_pic); @@ -1552,6 +1555,9 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data, if (svq3_decode_slice_header(avctx)) return -1; } +if (s->slice_type != s->pict_type) { +avpriv_request_sample(avctx, "non constant slice type\n"); +} /* TODO: support s->mb_skip_run */ } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/alsdec: Fix reading 0 mantisse bits
ffmpeg | branch: master | Michael Niedermayer | Thu Sep 8 22:02:44 2016 +0200| [037422178d7f1d0dd09e1ce424dd61a69e77668b] | committer: Michael Niedermayer avcodec/alsdec: Fix reading 0 mantisse bits Fixes assertion failure Fixes: 848c24abc1721c9e3d1ba7bfee8d9fcc/asan_heap-oob_1d99eca_3709_567bba70d67e7d62714dcf56f26fb1da.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=037422178d7f1d0dd09e1ce424dd61a69e77668b --- libavcodec/alsdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 1bb71f5..8c4ff53 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] = get_bits(gb, nbits[i]); +raw_mantissa[c][i] = nbits[i] ? get_bits(gb, nbits[i]) : 0; } } } else { //compressed ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_datascope: let user change background opacity
ffmpeg | branch: master | Paul B Mahol | Fri Sep 9 00:40:30 2016 +0200| [e9770b40b17f1d82058e11e490a66d9fefd3e840] | committer: Paul B Mahol avfilter/vf_datascope: let user change background opacity Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e9770b40b17f1d82058e11e490a66d9fefd3e840 --- doc/filters.texi | 3 +++ libavfilter/vf_datascope.c | 7 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 2b5c25b..5c7146a 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -6035,6 +6035,9 @@ the text color is picked in such way so its always visible. @item axis Draw rows and columns numbers on left and top of video. + +@item opacity +Set background opacity. @end table @section dctdnoiz diff --git a/libavfilter/vf_datascope.c b/libavfilter/vf_datascope.c index 76134c2..57478fd 100644 --- a/libavfilter/vf_datascope.c +++ b/libavfilter/vf_datascope.c @@ -36,6 +36,7 @@ typedef struct DatascopeContext { int x, y; int mode; int axis; +float opacity; int nb_planes; int nb_comps; @@ -62,6 +63,7 @@ static const AVOption datascope_options[] = { { "color", NULL, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, "mode" }, { "color2", NULL, 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, FLAGS, "mode" }, { "axis","draw column/row numbers", OFFSET(axis), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS }, +{ "opacity", "set background opacity", OFFSET(opacity), AV_OPT_TYPE_FLOAT, {.dbl=0.75}, 0, 1, FLAGS }, { NULL } }; @@ -135,7 +137,6 @@ static void reverse_color(FFDrawContext *draw, FFDrawColor *color, FFDrawColor * 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].u8[3] = color->comp[p].u8[3] > 127 ? 0 : 255; } else { const unsigned max = (1 << draw->desc->comp[p].depth) - 1; const unsigned mid = (max + 1) / 2; @@ -143,7 +144,6 @@ static void reverse_color(FFDrawContext *draw, FFDrawColor *color, FFDrawColor * 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; -reverse->comp[p].u16[3] = color->comp[p].u16[3] > mid ? 0 : max; } } } @@ -337,11 +337,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) static int config_input(AVFilterLink *inlink) { DatascopeContext *s = inlink->dst->priv; +uint8_t alpha = s->opacity * 255; s->nb_planes = av_pix_fmt_count_planes(inlink->format); ff_draw_init(&s->draw, inlink->format, 0); ff_draw_color(&s->draw, &s->white, (uint8_t[]){ 255, 255, 255, 255} ); -ff_draw_color(&s->draw, &s->black, (uint8_t[]){ 0, 0, 0, 0} ); +ff_draw_color(&s->draw, &s->black, (uint8_t[]){ 0, 0, 0, alpha} ); ff_draw_color(&s->draw, &s->yellow, (uint8_t[]){ 255, 255, 0, 255} ); ff_draw_color(&s->draw, &s->gray, (uint8_t[]){ 77, 77, 77, 255} ); s->chars = (s->draw.desc->comp[0].depth + 7) / 8 * 2; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: add swaprect
ffmpeg | branch: master | Paul B Mahol | Fri Sep 9 00:57:01 2016 +0200| [21de33dd83ca0a093ac437d9351d8f494754c3af] | committer: Paul B Mahol fate: add swaprect Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21de33dd83ca0a093ac437d9351d8f494754c3af --- tests/fate/filter-video.mak| 5 tests/ref/fate/filter-swaprect | 55 ++ 2 files changed, 60 insertions(+) diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index ca0057b..fc71b94 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -277,6 +277,11 @@ fate-filter-shuffleplanes-swapuv: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf shuff FATE_FILTER_VSYNTH-$(CONFIG_SHUFFLEPLANES_FILTER) += $(FATE_SHUFFLEPLANES) +FATE_SWAPRECT += fate-filter-swaprect +fate-filter-swaprect: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf swaprect + +FATE_FILTER_VSYNTH-$(CONFIG_SWAPRECT_FILTER) += $(FATE_SWAPRECT) + FATE_FILTER_VSYNTH-$(CONFIG_TBLEND_FILTER) += fate-filter-tblend fate-filter-tblend: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf tblend=all_mode=difference128 diff --git a/tests/ref/fate/filter-swaprect b/tests/ref/fate/filter-swaprect new file mode 100644 index 000..5bd6864 --- /dev/null +++ b/tests/ref/fate/filter-swaprect @@ -0,0 +1,55 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 352x288 +#sar 0: 0/1 +0, 0, 0,1, 152064, 0x4aaf89ef +0, 1, 1,1, 152064, 0x1c4e6551 +0, 2, 2,1, 152064, 0x18b3f64a +0, 3, 3,1, 152064, 0xdd7680b0 +0, 4, 4,1, 152064, 0x9835b652 +0, 5, 5,1, 152064, 0xd56da8e6 +0, 6, 6,1, 152064, 0x3d947c23 +0, 7, 7,1, 152064, 0xe2e98bac +0, 8, 8,1, 152064, 0xf7ab8026 +0, 9, 9,1, 152064, 0x1dcc3915 +0, 10, 10,1, 152064, 0xf54d4760 +0, 11, 11,1, 152064, 0x937dfcd5 +0, 12, 12,1, 152064, 0xc18aad61 +0, 13, 13,1, 152064, 0x8612a223 +0, 14, 14,1, 152064, 0xd1fc8ddd +0, 15, 15,1, 152064, 0x88030f05 +0, 16, 16,1, 152064, 0xd17f4e18 +0, 17, 17,1, 152064, 0x75d838c8 +0, 18, 18,1, 152064, 0x140e6acc +0, 19, 19,1, 152064, 0xaf89dbff +0, 20, 20,1, 152064, 0xc2b1f570 +0, 21, 21,1, 152064, 0x84dc2412 +0, 22, 22,1, 152064, 0x84951d59 +0, 23, 23,1, 152064, 0xeb5c68ef +0, 24, 24,1, 152064, 0x5f4cf9d6 +0, 25, 25,1, 152064, 0xb4689936 +0, 26, 26,1, 152064, 0x9c7096b5 +0, 27, 27,1, 152064, 0x5142d887 +0, 28, 28,1, 152064, 0xa4b5a455 +0, 29, 29,1, 152064, 0xc100650e +0, 30, 30,1, 152064, 0x86d86aca +0, 31, 31,1, 152064, 0xf1cdc51e +0, 32, 32,1, 152064, 0x34f8fc8d +0, 33, 33,1, 152064, 0x7eff7a30 +0, 34, 34,1, 152064, 0x13b44378 +0, 35, 35,1, 152064, 0x646194fb +0, 36, 36,1, 152064, 0x111437ab +0, 37, 37,1, 152064, 0x448d01f8 +0, 38, 38,1, 152064, 0x55e1594c +0, 39, 39,1, 152064, 0xd1464edd +0, 40, 40,1, 152064, 0xd6165925 +0, 41, 41,1, 152064, 0x111e9e08 +0, 42, 42,1, 152064, 0x6c91bfa9 +0, 43, 43,1, 152064, 0x8fd220ec +0, 44, 44,1, 152064, 0xfe480471 +0, 45, 45,1, 152064, 0xd7687e73 +0, 46, 46,1, 152064, 0x979b53ff +0, 47, 47,1, 152064, 0xeb98c5c2 +0, 48, 48,1, 152064, 0xc04cb483 +0, 49, 49,1, 152064, 0x3709d8ea ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] af_hdcd: fix bounds check in hdcd_envelope()
ffmpeg | branch: master | Burt P | Thu Sep 8 18:06:54 2016 -0500| [91117fc9f196fe4f1bcbec93e60bfda3f798fe45] | committer: Burt P af_hdcd: fix bounds check in hdcd_envelope() From Sebastian Ramacher. https://github.com/bp0/libhdcd/pull/11 Signed-off-by: Burt P > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=91117fc9f196fe4f1bcbec93e60bfda3f798fe45 --- libavfilter/af_hdcd.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c index 96d5a0f..40dba3c 100644 --- a/libavfilter/af_hdcd.c +++ b/libavfilter/af_hdcd.c @@ -1388,15 +1388,18 @@ static int hdcd_analyze(int32_t *samples, int count, int stride, int gain, int t /** apply HDCD decoding parameters to a series of samples */ static int hdcd_envelope(int32_t *samples, int count, int stride, int gain, int target_gain, int extend) { -int i; +static const int max_asample = sizeof(peaktab) / sizeof(peaktab[0]) - 1; int32_t *samples_end = samples + stride * count; +int i; + +av_assert0(PEAK_EXT_LEVEL + max_asample == 0x8000); if (extend) { for (i = 0; i < count; i++) { int32_t sample = samples[i * stride]; int32_t asample = abs(sample) - PEAK_EXT_LEVEL; if (asample >= 0) { -av_assert0(asample < sizeof(peaktab)); +av_assert0(asample <= max_asample); sample = sample >= 0 ? peaktab[asample] : -peaktab[asample]; } else sample <<= 15; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] MAINTAINERS: Add myself for hlsenc
ffmpeg | branch: master | Steven Liu | Thu Sep 8 00:56:19 2016 +0800| [fff4df7fba4fdabff875bb40b63f219601cc5ab1] | committer: Michael Niedermayer MAINTAINERS: Add myself for hlsenc Signed-off-by: Steven Liu Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fff4df7fba4fdabff875bb40b63f219601cc5ab1 --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 044854b..f7e8298 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -397,7 +397,7 @@ Muxers/Demuxers: gxf.c Reimar Doeffinger gxfenc.c Baptiste Coudurier hls.c Anssi Hannula - hls encryption (hlsenc.c) Christian Suloway + hls encryption (hlsenc.c) Christian Suloway, Steven Liu idcin.c Mike Melanson idroqdec.cMike Melanson iff.c Jaikrishnan Menon ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/segment: give a warning message for remove initial_offset option
ffmpeg | branch: master | Steven Liu | Thu Sep 8 21:56:44 2016 +0800| [1da00be009aa74400042bf470b9a5ffbd82a1c5e] | committer: Michael Niedermayer avformat/segment: give a warning message for remove initial_offset option ffmpeg have a generic solution working with all muxer named output_ts_offset, output_ts_offset will instead of initial_offset Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1da00be009aa74400042bf470b9a5ffbd82a1c5e --- libavformat/segment.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavformat/segment.c b/libavformat/segment.c index bf29ef8..33a5cf0 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -651,6 +651,11 @@ static int seg_init(AVFormatContext *s) seg->individual_header_trailer = 0; } +if (seg->initial_offset > 0) { +av_log(s, AV_LOG_WARNING, "NOTE: the option initial_offset is deprecated," + "you can use output_ts_offset instead of it\n"); +} + if (!!seg->time_str + !!seg->times_str + !!seg->frames_str > 1) { av_log(s, AV_LOG_ERROR, "segment_time, segment_times, and segment_frames options " ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/mov: Enable stream parsing for VP9.
ffmpeg | branch: master | Matthew Gregan | Wed Sep 7 13:58:30 2016 +1200| [7b3bc365f9923e30a925f8dece4fddd127a54c5d] | committer: Ronald S. Bultje avformat/mov: Enable stream parsing for VP9. MP4 media containing VP9 using superframes (such as https://github.com/Netflix/vp9-dash/raw/master/DASH-Samples/Fountain_2997_0560kbps_640x480_4x3PAR.ivf_DashUnencrypted.ismv) does not decode correctly with the built-in VP9 decoder because superframes are passed to the decoder whole rather than split into individual frames. Signed-off-by: Matthew Gregan > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b3bc365f9923e30a925f8dece4fddd127a54c5d --- libavformat/mov.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index a7595c5..6e80b93 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2161,6 +2161,7 @@ static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb, case AV_CODEC_ID_EAC3: case AV_CODEC_ID_MPEG1VIDEO: case AV_CODEC_ID_VC1: +case AV_CODEC_ID_VP9: st->need_parsing = AVSTREAM_PARSE_FULL; break; default: ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog