[FFmpeg-cvslog] lavf: Remove probesize32 and max_analyze_duration32 on version bump.
ffmpeg | branch: master | Carl Eugen Hoyos | Tue Sep 1 09:19:49 2015 +0200| [670d8ecfae5201f8c2d5693495c2f763cbbc2d72] | committer: Carl Eugen Hoyos lavf: Remove probesize32 and max_analyze_duration32 on version bump. Add FF_API_PROBESIZE_32 to allow removing 32bit probesize and 32bit max_analyze_duration after the next libavformat version bump. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=670d8ecfae5201f8c2d5693495c2f763cbbc2d72 --- libavformat/avformat.h | 10 ++ libavformat/mpegts.c|7 ++- libavformat/options_table.h |8 libavformat/utils.c |8 libavformat/version.h |3 +++ 5 files changed, 35 insertions(+), 1 deletion(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index e83a374..4068ab6 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1396,6 +1396,7 @@ typedef struct AVFormatContext { #define AVFMT_FLAG_KEEP_SIDE_DATA 0x4 ///< Don't merge side data but keep it separate. #define AVFMT_FLAG_FAST_SEEK 0x8 ///< Enable fast, but inaccurate seeks for some formats +#if FF_API_PROBESIZE_32 /** * @deprecated deprecated in favor of probesize2 */ @@ -1406,6 +1407,7 @@ typedef struct AVFormatContext { */ attribute_deprecated int max_analyze_duration; +#endif const uint8_t *key; int keylen; @@ -1758,7 +1760,11 @@ typedef struct AVFormatContext { * via AVOptions (NO direct access). * Can be set to 0 to let avformat choose using a heuristic. */ +#if FF_API_PROBESIZE_32 int64_t max_analyze_duration2; +#else +int64_t max_analyze_duration; +#endif /** * Maximum size of the data read from input for determining @@ -1766,7 +1772,11 @@ typedef struct AVFormatContext { * Demuxing only, set by the caller before avformat_open_input() * via AVOptions (NO direct access). */ +#if FF_API_PROBESIZE_32 int64_t probesize2; +#else +int64_t probesize; +#endif /** * dump format separator. diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index eac6d9e..3500fc1 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2510,7 +2510,12 @@ static int mpegts_read_header(AVFormatContext *s) AVIOContext *pb = s->pb; uint8_t buf[8 * 1024] = {0}; int len; -int64_t pos, probesize = s->probesize ? s->probesize : s->probesize2; +int64_t pos, probesize = +#if FF_API_PROBESIZE_32 + s->probesize ? s->probesize : s->probesize2; +#else + s->probesize; +#endif if (ffio_ensure_seekback(pb, probesize) < 0) av_log(s, AV_LOG_WARNING, "Failed to allocate buffers for seekback\n"); diff --git a/libavformat/options_table.h b/libavformat/options_table.h index 58670b0..773814a 100644 --- a/libavformat/options_table.h +++ b/libavformat/options_table.h @@ -36,7 +36,11 @@ static const AVOption avformat_options[] = { {"avioflags", NULL, OFFSET(avio_flags), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, INT_MIN, INT_MAX, D|E, "avioflags"}, {"direct", "reduce buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVIO_FLAG_DIRECT }, INT_MIN, INT_MAX, D|E, "avioflags"}, +#if FF_API_PROBESIZE_32 {"probesize", "set probing size", OFFSET(probesize2), AV_OPT_TYPE_INT64, {.i64 = 500 }, 32, INT64_MAX, D}, +#else +{"probesize", "set probing size", OFFSET(probesize), AV_OPT_TYPE_INT64, {.i64 = 500 }, 32, INT64_MAX, D}, +#endif {"formatprobesize", "number of bytes to probe file format", OFFSET(format_probesize), AV_OPT_TYPE_INT, {.i64 = PROBE_BUF_MAX}, 0, INT_MAX-1, D}, {"packetsize", "set packet size", OFFSET(packet_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, E}, {"fflags", NULL, OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = AVFMT_FLAG_FLUSH_PACKETS }, INT_MIN, INT_MAX, D|E, "fflags"}, @@ -54,7 +58,11 @@ static const AVOption avformat_options[] = { {"nobuffer", "reduce the latency introduced by optional buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, "fflags"}, {"seek2any", "allow seeking to non-keyframes on demuxer level when supported", OFFSET(seek2any), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, D}, {"bitexact", "do not write random/volatile data", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_BITEXACT }, 0, 0, E, "fflags" }, +#if FF_API_PROBESIZE_32 {"analyzeduration", "specify how many microseconds are analyzed to probe the input", OFFSET(max_analyze_duration2), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, D}, +#else +{"analyzeduration", "specify how many microseconds are analyzed to probe the input", OFFSET(max_analyze_duration), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, D}, +#endif {"cryptokey", "decryption key", OFFSET(key), AV_OPT_TYPE_BINARY, {.dbl = 0}, 0, 0, D}, {"indexmem", "max memory used for timestamp index (per stream)", OFFSET(max_index_size), AV_OPT_TYPE_INT, {.i64 = 1<<20 }, 0, INT_MAX, D}, {"rtbufsize", "max memory used for buf
[FFmpeg-cvslog] lavfi/scale: Pass src_range and dst_range to libswscale.
ffmpeg | branch: master | Carl Eugen Hoyos | Tue Sep 1 09:17:26 2015 +0200| [0cb6c0ec488e324443b49b36f1224d3e5af420c4] | committer: Carl Eugen Hoyos lavfi/scale: Pass src_range and dst_range to libswscale. Fixes ticket #4812. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0cb6c0ec488e324443b49b36f1224d3e5af420c4 --- libavfilter/version.h |2 +- libavfilter/vf_scale.c |6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libavfilter/version.h b/libavfilter/version.h index 93fc827..8145078 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -31,7 +31,7 @@ #define LIBAVFILTER_VERSION_MAJOR 5 #define LIBAVFILTER_VERSION_MINOR 40 -#define LIBAVFILTER_VERSION_MICRO 100 +#define LIBAVFILTER_VERSION_MICRO 101 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ LIBAVFILTER_VERSION_MINOR, \ diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index a1a19bb..a40b392 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -374,6 +374,12 @@ static int config_props(AVFilterLink *outlink) av_opt_set_int(*s, "sws_flags", scale->flags, 0); av_opt_set_int(*s, "param0", scale->param[0], 0); av_opt_set_int(*s, "param1", scale->param[1], 0); +if (scale->in_range != AVCOL_RANGE_UNSPECIFIED) +av_opt_set_int(*s, "src_range", + scale->in_range == AVCOL_RANGE_JPEG, 0); +if (scale->out_range != AVCOL_RANGE_UNSPECIFIED) +av_opt_set_int(*s, "dst_range", + scale->out_range == AVCOL_RANGE_JPEG, 0); if (scale->opts) { AVDictionaryEntry *e = NULL; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: adjust fuzz of AAC Encoder's TNS test
ffmpeg | branch: master | Rostislav Pehlivanov | Tue Sep 1 09:08:31 2015 +0100| [b86532810ddc498d16e85b3535037e50a93dbad0] | committer: Rostislav Pehlivanov fate: adjust fuzz of AAC Encoder's TNS test Have to adjust it again, this time because of --enable-small on gcc 4.5 in Linaro. Signed-off-by: Rostislav Pehlivanov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b86532810ddc498d16e85b3535037e50a93dbad0 --- tests/fate/aac.mak |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak index d6acdde..004953a 100644 --- a/tests/fate/aac.mak +++ b/tests/fate/aac.mak @@ -172,7 +172,7 @@ fate-aac-tns-encode: CMP = stddev fate-aac-tns-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav fate-aac-tns-encode: CMP_SHIFT = -4096 fate-aac-tns-encode: CMP_TARGET = 636.93 -fate-aac-tns-encode: FUZZ = 1.8 +fate-aac-tns-encode: FUZZ = 2.8 fate-aac-tns-encode: SIZE_TOLERANCE = 3560 FATE_AAC_ENCODE += fate-aac-is-encode ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_waveform: simplify memory allocations
ffmpeg | branch: master | Paul B Mahol | Mon Aug 31 16:45:55 2015 +| [97c7c39d2539127094a3c30a1d13653e25b85d02] | committer: Paul B Mahol avfilter/vf_waveform: simplify memory allocations Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=97c7c39d2539127094a3c30a1d13653e25b85d02 --- libavfilter/vf_waveform.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c index eb49ef3..a856ccb 100644 --- a/libavfilter/vf_waveform.c +++ b/libavfilter/vf_waveform.c @@ -52,6 +52,7 @@ typedef struct WaveformContext { inteend[4]; int*emax[4]; int*emin[4]; +int*peak; intfilter; intsize; void (*waveform)(struct WaveformContext *s, AVFrame *in, AVFrame *out, @@ -908,19 +909,20 @@ static int config_output(AVFilterLink *outlink) comp++; } -for (p = 0; p < 4; p++) { -av_freep(&s->emax[p]); -av_freep(&s->emin[p]); -} +av_freep(&s->peak); if (s->mode) { outlink->h = s->size * FFMAX(comp * s->display, 1); -size = inlink->w * sizeof(int); +size = inlink->w; } else { outlink->w = s->size * FFMAX(comp * s->display, 1); -size = inlink->h * sizeof(int); +size = inlink->h; } +s->peak = av_malloc_array(size, 8 * sizeof(*s->peak)); +if (!s->peak) +return AVERROR(ENOMEM); + for (p = 0; p < 4; p++) { const int is_chroma = (p == 1 || p == 2); const int shift_w = (is_chroma ? s->desc->log2_chroma_w : 0); @@ -933,8 +935,8 @@ static int config_output(AVFilterLink *outlink) shift = s->mode ? shift_h : shift_w; -s->emax[plane] = av_malloc(size); -s->emin[plane] = av_malloc(size); +s->emax[plane] = s->peak + size * (p + 0); +s->emin[plane] = s->peak + size * (p + 4); if (!s->emin[plane] || !s->emax[plane]) return AVERROR(ENOMEM); @@ -942,7 +944,7 @@ static int config_output(AVFilterLink *outlink) offset = j++ * s->size * s->display; s->estart[plane] = offset >> shift; s->eend[plane] = (offset + s->size - 1) >> shift; -for (i = 0; i < size / sizeof(int); i++) { +for (i = 0; i < size; i++) { s->emax[plane][i] = s->estart[plane]; s->emin[plane][i] = s->eend[plane]; } @@ -992,12 +994,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) static av_cold void uninit(AVFilterContext *ctx) { WaveformContext *s = ctx->priv; -int p; -for (p = 0; p < 4; p++) { -av_freep(&s->emax[p]); -av_freep(&s->emin[p]); -} +av_freep(&s->peak); } static const AVFilterPad inputs[] = { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_waveform: implement various filters
ffmpeg | branch: master | Paul B Mahol | Fri Aug 28 18:45:53 2015 +| [32f217edadf0b79151aa2a2d16b38d07354749de] | committer: Paul B Mahol avfilter/vf_waveform: implement various filters Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=32f217edadf0b79151aa2a2d16b38d07354749de --- doc/filters.texi | 21 + libavfilter/vf_waveform.c | 948 - 2 files changed, 792 insertions(+), 177 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index b78cf90..892347b 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -11102,6 +11102,27 @@ can still spot out of range values without constantly looking at waveforms. @item peak+instant Peak and instant envelope combined together. @end table + +@item filter, f +@table @samp +@item lowpass +No filtering, this is default. + +@item flat +Luma and chroma combined together. + +@item aflat +Similar as above, but shows difference between blue and red chroma. + +@item chroma +Displays only chroma. + +@item achroma +Similar as above, but shows difference between blue and red chroma. + +@item color +Displays actual color value on waveform. +@end table @end table @section xbr diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c index 7dfd890..eb49ef3 100644 --- a/libavfilter/vf_waveform.c +++ b/libavfilter/vf_waveform.c @@ -28,6 +28,16 @@ #include "internal.h" #include "video.h" +enum FilterType { +LOWPASS, +FLAT, +AFLAT, +CHROMA, +ACHROMA, +COLOR, +NB_FILTERS +}; + typedef struct WaveformContext { const AVClass *class; intmode; @@ -42,6 +52,10 @@ typedef struct WaveformContext { inteend[4]; int*emax[4]; int*emin[4]; +intfilter; +intsize; +void (*waveform)(struct WaveformContext *s, AVFrame *in, AVFrame *out, + int component, int intensity, int offset, int column); const AVPixFmtDescriptor *desc; } WaveformContext; @@ -69,26 +83,54 @@ static const AVOption waveform_options[] = { { "instant", NULL, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, "envelope" }, { "peak", NULL, 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, FLAGS, "envelope" }, { "peak+instant", NULL, 0, AV_OPT_TYPE_CONST, {.i64=3}, 0, 0, FLAGS, "envelope" }, +{ "filter", "set filter", OFFSET(filter), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_FILTERS-1, FLAGS, "filter" }, +{ "f", "set filter", OFFSET(filter), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_FILTERS-1, FLAGS, "filter" }, +{ "lowpass", NULL, 0, AV_OPT_TYPE_CONST, {.i64=LOWPASS}, 0, 0, FLAGS, "filter" }, +{ "flat" , NULL, 0, AV_OPT_TYPE_CONST, {.i64=FLAT},0, 0, FLAGS, "filter" }, +{ "aflat" , NULL, 0, AV_OPT_TYPE_CONST, {.i64=AFLAT}, 0, 0, FLAGS, "filter" }, +{ "chroma", NULL, 0, AV_OPT_TYPE_CONST, {.i64=CHROMA}, 0, 0, FLAGS, "filter" }, +{ "achroma", NULL, 0, AV_OPT_TYPE_CONST, {.i64=ACHROMA}, 0, 0, FLAGS, "filter" }, +{ "color", NULL, 0, AV_OPT_TYPE_CONST, {.i64=COLOR}, 0, 0, FLAGS, "filter" }, { NULL } }; AVFILTER_DEFINE_CLASS(waveform); -static const enum AVPixelFormat pix_fmts[] = { - AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, - AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, - AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV440P, - AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, - AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_YUVJ411P, AV_PIX_FMT_YUVJ420P, - AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, - AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA420P, - AV_PIX_FMT_GRAY8, - AV_PIX_FMT_NONE +static const enum AVPixelFormat lowpass_pix_fmts[] = { +AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, +AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, +AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV440P, +AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, +AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_YUVJ411P, AV_PIX_FMT_YUVJ420P, +AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, +AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA420P, +AV_PIX_FMT_GRAY8, +AV_PIX_FMT_NONE +}; + +static const enum AVPixelFormat flat_pix_fmts[] = { +AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_NONE +}; + +static const enum AVPixelFormat color_pix_fmts[] = { +AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, +AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_NONE }; static int query_formats(AVFilterContext *ctx) { +WaveformContext *s = ctx->priv; AVFilterFormats *fmts_list; +const enum AVPixelFormat *pix_fmts; + +switch (s->filter) { +case LOWPASS: pix_fmts = lowpass_pix_fmts; break; +case FLAT: +case AFLAT: +case CHROMA: +case ACHROMA: pix_fmts = flat_pix_fmts;break; +case COLOR: pix_fmts = color_pix_fmts; break; +} fmts_list = ff_make_format_list(pix_fmts); if (!fmts_list) @@ -96,88 +138,149 @@ static int query_form
[FFmpeg-cvslog] avfilter/vf_waveform: support envelope for all filters
ffmpeg | branch: master | Paul B Mahol | Mon Aug 31 17:48:10 2015 +| [c3cd1a7496feb374016f1bd099f373763db31705] | committer: Paul B Mahol avfilter/vf_waveform: support envelope for all filters Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c3cd1a7496feb374016f1bd099f373763db31705 --- libavfilter/vf_waveform.c | 89 ++--- 1 file changed, 52 insertions(+), 37 deletions(-) diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c index a856ccb..d672abd 100644 --- a/libavfilter/vf_waveform.c +++ b/libavfilter/vf_waveform.c @@ -50,8 +50,8 @@ typedef struct WaveformContext { intenvelope; intestart[4]; inteend[4]; -int*emax[4]; -int*emin[4]; +int*emax[4][4]; +int*emin[4][4]; int*peak; intfilter; intsize; @@ -139,11 +139,11 @@ static int query_formats(AVFilterContext *ctx) return ff_set_common_formats(ctx, fmts_list); } -static void envelope_instant(WaveformContext *s, AVFrame *out, int plane) +static void envelope_instant(WaveformContext *s, AVFrame *out, int plane, int component) { -const int dst_linesize = out->linesize[plane]; -const uint8_t bg = s->bg_color[plane]; -const int is_chroma = (plane == 1 || plane == 2); +const int dst_linesize = out->linesize[component]; +const uint8_t bg = s->bg_color[component]; +const int is_chroma = (component == 1 || component == 2); const int shift_w = (is_chroma ? s->desc->log2_chroma_w : 0); const int shift_h = (is_chroma ? s->desc->log2_chroma_h : 0); const int dst_h = FF_CEIL_RSHIFT(out->height, shift_h); @@ -156,14 +156,14 @@ static void envelope_instant(WaveformContext *s, AVFrame *out, int plane) if (s->mode) { for (x = 0; x < dst_w; x++) { for (y = start; y < end; y++) { -dst = out->data[plane] + y * dst_linesize + x; +dst = out->data[component] + y * dst_linesize + x; if (dst[0] != bg) { dst[0] = 255; break; } } for (y = end - 1; y >= start; y--) { -dst = out->data[plane] + y * dst_linesize + x; +dst = out->data[component] + y * dst_linesize + x; if (dst[0] != bg) { dst[0] = 255; break; @@ -172,7 +172,7 @@ static void envelope_instant(WaveformContext *s, AVFrame *out, int plane) } } else { for (y = 0; y < dst_h; y++) { -dst = out->data[plane] + y * dst_linesize; +dst = out->data[component] + y * dst_linesize; for (x = start; x < end; x++) { if (dst[x] != bg) { dst[x] = 255; @@ -189,33 +189,33 @@ static void envelope_instant(WaveformContext *s, AVFrame *out, int plane) } } -static void envelope_peak(WaveformContext *s, AVFrame *out, int plane) +static void envelope_peak(WaveformContext *s, AVFrame *out, int plane, int component) { -const int dst_linesize = out->linesize[plane]; -const uint8_t bg = s->bg_color[plane]; -const int is_chroma = (plane == 1 || plane == 2); +const int dst_linesize = out->linesize[component]; +const uint8_t bg = s->bg_color[component]; +const int is_chroma = (component == 1 || component == 2); const int shift_w = (is_chroma ? s->desc->log2_chroma_w : 0); const int shift_h = (is_chroma ? s->desc->log2_chroma_h : 0); const int dst_h = FF_CEIL_RSHIFT(out->height, shift_h); const int dst_w = FF_CEIL_RSHIFT(out->width, shift_w); const int start = s->estart[plane]; const int end = s->eend[plane]; -int *emax = s->emax[plane]; -int *emin = s->emin[plane]; +int *emax = s->emax[plane][component]; +int *emin = s->emin[plane][component]; uint8_t *dst; int x, y; if (s->mode) { for (x = 0; x < dst_w; x++) { for (y = start; y < end && y < emin[x]; y++) { -dst = out->data[plane] + y * dst_linesize + x; +dst = out->data[component] + y * dst_linesize + x; if (dst[0] != bg) { emin[x] = y; break; } } for (y = end - 1; y >= start && y >= emax[x]; y--) { -dst = out->data[plane] + y * dst_linesize + x; +dst = out->data[component] + y * dst_linesize + x; if (dst[0] != bg) { emax[x] = y; break; @@ -224,17 +224,17 @@ static void envelope_peak(WaveformContext *s, AVFrame *out, int plane) } if (s->envelope == 3) -envelope_instant(s, out, plane); +envelope_instant(s, out, plane, component); for (x = 0; x < dst_w; x++)
[FFmpeg-cvslog] aacenc: disable bandtype modifying extensions when coder != twoloop
ffmpeg | branch: master | Rostislav Pehlivanov | Tue Sep 1 12:07:00 2015 +0100| [8ffe1cb4d7d457fdd216f42fec068fbd0cbc7ade] | committer: Rostislav Pehlivanov aacenc: disable bandtype modifying extensions when coder != twoloop If the selected coder isn't twoloop, this commit temporarily disables IS and PNS. The problem is in the encode_window_bands_info() being confused and setting invalid band_types for non-marked (normal) bands. Signed-off-by: Rostislav Pehlivanov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8ffe1cb4d7d457fdd216f42fec068fbd0cbc7ade --- libavcodec/aacenc.c |5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 899111b..444ca0e 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -797,6 +797,11 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) ERROR_IF(1, "Unsupported profile %d\n", avctx->profile); } +if (s->options.aac_coder != AAC_CODER_TWOLOOP) { +s->options.intensity_stereo = 0; +s->options.pns = 0; +} + avctx->bit_rate = (int)FFMIN( 6144 * s->channels / 1024.0 * avctx->sample_rate, avctx->bit_rate); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] rtmp: support the AMF_DATE tag
ffmpeg | branch: master | Andrew Stone | Mon Aug 31 20:28:42 2015 -0400| [dc926ab518a30880c9e8dd9ec26c74d5e9aa6182] | committer: Michael Niedermayer rtmp: support the AMF_DATE tag Instead of returning EINVAL, which can cause a stream to fail to load, this allows the tag to be passed through to the flv demuxer, where it's summarily ignored. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dc926ab518a30880c9e8dd9ec26c74d5e9aa6182 --- libavformat/rtmppkt.c |1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c index c474fb3..0d693c2 100644 --- a/libavformat/rtmppkt.c +++ b/libavformat/rtmppkt.c @@ -440,6 +440,7 @@ int ff_amf_tag_size(const uint8_t *data, const uint8_t *data_end) case AMF_DATA_TYPE_STRING: return 3 + AV_RB16(data); case AMF_DATA_TYPE_LONG_STRING: return 5 + AV_RB32(data); case AMF_DATA_TYPE_NULL:return 1; +case AMF_DATA_TYPE_DATE:return 11; case AMF_DATA_TYPE_ARRAY: parse_key = 0; case AMF_DATA_TYPE_MIXEDARRAY: ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_spp: use the name 's' for the pointer to the private context
ffmpeg | branch: master | Ganesh Ajjanagadde | Mon Aug 31 08:07:56 2015 -0700| [d79c2052dea38d2c997ac5a8ee61a168eb8e] | committer: Paul B Mahol avfilter/vf_spp: use the name 's' for the pointer to the private context Signed-off-by: Ganesh Ajjanagadde > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d79c2052dea38d2c997ac5a8ee61a168eb8e --- libavfilter/vf_spp.c | 98 +- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c index b75f5f3..990fea3 100644 --- a/libavfilter/vf_spp.c +++ b/libavfilter/vf_spp.c @@ -328,24 +328,24 @@ static int query_formats(AVFilterContext *ctx) static int config_input(AVFilterLink *inlink) { -SPPContext *spp = inlink->dst->priv; +SPPContext *s = inlink->dst->priv; const int h = FFALIGN(inlink->h + 16, 16); const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); const int bps = desc->comp[0].depth_minus1 + 1; -av_opt_set_int(spp->dct, "bits_per_sample", bps, 0); -avcodec_dct_init(spp->dct); +av_opt_set_int(s->dct, "bits_per_sample", bps, 0); +avcodec_dct_init(s->dct); if (ARCH_X86) -ff_spp_init_x86(spp); +ff_spp_init_x86(s); -spp->hsub = desc->log2_chroma_w; -spp->vsub = desc->log2_chroma_h; -spp->temp_linesize = FFALIGN(inlink->w + 16, 16); -spp->temp = av_malloc_array(spp->temp_linesize, h * sizeof(*spp->temp)); -spp->src = av_malloc_array(spp->temp_linesize, h * sizeof(*spp->src) * 2); +s->hsub = desc->log2_chroma_w; +s->vsub = desc->log2_chroma_h; +s->temp_linesize = FFALIGN(inlink->w + 16, 16); +s->temp = av_malloc_array(s->temp_linesize, h * sizeof(*s->temp)); +s->src = av_malloc_array(s->temp_linesize, h * sizeof(*s->src) * 2); -if (!spp->temp || !spp->src) +if (!s->temp || !s->src) return AVERROR(ENOMEM); return 0; } @@ -353,7 +353,7 @@ static int config_input(AVFilterLink *inlink) static int filter_frame(AVFilterLink *inlink, AVFrame *in) { AVFilterContext *ctx = inlink->dst; -SPPContext *spp = ctx->priv; +SPPContext *s = ctx->priv; AVFilterLink *outlink = ctx->outputs[0]; AVFrame *out = in; int qp_stride = 0; @@ -365,10 +365,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) * the quantizers from the B-frames (B-frames often have a higher QP), we * need to save the qp table from the last non B-frame; this is what the * following code block does */ -if (!spp->qp) { -qp_table = av_frame_get_qp_table(in, &qp_stride, &spp->qscale_type); +if (!s->qp) { +qp_table = av_frame_get_qp_table(in, &qp_stride, &s->qscale_type); -if (qp_table && !spp->use_bframe_qp && in->pict_type != AV_PICTURE_TYPE_B) { +if (qp_table && !s->use_bframe_qp && in->pict_type != AV_PICTURE_TYPE_B) { int w, h; /* if the qp stride is not set, it means the QP are only defined on @@ -381,27 +381,27 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) h = FF_CEIL_RSHIFT(inlink->h, 4); } -if (w * h > spp->non_b_qp_alloc_size) { -int ret = av_reallocp_array(&spp->non_b_qp_table, w, h); +if (w * h > s->non_b_qp_alloc_size) { +int ret = av_reallocp_array(&s->non_b_qp_table, w, h); if (ret < 0) { -spp->non_b_qp_alloc_size = 0; +s->non_b_qp_alloc_size = 0; return ret; } -spp->non_b_qp_alloc_size = w * h; +s->non_b_qp_alloc_size = w * h; } -av_assert0(w * h <= spp->non_b_qp_alloc_size); -memcpy(spp->non_b_qp_table, qp_table, w * h); +av_assert0(w * h <= s->non_b_qp_alloc_size); +memcpy(s->non_b_qp_table, qp_table, w * h); } } -if (spp->log2_count && !ctx->is_disabled) { -if (!spp->use_bframe_qp && spp->non_b_qp_table) -qp_table = spp->non_b_qp_table; +if (s->log2_count && !ctx->is_disabled) { +if (!s->use_bframe_qp && s->non_b_qp_table) +qp_table = s->non_b_qp_table; -if (qp_table || spp->qp) { -const int cw = FF_CEIL_RSHIFT(inlink->w, spp->hsub); -const int ch = FF_CEIL_RSHIFT(inlink->h, spp->vsub); +if (qp_table || s->qp) { +const int cw = FF_CEIL_RSHIFT(inlink->w, s->hsub); +const int ch = FF_CEIL_RSHIFT(inlink->h, s->vsub); /* get a new frame if in-place is not possible or if the dimensions * are not multiple of 8 */ @@ -419,11 +419,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) out->height = in->height; } -filter(spp, out->data[0], in->data[0], out->linesize[0], in->linesize[0], inlink->w, inlink->h, qp_
[FFmpeg-cvslog] mpegts: demux BluRay text subtitles
ffmpeg | branch: master | Petri Hintukainen | Tue Sep 1 11:56:21 2015 +0300| [5d12d7de2ce548a3c9f5c175a9d1c5bfbdbcbfa8] | committer: Michael Niedermayer mpegts: demux BluRay text subtitles Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d12d7de2ce548a3c9f5c175a9d1c5bfbdbcbfa8 --- libavcodec/avcodec.h|1 + libavcodec/codec_desc.c |7 +++ libavformat/mpegts.c|1 + 3 files changed, 9 insertions(+) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 12a6b54..9d38b59 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -530,6 +530,7 @@ enum AVCodecID { AV_CODEC_ID_VPLAYER= MKBETAG('V','P','l','r'), AV_CODEC_ID_PJS= MKBETAG('P','h','J','S'), AV_CODEC_ID_ASS= MKBETAG('A','S','S',' '), ///< ASS as defined in Matroska +AV_CODEC_ID_HDMV_TEXT_SUBTITLE = MKBETAG('B','D','T','X'), /* other specific kind of codecs (generally used for attachments) */ AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs. diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index c172bf8..487bc2f 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -2735,6 +2735,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"), .props = AV_CODEC_PROP_TEXT_SUB, }, +{ +.id= AV_CODEC_ID_HDMV_TEXT_SUBTITLE, +.type = AVMEDIA_TYPE_SUBTITLE, +.name = "hdmv_text_subtitle", +.long_name = NULL_IF_CONFIG_SMALL("HDMV Text subtitle"), +.props = AV_CODEC_PROP_TEXT_SUB, +}, /* other kind of codecs and pseudo-codecs */ { diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 7f199d4..ed0a86b 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -718,6 +718,7 @@ static const StreamType HDMV_types[] = { { 0xa1, AVMEDIA_TYPE_AUDIO,AV_CODEC_ID_EAC3 }, /* E-AC3 Secondary Audio */ { 0xa2, AVMEDIA_TYPE_AUDIO,AV_CODEC_ID_DTS }, /* DTS Express Secondary Audio */ { 0x90, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_HDMV_PGS_SUBTITLE }, +{ 0x92, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_HDMV_TEXT_SUBTITLE }, { 0 }, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mpegts: fix demuxing PES private stream 2
ffmpeg | branch: master | Petri Hintukainen | Mon Aug 31 12:06:16 2015 +0300| [757cb0f286b5497465207c06e18859bb40d079c5] | committer: Michael Niedermayer mpegts: fix demuxing PES private stream 2 PES header size is 6 bytes (00 00 01 bf XX XX), not 0. BluRay text subtitles use private stream 2. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=757cb0f286b5497465207c06e18859bb40d079c5 --- libavformat/mpegts.c |1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 3500fc1..7f199d4 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1054,6 +1054,7 @@ static int mpegts_push_data(MpegTSFilter *filter, pes->st->request_probe = 1; } } else { +pes->pes_header_size = 6; pes->state = MPEGTS_PAYLOAD; pes->data_index = 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
Re: [FFmpeg-cvslog] mpegts: demux BluRay text subtitles
On Tue, Sep 01, 2015 at 02:57:28PM +0200, Petri Hintukainen wrote: > ffmpeg | branch: master | Petri Hintukainen | Tue Sep 1 > 11:56:21 2015 +0300| [5d12d7de2ce548a3c9f5c175a9d1c5bfbdbcbfa8] | committer: > Michael Niedermayer > > mpegts: demux BluRay text subtitles > > Reviewed-by: Paul B Mahol > Signed-off-by: Michael Niedermayer > > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d12d7de2ce548a3c9f5c175a9d1c5bfbdbcbfa8 > --- > > libavcodec/avcodec.h|1 + > libavcodec/codec_desc.c |7 +++ > libavformat/mpegts.c|1 + > 3 files changed, 9 insertions(+) > I think this is missing a minor version in libavcodec [...] -- Clément B. pgpRnm5YiuX2E.pgp Description: PGP signature ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
Re: [FFmpeg-cvslog] [FFmpeg-devel] mpegts: demux BluRay text subtitles
On Tue, Sep 01, 2015 at 03:10:58PM +0200, Clément Bœsch wrote: > On Tue, Sep 01, 2015 at 02:57:28PM +0200, Petri Hintukainen wrote: > > ffmpeg | branch: master | Petri Hintukainen | Tue Sep > > 1 11:56:21 2015 +0300| [5d12d7de2ce548a3c9f5c175a9d1c5bfbdbcbfa8] | > > committer: Michael Niedermayer > > > > mpegts: demux BluRay text subtitles > > > > Reviewed-by: Paul B Mahol > > Signed-off-by: Michael Niedermayer > > > > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d12d7de2ce548a3c9f5c175a9d1c5bfbdbcbfa8 > > --- > > > > libavcodec/avcodec.h|1 + > > libavcodec/codec_desc.c |7 +++ > > libavformat/mpegts.c|1 + > > 3 files changed, 9 insertions(+) > > > > I think this is missing a minor version in libavcodec > (essential missing word of the sentence: bump) -- Clément B. pgp7ZGA42NdND.pgp Description: PGP signature ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
Re: [FFmpeg-cvslog] mpegts: demux BluRay text subtitles
Clément Bœsch pkh.me> writes: > I think this is missing a minor version in libavcodec (I am not near my development computer atm.) I agree that everybody has missed this and that is was a mistake but please just commit a bump... Carl Eugen ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/mxg: Use memmove()
ffmpeg | branch: master | Michael Niedermayer | Tue Sep 1 22:45:07 2015 +0200| [c7c207aecde0773afc974ce4b7e25dca659bc5b5] | committer: Michael Niedermayer avformat/mxg: Use memmove() Fixes undefined behavior Fixes: 172963a49da13542e0726b7bb758/unknown_unknown_292_658_cov_2141972066_m1.mxg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c7c207aecde0773afc974ce4b7e25dca659bc5b5 --- libavformat/mxg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mxg.c b/libavformat/mxg.c index 3a34ebd..b95f542 100644 --- a/libavformat/mxg.c +++ b/libavformat/mxg.c @@ -182,7 +182,7 @@ FF_ENABLE_DEPRECATION_WARNINGS if (mxg->soi_ptr - mxg->buffer > mxg->cache_size) { if (mxg->cache_size > 0) { -memcpy(mxg->buffer, mxg->buffer_ptr, mxg->cache_size); +memmove(mxg->buffer, mxg->buffer_ptr, mxg->cache_size); } mxg->buffer_ptr = mxg->buffer; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/version: Minor version bump due to 5d12d7de2ce548a3c9f5c175a9d1c5bfbdbcbfa8
ffmpeg | branch: master | Michael Niedermayer | Tue Sep 1 23:02:15 2015 +0200| [642d2f9d558b946de6a92f2fad32286e74e14218] | committer: Michael Niedermayer avcodec/version: Minor version bump due to 5d12d7de2ce548a3c9f5c175a9d1c5bfbdbcbfa8 Found-by: ubitux Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=642d2f9d558b946de6a92f2fad32286e74e14218 --- libavcodec/version.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/version.h b/libavcodec/version.h index e098dde..6dbeeff 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 56 -#define LIBAVCODEC_VERSION_MINOR 59 +#define LIBAVCODEC_VERSION_MINOR 60 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_subtitles: allow setting fonts directory
ffmpeg | branch: master | Ricardo Constantino | Sun Aug 30 23:52:10 2015 +0100| [9dbc50b4cdaf6de5a4d52bdaa3d4d1a0df5efadd] | committer: wm4 avfilter/vf_subtitles: allow setting fonts directory This is mostly useful if libass was compiled with a font provider other than fontconfig, but is still useful in that case. Signed-off-by: Ricardo Constantino > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9dbc50b4cdaf6de5a4d52bdaa3d4d1a0df5efadd --- doc/filters.texi |4 libavfilter/vf_subtitles.c |4 2 files changed, 8 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 892347b..3e7d2a2 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -9939,6 +9939,10 @@ was composed. For the syntax of this option, check the Due to a misdesign in ASS aspect ratio arithmetic, this is necessary to correctly scale the fonts if the aspect ratio has been changed. +@item fontsdir +Set a directory path containing fonts that can be used by the filter. +These fonts will be used in addition to whatever the font provider uses. + @item charenc Set subtitles input character encoding. @code{subtitles} filter only. Only useful if not UTF-8. diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 5e1324c..b0d016c 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -50,6 +50,7 @@ typedef struct { ASS_Renderer *renderer; ASS_Track*track; char *filename; +char *fontsdir; char *charenc; char *force_style; int stream_index; @@ -67,6 +68,7 @@ typedef struct { {"filename", "set the filename of file to read", OFFSET(filename), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS }, \ {"f", "set the filename of file to read", OFFSET(filename), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS }, \ {"original_size", "set the size of the original video (used to scale fonts)", OFFSET(original_w), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS }, \ +{"fontsdir", "set the directory containing the fonts to read", OFFSET(fontsdir), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS }, \ /* libass supports a log level ranging from 0 to 7 */ static const int ass_libavfilter_log_level_map[] = { @@ -106,6 +108,8 @@ static av_cold int init(AVFilterContext *ctx) } ass_set_message_cb(ass->library, ass_log, ctx); +ass_set_fonts_dir(ass->library, ass->fontsdir); + ass->renderer = ass_renderer_init(ass->library); if (!ass->renderer) { av_log(ctx, AV_LOG_ERROR, "Could not initialize libass renderer.\n"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/dv: Do not return EIO for every error (like EOF).
ffmpeg | branch: master | Carl Eugen Hoyos | Wed Sep 2 00:58:13 2015 +0200| [3eae98c1ac705d3f820a1800e81960146a80c61c] | committer: Carl Eugen Hoyos lavf/dv: Do not return EIO for every error (like EOF). Fixes ticket #4818. Reviewed-by: Ronald S. Bultje Reviewed-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3eae98c1ac705d3f820a1800e81960146a80c61c --- libavformat/dv.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/dv.c b/libavformat/dv.c index 8500228..84c3061 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -553,12 +553,17 @@ static int dv_read_packet(AVFormatContext *s, AVPacket *pkt) size = avpriv_dv_get_packet(c->dv_demux, pkt); if (size < 0) { +int ret; int64_t pos = avio_tell(s->pb); if (!c->dv_demux->sys) return AVERROR(EIO); size = c->dv_demux->sys->frame_size; -if (avio_read(s->pb, c->buf, size) <= 0) +ret = avio_read(s->pb, c->buf, size); +if (ret < 0) { +return ret; +} else if (ret == 0) { return AVERROR(EIO); +} size = avpriv_dv_produce_packet(c->dv_demux, pkt, c->buf, size, pos); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/h264_slice: replace assert by normal error check
ffmpeg | branch: master | Michael Niedermayer | Wed Sep 2 00:44:28 2015 +0200| [1376084dcbab53cbaea8047cf7ec85af3c8570ce] | committer: Michael Niedermayer avcodec/h264_slice: replace assert by normal error check Fixes assertion failure Fixes: c6075771557e4f3b7b74e63d2d24fb01/signal_sigabrt_76ac8cc9_133_cov_2853689970_CREDITS.FST Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1376084dcbab53cbaea8047cf7ec85af3c8570ce --- libavcodec/h264_slice.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 5c116b0..a346ccb 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1173,7 +1173,10 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl) if (first_mb_in_slice == 0) { // FIXME better field boundary detection if (h->current_slice) { -av_assert0(!h->setup_finished); +if (h->setup_finished) { +av_log(h->avctx, AV_LOG_ERROR, "Too many fields\n"); +return AVERROR_INVALIDDATA; +} if (h->cur_pic_ptr && FIELD_PICTURE(h) && h->first_field) { ret = ff_h264_field_end(h, h->slice_ctx, 1); h->current_slice = 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/ffv1dec: Print CRCs at picture debug level
ffmpeg | branch: master | Michael Niedermayer | Wed Sep 2 02:11:43 2015 +0200| [b7baebb754f548ccd106ebcacd09ffa289382fd4] | committer: Michael Niedermayer avcodec/ffv1dec: Print CRCs at picture debug level Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7baebb754f548ccd106ebcacd09ffa289382fd4 --- libavcodec/ffv1dec.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 133ad85..162e41b 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -513,6 +513,7 @@ static int read_extra_header(FFV1Context *f) uint8_t state[CONTEXT_SIZE]; int i, j, k, ret; uint8_t state2[32][CONTEXT_SIZE]; +unsigned crc = 0; memset(state2, 128, sizeof(state2)); memset(state, 128, sizeof(state)); @@ -598,11 +599,12 @@ static int read_extra_header(FFV1Context *f) av_log(f->avctx, AV_LOG_ERROR, "CRC mismatch %X!\n", v); return AVERROR_INVALIDDATA; } +crc = AV_RB32(f->avctx->extradata + f->avctx->extradata_size - 4); } if (f->avctx->debug & FF_DEBUG_PICT_INFO) av_log(f->avctx, AV_LOG_DEBUG, - "global: ver:%d.%d, coder:%d, colorspace: %d bpr:%d chroma:%d(%d:%d), alpha:%d slices:%dx%d qtabs:%d ec:%d intra:%d\n", + "global: ver:%d.%d, coder:%d, colorspace: %d bpr:%d chroma:%d(%d:%d), alpha:%d slices:%dx%d qtabs:%d ec:%d intra:%d CRC:0x%08X\n", f->version, f->micro_version, f->ac, f->colorspace, @@ -612,7 +614,8 @@ static int read_extra_header(FFV1Context *f) f->num_h_slices, f->num_v_slices, f->quant_table_count, f->ec, - f->intra + f->intra, + crc ); return 0; } @@ -947,6 +950,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac } fs->slice_damaged = 1; } +if (avctx->debug & FF_DEBUG_PICT_INFO) { +av_log(avctx, AV_LOG_DEBUG, "slice %d, CRC: 0x%08X\n", i, AV_RB32(buf_p + v - 4)); +} } if (i) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/ffv1dec: Check that there is enough space for the CRC in the global header
ffmpeg | branch: master | Michael Niedermayer | Wed Sep 2 02:10:31 2015 +0200| [eac161451d248fdd375d403f9bb7d0bec68bc40b] | committer: Michael Niedermayer avcodec/ffv1dec: Check that there is enough space for the CRC in the global header Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eac161451d248fdd375d403f9bb7d0bec68bc40b --- libavcodec/ffv1dec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 6c035b8..133ad85 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -594,7 +594,7 @@ static int read_extra_header(FFV1Context *f) unsigned v; v = av_crc(av_crc_get_table(AV_CRC_32_IEEE), 0, f->avctx->extradata, f->avctx->extradata_size); -if (v) { +if (v || f->avctx->extradata_size < 4) { av_log(f->avctx, AV_LOG_ERROR, "CRC mismatch %X!\n", v); return AVERROR_INVALIDDATA; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/hevc_parser: fix split function of parser
ffmpeg | branch: master | Rainer Hochecker | Tue Sep 1 16:27:02 2015 +0200| [62bd8deef9005dbc9750e3bdc12fbf9b50392adc] | committer: Michael Niedermayer avcodec/hevc_parser: fix split function of parser Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=62bd8deef9005dbc9750e3bdc12fbf9b50392adc --- libavcodec/hevc_parser.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c index f970de5..35cace5 100644 --- a/libavcodec/hevc_parser.c +++ b/libavcodec/hevc_parser.c @@ -410,19 +410,30 @@ static int hevc_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { const uint8_t *ptr = buf, *end = buf + buf_size; uint32_t state = -1; -int has_ps = 0, nut; +int has_vps = 0; +int has_sps = 0; +int has_pps = 0; +int nut; while (ptr < end) { ptr = avpriv_find_start_code(ptr, end, &state); if ((state >> 8) != START_CODE) break; nut = (state >> 1) & 0x3F; -if (nut >= NAL_VPS && nut <= NAL_PPS) -has_ps = 1; -else if (has_ps) -return ptr - 4 - buf; -else // no parameter set at the beginning of the stream -return 0; +if (nut == NAL_VPS) +has_vps = 1; +else if (nut == NAL_SPS) +has_sps = 1; +else if (nut == NAL_PPS) +has_pps = 1; +else if ((nut != NAL_SEI_PREFIX || has_pps) && + nut != NAL_AUD) { +if (has_vps && has_sps) { +while (ptr - 4 > buf && ptr[-5] == 0) +ptr--; +return ptr - 4 - buf; +} +} } return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/hlsenc: add a use_localtime option to expand the segment filename with localtime
ffmpeg | branch: master | LiuQi | Tue Sep 1 04:10:15 2015 +0800| [a4055d3e5d672800a85d8397b8a2e397aa5551fb] | committer: Michael Niedermayer avformat/hlsenc: add a use_localtime option to expand the segment filename with localtime test examples: ./ffmpeg -re -i ~/Movies/objectC/facebook.mp4 -v verbose -c copy -f hls -hls_segment_filename test-%s.ts -use_localtime 1 -bsf:v h264_mp4toannexb aaa.m3u8 [StevenLiu@localhost ffmpeg]$ cat aaa.m3u8;ll test-*.ts test-1441052221.ts test-1441052231.ts test-1441052235.ts test-1441052243.ts test-1441052249.ts -rw-r--r-- 1 StevenLiu staff 1310736 9 1 04:15 test-1441052131.ts -rw-r--r-- 1 StevenLiu staff 495192 9 1 04:15 test-1441052141.ts -rw-r--r-- 1 StevenLiu staff 1310736 9 1 04:17 test-1441052212.ts -rw-r--r-- 1 StevenLiu staff 1067840 9 1 04:17 test-1441052221.ts -rw-r--r-- 1 StevenLiu staff 235564 9 1 04:17 test-1441052231.ts -rw-r--r-- 1 StevenLiu staff 1187220 9 1 04:17 test-1441052235.ts -rw-r--r-- 1 StevenLiu staff 694848 9 1 04:17 test-1441052243.ts -rw-r--r-- 1 StevenLiu staff 526588 9 1 04:17 test-1441052249.ts [StevenLiu@localhost ffmpeg]$ ./ffmpeg -re -i ~/Movies/objectC/facebook.mp4 -v verbose -c copy -f hls -hls_segment_filename test-%s.ts -use_localtime 1 -bsf:v h264_mp4toannexb aaa.m3u8 [StevenLiu@localhost ffmpeg]$ cat aaa.m3u8;ll aaa-*.ts aaa-1441052417.ts aaa-1441052427.ts aaa-1441052437.ts aaa-1441052440.ts aaa-1441052449.ts -rw-r--r-- 1 StevenLiu staff 1310736 9 1 04:19 aaa-1441052382.ts -rw-r--r-- 1 StevenLiu staff 277300 9 1 04:19 aaa-1441052392.ts -rw-r--r-- 1 StevenLiu staff 1310736 9 1 04:20 aaa-1441052417.ts -rw-r--r-- 1 StevenLiu staff 1067840 9 1 04:20 aaa-1441052427.ts -rw-r--r-- 1 StevenLiu staff 235564 9 1 04:20 aaa-1441052437.ts -rw-r--r-- 1 StevenLiu staff 1187220 9 1 04:20 aaa-1441052440.ts -rw-r--r-- 1 StevenLiu staff 338776 9 1 04:20 aaa-1441052449.ts [StevenLiu@localhost ffmpeg]$ Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a4055d3e5d672800a85d8397b8a2e397aa5551fb --- libavformat/hlsenc.c | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 2c0c6f0..fea5ef8 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -32,6 +32,7 @@ #include "libavutil/avstring.h" #include "libavutil/opt.h" #include "libavutil/log.h" +#include "libavutil/time_internal.h" #include "avformat.h" #include "internal.h" @@ -79,6 +80,7 @@ typedef struct HLSContext { uint32_t flags;// enum HLSFlags char *segment_filename; +int use_localtime; ///< flag to expand filename with localtime int allowcache; int64_t recording_time; int has_video; @@ -479,9 +481,18 @@ static int hls_start(AVFormatContext *s) av_strlcpy(vtt_oc->filename, c->vtt_basename, sizeof(vtt_oc->filename)); } else { -if (av_get_frame_filename(oc->filename, sizeof(oc->filename), +if (c->use_localtime) { +time_t now0; +struct tm *tm, tmpbuf; +time(&now0); +tm = localtime_r(&now0, &tmpbuf); +if (!strftime(oc->filename, sizeof(oc->filename), c->basename, tm)) { +av_log(oc, AV_LOG_ERROR, "Could not get segment filename with use_localtime\n"); +return AVERROR(EINVAL); +} + } else if (av_get_frame_filename(oc->filename, sizeof(oc->filename), c->basename, c->wrap ? c->sequence % c->wrap : c->sequence) < 0) { -av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s'\n", c->basename); +av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s' you can try use -use_localtime 1 with it\n", c->basename); return AVERROR(EINVAL); } if( c->vtt_basename) { @@ -542,6 +553,7 @@ static int hls_write_header(AVFormatContext *s) int ret, i; char *p; const char *pattern = "%d.ts"; +const char *pattern_localtime_fmt = "-%s.ts"; const char *vtt_pattern = "%d.vtt"; AVDictionary *options = NULL; int basename_size; @@ -596,7 +608,11 @@ static int hls_write_header(AVFormatContext *s) if (hls->flags & HLS_SINGLE_FILE) pattern = ".ts"; -basename_size = strlen(s->filename) + strlen(pattern) + 1; +if (hls->use_localtime) { +basename_size = strlen(s->filename) + strlen(pattern_localtime_fmt) + 1; +} else { +basename_size = strlen(s->filename) + strlen(pattern) + 1; +} hls->basename = av_malloc(basename_size); if (!hls->basename) { ret = AVERROR(ENOMEM); @@ -608,7 +624,11 @@ static int hls_write_header(AVFormatContext *s) p = strrchr(hls->basename, '.'); if (p) *p = '\0'; -av_strlc
[FFmpeg-cvslog] aacenc: reorder coding tools
ffmpeg | branch: master | Rostislav Pehlivanov | Wed Sep 2 06:26:45 2015 +0100| [20dc527139b44ede4e0e35d6473f4c3993a71844] | committer: Rostislav Pehlivanov aacenc: reorder coding tools This commit reorders the coding tools such that they're doing what the decoder does in reverse order. The very first thing the decoder does is to decode M/S stereo if that's signalled, then prediction, IS, and finally TNS and PNS in another function. adjust_frame_information()'s application of IS and M/S was taken out into two separate functions since prediction doesn't expect to get the raw coefficients but rathe the coefficients at that part of the encoding process. The results show a much better PSNR when any combination of Intensity Stereo, Mid/Side stereo and Prediction is used, which is a sign of an increased encoder efficiency as well as the fact that the decoder gets what it expects. Otherwise, with only IS, PNS or prediction there are neither regressions nor improvements except in the case of IS, which now by itself (or with PNS) is less prone to artifacts. Enabling M/S (using stereo_mode) as well will also reduce stereo artifacts induced by IS, so in the very near future M/S may be enabled by default. Signed-off-by: Rostislav Pehlivanov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=20dc527139b44ede4e0e35d6473f4c3993a71844 --- libavcodec/aacenc.c | 151 ++- 1 file changed, 88 insertions(+), 63 deletions(-) diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 444ca0e..9cce1a2 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -196,37 +196,6 @@ static void adjust_frame_information(ChannelElement *cpe, int chans) { int i, w, w2, g, ch; int maxsfb, cmaxsfb; -IndividualChannelStream *ics; - -if (cpe->common_window) { -ics = &cpe->ch[0].ics; -for (w = 0; w < ics->num_windows; w += ics->group_len[w]) { -for (w2 = 0; w2 < ics->group_len[w]; w2++) { -int start = (w+w2) * 128; -for (g = 0; g < ics->num_swb; g++) { -//apply Intensity stereo coeffs transformation -if (cpe->is_mask[w*16 + g]) { -int p = -1 + 2 * (cpe->ch[1].band_type[w*16+g] - 14); -float scale = cpe->ch[0].is_ener[w*16+g]; -for (i = 0; i < ics->swb_sizes[g]; i++) { -cpe->ch[0].coeffs[start+i] = (cpe->ch[0].coeffs[start+i] + p*cpe->ch[1].coeffs[start+i]) * scale; -cpe->ch[1].coeffs[start+i] = 0.0f; -} -} else if (cpe->ms_mask[w*16 + g] && - cpe->ch[0].band_type[w*16 + g] < NOISE_BT && - cpe->ch[1].band_type[w*16 + g] < NOISE_BT) { -for (i = 0; i < ics->swb_sizes[g]; i++) { -float L = (cpe->ch[0].coeffs[start+i] + cpe->ch[1].coeffs[start+i]) * 0.5f; -float R = L - cpe->ch[1].coeffs[start+i]; -cpe->ch[0].coeffs[start+i] = L; -cpe->ch[1].coeffs[start+i] = R; -} -} -start += ics->swb_sizes[g]; -} -} -} -} for (ch = 0; ch < chans; ch++) { IndividualChannelStream *ics = &cpe->ch[ch].ics; @@ -273,6 +242,59 @@ static void adjust_frame_information(ChannelElement *cpe, int chans) } } +static void apply_intensity_stereo(ChannelElement *cpe) +{ +int w, w2, g, i; +IndividualChannelStream *ics = &cpe->ch[0].ics; +if (!cpe->common_window) +return; +for (w = 0; w < ics->num_windows; w += ics->group_len[w]) { +for (w2 = 0; w2 < ics->group_len[w]; w2++) { +int start = (w+w2) * 128; +for (g = 0; g < ics->num_swb; g++) { +int p = -1 + 2 * (cpe->ch[1].band_type[w*16+g] - 14); +float scale = cpe->ch[0].is_ener[w*16+g]; +if (!cpe->is_mask[w*16 + g]) { +start += ics->swb_sizes[g]; +continue; +} +for (i = 0; i < ics->swb_sizes[g]; i++) { +float sum = (cpe->ch[0].coeffs[start+i] + p*cpe->ch[1].coeffs[start+i])*scale; +cpe->ch[0].coeffs[start+i] = sum; +cpe->ch[1].coeffs[start+i] = 0.0f; +} +start += ics->swb_sizes[g]; +} +} +} +} + +static void apply_mid_side_stereo(ChannelElement *cpe) +{ +int w, w2, g, i; +IndividualChannelStream *ics = &cpe->ch[0].ics; +if (!cpe->common_window) +return; +for (w = 0; w < ics->num_windows; w += ics->group_len[w]) { +for (w2 = 0; w2 < ics->group_len[w]; w2++) { +int start = (w+w2) * 128; +for (g = 0; g < i
[FFmpeg-cvslog] fate: update AAC encoder tests
ffmpeg | branch: master | Rostislav Pehlivanov | Wed Sep 2 06:39:59 2015 +0100| [72adf2431027426300f5d9e45df32ff3bf499084] | committer: Rostislav Pehlivanov fate: update AAC encoder tests TNS had both IS and PNS switched on when it makes more sense to have them both off. Prediction had a redundant argument. Signed-off-by: Rostislav Pehlivanov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=72adf2431027426300f5d9e45df32ff3bf499084 --- tests/fate/aac.mak |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak index 004953a..728bfb4 100644 --- a/tests/fate/aac.mak +++ b/tests/fate/aac.mak @@ -167,11 +167,11 @@ fate-aac-pns-encode: CMP_TARGET = 646.89 fate-aac-pns-encode: SIZE_TOLERANCE = 3560 FATE_AAC_ENCODE += fate-aac-tns-encode -fate-aac-tns-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -strict -2 -c:a aac -aac_tns 1 -b:a 128k +fate-aac-tns-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -strict -2 -c:a aac -aac_tns 1 -aac_is 0 -aac_pns 0 -b:a 128k fate-aac-tns-encode: CMP = stddev fate-aac-tns-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav fate-aac-tns-encode: CMP_SHIFT = -4096 -fate-aac-tns-encode: CMP_TARGET = 636.93 +fate-aac-tns-encode: CMP_TARGET = 660.85 fate-aac-tns-encode: FUZZ = 2.8 fate-aac-tns-encode: SIZE_TOLERANCE = 3560 @@ -184,7 +184,7 @@ fate-aac-is-encode: CMP_TARGET = 613.26 fate-aac-is-encode: SIZE_TOLERANCE = 3560 FATE_AAC_ENCODE += fate-aac-pred-encode -fate-aac-pred-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -strict -2 -profile:a aac_main -c:a aac -aac_pred 1 -aac_pns 0 -aac_is 0 -b:a 128k +fate-aac-pred-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -strict -2 -profile:a aac_main -c:a aac -aac_is 0 -aac_pns 0 -b:a 128k fate-aac-pred-encode: CMP = stddev fate-aac-pred-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav fate-aac-pred-encode: CMP_SHIFT = -4096 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: add fuzziness to the AAC Encode prediction test
ffmpeg | branch: master | Rostislav Pehlivanov | Wed Sep 2 07:15:42 2015 +0100| [dcf72da84183ce472bb647d3945a40b8a268f521] | committer: Rostislav Pehlivanov fate: add fuzziness to the AAC Encode prediction test Fails on ppc64 architecture under Ubuntu. Signed-off-by: Rostislav Pehlivanov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dcf72da84183ce472bb647d3945a40b8a268f521 --- tests/fate/aac.mak |1 + 1 file changed, 1 insertion(+) diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak index 728bfb4..6c687b6 100644 --- a/tests/fate/aac.mak +++ b/tests/fate/aac.mak @@ -189,6 +189,7 @@ fate-aac-pred-encode: CMP = stddev fate-aac-pred-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav fate-aac-pred-encode: CMP_SHIFT = -4096 fate-aac-pred-encode: CMP_TARGET = 652.60 +fate-aac-pred-encode: FUZZ = 2.2 fate-aac-pred-encode: SIZE_TOLERANCE = 3560 FATE_AAC_LATM += fate-aac-latm_1180bc60 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog