[FFmpeg-cvslog] lavd: drop disabled v4l code
ffmpeg | branch: master | Clément Bœsch | Sun Sep 3 00:18:57 2017 +0200| [b4b1285fa1b6b84cc68cad67e7ea1389863cd178] | committer: Clément Bœsch lavd: drop disabled v4l code This code is disabled since 2012. V4L1 was dropped from the kernel more than 10 years ago. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4b1285fa1b6b84cc68cad67e7ea1389863cd178 --- configure| 2 - libavdevice/Makefile | 1 - libavdevice/alldevices.c | 1 - libavdevice/v4l.c| 364 --- 4 files changed, 368 deletions(-) diff --git a/configure b/configure index 445d953e4f..d58270550c 100755 --- a/configure +++ b/configure @@ -3048,7 +3048,6 @@ qtkit_indev_select="qtkit" sdl2_outdev_deps="sdl2" sndio_indev_deps="sndio" sndio_outdev_deps="sndio" -v4l_indev_deps="linux_videodev_h" v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h" v4l2_outdev_deps_any="linux_videodev2_h sys_videoio_h" vfwcap_indev_deps="vfw32 vfwcap_defines" @@ -6079,7 +6078,6 @@ pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout check_header linux/fb.h -check_header linux/videodev.h check_header linux/videodev2.h check_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete diff --git a/libavdevice/Makefile b/libavdevice/Makefile index cd077b292e..0efb3f905f 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -47,7 +47,6 @@ OBJS-$(CONFIG_SNDIO_INDEV) += sndio_dec.o sndio.o OBJS-$(CONFIG_SNDIO_OUTDEV) += sndio_enc.o sndio.o OBJS-$(CONFIG_V4L2_INDEV)+= v4l2.o v4l2-common.o timefilter.o OBJS-$(CONFIG_V4L2_OUTDEV) += v4l2enc.o v4l2-common.o -OBJS-$(CONFIG_V4L_INDEV) += v4l.o OBJS-$(CONFIG_VFWCAP_INDEV) += vfwcap.o OBJS-$(CONFIG_XCBGRAB_INDEV) += xcbgrab.o OBJS-$(CONFIG_XV_OUTDEV) += xv.o diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index 8d1cb8648f..4bf08d798d 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -62,7 +62,6 @@ static void register_all(void) REGISTER_OUTDEV (SDL2, sdl2); REGISTER_INOUTDEV(SNDIO,sndio); REGISTER_INOUTDEV(V4L2, v4l2); -//REGISTER_INDEV (V4L, v4l REGISTER_INDEV (VFWCAP, vfwcap); REGISTER_INDEV (XCBGRAB, xcbgrab); REGISTER_OUTDEV (XV, xv); diff --git a/libavdevice/v4l.c b/libavdevice/v4l.c deleted file mode 100644 index 81653e02fb..00 --- a/libavdevice/v4l.c +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Linux video grab interface - * Copyright (c) 2000,2001 Fabrice Bellard - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "avdevice.h" - -#undef __STRICT_ANSI__ //workaround due to broken kernel headers -#include "config.h" -#include "libavutil/rational.h" -#include "libavutil/imgutils.h" -#include "libavutil/internal.h" -#include "libavutil/log.h" -#include "libavutil/opt.h" -#include "libavformat/internal.h" -#include "libavcodec/dsputil.h" -#include -#include -#include -#include -#include -#define _LINUX_TIME_H 1 -#include -#include - -typedef struct { -AVClass *class; -int fd; -int frame_format; /* see VIDEO_PALETTE_xxx */ -int use_mmap; -AVRational time_base; -int64_t time_frame; -int frame_size; -struct video_capability video_cap; -struct video_audio audio_saved; -struct video_window video_win; -uint8_t *video_buf; -struct video_mbuf gb_buffers; -struct video_mmap gb_buf; -int gb_frame; -int standard; -} VideoData; - -static const struct { -int palette; -int depth; -enum AVPixelFormat pix_fmt; -} video_formats [] = { -{.palette = VIDEO_PALETTE_YUV420P, .depth = 12, .pix_fmt = AV_PIX_FMT_YUV420P }, -{.palette = VIDEO_PALETTE_YUV422, .depth = 16, .pix_fmt = AV_PIX_FMT_YUYV422 }, -{.palette = VIDEO_PALETTE_UYVY,.depth = 16, .pix_fmt = AV_PIX_FMT_UYVY422 }, -{.palette = VIDEO_PALETTE_YUYV,.depth = 16, .pix_f
[FFmpeg-cvslog] doc/filters.texi: Add default values to vf_vaguedenoiser options
ffmpeg | branch: master | Leo Izen | Sun Sep 3 05:01:13 2017 -0400| [dda1c23c20d727b7b9dbe1121cc63c2ba54f51ff] | committer: Paul B Mahol doc/filters.texi: Add default values to vf_vaguedenoiser options > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dda1c23c20d727b7b9dbe1121cc63c2ba54f51ff --- doc/filters.texi | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index afcb99d876..c898c43557 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -14911,7 +14911,7 @@ This filter accepts the following options: @item threshold The filtering strength. The higher, the more filtered the video will be. Hard thresholding can use a higher threshold than soft thresholding -before the video looks overfiltered. +before the video looks overfiltered. Default value is 2. @item method The filtering method the filter will use. @@ -14930,13 +14930,15 @@ Scales or nullifies coefficients - intermediary between (more) soft and (less) hard thresholding. @end table +Default is garrote. + @item nsteps Number of times, the wavelet will decompose the picture. Picture can't be decomposed beyond a particular point (typically, 8 for a 640x480 -frame - as 2^9 = 512 > 480) +frame - as 2^9 = 512 > 480). Valid values are integers between 1 and 32. Default value is 6. @item percent -Partial of full denoising (limited coefficients shrinking), from 0 to 100. +Partial of full denoising (limited coefficients shrinking), from 0 to 100. Default value is 85. @item planes A list of the planes to process. By default all planes are processed. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_subtitles: enable processing of alpha channel
ffmpeg | branch: master | Paul B Mahol | Wed Aug 30 21:04:02 2017 +0200| [f19e4118e9ca392f89d3c264aa8490b7d9ac3284] | committer: Paul B Mahol avfilter/vf_subtitles: enable processing of alpha channel Fixes #6605. Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f19e4118e9ca392f89d3c264aa8490b7d9ac3284 --- doc/filters.texi | 3 +++ libavfilter/vf_subtitles.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index c898c43557..19ca055076 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -14005,6 +14005,9 @@ correctly scale the fonts if the aspect ratio has been changed. 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 alpha +Process alpha channel, by default alpha channel is untouched. + @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 805ee2d7e0..66a564699a 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -54,6 +54,7 @@ typedef struct AssContext { char *charenc; char *force_style; int stream_index; +int alpha; uint8_t rgba_map[4]; int pix_step[4]; ///< steps per pixel for each plane of the main output int original_w, original_h; @@ -69,6 +70,7 @@ typedef struct AssContext { {"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 }, \ +{"alpha", "enable processing of alpha channel", OFFSET(alpha), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, FLAGS }, \ /* libass supports a log level ranging from 0 to 7 */ static const int ass_libavfilter_log_level_map[] = { @@ -140,7 +142,7 @@ static int config_input(AVFilterLink *inlink) { AssContext *ass = inlink->dst->priv; -ff_draw_init(&ass->draw, inlink->format, 0); +ff_draw_init(&ass->draw, inlink->format, ass->alpha ? FF_DRAW_PROCESS_ALPHA : 0); ass_set_frame_size (ass->renderer, inlink->w, inlink->h); if (ass->original_w && ass->original_h) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_displace: remove useless requirement that SAR matches between input streams
ffmpeg | branch: master | Paul B Mahol | Sun Sep 3 13:37:43 2017 +0200| [06ed3768c88cce44ba157ec81676acf96e50a61a] | committer: Paul B Mahol avfilter/vf_displace: remove useless requirement that SAR matches between input streams Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=06ed3768c88cce44ba157ec81676acf96e50a61a --- libavfilter/vf_displace.c | 26 -- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/libavfilter/vf_displace.c b/libavfilter/vf_displace.c index 6100a249c6..a894021bff 100644 --- a/libavfilter/vf_displace.c +++ b/libavfilter/vf_displace.c @@ -280,27 +280,17 @@ static int config_output(AVFilterLink *outlink) av_log(ctx, AV_LOG_ERROR, "inputs must be of same pixel format\n"); return AVERROR(EINVAL); } -if (srclink->w != xlink->w || -srclink->h != xlink->h || -srclink->sample_aspect_ratio.num != xlink->sample_aspect_ratio.num || -srclink->sample_aspect_ratio.den != xlink->sample_aspect_ratio.den || -srclink->w != ylink->w || -srclink->h != ylink->h || -srclink->sample_aspect_ratio.num != ylink->sample_aspect_ratio.num || -srclink->sample_aspect_ratio.den != ylink->sample_aspect_ratio.den) { +if (srclink->w != xlink->w || +srclink->h != xlink->h || +srclink->w != ylink->w || +srclink->h != ylink->h) { av_log(ctx, AV_LOG_ERROR, "First input link %s parameters " - "(size %dx%d, SAR %d:%d) do not match the corresponding " - "second input link %s parameters (%dx%d, SAR %d:%d) " - "and/or third input link %s parameters (%dx%d, SAR %d:%d)\n", + "(size %dx%d) do not match the corresponding " + "second input link %s parameters (%dx%d) " + "and/or third input link %s parameters (%dx%d)\n", ctx->input_pads[0].name, srclink->w, srclink->h, - srclink->sample_aspect_ratio.num, - srclink->sample_aspect_ratio.den, ctx->input_pads[1].name, xlink->w, xlink->h, - xlink->sample_aspect_ratio.num, - xlink->sample_aspect_ratio.den, - ctx->input_pads[2].name, ylink->w, ylink->h, - ylink->sample_aspect_ratio.num, - ylink->sample_aspect_ratio.den); + ctx->input_pads[2].name, ylink->w, ylink->h); return AVERROR(EINVAL); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_displace: add mirror edge mode
ffmpeg | branch: master | Paul B Mahol | Sun Sep 3 14:15:33 2017 +0200| [e6e58de03d6048f8cb7233881465ec6288c7cf7f] | committer: Paul B Mahol avfilter/vf_displace: add mirror edge mode Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e6e58de03d6048f8cb7233881465ec6288c7cf7f --- doc/filters.texi | 3 +++ libavfilter/vf_displace.c | 42 +++--- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 19ca055076..abc3a0cae8 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -6890,6 +6890,9 @@ Adjacent pixels will spread out to replace missing pixels. @item wrap Out of range pixels are wrapped so they point to pixels of other side. + +@item mirror +Out of range pixels will be replaced with mirrored pixels. @end table Default is @samp{smear}. diff --git a/libavfilter/vf_displace.c b/libavfilter/vf_displace.c index a894021bff..9f16ad441f 100644 --- a/libavfilter/vf_displace.c +++ b/libavfilter/vf_displace.c @@ -31,6 +31,7 @@ enum EdgeMode { EDGE_BLANK, EDGE_SMEAR, EDGE_WRAP, +EDGE_MIRROR, EDGE_NB }; @@ -53,9 +54,10 @@ typedef struct DisplaceContext { static const AVOption displace_options[] = { { "edge", "set edge mode", OFFSET(edge), AV_OPT_TYPE_INT, {.i64=EDGE_SMEAR}, 0, EDGE_NB-1, FLAGS, "edge" }, -{ "blank", "", 0, AV_OPT_TYPE_CONST, {.i64=EDGE_BLANK}, 0, 0, FLAGS, "edge" }, -{ "smear", "", 0, AV_OPT_TYPE_CONST, {.i64=EDGE_SMEAR}, 0, 0, FLAGS, "edge" }, -{ "wrap" , "", 0, AV_OPT_TYPE_CONST, {.i64=EDGE_WRAP}, 0, 0, FLAGS, "edge" }, +{ "blank", "", 0, AV_OPT_TYPE_CONST, {.i64=EDGE_BLANK}, 0, 0, FLAGS, "edge" }, +{ "smear", "", 0, AV_OPT_TYPE_CONST, {.i64=EDGE_SMEAR}, 0, 0, FLAGS, "edge" }, +{ "wrap" , "", 0, AV_OPT_TYPE_CONST, {.i64=EDGE_WRAP}, 0, 0, FLAGS, "edge" }, +{ "mirror" , "", 0, AV_OPT_TYPE_CONST, {.i64=EDGE_MIRROR}, 0, 0, FLAGS, "edge" }, { NULL } }; @@ -130,6 +132,22 @@ static void displace_planar(DisplaceContext *s, const AVFrame *in, dst[x] = src[Y * slinesize + X]; } break; +case EDGE_MIRROR: +for (x = 0; x < w; x++) { +int Y = y + ysrc[x] - 128; +int X = x + xsrc[x] - 128; + +if (Y < 0) +Y = (-Y) % h; +if (X < 0) +X = (-X) % w; +if (Y >= h) +Y = h - (Y % h) - 1; +if (X >= w) +X = w - (X % w) - 1; +dst[x] = src[Y * slinesize + X]; +} +break; } ysrc += ylinesize; @@ -196,6 +214,24 @@ static void displace_packed(DisplaceContext *s, const AVFrame *in, } } break; +case EDGE_MIRROR: +for (x = 0; x < w; x++) { +for (c = 0; c < s->nb_components; c++) { +int Y = y + ysrc[x * step + c] - 128; +int X = x + xsrc[x * step + c] - 128; + +if (Y < 0) +Y = (-Y) % h; +if (X < 0) +X = (-X) % w; +if (Y >= h) +Y = h - (Y % h) - 1; +if (X >= w) +X = w - (X % w) - 1; +dst[x * step + c] = src[Y * slinesize + X * step + c]; +} +} +break; } ysrc += ylinesize; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/filters: add one more blend example
ffmpeg | branch: master | Paul B Mahol | Sun Sep 3 20:00:08 2017 +0200| [05b1c606870cc4646da8197a86e9af5301654499] | committer: Paul B Mahol doc/filters: add one more blend example Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=05b1c606870cc4646da8197a86e9af5301654499 --- doc/filters.texi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index abc3a0cae8..710294860e 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -4995,6 +4995,12 @@ blend=all_expr='A*(if(gte(T,10),1,T/10))+B*(1-(if(gte(T,10),1,T/10)))' @end example @item +Apply linear horizontal transition from top layer to bottom layer: +@example +blend=all_expr='A*(X/W)+B*(1-X/W)' +@end example + +@item Apply 1x1 checkerboard effect: @example blend=all_expr='if(eq(mod(X,2),mod(Y,2)),A,B)' ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/filters: add missing '' for blend example
ffmpeg | branch: master | Paul B Mahol | Sun Sep 3 20:00:53 2017 +0200| [8b193e553055f7c89f6a8263ebdc2e6756af7fb1] | committer: Paul B Mahol doc/filters: add missing '' for blend example Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b193e553055f7c89f6a8263ebdc2e6756af7fb1 --- doc/filters.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index 710294860e..649e101876 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5027,7 +5027,7 @@ blend=all_expr='if(gte(T*SH*40+Y,H)*gte((T*40*SW+X)*W/H,W),A,B)' @item Split diagonally video and shows top and bottom layer on each side: @example -blend=all_expr=if(gt(X,Y*(W/H)),A,B) +blend=all_expr='if(gt(X,Y*(W/H)),A,B)' @end example @item ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_datascope: add timeline support to pixscope and oscilloscope
ffmpeg | branch: master | Paul B Mahol | Sun Sep 3 20:42:04 2017 +0200| [f3c0f34f53c26b800aae0d4e63608b065d73f4ec] | committer: Paul B Mahol avfilter/vf_datascope: add timeline support to pixscope and oscilloscope Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f3c0f34f53c26b800aae0d4e63608b065d73f4ec --- libavfilter/vf_datascope.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/vf_datascope.c b/libavfilter/vf_datascope.c index 7a1dc4de01..a0482cdb75 100644 --- a/libavfilter/vf_datascope.c +++ b/libavfilter/vf_datascope.c @@ -646,6 +646,7 @@ AVFilter ff_vf_pixscope = { .query_formats = query_formats, .inputs= pixscope_inputs, .outputs = pixscope_outputs, +.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; typedef struct PixelValues { @@ -1027,4 +1028,5 @@ AVFilter ff_vf_oscilloscope = { .uninit= oscilloscope_uninit, .inputs= oscilloscope_inputs, .outputs = oscilloscope_outputs, +.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/flvdec: Set need_context_update when setting the initial extradata
ffmpeg | branch: master | Alex Converse | Tue Aug 29 10:47:26 2017 -0700| [4d2b9ece45e576474a2f03eb47f5cc088eec3f0c] | committer: Alex Converse avformat/flvdec: Set need_context_update when setting the initial extradata Fixes ticket 6398. Debugged with the help of James Almer and Hendrik Leppkes. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4d2b9ece45e576474a2f03eb47f5cc088eec3f0c --- libavformat/flvdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 94c9e28334..2e70352c53 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -754,6 +754,7 @@ static int flv_get_extradata(AVFormatContext *s, AVStream *st, int size) av_freep(&st->codecpar->extradata); if (ff_get_extradata(s, st->codecpar, s->pb, size) < 0) return AVERROR(ENOMEM); +st->internal->need_context_update = 1; return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog