[FFmpeg-cvslog] ffplay: always show stats at all log levels if requested by user
ffmpeg | branch: master | Gyan Doshi | Fri Apr 3 16:54:31 2020 +0530| [2d6a89872ea2e20a3464be825d683d6f91d67c62] | committer: Gyan Doshi ffplay: always show stats at all log levels if requested by user Since 3b491c5a500, stats would be hidden if loglevel was lower than info, even if -stats was set. Fixes #6962 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2d6a89872ea2e20a3464be825d683d6f91d67c62 --- doc/ffplay.texi | 5 +++-- fftools/ffplay.c | 36 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/doc/ffplay.texi b/doc/ffplay.texi index a487c0de8d..f3761bb12e 100644 --- a/doc/ffplay.texi +++ b/doc/ffplay.texi @@ -133,8 +133,9 @@ This option has been deprecated in favor of private options, try -pixel_format. @item -stats Print several playback statistics, in particular show the stream duration, the codec parameters, the current position in the stream and -the audio/video synchronisation drift. It is on by default, to -explicitly disable it you need to specify @code{-nostats}. +the audio/video synchronisation drift. It is shown by default, unless the +log level is lower than @code{info}. Its display can be forced by manually +specifying this option. To disable it, you need to specify @code{-nostats}. @item -fast Non-spec-compliant optimizations. diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 2ed4b22d3e..416ebbf7df 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -40,6 +40,7 @@ #include "libavutil/samplefmt.h" #include "libavutil/avassert.h" #include "libavutil/time.h" +#include "libavutil/bprint.h" #include "libavformat/avformat.h" #include "libavdevice/avdevice.h" #include "libswscale/swscale.h" @@ -326,7 +327,7 @@ static int display_disable; static int borderless; static int alwaysontop; static int startup_volume = 100; -static int show_status = 1; +static int show_status = -1; static int av_sync_type = AV_SYNC_AUDIO_MASTER; static int64_t start_time = AV_NOPTS_VALUE; static int64_t duration = AV_NOPTS_VALUE; @@ -1692,6 +1693,7 @@ display: } is->force_refresh = 0; if (show_status) { +AVBPrint buf; static int64_t last_time; int64_t cur_time; int aqsize, vqsize, sqsize; @@ -1715,18 +1717,28 @@ display: av_diff = get_master_clock(is) - get_clock(&is->vidclk); else if (is->audio_st) av_diff = get_master_clock(is) - get_clock(&is->audclk); -av_log(NULL, AV_LOG_INFO, - "%7.2f %s:%7.3f fd=%4d aq=%5dKB vq=%5dKB sq=%5dB f=%"PRId64"/%"PRId64" \r", - get_master_clock(is), - (is->audio_st && is->video_st) ? "A-V" : (is->video_st ? "M-V" : (is->audio_st ? "M-A" : " ")), - av_diff, - is->frame_drops_early + is->frame_drops_late, - aqsize / 1024, - vqsize / 1024, - sqsize, - is->video_st ? is->viddec.avctx->pts_correction_num_faulty_dts : 0, - is->video_st ? is->viddec.avctx->pts_correction_num_faulty_pts : 0); + +av_bprint_init(&buf, 0, AV_BPRINT_SIZE_AUTOMATIC); +av_bprintf(&buf, + "%7.2f %s:%7.3f fd=%4d aq=%5dKB vq=%5dKB sq=%5dB f=%"PRId64"/%"PRId64" \r", + get_master_clock(is), + (is->audio_st && is->video_st) ? "A-V" : (is->video_st ? "M-V" : (is->audio_st ? "M-A" : " ")), + av_diff, + is->frame_drops_early + is->frame_drops_late, + aqsize / 1024, + vqsize / 1024, + sqsize, + is->video_st ? is->viddec.avctx->pts_correction_num_faulty_dts : 0, + is->video_st ? is->viddec.avctx->pts_correction_num_faulty_pts : 0); + +if (show_status == 1 && AV_LOG_INFO > av_log_get_level()) +fprintf(stderr, "%s", buf.str); +else +av_log(NULL, AV_LOG_INFO, "%s", buf.str); + fflush(stdout); +av_bprint_finalize(&buf, NULL); + last_time = cur_time; } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] ffplay: flush correct stream after stats update
ffmpeg | branch: master | Gyan Doshi | Fri Apr 3 22:17:31 2020 +0530| [b195b5f2ba3527172ff6ac28d018a6ba23262af9] | committer: Gyan Doshi ffplay: flush correct stream after stats update Stats and logs are written to stderr, not stdout. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b195b5f2ba3527172ff6ac28d018a6ba23262af9 --- fftools/ffplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 416ebbf7df..1beec54293 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -1736,7 +1736,7 @@ display: else av_log(NULL, AV_LOG_INFO, "%s", buf.str); -fflush(stdout); +fflush(stderr); av_bprint_finalize(&buf, NULL); last_time = cur_time; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/vf_v360: add pannini input support
ffmpeg | branch: master | Paul B Mahol | Sat Apr 4 14:12:43 2020 +0200| [ec7fb4524012e254d9f03cfe0253eb4f2c89dbeb] | committer: Paul B Mahol avfilter/vf_v360: add pannini input support > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ec7fb4524012e254d9f03cfe0253eb4f2c89dbeb --- doc/filters.texi | 7 +-- libavfilter/vf_v360.c | 54 ++- 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index a8d5fb1b4e..dce396e3fd 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -19044,12 +19044,15 @@ If diagonal field of view is set it overrides horizontal and vertical field of v @end table @item pannini -Pannini projection. @i{(output only)} +Pannini projection. Format specific options: @table @option @item h_fov -Set pannini parameter. +Set output pannini parameter. + +@item ih_fov +Set input pannini parameter. @end table @item cylindrical diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c index e33a857f87..ebc281dfca 100644 --- a/libavfilter/vf_v360.c +++ b/libavfilter/vf_v360.c @@ -74,6 +74,7 @@ static const AVOption v360_options[] = { {"hammer", "hammer", 0, AV_OPT_TYPE_CONST, {.i64=HAMMER}, 0, 0, FLAGS, "in" }, {"sinusoidal", "sinusoidal", 0, AV_OPT_TYPE_CONST, {.i64=SINUSOIDAL}, 0, 0, FLAGS, "in" }, { "fisheye", "fisheye",0, AV_OPT_TYPE_CONST, {.i64=FISHEYE}, 0, 0, FLAGS, "in" }, +{ "pannini", "pannini",0, AV_OPT_TYPE_CONST, {.i64=PANNINI}, 0, 0, FLAGS, "in" }, {"cylindrical", "cylindrical", 0, AV_OPT_TYPE_CONST, {.i64=CYLINDRICAL}, 0, 0, FLAGS, "in" }, {"tetrahedron", "tetrahedron", 0, AV_OPT_TYPE_CONST, {.i64=TETRAHEDRON}, 0, 0, FLAGS, "in" }, {"barrelsplit", "barrel split facebook's 360 format",0, AV_OPT_TYPE_CONST, {.i64=BARREL_SPLIT},0, 0, FLAGS, "in" }, @@ -2690,6 +2691,52 @@ static int pannini_to_xyz(const V360Context *s, return 1; } +/** + * Calculate frame position in pannini format for corresponding 3D coordinates on sphere. + * + * @param s filter private context + * @param vec coordinates on sphere + * @param width frame width + * @param height frame height + * @param us horizontal coordinates for interpolation window + * @param vs vertical coordinates for interpolation window + * @param du horizontal relative coordinate + * @param dv vertical relative coordinate + */ +static int xyz_to_pannini(const V360Context *s, + const float *vec, int width, int height, + int16_t us[4][4], int16_t vs[4][4], float *du, float *dv) +{ +const float phi = atan2f(vec[0], vec[2]) * s->input_mirror_modifier[0]; +const float theta = asinf(vec[1]) * s->input_mirror_modifier[1]; + +const float d = s->ih_fov; +const float S = (d + 1.f) / (d + cosf(phi)); + +const float x = S * sinf(phi); +const float y = S * tanf(theta); + +const float uf = (x + 1.f) * width / 2.f; +const float vf = (y + 1.f) * height / 2.f; + +const int ui = floorf(uf); +const int vi = floorf(vf); + +const int visible = vi >= 0 && vi < height && ui >= 0 && ui < width && vec[2] >= 0.f; + +*du = uf - ui; +*dv = vf - vi; + +for (int i = 0; i < 4; i++) { +for (int j = 0; j < 4; j++) { +us[i][j] = visible ? av_clip(ui + j - 1, 0, width - 1) : 0; +vs[i][j] = visible ? av_clip(vi + i - 1, 0, height - 1) : 0; +} +} + +return visible; +} + /** * Prepare data for processing cylindrical output format. * @@ -3877,7 +3924,6 @@ static int config_output(AVFilterLink *outlink) hf = h; break; case PERSPECTIVE: -case PANNINI: av_log(ctx, AV_LOG_ERROR, "Supplied format is not accepted as input.\n"); return AVERROR(EINVAL); case DUAL_FISHEYE: @@ -3928,6 +3974,12 @@ static int config_output(AVFilterLink *outlink) wf = w * 2; hf = h; break; +case PANNINI: +s->in_transform = xyz_to_pannini; +err = 0; +wf = w; +hf = h; +break; case CYLINDRICAL: s->in_transform = xyz_to_cylindrical; err = prepare_cylindrical_in(ctx); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] libavcodec/jpeg2000dec.c: Handle non EOC streams
ffmpeg | branch: master | Gautam Ramakrishnan | Sat Apr 4 00:15:57 2020 +0530| [e116cb45c231910fc58ea489a1e5fc5aadab6a87] | committer: Michael Niedermayer libavcodec/jpeg2000dec.c: Handle non EOC streams This patch allows decoding of j2k streams which do not have an EOC marker. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e116cb45c231910fc58ea489a1e5fc5aadab6a87 --- libavcodec/jpeg2000dec.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 7103cd6ceb..e71a84c4b8 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -1939,8 +1939,12 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s) len = bytestream2_get_be16(&s->g); if (len < 2 || bytestream2_get_bytes_left(&s->g) < len - 2) { -av_log(s->avctx, AV_LOG_ERROR, "Invalid len %d left=%d\n", len, bytestream2_get_bytes_left(&s->g)); -return AVERROR_INVALIDDATA; +if (s->avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT) { +av_log(s->avctx, AV_LOG_ERROR, "Invalid len %d left=%d\n", len, bytestream2_get_bytes_left(&s->g)); +return AVERROR_INVALIDDATA; +} +av_log(s->avctx, AV_LOG_WARNING, "Missing EOC Marker.\n"); +break; } switch (marker) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] libavcodec/jpeg2000dec.c: Fix indentation
ffmpeg | branch: master | Gautam Ramakrishnan | Sat Apr 4 00:15:58 2020 +0530| [88f95253e1afeb1516b21daf31bb78f496ef2fd4] | committer: Michael Niedermayer libavcodec/jpeg2000dec.c: Fix indentation Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=88f95253e1afeb1516b21daf31bb78f496ef2fd4 --- libavcodec/jpeg2000dec.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index e71a84c4b8..732d88e6fc 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -1288,14 +1288,14 @@ static int jpeg2000_decode_packets_po_iteration(Jpeg2000DecoderContext *s, Jpeg2 continue; } -for (layno = 0; layno < LYEpoc; layno++) { -if ((ret = jpeg2000_decode_packet(s, tile, tp_index, -codsty, rlevel, -precno, layno, -qntsty->expn + (reslevelno ? 3 * (reslevelno - 1) + 1 : 0), - qntsty->nguardbits)) < 0) -return ret; -} +for (layno = 0; layno < LYEpoc; layno++) { +if ((ret = jpeg2000_decode_packet(s, tile, tp_index, + codsty, rlevel, + precno, layno, + qntsty->expn + (reslevelno ? 3 * (reslevelno - 1) + 1 : 0), + qntsty->nguardbits)) < 0) +return ret; +} } } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/mov: Discard last STSC if its empty
ffmpeg | branch: master | Michael Niedermayer | Tue Feb 4 09:45:35 2020 +0100| [550fa277ef976d386b7b17841cb2dd8d1e5db168] | committer: Michael Niedermayer avformat/mov: Discard last STSC if its empty Fixes: Ticket8508 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=550fa277ef976d386b7b17841cb2dd8d1e5db168 --- libavformat/mov.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index f01502a5f8..a46787373f 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2677,6 +2677,10 @@ static int mov_read_stsc(MOVContext *c, AVIOContext *pb, MOVAtom atom) sc->stsc_data[i].id < 1) { av_log(c->fc, AV_LOG_WARNING, "STSC entry %d is invalid (first=%d count=%d id=%d)\n", i, sc->stsc_data[i].first, sc->stsc_data[i].count, sc->stsc_data[i].id); if (i+1 >= sc->stsc_count) { +if (sc->stsc_data[i].count == 0 && i > 0) { +sc->stsc_count --; +continue; +} sc->stsc_data[i].first = FFMAX(sc->stsc_data[i].first, first_min); if (i > 0 && sc->stsc_data[i].first <= sc->stsc_data[i-1].first) sc->stsc_data[i].first = FFMIN(sc->stsc_data[i-1].first + 1LL, INT_MAX); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] swscale/output: Fix integer overflow in alpha computation in yuv2gbrp16_full_X_c()
ffmpeg | branch: master | Michael Niedermayer | Sun Feb 16 20:18:11 2020 +0100| [49ba1879add99d3f64d70d34fb0255c8a49d4b28] | committer: Michael Niedermayer swscale/output: Fix integer overflow in alpha computation in yuv2gbrp16_full_X_c() Fixes: signed integer overflow: 524280 * 4432 cannot be represented in type 'int' Fixes: ticket8322 Found-by: Suhwan Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=49ba1879add99d3f64d70d34fb0255c8a49d4b28 --- libswscale/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/output.c b/libswscale/output.c index a793a89443..9df6ba44c8 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -2278,7 +2278,7 @@ yuv2gbrp16_full_X_c(SwsContext *c, const int16_t *lumFilter, A = -0x4000; for (j = 0; j < lumFilterSize; j++) -A += alpSrc[j][i] * lumFilter[j]; +A += alpSrc[j][i] * (unsigned)lumFilter[j]; A >>= 1; A += 0x20002000; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] swscale/output: Fix integer overflow in yuv2rgb_write_full() with out of range input
ffmpeg | branch: master | Michael Niedermayer | Sun Feb 16 20:11:52 2020 +0100| [e057e83a4ff4c0eeeb78dffe58e21af951c056b6] | committer: Michael Niedermayer swscale/output: Fix integer overflow in yuv2rgb_write_full() with out of range input Fixes: signed integer overflow: 1169365504 + 981452800 cannot be represented in type 'int' Fixes: ticket8293 Found-by: Suhwan Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e057e83a4ff4c0eeeb78dffe58e21af951c056b6 --- libswscale/output.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libswscale/output.c b/libswscale/output.c index 9df6ba44c8..68f43ffba3 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -1850,9 +1850,9 @@ static av_always_inline void yuv2rgb_write_full(SwsContext *c, Y -= c->yuv2rgb_y_offset; Y *= c->yuv2rgb_y_coeff; Y += 1 << 21; -R = Y + V*c->yuv2rgb_v2r_coeff; -G = Y + V*c->yuv2rgb_v2g_coeff + U*c->yuv2rgb_u2g_coeff; -B = Y + U*c->yuv2rgb_u2b_coeff; +R = (unsigned)Y + V*c->yuv2rgb_v2r_coeff; +G = (unsigned)Y + V*c->yuv2rgb_v2g_coeff + U*c->yuv2rgb_u2g_coeff; +B = (unsigned)Y + U*c->yuv2rgb_u2b_coeff; if ((R | G | B) & 0xC000) { R = av_clip_uintp2(R, 30); G = av_clip_uintp2(G, 30); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] fftools/ffmpeg: Disable copy_ts on timestamp wraparound
ffmpeg | branch: master | Michael Niedermayer | Fri May 3 13:38:57 2019 +0200| [64c59b626fa1cfd92703e99b85acc516d0d8ba0b] | committer: Michael Niedermayer fftools/ffmpeg: Disable copy_ts on timestamp wraparound This allows handling more than 26.5h of mpeg* input Fixes: Ticket 7876 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64c59b626fa1cfd92703e99b85acc516d0d8ba0b --- fftools/ffmpeg.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 4fca8b4896..3322723748 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -4263,6 +4263,7 @@ static int process_input(int file_index) int ret, thread_ret, i, j; int64_t duration; int64_t pkt_dts; +int disable_discontinuity_correction = copy_ts; is = ifile->ctx; ret = get_input_packet(ifile, &pkt); @@ -4464,10 +4465,20 @@ static int process_input(int file_index) pkt.dts += duration; pkt_dts = av_rescale_q_rnd(pkt.dts, ist->st->time_base, AV_TIME_BASE_Q, AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX); + +if (copy_ts && pkt_dts != AV_NOPTS_VALUE && ist->next_dts != AV_NOPTS_VALUE && +(is->iformat->flags & AVFMT_TS_DISCONT) && ist->st->pts_wrap_bits < 60) { +int64_t wrap_dts = av_rescale_q_rnd(pkt.dts + (1LLpts_wrap_bits), +ist->st->time_base, AV_TIME_BASE_Q, + AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX); +if (FFABS(wrap_dts - ist->next_dts) < FFABS(pkt_dts - ist->next_dts)/10) +disable_discontinuity_correction = 0; +} + if ((ist->dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO || ist->dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) && pkt_dts != AV_NOPTS_VALUE && ist->next_dts != AV_NOPTS_VALUE && -!copy_ts) { +!disable_discontinuity_correction) { int64_t delta = pkt_dts - ist->next_dts; if (is->iformat->flags & AVFMT_TS_DISCONT) { if (delta < -1LL*dts_delta_threshold*AV_TIME_BASE || ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avdevice/decklink_dec: increase autodetect timeout to 3 sec
ffmpeg | branch: master | Marton Balint | Wed Apr 1 01:04:06 2020 +0200| [f04fe8aa4e290d0d00b2c5bbd33fcf2a43b3fc2d] | committer: Marton Balint avdevice/decklink_dec: increase autodetect timeout to 3 sec 1 sec might not be enough for the cards to detect the format... Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f04fe8aa4e290d0d00b2c5bbd33fcf2a43b3fc2d --- libavdevice/decklink_dec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index c8d931517e..82106aa69e 100644 --- a/libavdevice/decklink_dec.cpp +++ b/libavdevice/decklink_dec.cpp @@ -950,8 +950,8 @@ static int decklink_autodetect(struct decklink_cctx *cctx) { return -1; } -// 1 second timeout -for (i = 0; i < 10; i++) { +// 3 second timeout +for (i = 0; i < 30; i++) { av_usleep(10); /* Sometimes VideoInputFrameArrived is called without the * bmdFrameHasNoInputSource flag before VideoInputFormatChanged. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/mpegts: use buffer pools for allocating PES payloads
ffmpeg | branch: master | Marton Balint | Fri Apr 3 23:32:38 2020 +0200| [944cb188edda3574d52a161d785928c851810cef] | committer: Marton Balint avformat/mpegts: use buffer pools for allocating PES payloads This brings a performance improvement when demuxing files, most of the improvement comes from buffer pooling unbound packets. time ffprobe -i samples/ffmpeg-bugs/trac/ticket6132/Samsung_HDR_-_Chasing_the_Light.ts -show_packets >/dev/null 2>&1 Before: real0m1.967s user0m1.471s sys 0m0.493s After: real0m1.497s user0m1.364s sys 0m0.129s Based on a patch of James Almer. Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=944cb188edda3574d52a161d785928c851810cef --- libavformat/mpegts.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 7f56bacb2c..a4ecb2e084 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -170,6 +170,7 @@ struct MpegTSContext { int current_pid; AVStream *epg_stream; +AVBufferPool* pools[32]; }; #define MPEGTS_OPTIONS \ @@ -1103,6 +1104,18 @@ static int read_sl_header(PESContext *pes, SLConfigDescr *sl, return (get_bits_count(&gb) + 7) >> 3; } +static AVBufferRef *buffer_pool_get(MpegTSContext *ts, int size) +{ +int index = av_log2(size + AV_INPUT_BUFFER_PADDING_SIZE); +if (!ts->pools[index]) { +int pool_size = FFMIN(MAX_PES_PAYLOAD + AV_INPUT_BUFFER_PADDING_SIZE, 2 << index); +ts->pools[index] = av_buffer_pool_init(pool_size, NULL); +if (!ts->pools[index]) +return NULL; +} +return av_buffer_pool_get(ts->pools[index]); +} + /* return non zero if a packet could be constructed */ static int mpegts_push_data(MpegTSFilter *filter, const uint8_t *buf, int buf_size, int is_start, @@ -1177,8 +1190,7 @@ static int mpegts_push_data(MpegTSFilter *filter, pes->total_size = MAX_PES_PAYLOAD; /* allocate pes buffer */ -pes->buffer = av_buffer_alloc(pes->total_size + - AV_INPUT_BUFFER_PADDING_SIZE); +pes->buffer = buffer_pool_get(ts, pes->total_size); if (!pes->buffer) return AVERROR(ENOMEM); @@ -1351,8 +1363,7 @@ skip: if (ret < 0) return ret; pes->total_size = MAX_PES_PAYLOAD; -pes->buffer = av_buffer_alloc(pes->total_size + - AV_INPUT_BUFFER_PADDING_SIZE); +pes->buffer = buffer_pool_get(ts, pes->total_size); if (!pes->buffer) return AVERROR(ENOMEM); ts->stop_parse = 1; @@ -3200,6 +3211,9 @@ static void mpegts_free(MpegTSContext *ts) clear_programs(ts); +for (i = 0; i < FF_ARRAY_ELEMS(ts->pools); i++) +av_buffer_pool_uninit(&ts->pools[i]); + for (i = 0; i < NB_PID_MAX; i++) if (ts->pids[i]) mpegts_close_filter(ts, ts->pids[i]); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] lavc: Use supported_samplerates for Dolby Digital encoders.
ffmpeg | branch: master | Carl Eugen Hoyos | Tue Feb 11 00:20:52 2020 +0100| [4679a474f06c229b10976d7f0b4eee0613c2715a] | committer: Carl Eugen Hoyos lavc: Use supported_samplerates for Dolby Digital encoders. Fixes ticket #8518. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4679a474f06c229b10976d7f0b4eee0613c2715a --- libavcodec/ac3enc_fixed.c | 1 + libavcodec/ac3enc_float.c | 1 + libavcodec/ac3tab.c | 2 +- libavcodec/ac3tab.h | 2 +- libavcodec/eac3enc.c | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c index b23fc64776..e57d035294 100644 --- a/libavcodec/ac3enc_fixed.c +++ b/libavcodec/ac3enc_fixed.c @@ -155,6 +155,7 @@ AVCodec ff_ac3_fixed_encoder = { .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_NONE }, .priv_class = &ac3enc_class, +.supported_samplerates = ff_ac3_sample_rate_tab, .channel_layouts = ff_ac3_channel_layouts, .defaults= ac3_defaults, }; diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c index d6e658b2b4..1f3111af0e 100644 --- a/libavcodec/ac3enc_float.c +++ b/libavcodec/ac3enc_float.c @@ -150,6 +150,7 @@ AVCodec ff_ac3_encoder = { .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .priv_class = &ac3enc_class, +.supported_samplerates = ff_ac3_sample_rate_tab, .channel_layouts = ff_ac3_channel_layouts, .defaults= ac3_defaults, }; diff --git a/libavcodec/ac3tab.c b/libavcodec/ac3tab.c index bd88f32d92..96ef8ebaeb 100644 --- a/libavcodec/ac3tab.c +++ b/libavcodec/ac3tab.c @@ -126,7 +126,7 @@ const uint8_t ff_ac3_dec_channel_map[8][2][6] = { }; /* possible frequencies */ -const uint16_t ff_ac3_sample_rate_tab[3] = { 48000, 44100, 32000 }; +const int ff_ac3_sample_rate_tab[3] = { 48000, 44100, 32000 }; /* possible bitrates */ const uint16_t ff_ac3_bitrate_tab[19] = { diff --git a/libavcodec/ac3tab.h b/libavcodec/ac3tab.h index aa71acbce1..f0f6e6ccc4 100644 --- a/libavcodec/ac3tab.h +++ b/libavcodec/ac3tab.h @@ -33,7 +33,7 @@ extern const uint8_t ff_ac3_channels_tab[8]; extern av_export_avcodec const uint16_t avpriv_ac3_channel_layout_tab[8]; extern const uint8_t ff_ac3_enc_channel_map[8][2][6]; extern const uint8_t ff_ac3_dec_channel_map[8][2][6]; -extern const uint16_t ff_ac3_sample_rate_tab[3]; +extern const int ff_ac3_sample_rate_tab[3]; extern const uint16_t ff_ac3_bitrate_tab[19]; extern const uint8_t ff_ac3_rematrix_band_tab[5]; extern const uint8_t ff_eac3_default_cpl_band_struct[18]; diff --git a/libavcodec/eac3enc.c b/libavcodec/eac3enc.c index e1d61f68bf..6a90571e56 100644 --- a/libavcodec/eac3enc.c +++ b/libavcodec/eac3enc.c @@ -263,6 +263,7 @@ AVCodec ff_eac3_encoder = { .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, .priv_class = &eac3enc_class, +.supported_samplerates = ff_ac3_sample_rate_tab, .channel_layouts = ff_ac3_channel_layouts, .defaults= ac3_defaults, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] lavfi/scale_qsv: Fix a format specifier for a variable of type int.
ffmpeg | branch: master | Carl Eugen Hoyos | Wed Apr 1 16:53:04 2020 +0200| [e61767c40a978f0d1c41c848c134d537b5494cb3] | committer: Carl Eugen Hoyos lavfi/scale_qsv: Fix a format specifier for a variable of type int. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e61767c40a978f0d1c41c848c134d537b5494cb3 --- libavfilter/vf_scale_qsv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_scale_qsv.c b/libavfilter/vf_scale_qsv.c index d1fa9424d2..5064dcbb60 100644 --- a/libavfilter/vf_scale_qsv.c +++ b/libavfilter/vf_scale_qsv.c @@ -410,7 +410,7 @@ static int init_out_session(AVFilterContext *ctx) s->scale_conf.Header.BufferSz = sizeof(mfxExtVPPScaling); s->scale_conf.ScalingMode = s->mode; s->ext_buffers[s->num_ext_buf++] = (mfxExtBuffer*)&s->scale_conf; -av_log(ctx, AV_LOG_VERBOSE, "Scaling mode: %"PRIu16"\n", s->mode); +av_log(ctx, AV_LOG_VERBOSE, "Scaling mode: %d\n", s->mode); #endif par.ExtParam= s->ext_buffers; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] lavc/qsvenc: Fix format specifiers for two variables of type int.
ffmpeg | branch: master | Carl Eugen Hoyos | Wed Apr 1 16:52:19 2020 +0200| [d46a91b7f38f5abce2d01d247f22ec4435204efe] | committer: Carl Eugen Hoyos lavc/qsvenc: Fix format specifiers for two variables of type int. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d46a91b7f38f5abce2d01d247f22ec4435204efe --- libavcodec/qsvenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 52b4e43979..afab8fd715 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -218,9 +218,9 @@ static void dump_video_param(AVCodecContext *avctx, QSVEncContext *q, "RecoveryPointSEI: %s IntRefType: %"PRIu16"; IntRefCycleSize: %"PRIu16"; IntRefQPDelta: %"PRId16"\n", print_threestate(co->RecoveryPointSEI), co2->IntRefType, co2->IntRefCycleSize, co2->IntRefQPDelta); -av_log(avctx, AV_LOG_VERBOSE, "MaxFrameSize: %"PRIu16"; ", co2->MaxFrameSize); +av_log(avctx, AV_LOG_VERBOSE, "MaxFrameSize: %d; ", co2->MaxFrameSize); #if QSV_HAVE_MAX_SLICE_SIZE -av_log(avctx, AV_LOG_VERBOSE, "MaxSliceSize: %"PRIu16"; ", co2->MaxSliceSize); +av_log(avctx, AV_LOG_VERBOSE, "MaxSliceSize: %d; ", co2->MaxSliceSize); #endif av_log(avctx, AV_LOG_VERBOSE, "\n"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] lavf, lavfi: Remove uses of sizeof(char).
ffmpeg | branch: master | Carl Eugen Hoyos | Sat Apr 4 01:30:14 2020 +0200| [61dcaf5fb74d11209683da1a98aa324df54147ed] | committer: Carl Eugen Hoyos lavf, lavfi: Remove uses of sizeof(char). The C standard requires sizeof(char) == 1. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=61dcaf5fb74d11209683da1a98aa324df54147ed --- libavfilter/dnn/dnn_backend_tf.c | 2 +- libavfilter/vf_deshake.c | 4 ++-- libavformat/webmdashenc.c| 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index a921667424..9ceca5cea0 100644 --- a/libavfilter/dnn/dnn_backend_tf.c +++ b/libavfilter/dnn/dnn_backend_tf.c @@ -95,7 +95,7 @@ static TF_Tensor *allocate_input_tensor(const DNNData *input) break; case DNN_UINT8: dt = TF_UINT8; -size = sizeof(char); +size = 1; break; default: av_assert0(!"should not reach here"); diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c index b516ea2d59..28a541b94a 100644 --- a/libavfilter/vf_deshake.c +++ b/libavfilter/vf_deshake.c @@ -354,7 +354,7 @@ static av_cold int init(AVFilterContext *ctx) if (deshake->filename) deshake->fp = fopen(deshake->filename, "w"); if (deshake->fp) -fwrite("Ori x, Avg x, Fin x, Ori y, Avg y, Fin y, Ori angle, Avg angle, Fin angle, Ori zoom, Avg zoom, Fin zoom\n", sizeof(char), 104, deshake->fp); +fwrite("Ori x, Avg x, Fin x, Ori y, Avg y, Fin y, Ori angle, Avg angle, Fin angle, Ori zoom, Avg zoom, Fin zoom\n", 1, 104, deshake->fp); // Quadword align left edge of box for MMX code, adjust width if necessary // to keep right margin @@ -485,7 +485,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) // Write statistics to file if (deshake->fp) { snprintf(tmp, 256, "%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f\n", orig.vec.x, deshake->avg.vec.x, t.vec.x, orig.vec.y, deshake->avg.vec.y, t.vec.y, orig.angle, deshake->avg.angle, t.angle, orig.zoom, deshake->avg.zoom, t.zoom); -fwrite(tmp, sizeof(char), strlen(tmp), deshake->fp); +fwrite(tmp, 1, strlen(tmp), deshake->fp); } // Turn relative current frame motion into absolute by adding it to the diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c index d05b265330..7847659c63 100644 --- a/libavformat/webmdashenc.c +++ b/libavformat/webmdashenc.c @@ -439,7 +439,7 @@ static int write_adaptation_set(AVFormatContext *s, int as_index) static int to_integer(char *p, int len) { int ret; -char *q = av_malloc(sizeof(char) * len); +char *q = av_malloc(len); if (!q) return AVERROR(ENOMEM); av_strlcpy(q, p, len); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] lavc/sbc: Remove bool usage.
ffmpeg | branch: master | Carl Eugen Hoyos | Wed Apr 1 21:28:09 2020 +0200| [c59233d50336c8f8eedd94f960ef927ffbae5c29] | committer: Carl Eugen Hoyos lavc/sbc: Remove bool usage. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c59233d50336c8f8eedd94f960ef927ffbae5c29 --- libavcodec/sbcdec.c | 1 - libavcodec/sbcenc.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/sbcdec.c b/libavcodec/sbcdec.c index 2ebde46627..5361ee2c89 100644 --- a/libavcodec/sbcdec.c +++ b/libavcodec/sbcdec.c @@ -30,7 +30,6 @@ * SBC decoder implementation */ -#include #include "avcodec.h" #include "internal.h" #include "libavutil/intreadwrite.h" diff --git a/libavcodec/sbcenc.c b/libavcodec/sbcenc.c index e2929e22ac..631acf7905 100644 --- a/libavcodec/sbcenc.c +++ b/libavcodec/sbcenc.c @@ -30,7 +30,6 @@ * SBC encoder implementation */ -#include #include "libavutil/opt.h" #include "avcodec.h" #include "internal.h" @@ -95,7 +94,7 @@ static int sbc_analyze_audio(SBCDSPContext *s, struct sbc_frame *frame) * Returns the length of the packed frame. */ static size_t sbc_pack_frame(AVPacket *avpkt, struct sbc_frame *frame, - int joint, bool msbc) + int joint, int msbc) { PutBitContext pb; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] configure: Filter -Wl, linker flags out for msvc compilation.
ffmpeg | branch: master | Carl Eugen Hoyos | Wed Apr 1 16:57:40 2020 +0200| [84abd1012cca766bf3b82b527880cf4ec2475cda] | committer: Carl Eugen Hoyos configure: Filter -Wl, linker flags out for msvc compilation. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=84abd1012cca766bf3b82b527880cf4ec2475cda --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 5fe9950e20..28197b3c9d 100755 --- a/configure +++ b/configure @@ -4439,6 +4439,7 @@ msvc_common_flags(){ -l*) echo ${flag#-l}.lib ;; -LARGEADDRESSAWARE) echo $flag ;; -L*) echo -libpath:${flag#-L} ;; +-Wl,*);; *)echo $flag ;; esac done ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] lavc/aacdec_template: Only warn once about unusual 7.1 encoding.
ffmpeg | branch: master | Carl Eugen Hoyos | Fri Mar 27 22:37:23 2020 +0100| [4d9b9c5e4637ac15205467f16fcac92a28e18f18] | committer: Carl Eugen Hoyos lavc/aacdec_template: Only warn once about unusual 7.1 encoding. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4d9b9c5e4637ac15205467f16fcac92a28e18f18 --- libavcodec/aac.h | 2 +- libavcodec/aacdec_template.c | 20 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libavcodec/aac.h b/libavcodec/aac.h index c2b9c980cb..d422ea5b13 100644 --- a/libavcodec/aac.h +++ b/libavcodec/aac.h @@ -356,7 +356,7 @@ struct AACContext { OutputConfiguration oc[2]; int warned_num_aac_frames; int warned_960_sbr; - +unsigned warned_71_wide; int warned_gain_control; /* aacdec functions pointers */ diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c index bb11de3458..3c7818530a 100644 --- a/libavcodec/aacdec_template.c +++ b/libavcodec/aacdec_template.c @@ -520,14 +520,14 @@ static void flush(AVCodecContext *avctx) * * @return Returns error status. 0 - OK, !0 - error */ -static int set_default_channel_config(AVCodecContext *avctx, +static int set_default_channel_config(AACContext *ac, uint8_t (*layout_map)[3], int *tags, int channel_config) { if (channel_config < 1 || (channel_config > 7 && channel_config < 11) || channel_config > 12) { -av_log(avctx, AV_LOG_ERROR, +av_log(ac->avctx, AV_LOG_ERROR, "invalid default channel configuration (%d)\n", channel_config); return AVERROR_INVALIDDATA; @@ -547,8 +547,8 @@ static int set_default_channel_config(AVCodecContext *avctx, * As actual intended 7.1(wide) streams are very rare, default to assuming a * 7.1 layout was intended. */ -if (channel_config == 7 && avctx->strict_std_compliance < FF_COMPLIANCE_STRICT) { -av_log(avctx, AV_LOG_INFO, "Assuming an incorrectly encoded 7.1 channel layout" +if (channel_config == 7 && ac->avctx->strict_std_compliance < FF_COMPLIANCE_STRICT && !ac->warned_71_wide++) { +av_log(ac->avctx, AV_LOG_INFO, "Assuming an incorrectly encoded 7.1 channel layout" " instead of a spec-compliant 7.1(wide) layout, use -strict %d to decode" " according to the specification instead.\n", FF_COMPLIANCE_STRICT); layout_map[2][2] = AAC_CHANNEL_SIDE; @@ -573,7 +573,7 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id) av_log(ac->avctx, AV_LOG_DEBUG, "mono with CPE\n"); -if (set_default_channel_config(ac->avctx, layout_map, +if (set_default_channel_config(ac, layout_map, &layout_map_tags, 2) < 0) return NULL; if (output_configure(ac, layout_map, layout_map_tags, @@ -592,7 +592,7 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id) av_log(ac->avctx, AV_LOG_DEBUG, "stereo with SCE\n"); -if (set_default_channel_config(ac->avctx, layout_map, +if (set_default_channel_config(ac, layout_map, &layout_map_tags, 1) < 0) return NULL; if (output_configure(ac, layout_map, layout_map_tags, @@ -841,7 +841,7 @@ static int decode_ga_specific_config(AACContext *ac, AVCodecContext *avctx, if (tags < 0) return tags; } else { -if ((ret = set_default_channel_config(avctx, layout_map, +if ((ret = set_default_channel_config(ac, layout_map, &tags, channel_config))) return ret; } @@ -937,7 +937,7 @@ static int decode_eld_specific_config(AACContext *ac, AVCodecContext *avctx, skip_bits_long(gb, 8 * len); } -if ((ret = set_default_channel_config(avctx, layout_map, +if ((ret = set_default_channel_config(ac, layout_map, &tags, channel_config))) return ret; @@ -1200,7 +1200,7 @@ static av_cold int aac_decode_init(AVCodecContext *avctx) ac->oc[1].m4ac.chan_config = i; if (ac->oc[1].m4ac.chan_config) { -int ret = set_default_channel_config(avctx, layout_map, +int ret = set_default_channel_config(ac, layout_map, &layout_map_tags, ac->oc[1].m4ac.chan_config); if (!ret) output_configure(ac, layout_map, layout_map_tags, @@ -3002,7 +3002,7 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb) push_output_configuration(ac); if (hdr_info.chan_config) { ac->oc[1].m4ac.chan_config = hdr_info.chan_config; -if ((ret = set_default_channel_config(ac->avctx, +if ((ret = set_default_channel_config(ac,
[FFmpeg-cvslog] avformat/avisynth: fix deprecation warning
ffmpeg | branch: master | Stephen Hutchinson | Thu Mar 12 19:38:02 2020 -0400| [56f59246293de417d27ea7e27cb9a7727ee579fb] | committer: Marton Balint avformat/avisynth: fix deprecation warning > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=56f59246293de417d27ea7e27cb9a7727ee579fb --- libavformat/avisynth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index 43b65badc9..2c08ace8db 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -555,12 +555,12 @@ static int avisynth_open_file(AVFormatContext *s) #ifdef _WIN32 /* Convert UTF-8 to ANSI code page */ -MultiByteToWideChar(CP_UTF8, 0, s->filename, -1, filename_wc, MAX_PATH * 4); +MultiByteToWideChar(CP_UTF8, 0, s->url, -1, filename_wc, MAX_PATH * 4); WideCharToMultiByte(CP_THREAD_ACP, 0, filename_wc, -1, filename_ansi, MAX_PATH * 4, NULL, NULL); arg = avs_new_value_string(filename_ansi); #else -arg = avs_new_value_string(s->filename); +arg = avs_new_value_string(s->url); #endif val = avs_library.avs_invoke(avs->env, "Import", arg, 0); if (avs_is_error(val)) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] compat/avisynth: remove avisynth headers
ffmpeg | branch: master | Stephen Hutchinson | Thu Mar 12 19:37:59 2020 -0400| [0c75acb4ce5db623f4c1c2729468e66c3e28ad67] | committer: Marton Balint compat/avisynth: remove avisynth headers > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c75acb4ce5db623f4c1c2729468e66c3e28ad67 --- compat/avisynth/avisynth_c.h | 1264 compat/avisynth/avs/capi.h | 94 -- compat/avisynth/avs/config.h | 70 -- compat/avisynth/avs/types.h| 57 - compat/avisynth/avxsynth_c.h | 728 --- .../windowsPorts/basicDataTypeConversions.h| 85 -- compat/avisynth/windowsPorts/windows2linux.h | 77 -- configure |1 + tests/ref/fate/source |9 - 9 files changed, 1 insertion(+), 2384 deletions(-) diff --git a/compat/avisynth/avisynth_c.h b/compat/avisynth/avisynth_c.h deleted file mode 100644 index 9ff9321552..00 --- a/compat/avisynth/avisynth_c.h +++ /dev/null @@ -1,1264 +0,0 @@ -// Avisynth C Interface Version 0.20 -// Copyright 2003 Kevin Atkinson - -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA, or visit -// http://www.gnu.org/copyleft/gpl.html . -// -// As a special exception, I give you permission to link to the -// Avisynth C interface with independent modules that communicate with -// the Avisynth C interface solely through the interfaces defined in -// avisynth_c.h, regardless of the license terms of these independent -// modules, and to copy and distribute the resulting combined work -// under terms of your choice, provided that every copy of the -// combined work is accompanied by a complete copy of the source code -// of the Avisynth C interface and Avisynth itself (with the version -// used to produce the combined work), being distributed under the -// terms of the GNU General Public License plus this exception. An -// independent module is a module which is not derived from or based -// on Avisynth C Interface, such as 3rd-party filters, import and -// export plugins, or graphical user interfaces. - -// NOTE: this is a partial update of the Avisynth C interface to recognize -// new color spaces added in Avisynth 2.60. By no means is this document -// completely Avisynth 2.60 compliant. -// 170103: added new CPU constants (FMA4, AVX512xx) -// 171102: define SIZETMOD. do not use yet, experimental. Offsets are size_t instead of int. Affects x64. -// 171106: avs_get_row_size calls into avs_get_row_size_p, instead of direct field access -// 171106: avs_get_height calls into avs_get_row_size_p, instead of direct field access -// 180524: AVSC_EXPORT to dllexport in capi.h for avisynth_c_plugin_init -// 180524: avs_is_same_colorspace VideoInfo parameters to const -// 181230: Readability: functions regrouped to mix less AVSC_API and AVSC_INLINE, put together Avisynth+ specific stuff -// 181230: use #ifndef AVSC_NO_DECLSPEC for AVSC_INLINE functions which are calling API functions -// 181230: comments on avs_load_library (helper for loading API entries dynamically into a struct using AVSC_NO_DECLSPEC define) -// 181230: define alias AVS_FRAME_ALIGN as FRAME_ALIGN -// 181230: remove unused form of avs_get_rowsize and avs_get_height (kept earlier for reference) -// 190104: avs_load_library: smart fallback mechanism for Avisynth+ specific functions: -// if they are not loadable, they will work in a classic Avisynth compatible mode -// Example#1: e.g. avs_is_444 will call the existing avs_is_yv24 instead -// Example#2: avs_bits_per_component will return 8 for all colorspaces (Classic Avisynth supports only 8 bits/pixel) -// Thus the Avisynth+ specific API functions are safely callable even when connected to classic Avisynth DLL - -#ifndef __AVISYNTH_C__ -#define __AVISYNTH_C__ - -#include "avs/config.h" -#include "avs/capi.h" -#include "avs/types.h" - -#define AVS_FRAME_ALIGN FRAME_ALIGN -/ -// -// Constants -// - -#ifndef __AVISYNTH_6_H__ -enum { AVISYNTH_INTERFACE_VERSION = 6 }; -#endif - -enum {AVS_SAMPLE_INT8 = 1<<0, - AVS_SAMPLE_INT16 = 1<<1, - AVS_SAMPLE_INT24 = 1<<2, -
[FFmpeg-cvslog] avformat/avisynth: switch to AviSynth+ on Linux
ffmpeg | branch: master | Stephen Hutchinson | Thu Mar 12 19:38:00 2020 -0400| [6d8cddd1c67758636843f6a08295b3896c2e9ef8] | committer: Marton Balint avformat/avisynth: switch to AviSynth+ on Linux AviSynth+ now supports non-Windows OSes, making AvxSynth obsolete. Since we no longer support AviSynth 2.5 (which is essentially what AvxSynth is), remove AvxSynth support and replace it with AviSynth+. As a result, the USING_AVISYNTH defines can be switched back to generic _WIN32. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d8cddd1c67758636843f6a08295b3896c2e9ef8 --- Changelog | 1 + libavformat/avisynth.c | 56 ++ 2 files changed, 16 insertions(+), 41 deletions(-) diff --git a/Changelog b/Changelog index 05b9a84562..e6db88af07 100644 --- a/Changelog +++ b/Changelog @@ -55,6 +55,7 @@ version : - CRI HCA decoder - CRI HCA demuxer - overlay_cuda filter +- switch from AvxSynth to AviSynth+ on Linux version 4.2: diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index 55a2efd884..43b65badc9 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -1,5 +1,5 @@ /* - * AviSynth/AvxSynth support + * AviSynth(+) support * Copyright (c) 2012 AvxSynth Team * * This file is part of FFmpeg @@ -31,20 +31,19 @@ /* Enable function pointer definitions for runtime loading. */ #define AVSC_NO_DECLSPEC -/* Platform-specific directives for AviSynth vs AvxSynth. */ +/* Platform-specific directives. */ #ifdef _WIN32 #include "compat/w32dlfcn.h" #undef EXTERN_C - #include "compat/avisynth/avisynth_c.h" #define AVISYNTH_LIB "avisynth" - #define USING_AVISYNTH #else #include - #include "compat/avisynth/avxsynth_c.h" - #define AVISYNTH_NAME "libavxsynth" + #define AVISYNTH_NAME "libavisynth" #define AVISYNTH_LIB AVISYNTH_NAME SLIBSUF #endif +#include + typedef struct AviSynthLibrary { void *library; #define AVSC_DECLARE_FUNC(name) name ## _func name @@ -62,7 +61,6 @@ typedef struct AviSynthLibrary { AVSC_DECLARE_FUNC(avs_release_value); AVSC_DECLARE_FUNC(avs_release_video_frame); AVSC_DECLARE_FUNC(avs_take_clip); -#ifdef USING_AVISYNTH AVSC_DECLARE_FUNC(avs_bits_per_pixel); AVSC_DECLARE_FUNC(avs_get_height_p); AVSC_DECLARE_FUNC(avs_get_pitch_p); @@ -70,7 +68,6 @@ typedef struct AviSynthLibrary { AVSC_DECLARE_FUNC(avs_get_row_size_p); AVSC_DECLARE_FUNC(avs_is_planar_rgb); AVSC_DECLARE_FUNC(avs_is_planar_rgba); -#endif #undef AVSC_DECLARE_FUNC } AviSynthLibrary; @@ -97,14 +94,12 @@ static const int avs_planes_packed[1] = { 0 }; static const int avs_planes_grey[1] = { AVS_PLANAR_Y }; static const int avs_planes_yuv[3]= { AVS_PLANAR_Y, AVS_PLANAR_U, AVS_PLANAR_V }; -#ifdef USING_AVISYNTH static const int avs_planes_rgb[3]= { AVS_PLANAR_G, AVS_PLANAR_B, AVS_PLANAR_R }; static const int avs_planes_yuva[4] = { AVS_PLANAR_Y, AVS_PLANAR_U, AVS_PLANAR_V, AVS_PLANAR_A }; static const int avs_planes_rgba[4] = { AVS_PLANAR_G, AVS_PLANAR_B, AVS_PLANAR_R, AVS_PLANAR_A }; -#endif /* A conflict between C++ global objects, atexit, and dynamic loading requires * us to register our own atexit handler to prevent double freeing. */ @@ -142,7 +137,6 @@ static av_cold int avisynth_load_library(void) LOAD_AVS_FUNC(avs_release_value, 0); LOAD_AVS_FUNC(avs_release_video_frame, 0); LOAD_AVS_FUNC(avs_take_clip, 0); -#ifdef USING_AVISYNTH LOAD_AVS_FUNC(avs_bits_per_pixel, 1); LOAD_AVS_FUNC(avs_get_height_p, 1); LOAD_AVS_FUNC(avs_get_pitch_p, 1); @@ -150,7 +144,6 @@ static av_cold int avisynth_load_library(void) LOAD_AVS_FUNC(avs_get_row_size_p, 1); LOAD_AVS_FUNC(avs_is_planar_rgb, 1); LOAD_AVS_FUNC(avs_is_planar_rgba, 1); -#endif #undef LOAD_AVS_FUNC atexit(avisynth_atexit_handler); @@ -249,7 +242,6 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) avpriv_set_pts_info(st, 32, avs->vi->fps_denominator, avs->vi->fps_numerator); switch (avs->vi->pixel_type) { -#ifdef USING_AVISYNTH /* 10~16-bit YUV pix_fmts (AviSynth+) */ case AVS_CS_YUV444P10: st->codecpar->format = AV_PIX_FMT_YUV444P10; @@ -434,8 +426,7 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) case AVS_CS_BGR64: st->codecpar->format = AV_PIX_FMT_BGRA64; break; -#endif -/* AviSynth 2.5 and AvxSynth pix_fmts */ +/* AviSynth 2.5 pix_fmts */ case AVS_CS_BGR24: st->codecpar->format = AV_PIX_FMT_BGR24; break; @@ -461,7 +452,6 @@ static int avisynth_create_stream_video(AVFormatContext *s, AVStream *st) } switch (planar) { -#ifdef USING_AVISYNTH case 5: // Planar RGB + Alpha avs->n_planes = 4;
[FFmpeg-cvslog] doc/general: AviSynth+ works on Linux now, AvxSynth is gone.
ffmpeg | branch: master | Stephen Hutchinson | Thu Mar 12 19:38:01 2020 -0400| [6e959ad680288e34eccb4ee2dd205e4ffa495f95] | committer: Marton Balint doc/general: AviSynth+ works on Linux now, AvxSynth is gone. Related to this are the following changes: * Mention the GNUmakefile that AviSynth+ provides for installing just the headers. * Expand on users installing AviSynth on their system a little more. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6e959ad680288e34eccb4ee2dd205e4ffa495f95 --- doc/general.texi | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/general.texi b/doc/general.texi index 752618a00b..a7c4b22461 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -50,16 +50,17 @@ This driver can be installed using amdgpu-pro-install script in official amd dri @section AviSynth FFmpeg can read AviSynth scripts as input. To enable support, pass -@code{--enable-avisynth} to configure. The correct headers are -included in compat/avisynth/, which allows the user to enable support -without needing to search for these headers themselves. +@code{--enable-avisynth} to configure after installing the headers +provided by @url{https://github.com/AviSynth/AviSynthPlus, AviSynth+}. +AviSynth+ supplies a @code{GNUmakefile} to install only the headers, +as CMake does not make header-only installs an easy task. For Windows, supported AviSynth variants are @url{http://avisynth.nl, AviSynth 2.6 RC1 or higher} for 32-bit builds and @url{http://avisynth.nl/index.php/AviSynth+, AviSynth+ r1718 or higher} for 32-bit and 64-bit builds. -For Linux and OS X, the supported AviSynth variant is -@url{https://github.com/avxsynth/avxsynth, AvxSynth}. +For Linux, macOS, and BSD, the only supported AviSynth variant is +@url{https://github.com/AviSynth/AviSynthPlus, AviSynth+}, starting with version 3.5. @float NOTE In 2016, AviSynth+ added support for building with GCC. However, due to @@ -77,10 +78,11 @@ GCC builds of AviSynth+ without any special flags. @end float @float NOTE -AviSynth and AvxSynth are loaded dynamically. Distributors can build FFmpeg -with @code{--enable-avisynth}, and the binaries will work regardless of the -end user having AviSynth or AvxSynth installed - they'll only need to be -installed to use AviSynth scripts (obviously). +AviSynth(+) is loaded dynamically. Distributors can build FFmpeg +with @code{--enable-avisynth}, and the binaries will work regardless +of the end user having AviSynth installed. If/when an end user +would like to use AviSynth scripts, then they can install AviSynth(+) +and FFmpeg will be able to find and use it to open scripts. @end float @section Chromaprint ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] lavc/amrwbdec: Do not ignore NO_DATA frames.
ffmpeg | branch: master | Carl Eugen Hoyos | Tue Jan 29 22:46:37 2019 +0100| [bef3c14dd1a9a38d996497da7ea416aa372283bf] | committer: Carl Eugen Hoyos lavc/amrwbdec: Do not ignore NO_DATA frames. Fixes the actual output duration of the sample in ticket #7113. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bef3c14dd1a9a38d996497da7ea416aa372283bf --- libavcodec/amrwbdata.h | 2 +- libavcodec/amrwbdec.c | 9 - 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libavcodec/amrwbdata.h b/libavcodec/amrwbdata.h index 8a8cbfdddf..95c0aaa37b 100644 --- a/libavcodec/amrwbdata.h +++ b/libavcodec/amrwbdata.h @@ -1884,7 +1884,7 @@ static const float lpf_7_coef[31] = { // low pass, 7kHz cutoff /** Core frame sizes in each mode */ static const uint16_t cf_sizes_wb[] = { 132, 177, 253, 285, 317, 365, 397, 461, 477, -40 /// SID/comfort noise frame +40, 0, 0, 0, 0, 0, 0 }; #endif /* AVCODEC_AMRWBDATA_H */ diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c index 47fe7eb55e..b488a5d3c7 100644 --- a/libavcodec/amrwbdec.c +++ b/libavcodec/amrwbdec.c @@ -1119,12 +1119,19 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, buf_out = (float *)frame->data[0]; header_size = decode_mime_header(ctx, buf); +expected_fr_size = ((cf_sizes_wb[ctx->fr_cur_mode] + 7) >> 3) + 1; + +if (ctx->fr_cur_mode == NO_DATA) { +for (i = 0; i < frame->nb_samples; i++) +buf_out[i] = 0.f; +*got_frame_ptr = 1; +return expected_fr_size; +} if (ctx->fr_cur_mode > MODE_SID) { av_log(avctx, AV_LOG_ERROR, "Invalid mode %d\n", ctx->fr_cur_mode); return AVERROR_INVALIDDATA; } -expected_fr_size = ((cf_sizes_wb[ctx->fr_cur_mode] + 7) >> 3) + 1; if (buf_size < expected_fr_size) { av_log(avctx, AV_LOG_ERROR, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".