Re: [FFmpeg-devel] [PATCH] configure: add -Werror=declaration-after-statement for gcc
Le primidi 11 brumaire, an CCXXIII, Lukasz Marek a écrit : > Signed-off-by: Lukasz Marek > --- > configure | 1 + > 1 file changed, 1 insertion(+) Did something change since 377dfa3d? Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] avcodec/libwebpenc: support "P" frames in webp animations
On Fri, Oct 31, 2014 at 04:48:08PM +0100, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > --- > libavcodec/libwebpenc.c | 80 > +-- > 1 file changed, 77 insertions(+), 3 deletions(-) > > diff --git a/libavcodec/libwebpenc.c b/libavcodec/libwebpenc.c > index 4cb8dc3..c7f9784 100644 > --- a/libavcodec/libwebpenc.c > +++ b/libavcodec/libwebpenc.c [...] > +alt_frame->format = AV_PIX_FMT_YUVA420P; > +for (y = 0; y < frame->height; y+= bs) { > +for (x = 0; x < frame->width; x+= bs) { > +int skip; > +int sse = 0; > +for (p = 0; p < 3; p++) { > +int bs2 = bs >> !!p; > +int w = frame->width >> !!p; > +int h = frame->height >> !!p; Does it work with odd dimensions? Same below [...] -- Clément B. pgp_7KGBqAAa8.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]Set bits_per_coded_sample for G.726 in mov
Hi! Ticket #4069 indicates that users unfortunately try to put G.726 in mov. Attached patch makes such files decodable. Please comment, Carl Eugen diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 974edea..b9576dc 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -938,6 +938,8 @@ static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track) if (track->enc->codec_id == AV_CODEC_ID_PCM_U8 || track->enc->codec_id == AV_CODEC_ID_PCM_S8) avio_wb16(pb, 8); /* bits per sample */ +else if (track->enc->codec_id == AV_CODEC_ID_ADPCM_G726) +avio_wb16(pb, track->enc->bits_per_coded_sample); else avio_wb16(pb, 16); avio_wb16(pb, track->audio_vbr ? -2 : 0); /* compression ID */ ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avformat: add webp muxer
Michael Niedermayer gmx.at> writes: > +{ "loop", "Number of times to loop the output: 0 - infinite loop", > OFFSET(loop), > + AV_OPT_TYPE_INT, { .i64 = 1 }, -1, 65535, ENC }, What effect does "-1" have? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avformat: add webp muxer
On Sat, Nov 01, 2014 at 10:21:20AM +, Carl Eugen Hoyos wrote: > Michael Niedermayer gmx.at> writes: > > > +{ "loop", "Number of times to loop the output: 0 - infinite loop", > > OFFSET(loop), > > + AV_OPT_TYPE_INT, { .i64 = 1 }, -1, 65535, ENC }, > > What effect does "-1" have? same as 65535, removed -1 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User questions about the command line tools should be sent to the ffmpeg-user ML. And questions about how to use libav* should be sent to the libav-user ML. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] avcodec/libwebpenc: support "P" frames in webp animations
On Sat, Nov 01, 2014 at 10:54:33AM +0100, Clément Bœsch wrote: > On Fri, Oct 31, 2014 at 04:48:08PM +0100, Michael Niedermayer wrote: > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/libwebpenc.c | 80 > > +-- > > 1 file changed, 77 insertions(+), 3 deletions(-) > > > > diff --git a/libavcodec/libwebpenc.c b/libavcodec/libwebpenc.c > > index 4cb8dc3..c7f9784 100644 > > --- a/libavcodec/libwebpenc.c > > +++ b/libavcodec/libwebpenc.c > [...] > > +alt_frame->format = AV_PIX_FMT_YUVA420P; > > +for (y = 0; y < frame->height; y+= bs) { > > +for (x = 0; x < frame->width; x+= bs) { > > +int skip; > > +int sse = 0; > > +for (p = 0; p < 3; p++) { > > +int bs2 = bs >> !!p; > > > +int w = frame->width >> !!p; > > +int h = frame->height >> !!p; > > Does it work with odd dimensions? Same below yes it works, and replaced by int w = FF_CEIL_RSHIFT(frame->width , !!p); int h = FF_CEIL_RSHIFT(frame->height, !!p); same for the 2nd occurance [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you think the mosad wants you dead since a long time then you are either wrong or dead since a long time. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] "OPW Qualification Task: Enable daemon mode for FFserver"
Le decadi 10 brumaire, an CCXXIII, Binathi Bingi a écrit : > Hello > > I tried to include the changes specified by Nicholas. > We can switch between both Daemon and NoDaemon mode, using the option in > ffserver.conf file. > > >From 018f8c1e1acf062a9e6a3ec94f671d574ec4b712 Mon Sep 17 00:00:00 2001 > From: Binathi > Date: Fri, 31 Oct 2014 23:27:20 +0530 > Subject: [PATCH] Enable Daemon mode for FFServer > > Signed-off-by: Binathi > --- > doc/ffserver.conf | 4 > doc/ffserver.texi | 7 +-- > ffserver.c| 31 +-- > ffserver_config.c | 7 +-- > ffserver_config.h | 1 + > 5 files changed, 44 insertions(+), 6 deletions(-) > > diff --git a/doc/ffserver.conf b/doc/ffserver.conf > index b756961..eac088b 100644 > --- a/doc/ffserver.conf > +++ b/doc/ffserver.conf > @@ -25,6 +25,10 @@ MaxBandwidth 1000 > # '-' is the standard output. > CustomLog - > > +# Suppress Daemon if you don't want to launch ffserver in daemon mode. > +#NoDaemon > +Daemon Needs to be consistent with the default, see below. > + > ## > # Definition of the live feeds. Each live feed contains one video > # and/or audio sequence coming from an ffmpeg encoder or another > diff --git a/doc/ffserver.texi b/doc/ffserver.texi > index 77273d2..15dc4b3 100644 > --- a/doc/ffserver.texi > +++ b/doc/ffserver.texi > @@ -406,8 +406,11 @@ ignored, and the log is written to standard output. > > @item NoDaemon > Set no-daemon mode. This option is currently ignored since now > -@command{ffserver} will always work in no-daemon mode, and is > -deprecated. > +@command{ffserver} will always work in daemon mode. > + > +@ Daemon > +Set daemon mode. > +@command{ffserver} will always work in daemon mode. To enable no-daemon > mode, suppress this and enable NoDaemon. The wording is misleading: ffserver will NOT "always" work in daemon mode: the options are precisely there to choose if it does. The usual wording for that kind of option look usually like that: Option_foo: make the application behave foo; this is the default. Option_bar: make the application behave bar; the default is foo. > @end table > > @section Feed section > diff --git a/ffserver.c b/ffserver.c > index ea2a2ae..d6eb0b4 100644 > --- a/ffserver.c > +++ b/ffserver.c > @@ -3671,6 +3671,7 @@ static void handle_child_exit(int sig) > static void opt_debug(void) > { > config.debug = 1; > +config.ffserver_daemon = 0; > snprintf(config.logfilename, sizeof(config.logfilename), "-"); > } > > @@ -3736,10 +3737,36 @@ int main(int argc, char **argv) > build_feed_streams(); > > compute_bandwidth(); > - > + > +if (config.ffserver_daemon) { Do not forget to indent. > +int ffserver_id = 0; > +pid_t sid = 0; > + > +ffserver_id = fork(); > + > +if (ffserver_id < 0) { > +av_log(NULL, AV_LOG_WARNING, "Fork failed!Couldn't launch ffserver > in daemon mode.\n"); > +exit(1); Since there is exit(1), then this is an ERROR, not a WARNING. And please translate the reason for the fork fail: av_err2str(AVERROR(errno)). > +} > + > +if (ffserver_id > 0) { > +exit(0); > +} > + > +sid = setsid(); > +if (sid < 0) { > +exit(1); > +} > + > +open ("/dev/null", O_RDWR); > + > +if (strcmp(config.logfilename, "-") != 0) { > +close(1); > +} This looked wrong before and still looks wrong now. Opening a file (or device) and ignoring the returned file descriptor is almost never correct. Closing stdout and not re-opening it afterwards can hardly be right either. > +} > /* signal init */ > signal(SIGPIPE, SIG_IGN); > - > + > if (http_server() < 0) { > http_log("Could not start server\n"); > exit(1); > diff --git a/ffserver_config.c b/ffserver_config.c > index e44cdf7..f46d8f4 100644 > --- a/ffserver_config.c > +++ b/ffserver_config.c > @@ -358,8 +358,11 @@ static int ffserver_parse_config_global(FFServerConfig > *config, const char *cmd, > ffserver_get_arg(arg, sizeof(arg), p); > if (resolve_host(&config->http_addr.sin_addr, arg) != 0) > ERROR("%s:%d: Invalid host/IP address: %s\n", arg); > -} else if (!av_strcasecmp(cmd, "NoDaemon")) { > -WARNING("NoDaemon option has no effect, you should remove it\n"); > +} else if (!av_strcasecmp(cmd, "Daemon") || !av_strcasecmp(cmd, > "NoDaemon")) { > +if (!av_strcasecmp(cmd, "Daemon")) > +config->ffserver_daemon = 1; > +if (!av_strcasecmp(cmd, "NoDaemon")) > +config->ffserver_daemon = 0; As Michael pointed out, no need to group them in a nested test, you can just treat them as two separate options: ... else if Daemon ffserver_daemon = 1; else if NoDaemon ffserver_daemon = 0; else ... > } else if (!av_strcasecmp(cmd, "RTSPPort")) { > ffser
Re: [FFmpeg-devel] [PATCH 0/6] dv: of inverse weight tables
On Wed, Oct 29, 2014 at 12:17:34PM +0100, Christophe Gisquet wrote: > Hi, > > 2014-10-25 13:29 GMT+02:00 Reimar Döffinger : > > Maybe as a patch that puts it into tools? > > I don't know if that's the right place, but I would kind of prefer to > > have these kind of things around. > > Probably overkill, but we have libavcodec/tableprint.h that has helpers > > to generate files with tables. > > I see dv_tablegen.c which sounds like a good place. You probably have > a better idea seeing how several files serving a similar purpose were > created by you. On the other hand, that's just 2*128 bytes. dv_tablegen.c means it will by default be generated at runtime, unless hardcoded tables are enabled. I don't know if that makes sense. > Otherwise, the mailing list is there to forever archive that program > (hence my sending it). Sure. Though attachments can be hard to retrieve from many archives, plus it's hard to find if you don't know that the email exists. Either way, it was just a suggestion, it's not something important. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi: add xbr filter
On date Saturday 2014-11-01 04:27:24 +0530, arwa arif encoded: [...] > On Fri, Oct 31, 2014 at 6:31 PM, Stefano Sabatini > From 9b6b1d546247cf61b2f696835fb8a5e782d353ea Mon Sep 17 00:00:00 2001 > From: Arwa Arif > Date: Thu, 30 Oct 2014 22:06:20 +0530 > Subject: [PATCH] [PATCH]lvafi: add xbr filter typo: lvafi > > --- > doc/filters.texi |5 + > libavfilter/Makefile |1 + > libavfilter/allfilters.c |1 + > libavfilter/vf_xbr.c | 331 > ++ > 4 files changed, 338 insertions(+) > create mode 100644 libavfilter/vf_xbr.c [...] Code looks good to me, apart a few cosmetics nits which I can fix myself before pushing. About Michael's question, is it possible to compare it with the reference filter? -- FFmpeg = Fantastic & Fierce MultiPurpose Experimenting Gospel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]Set bits_per_coded_sample for G.726 in mov
On Sat, Nov 01, 2014 at 10:57:18AM +0100, Carl Eugen Hoyos wrote: > Hi! > > Ticket #4069 indicates that users unfortunately try to put G.726 in mov. > Attached patch makes such files decodable. > > Please comment, Carl Eugen should be ok [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB You can kill me, but you cannot change the truth. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/rtpdec_h261: code aligned to the HEVC code
From: Thomas Volkert --- libavformat/rtpdec_h261.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libavformat/rtpdec_h261.c b/libavformat/rtpdec_h261.c index b902d2a..43244bb 100644 --- a/libavformat/rtpdec_h261.c +++ b/libavformat/rtpdec_h261.c @@ -32,7 +32,7 @@ struct PayloadContext { uint32_t timestamp; }; -static PayloadContext *h261_new_context(void) +static av_cold PayloadContext *h261_new_context(void) { return av_mallocz(sizeof(PayloadContext)); } @@ -45,7 +45,7 @@ static void h261_free_dyn_buffer(AVIOContext **dyn_buf) *dyn_buf = NULL; } -static void h261_free_context(PayloadContext *pl_ctx) +static av_cold void h261_free_context(PayloadContext *pl_ctx) { /* return if context is invalid */ if (!pl_ctx) @@ -80,16 +80,14 @@ int ff_h261_handle_packet(AVFormatContext *ctx, PayloadContext *data, int sbit, ebit, gobn, mbap, quant; int res; -//av_log(ctx, AV_LOG_DEBUG, "got h261 RTP packet with time: %u\n", timestamp); - /* drop data of previous packets in case of non-continuous (loss) packet stream */ if (data->buf && data->timestamp != *timestamp) { h261_free_dyn_buffer(&data->buf); } -/* sanity check for size of input packet */ -if (len < 5 /* 4 bytes header and 1 byte payload at least */) { -av_log(ctx, AV_LOG_ERROR, "Too short H.261 RTP packet\n"); +/* sanity check for size of input packet: 1 byte payload at least */ +if (len < RTP_H261_PAYLOAD_HEADER_SIZE + 1) { +av_log(ctx, AV_LOG_ERROR, "Too short RTP/H.261 packet, got %d bytes\n", len); return AVERROR_INVALIDDATA; } -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] mpeg4vdpau: Fix priv data size.
--- libavcodec/mpeg4videodec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 47ac523..846b691 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -2795,7 +2795,7 @@ AVCodec ff_mpeg4_vdpau_decoder = { .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 (VDPAU)"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_MPEG4, -.priv_data_size = sizeof(MpegEncContext), +.priv_data_size = sizeof(Mpeg4DecContext), .init = decode_init, .close = ff_h263_decode_end, .decode = ff_h263_decode_frame, -- 2.1.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] vdpau_mpeg4: Do not fail on unknown profile.
This is a regression, previous code did not require users to set the profile to use VDPAU. In addition, ASP is a superset of SP, so there is not even a good reason to require it. --- libavcodec/vdpau_mpeg4.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/vdpau_mpeg4.c b/libavcodec/vdpau_mpeg4.c index 2a036b6..02ed4d1 100644 --- a/libavcodec/vdpau_mpeg4.c +++ b/libavcodec/vdpau_mpeg4.c @@ -119,6 +119,7 @@ static int vdpau_mpeg4_init(AVCodecContext *avctx) case FF_PROFILE_MPEG4_SIMPLE: profile = VDP_DECODER_PROFILE_MPEG4_PART2_SP; break; +case FF_PROFILE_UNKNOWN: case FF_PROFILE_MPEG4_ADVANCED_SIMPLE: profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP; break; -- 2.1.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] vdpau_mpeg4: Do not fail on unknown profile.
On Sat, 1 Nov 2014 13:45:46 +0100 Reimar Döffinger wrote: > This is a regression, previous code did not require > users to set the profile to use VDPAU. It still doesn't...? There are basically 3 ffmpeg vdpau hwaccel APIs now. > In addition, ASP is a superset of SP, so there is not > even a good reason to require it. > --- > libavcodec/vdpau_mpeg4.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavcodec/vdpau_mpeg4.c b/libavcodec/vdpau_mpeg4.c > index 2a036b6..02ed4d1 100644 > --- a/libavcodec/vdpau_mpeg4.c > +++ b/libavcodec/vdpau_mpeg4.c > @@ -119,6 +119,7 @@ static int vdpau_mpeg4_init(AVCodecContext *avctx) > case FF_PROFILE_MPEG4_SIMPLE: > profile = VDP_DECODER_PROFILE_MPEG4_PART2_SP; > break; > +case FF_PROFILE_UNKNOWN: > case FF_PROFILE_MPEG4_ADVANCED_SIMPLE: > profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP; > break; ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] vdpau_mpeg4: Do not fail on unknown profile.
Reimar Döffinger gmx.de> writes: > +case FF_PROFILE_UNKNOWN: > case FF_PROFILE_MPEG4_ADVANCED_SIMPLE: > profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP; Could instead be the default case to set profile to ASP? Or to remove this whole logic? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] vdpau_mpeg4: Do not fail on unknown profile.
On 01 Nov, Reimar Döffinger wrote : > This is a regression, previous code did not require > users to set the profile to use VDPAU. If you don't set the profile, how can you know that the hardware supports it? -- Jean-Baptiste Kempf http://www.jbkempf.com/ - +33 672 704 734 Sent from my Electronic Device ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] mpeg4vdpau: Fix priv data size.
Reimar Döffinger gmx.de> writes: > -.priv_data_size = sizeof(MpegEncContext), > +.priv_data_size = sizeof(Mpeg4DecContext), Please commit. Thank you for debugging this, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] vdpau_mpeg4: Do not fail on unknown profile.
Jean-Baptiste Kempf videolan.org> writes: > On 01 Nov, Reimar Döffinger wrote : > > This is a regression, previous code did not require > > users to set the profile to use VDPAU. > > If you don't set the profile, how can you know that > the hardware supports it? Does this have any relevance for ASP? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] ffmpeg: init sub2video.last_pts.
Get the heartbeat working when the video has negative timestamps. Fix trac ticket #4062. Signed-off-by: Nicolas George --- ffmpeg_filter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c index 2ba2d9b..0555cf6 100644 --- a/ffmpeg_filter.c +++ b/ffmpeg_filter.c @@ -619,6 +619,7 @@ static int sub2video_prepare(InputStream *ist) ist->sub2video.frame = av_frame_alloc(); if (!ist->sub2video.frame) return AVERROR(ENOMEM); +ist->sub2video.last_pts = INT64_MIN; return 0; } -- 2.1.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/3] idet improvements: add current frame classification to metadata
This was requested following my initial patch adding the metadata. Should resolve http://trac.ffmpeg.org/ticket/3832 From 2c4f9c042a863ae370ff21058c9aa72e0d0c6d7e Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Sat, 1 Nov 2014 04:10:15 -0700 Subject: [PATCH 1/3] avfilter/idet: add current frame classification to metadata resolves #3832 also, add metadata to "current" frame instead of "next" frame and do next to the av_log call --- doc/filters.texi | 13 + libavfilter/version.h | 2 +- libavfilter/vf_idet.c | 36 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 7be29de..33f842b 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5577,9 +5577,17 @@ Detect video interlacing type. This filter tries to detect if the input is interlaced or progressive, top or bottom field first. +Single frame detection considers only immediately adjacent frames when classifying each frame. +Multiple frame detection incorporates the classification history of previous frames. + The filter will log these metadata values: @table @option +@item single.current_frame +Detected type of current frame using single-frame detection. One of: +``tff'' (top field first), ``bff'' (bottom field first), +``progressive'', or ``undetermined'' + @item single.tff Cumulative number of frames detected as top field first using single-frame detection. @@ -5589,6 +5597,11 @@ Cumulative number of frames detected as top field first using multiple-frame det @item single.bff Cumulative number of frames detected as bottom field first using single-frame detection. +@item multiple.current_frame +Detected type of current frame using multiple-frame detection. One of: +``tff'' (top field first), ``bff'' (bottom field first), +``progressive'', or ``undetermined'' + @item multiple.bff Cumulative number of frames detected as bottom field first using multiple-frame detection. diff --git a/libavfilter/version.h b/libavfilter/version.h index 2fa15eb..440c587 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -31,7 +31,7 @@ #define LIBAVFILTER_VERSION_MAJOR 5 #define LIBAVFILTER_VERSION_MINOR 2 -#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_idet.c b/libavfilter/vf_idet.c index b9c4070..6f99f39 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -40,10 +40,10 @@ AVFILTER_DEFINE_CLASS(idet); static const char *type2str(Type type) { switch(type) { -case TFF : return "Top Field First "; -case BFF : return "Bottom Field First"; -case PROGRESSIVE : return "Progressive "; -case UNDETERMINED : return "Undetermined "; +case TFF : return "tff"; +case BFF : return "bff"; +case PROGRESSIVE : return "progressive"; +case UNDETERMINED : return "undetermined"; } return NULL; } @@ -82,6 +82,7 @@ static void filter(AVFilterContext *ctx) int64_t delta=0; Type type, best_type; int match = 0; +AVDictionary **metadata = avpriv_frame_get_metadatap(idet->cur); for (i = 0; i < idet->csp->nb_components; i++) { int w = idet->cur->width; @@ -147,14 +148,27 @@ static void filter(AVFilterContext *ctx) idet->prestat [ type] ++; idet->poststat[idet->last_type] ++; -av_log(ctx, AV_LOG_DEBUG, "Single frame:%s, Multi frame:%s\n", type2str(type), type2str(idet->last_type)); + +av_log(ctx, AV_LOG_DEBUG, "Single frame:%12s, Multi frame:%12s\n", type2str(type), type2str(idet->last_type)); + +av_dict_set(metadata, "lavfi.idet.single.current_frame", type2str(type), 0); +av_dict_set_int(metadata, "lavfi.idet.single.tff", idet->prestat[TFF], 0); +av_dict_set_int(metadata, "lavfi.idet.single.bff", idet->prestat[BFF], 0); +av_dict_set_int(metadata, "lavfi.idet.single.progressive", idet->prestat[PROGRESSIVE], 0); +av_dict_set_int(metadata, "lavfi.idet.single.undetermined", idet->prestat[UNDETERMINED], 0); + +av_dict_set(metadata, "lavfi.idet.multiple.current_frame", type2str(idet->last_type), 0); +av_dict_set_int(metadata, "lavfi.idet.multiple.tff", idet->poststat[TFF], 0); +av_dict_set_int(metadata, "lavfi.idet.multiple.bff", idet->poststat[BFF], 0); +av_dict_set_int(metadata, "lavfi.idet.multiple.progressive", idet->poststat[PROGRESSIVE], 0); +av_dict_set_int(metadata, "lavfi.idet.multiple.undetermined", idet->poststat[UNDETERMINED], 0); + } static int filter_frame(AVFilterLink *link, AVFrame *picref) { AVFilterContext *ctx = link->dst; IDETContext *idet = ctx->priv; -AVDictionary **metadata = avpriv_frame_get_metadatap(picref); if (idet->prev) av_fr
Re: [FFmpeg-devel] [PATCH 2/3] idet improvements: add reset_count feature
From 2ac0c4b6bab752c92ffa615c028cd4582441f680 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Sat, 1 Nov 2014 05:38:35 -0700 Subject: [PATCH 2/3] avfilter/vf_idet: add a "reset_count" option like cropdetect This can be useful for videos in which the interlacing pattern changes. Also log the total number of frames as metadata and with avlog. --- doc/filters.texi | 7 +++ libavfilter/version.h | 2 +- libavfilter/vf_idet.c | 45 + libavfilter/vf_idet.h | 2 ++ 4 files changed, 43 insertions(+), 13 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 33f842b..2896978 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5583,6 +5583,9 @@ Multiple frame detection incorporates the classification history of previous fra The filter will log these metadata values: @table @option +@item frames_total +Total number of frames considered in current statistics. + @item single.current_frame Detected type of current frame using single-frame detection. One of: ``tff'' (top field first), ``bff'' (bottom field first), @@ -5625,6 +5628,10 @@ The filter accepts the following options: Set interlacing threshold. @item prog_thres Set progressive threshold. +@item reset_count +Number of frames after which idet will reset all previously collected +statistics. The current statistics are logged before being +destroyed. The default of 0 indicates 'never reset'. @end table @section il diff --git a/libavfilter/version.h b/libavfilter/version.h index 440c587..dab9b45 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -31,7 +31,7 @@ #define LIBAVFILTER_VERSION_MAJOR 5 #define LIBAVFILTER_VERSION_MINOR 2 -#define LIBAVFILTER_VERSION_MICRO 101 +#define LIBAVFILTER_VERSION_MICRO 102 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ LIBAVFILTER_VERSION_MINOR, \ diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index 6f99f39..79dc9be 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -32,6 +32,7 @@ static const AVOption idet_options[] = { { "intl_thres", "set interlacing threshold", OFFSET(interlace_threshold), AV_OPT_TYPE_FLOAT, {.dbl = 1.04}, -1, FLT_MAX, FLAGS }, { "prog_thres", "set progressive threshold", OFFSET(progressive_threshold), AV_OPT_TYPE_FLOAT, {.dbl = 1.5}, -1, FLT_MAX, FLAGS }, +{ "reset_count", "drop statistics after this many frames", OFFSET(reset_count), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS }, { NULL } }; @@ -74,6 +75,25 @@ int ff_idet_filter_line_c_16bit(const uint16_t *a, const uint16_t *b, const uint return ret; } +static void log_cumulative_stats(AVFilterContext *ctx) +{ +IDETContext *idet = ctx->priv; +av_log(ctx, AV_LOG_INFO, "Single frame detection: TFF:%d BFF:%d Progressive:%d Undetermined:%d Total: %d\n", + idet->prestat[TFF], + idet->prestat[BFF], + idet->prestat[PROGRESSIVE], + idet->prestat[UNDETERMINED], + idet->frames_total +); +av_log(ctx, AV_LOG_INFO, "Multi frame detection: TFF:%d BFF:%d Progressive:%d Undetermined:%d Total: %d\n", + idet->poststat[TFF], + idet->poststat[BFF], + idet->poststat[PROGRESSIVE], + idet->poststat[UNDETERMINED], + idet->frames_total +); +} + static void filter(AVFilterContext *ctx) { IDETContext *idet = ctx->priv; @@ -84,6 +104,15 @@ static void filter(AVFilterContext *ctx) int match = 0; AVDictionary **metadata = avpriv_frame_get_metadatap(idet->cur); +// Reset the statistics every reset_count frames, if reset_count is > 0 +if (0 < idet->reset_count && idet->reset_count <= idet->frames_total ) { +log_cumulative_stats(ctx); +memset(idet->prestat, 0 , 4*sizeof(int)); +memset(idet->poststat, 0 , 4*sizeof(int)); +memset(idet->history, UNDETERMINED, HIST_SIZE); +idet->frames_total=0; +} + for (i = 0; i < idet->csp->nb_components; i++) { int w = idet->cur->width; int h = idet->cur->height; @@ -146,11 +175,14 @@ static void filter(AVFilterContext *ctx) idet->cur->interlaced_frame = 0; } +idet->frames_total ++; idet->prestat [ type] ++; idet->poststat[idet->last_type] ++; av_log(ctx, AV_LOG_DEBUG, "Single frame:%12s, Multi frame:%12s\n", type2str(type), type2str(idet->last_type)); +av_dict_set_int(metadata, "lavfi.idet.frames_total", idet->frames_total, 0); + av_dict_set(metadata, "lavfi.idet.single.current_frame", type2str(type), 0); av_dict_set_int(metadata, "lavfi.idet.single.tff", idet->prestat[TFF], 0); av_dict_set_int(metadata, "lavfi.idet.single.bff", idet->prestat[BFF], 0); @@ -228,18 +260,7 @@ static av_cold void uninit(AVFilterContext *ctx) { IDETContext *idet = ctx->priv; -av_log(ctx, AV_LOG_INFO, "Single frame de
Re: [FFmpeg-devel] [PATCH] vdpau_mpeg4: Do not fail on unknown profile.
On Sat, Nov 01, 2014 at 02:18:06PM +0100, Jean-Baptiste Kempf wrote: > On 01 Nov, Reimar Döffinger wrote : > > This is a regression, previous code did not require > > users to set the profile to use VDPAU. > > If you don't set the profile, how can you know that the hardware > supports it? Firstly: As I said, SP is a subset of ASP, so if the hardware supports ASP it supports SP. Secondly: The code actually interacting with the hardware can handle that. There is no need for the FFmpeg decoder to require that information. Obviously I can just hack around this by setting it to ASP if it's unknown, but I'd like a good reason why that is a better solution than graceful degradation here. Only slightly related: I generally dislike that part of the design as it mixes up the whole VDPAU structure/bitstream generation with the actual hardware decoding, which is a pain if you want to use security feature like process separation of decoding (which is a higher security risk) from actual display. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] vdpau_mpeg4: Do not fail on unknown profile.
On Sat, Nov 01, 2014 at 01:52:17PM +0100, wm4 wrote: > On Sat, 1 Nov 2014 13:45:46 +0100 > Reimar Döffinger wrote: > > > This is a regression, previous code did not require > > users to set the profile to use VDPAU. > > It still doesn't...? It does if you want the hwaccel API. > There are basically 3 ffmpeg vdpau hwaccel APIs now. (possibly 4 depending on how you could, but) Adding the newest one because of this code had the side-effect that you now need to set the profile even for the older ones (not for the oldest one using mpeg4_vdpau though it seems?). Obviously it would be possible to just skip this in the case of the older API, but as said I see no good reason. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 3/3] idet improvements: add repeated field detection
From d8141813d2987a2f7f06f738062301254ecb4c28 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Sat, 1 Nov 2014 03:12:48 -0700 Subject: [PATCH 3/3] avfilter/vf_idet: add repeated field detection This is useful for detecting telecine --- doc/filters.texi | 25 + libavfilter/version.h | 2 +- libavfilter/vf_idet.c | 46 ++ libavfilter/vf_idet.h | 12 +++- 4 files changed, 75 insertions(+), 10 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 2896978..5128a02 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5574,11 +5574,13 @@ value. Detect video interlacing type. -This filter tries to detect if the input is interlaced or progressive, -top or bottom field first. +This filter tries to detect if the input frames as interlaced, progressive, +top or bottom field first. It will also try and detect fields that are +repeated between adjacent frames (a sign of telecine). -Single frame detection considers only immediately adjacent frames when classifying each frame. -Multiple frame detection incorporates the classification history of previous frames. +There are two detection modes. Single frame detection considers only +immediately adjacent frames when classifying each frame. Multiple frame +detection incorporates the classification history of previous frames. The filter will log these metadata values: @@ -5619,6 +5621,19 @@ Cumulative number of frames that could not be classified using single-frame dete @item multiple.undetermined Cumulative number of frames that could not be classified using multiple-frame detection. + +@item repeated.current_frame +Which field in the current frame is repeated from the last. One of ``neither'', ``top'', or ``bottom''. + +@item repeated.neither +Cumulative number of frames with no repeated field. + +@item repeated.top +Cumulative number of frames with the top field repeated from the previous frame's top field. + +@item repeated.bottom +Cumulative number of frames with the bottom field repeated from the previous frame's bottom field. + @end table The filter accepts the following options: @@ -5628,6 +5643,8 @@ The filter accepts the following options: Set interlacing threshold. @item prog_thres Set progressive threshold. +@item repeat_thres +Threshold for repeat detection. @item reset_count Number of frames after which idet will reset all previously collected statistics. The current statistics are logged before being diff --git a/libavfilter/version.h b/libavfilter/version.h index dab9b45..6f61aee 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -31,7 +31,7 @@ #define LIBAVFILTER_VERSION_MAJOR 5 #define LIBAVFILTER_VERSION_MINOR 2 -#define LIBAVFILTER_VERSION_MICRO 102 +#define LIBAVFILTER_VERSION_MICRO 103 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ LIBAVFILTER_VERSION_MINOR, \ diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index 79dc9be..74cdb44 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -32,6 +32,7 @@ static const AVOption idet_options[] = { { "intl_thres", "set interlacing threshold", OFFSET(interlace_threshold), AV_OPT_TYPE_FLOAT, {.dbl = 1.04}, -1, FLT_MAX, FLAGS }, { "prog_thres", "set progressive threshold", OFFSET(progressive_threshold), AV_OPT_TYPE_FLOAT, {.dbl = 1.5}, -1, FLT_MAX, FLAGS }, +{ "rep_thres", "set repeat threshold", OFFSET(repeat_threshold), AV_OPT_TYPE_FLOAT, {.dbl = 3.0}, -1, FLT_MAX, FLAGS }, { "reset_count", "drop statistics after this many frames", OFFSET(reset_count), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS }, { NULL } }; @@ -49,6 +50,16 @@ static const char *type2str(Type type) return NULL; } +static const char *rep2str(RepeatedField repeated_field) +{ +switch(repeated_field) { +case REPEAT_NONE: return "neither"; +case REPEAT_TOP : return "top"; +case REPEAT_BOTTOM : return "bottom"; +} +return NULL; +} + int ff_idet_filter_line_c(const uint8_t *a, const uint8_t *b, const uint8_t *c, int w) { int x; @@ -78,6 +89,12 @@ int ff_idet_filter_line_c_16bit(const uint16_t *a, const uint16_t *b, const uint static void log_cumulative_stats(AVFilterContext *ctx) { IDETContext *idet = ctx->priv; +av_log(ctx, AV_LOG_INFO, "Repeated Fields: Neither:%d Top:%d Bottom:%d Total: %d\n", + idet->repeats[REPEAT_NONE], + idet->repeats[REPEAT_TOP], + idet->repeats[REPEAT_BOTTOM], + idet->frames_total +); av_log(ctx, AV_LOG_INFO, "Single frame detection: TFF:%d BFF:%d Progressive:%d Undetermined:%d Total: %d\n", idet->prestat[TFF], idet->prestat[BFF], @@ -100,7 +117,9 @@ static void filter(AVFilterContext *ctx) int y, i; int64_t alpha[2]={0}; int64_t delta=0; +int64_t gamma[2]={0};
Re: [FFmpeg-devel] [PATCH] vdpau_mpeg4: Do not fail on unknown profile.
On Sat, 1 Nov 2014 15:13:17 +0100 Reimar Döffinger wrote: > On Sat, Nov 01, 2014 at 01:52:17PM +0100, wm4 wrote: > > On Sat, 1 Nov 2014 13:45:46 +0100 > > Reimar Döffinger wrote: > > > > > This is a regression, previous code did not require > > > users to set the profile to use VDPAU. > > > > It still doesn't...? > > It does if you want the hwaccel API. > > > There are basically 3 ffmpeg vdpau hwaccel APIs now. > > (possibly 4 depending on how you could, but) > Adding the newest one because of this code had the > side-effect that you now need to set the profile > even for the older ones (not for the oldest one > using mpeg4_vdpau though it seems?). > Obviously it would be possible to just skip this in the > case of the older API, but as said I see no good reason. That seems indeed like a bug, then. It would mean every API user got broken. Nice job, Libav. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: add -Werror=declaration-after-statement for gcc
On 01.11.2014 09:48, Nicolas George wrote: Le primidi 11 brumaire, an CCXXIII, Lukasz Marek a écrit : Signed-off-by: Lukasz Marek --- configure | 1 + 1 file changed, 1 insertion(+) Did something change since 377dfa3d? Hmm, it can be annoying during debugging/development/tests... yes. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] mpeg4vdpau: Fix priv data size.
On Sat, Nov 01, 2014 at 01:15:46PM +, Carl Eugen Hoyos wrote: > Reimar Döffinger gmx.de> writes: > > > -.priv_data_size = sizeof(MpegEncContext), > > +.priv_data_size = sizeof(Mpeg4DecContext), > > Please commit. Pushed. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/rtpdec_h261: code aligned to the HEVC code
On Sat, Nov 01, 2014 at 01:01:53PM +0100, Thomas Volkert wrote: > From: Thomas Volkert > > --- > libavformat/rtpdec_h261.c | 12 +--- > 1 file changed, 5 insertions(+), 7 deletions(-) applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB During times of universal deceit, telling the truth becomes a revolutionary act. -- George Orwell signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] "OPW Qualification Task: Enable daemon mode for FFserver"
Hello I tried to incorporate the changes suggested in above mail. Now we have NoDaemon as by default as per the current standard. NoDaemon and Daemon are now treated as two separate options. Code is indented. Reason for fork fail included. Documentation has been changed. From e4b0cc451b7ffcf42f0a31b4ccd4d05ac69c1880 Mon Sep 17 00:00:00 2001 From: Binathi Date: Fri, 31 Oct 2014 23:27:20 +0530 Subject: [PATCH] Enable Daemon mode for FFServer Signed-off-by: Binathi Improvements: Enable Daemon mode in FFServer Signed-off-by: Binathi Improvements: Enable Daemon mode in FFServer Signed-off-by: Binathi --- doc/ffserver.conf | 5 + doc/ffserver.texi | 7 --- ffserver.c| 33 +++-- ffserver_config.c | 6 -- ffserver_config.h | 1 + 5 files changed, 45 insertions(+), 7 deletions(-) diff --git a/doc/ffserver.conf b/doc/ffserver.conf index b756961..0b63555 100644 --- a/doc/ffserver.conf +++ b/doc/ffserver.conf @@ -25,6 +25,11 @@ MaxBandwidth 1000 # '-' is the standard output. CustomLog - +# Suppress NoDaemon and enable Daemon, if you want to launch ffserver in daemon mode. +# If no option is specified, default option is NoDaemon. +#NoDaemon +#Daemon + ## # Definition of the live feeds. Each live feed contains one video # and/or audio sequence coming from an ffmpeg encoder or another diff --git a/doc/ffserver.texi b/doc/ffserver.texi index 77273d2..d7a6cbe 100644 --- a/doc/ffserver.texi +++ b/doc/ffserver.texi @@ -405,9 +405,10 @@ In case the commandline option @option{-d} is specified this option is ignored, and the log is written to standard output. @item NoDaemon -Set no-daemon mode. This option is currently ignored since now -@command{ffserver} will always work in no-daemon mode, and is -deprecated. +Set no-daemon mode. This is the default. + +@item Daemon +Set daemon mode. The default is NoDaemon @end table @section Feed section diff --git a/ffserver.c b/ffserver.c index ea2a2ae..611d1c4 100644 --- a/ffserver.c +++ b/ffserver.c @@ -3671,6 +3671,7 @@ static void handle_child_exit(int sig) static void opt_debug(void) { config.debug = 1; + config.ffserver_daemon = 1; snprintf(config.logfilename, sizeof(config.logfilename), "-"); } @@ -3736,10 +3737,38 @@ int main(int argc, char **argv) build_feed_streams(); compute_bandwidth(); - + +if (config.ffserver_daemon) { +int ffserver_id = 0; +pid_t sid = 0; + +ffserver_id = fork(); + +if (ffserver_id < 0) { +av_log(NULL, AV_LOG_ERROR, "Couldn't launch ffserver in daemon mode. Fork Failure Info(): %s\n",av_err2str(AVERROR(errno))); +exit(1); +} + +if (ffserver_id > 0) { +exit(0); +} + +sid = setsid(); +if (sid < 0) { +exit(1); +} + +open ("/dev/null", O_RDWR); +dup(0); +dup(0); + +if (strcmp(config.logfilename, "-") != 0) { +close(1); +} +} /* signal init */ signal(SIGPIPE, SIG_IGN); - + if (http_server() < 0) { http_log("Could not start server\n"); exit(1); diff --git a/ffserver_config.c b/ffserver_config.c index e44cdf7..a066e58 100644 --- a/ffserver_config.c +++ b/ffserver_config.c @@ -358,8 +358,10 @@ static int ffserver_parse_config_global(FFServerConfig *config, const char *cmd, ffserver_get_arg(arg, sizeof(arg), p); if (resolve_host(&config->http_addr.sin_addr, arg) != 0) ERROR("%s:%d: Invalid host/IP address: %s\n", arg); -} else if (!av_strcasecmp(cmd, "NoDaemon")) { -WARNING("NoDaemon option has no effect, you should remove it\n"); +} else if (!av_strcasecmp(cmd, "Daemon")){ + config->ffserver_daemon = 1; +} else if (!av_strcasecmp(cmd, "NoDaemon")){ + config->ffserver_daemon = 0; } else if (!av_strcasecmp(cmd, "RTSPPort")) { ffserver_get_arg(arg, sizeof(arg), p); val = atoi(arg); diff --git a/ffserver_config.h b/ffserver_config.h index 36d61d0..e3957b1 100644 --- a/ffserver_config.h +++ b/ffserver_config.h @@ -100,6 +100,7 @@ typedef struct FFServerConfig { unsigned int nb_max_http_connections; unsigned int nb_max_connections; uint64_t max_bandwidth; + int ffserver_daemon; int debug; char logfilename[1024]; struct sockaddr_in http_addr; -- 1.9.1 Regards, Binathi On Sat, Nov 1, 2014 at 4:28 PM, Nicolas George wrote: > Le decadi 10 brumaire, an CCXXIII, Binathi Bingi a écrit : > > Hello > > > > I tried to include the changes specified by Nicholas. > > We can switch between both Daemon and NoDaemon mode, using the option in > > ffserver.conf file. > > > > >From 018f8c1e1acf062a9e6a3ec94f671d574ec4b712 Mon Sep 17 00:00:00 2001 > > From: Binathi > > Date: Fri, 31 Oct 2014 23:27:20 +0530 > > Subject: [PATCH] Enable Daemon mode for FFServer > > > > Signed-off-by: Bina
Re: [FFmpeg-devel] [PATCH] lavfi: add xbr filter
On Sat, Nov 01, 2014 at 07:30:32PM +0530, arwa arif wrote: > On Sat, Nov 1, 2014 at 4:40 PM, Stefano Sabatini wrote: > > > On date Saturday 2014-11-01 04:27:24 +0530, arwa arif encoded: > > [...] > > > On Fri, Oct 31, 2014 at 6:31 PM, Stefano Sabatini > > > From 9b6b1d546247cf61b2f696835fb8a5e782d353ea Mon Sep 17 00:00:00 2001 > > > From: Arwa Arif > > > Date: Thu, 30 Oct 2014 22:06:20 +0530 > > > Subject: [PATCH] [PATCH]lvafi: add xbr filter > > > > typo: lvafi > > > > > > > > --- > > > doc/filters.texi |5 + > > > libavfilter/Makefile |1 + > > > libavfilter/allfilters.c |1 + > > > libavfilter/vf_xbr.c | 331 > > ++ > > > 4 files changed, 338 insertions(+) > > > create mode 100644 libavfilter/vf_xbr.c > > [...] > > > > Code looks good to me, apart a few cosmetics nits which I can fix > > myself before pushing. > > > > About Michael's question, is it possible to compare it with the > > reference filter? > > > > I compared the output with the code from scale2x " > http://scale2x.sourceforge.net/";. I have attached the ouput with this mail. > foobar.png denotes the original image. > foobar_ref,png denotes the output from scale2x. > foobar_out.png denotes the output from the code written. the ref and out images look somewhat different also, what is the relation between scale2x and xbr ? http://scale2x.sourceforge.net/index.html states that "Other interesting effects are HQx and xBR. These effects are a bit slower than Scale2x, but surely in the grasp of modern processors. " This does not sound like scale2x and xbr are the same thing [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] "OPW Qualification Task: Enable daemon mode for FFserver"
Le primidi 11 brumaire, an CCXXIII, Binathi Bingi a écrit : > I tried to incorporate the changes suggested in above mail. > Now we have NoDaemon as by default as per the current standard. > NoDaemon and Daemon are now treated as two separate options. > Code is indented. > Reason for fork fail included. > Documentation has been changed. Thanks. It looks almost there. > > From e4b0cc451b7ffcf42f0a31b4ccd4d05ac69c1880 Mon Sep 17 00:00:00 2001 > From: Binathi > Date: Fri, 31 Oct 2014 23:27:20 +0530 > Subject: [PATCH] Enable Daemon mode for FFServer Small nitpick: for the first line of the commit message, something like that is preferred: ffserver: implement daemon mode (possibly with "again" at the end, since it used to exist) > Signed-off-by: Binathi > > Improvements: Enable Daemon mode in FFServer > > Signed-off-by: Binathi > > Improvements: Enable Daemon mode in FFServer > > Signed-off-by: Binathi Are those repeated lines really in the commit message? If so, some cleanup is necessary. Also, for copyright reasons, the full name would be better if you do not mind. > --- > doc/ffserver.conf | 5 + > doc/ffserver.texi | 7 --- > ffserver.c| 33 +++-- > ffserver_config.c | 6 -- > ffserver_config.h | 1 + > 5 files changed, 45 insertions(+), 7 deletions(-) > > diff --git a/doc/ffserver.conf b/doc/ffserver.conf > index b756961..0b63555 100644 > --- a/doc/ffserver.conf > +++ b/doc/ffserver.conf > @@ -25,6 +25,11 @@ MaxBandwidth 1000 > # '-' is the standard output. > CustomLog - > > +# Suppress NoDaemon and enable Daemon, if you want to launch ffserver in > daemon mode. The patch was mangled by the mail user agent again. This will become an issue soon, as the patch is almost in shape to be applied but mangled patch can not be applied. > +# If no option is specified, default option is NoDaemon. > +#NoDaemon > +#Daemon > + > ## > # Definition of the live feeds. Each live feed contains one video > # and/or audio sequence coming from an ffmpeg encoder or another > diff --git a/doc/ffserver.texi b/doc/ffserver.texi > index 77273d2..d7a6cbe 100644 > --- a/doc/ffserver.texi > +++ b/doc/ffserver.texi > @@ -405,9 +405,10 @@ In case the commandline option @option{-d} is > specified this option is > ignored, and the log is written to standard output. > > @item NoDaemon > -Set no-daemon mode. This option is currently ignored since now > -@command{ffserver} will always work in no-daemon mode, and is > -deprecated. > +Set no-daemon mode. This is the default. > + > +@item Daemon > +Set daemon mode. The default is NoDaemon > @end table > > @section Feed section > diff --git a/ffserver.c b/ffserver.c > index ea2a2ae..611d1c4 100644 > --- a/ffserver.c > +++ b/ffserver.c > @@ -3671,6 +3671,7 @@ static void handle_child_exit(int sig) > static void opt_debug(void) > { > config.debug = 1; > + config.ffserver_daemon = 1; This one looked better the last time: you do not want to fork when debugging. > snprintf(config.logfilename, sizeof(config.logfilename), "-"); > } > > @@ -3736,10 +3737,38 @@ int main(int argc, char **argv) > build_feed_streams(); > > compute_bandwidth(); > - > + > +if (config.ffserver_daemon) { > +int ffserver_id = 0; > +pid_t sid = 0; > + > +ffserver_id = fork(); > + > +if (ffserver_id < 0) { > +av_log(NULL, AV_LOG_ERROR, "Couldn't launch ffserver in daemon > mode. Fork Failure Info(): %s\n",av_err2str(AVERROR(errno))); This is correct, but the message is a bit clumsy. "Impossible to start in daemon mode: %s" would probably be enough and more readable. Also, do not hesitate to split long lines between arguments, aligning everything with the opening parentheses (see similar code for examples). > +exit(1); > +} > + > +if (ffserver_id > 0) { > +exit(0); > +} > + > +sid = setsid(); > +if (sid < 0) { > +exit(1); > +} > + > +open ("/dev/null", O_RDWR); > +dup(0); > +dup(0); > + > +if (strcmp(config.logfilename, "-") != 0) { > +close(1); > +} This part is still nonsensical. If your trouble with it is that you struggle to understand why it is necessary and what it does exactly, do not hesitate to ask on the mailing list or in private. > +} > /* signal init */ > signal(SIGPIPE, SIG_IGN); > - > + > if (http_server() < 0) { > http_log("Could not start server\n"); > exit(1); > diff --git a/ffserver_config.c b/ffserver_config.c > index e44cdf7..a066e58 100644 > --- a/ffserver_config.c > +++ b/ffserver_config.c > @@ -358,8 +358,10 @@ static int ffserver_parse_config_global(FFServerConfig > *config, const char *cmd, > ffserver_get_arg(arg, sizeof(arg), p); > if (resolve_host(&config->http_addr.sin_addr, arg) != 0)
Re: [FFmpeg-devel] "OPW Qualification Task: Enable daemon mode for FFserver"
On 01.11.2014 17:20, Binathi Bingi wrote: +if (config.ffserver_daemon) { +int ffserver_id = 0; You may change int to pid_t too, which is actually returned by fork() +pid_t sid = 0; + +ffserver_id = fork(); ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/3] idet improvements: add current frame classification to metadata
On Sat, Nov 01, 2014 at 07:06:46AM -0700, Kevin Mitchell wrote: > This was requested following my initial patch adding the metadata. > Should resolve http://trac.ffmpeg.org/ticket/3832 > doc/filters.texi | 13 + > libavfilter/version.h |2 +- > libavfilter/vf_idet.c | 36 > 3 files changed, 34 insertions(+), 17 deletions(-) > 678a8c5327bdde56d5c2b2fa57051bea3da422de > 0001-avfilter-idet-add-current-frame-classification-to-me.patch > From 2c4f9c042a863ae370ff21058c9aa72e0d0c6d7e Mon Sep 17 00:00:00 2001 > From: Kevin Mitchell > Date: Sat, 1 Nov 2014 04:10:15 -0700 > Subject: [PATCH 1/3] avfilter/idet: add current frame classification to > metadata > > resolves #3832 > > also, add metadata to "current" frame instead of "next" frame and do > next to the av_log call > --- > doc/filters.texi | 13 + > libavfilter/version.h | 2 +- > libavfilter/vf_idet.c | 36 > 3 files changed, 34 insertions(+), 17 deletions(-) applied thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Concerning the gods, I have no means of knowing whether they exist or not or of what sort they may be, because of the obscurity of the subject, and the brevity of human life -- Protagoras signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/3] idet improvements: add reset_count feature
On Sat, Nov 01, 2014 at 07:08:53AM -0700, Kevin Mitchell wrote: > > doc/filters.texi |7 +++ > libavfilter/version.h |2 +- > libavfilter/vf_idet.c | 45 + > libavfilter/vf_idet.h |2 ++ > 4 files changed, 43 insertions(+), 13 deletions(-) > 5d2c485705ed33022dda83da39bd9f1fc28a97e5 > 0002-avfilter-vf_idet-add-a-reset_count-option-like-cropd.patch > From 2ac0c4b6bab752c92ffa615c028cd4582441f680 Mon Sep 17 00:00:00 2001 > From: Kevin Mitchell > Date: Sat, 1 Nov 2014 05:38:35 -0700 > Subject: [PATCH 2/3] avfilter/vf_idet: add a "reset_count" option like > cropdetect > > This can be useful for videos in which the interlacing pattern changes. > > Also log the total number of frames as metadata and with avlog. > --- > doc/filters.texi | 7 +++ > libavfilter/version.h | 2 +- > libavfilter/vf_idet.c | 45 + > libavfilter/vf_idet.h | 2 ++ > 4 files changed, 43 insertions(+), 13 deletions(-) > > diff --git a/doc/filters.texi b/doc/filters.texi > index 33f842b..2896978 100644 > --- a/doc/filters.texi > +++ b/doc/filters.texi > @@ -5583,6 +5583,9 @@ Multiple frame detection incorporates the > classification history of previous fra > The filter will log these metadata values: > > @table @option > +@item frames_total > +Total number of frames considered in current statistics. > + > @item single.current_frame > Detected type of current frame using single-frame detection. One of: > ``tff'' (top field first), ``bff'' (bottom field first), > @@ -5625,6 +5628,10 @@ The filter accepts the following options: > Set interlacing threshold. > @item prog_thres > Set progressive threshold. > +@item reset_count > +Number of frames after which idet will reset all previously collected > +statistics. The current statistics are logged before being > +destroyed. The default of 0 indicates 'never reset'. > @end table some kind of FIR or IIR filtering/windowing of the per frame data is probably better than sharply discarding data at data independant intervalls [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi: add xbr filter
Scale2x and xBR are very different. But they have implemented xBR also in their source code. Anyways, I found a good link --> " http://imgur.com/a/XAwx5"; for reference pictures. But, the answers are coming out to be different. Not sure, why this is happening. Maybe, it is because of different versions. On Sat, Nov 1, 2014 at 10:02 PM, Michael Niedermayer wrote: > On Sat, Nov 01, 2014 at 07:30:32PM +0530, arwa arif wrote: > > On Sat, Nov 1, 2014 at 4:40 PM, Stefano Sabatini > wrote: > > > > > On date Saturday 2014-11-01 04:27:24 +0530, arwa arif encoded: > > > [...] > > > > On Fri, Oct 31, 2014 at 6:31 PM, Stefano Sabatini < > stefa...@gmail.com> > > > > From 9b6b1d546247cf61b2f696835fb8a5e782d353ea Mon Sep 17 00:00:00 > 2001 > > > > From: Arwa Arif > > > > Date: Thu, 30 Oct 2014 22:06:20 +0530 > > > > Subject: [PATCH] [PATCH]lvafi: add xbr filter > > > > > > typo: lvafi > > > > > > > > > > > --- > > > > doc/filters.texi |5 + > > > > libavfilter/Makefile |1 + > > > > libavfilter/allfilters.c |1 + > > > > libavfilter/vf_xbr.c | 331 > > > ++ > > > > 4 files changed, 338 insertions(+) > > > > create mode 100644 libavfilter/vf_xbr.c > > > [...] > > > > > > Code looks good to me, apart a few cosmetics nits which I can fix > > > myself before pushing. > > > > > > About Michael's question, is it possible to compare it with the > > > reference filter? > > > > > > > I compared the output with the code from scale2x " > > http://scale2x.sourceforge.net/";. I have attached the ouput with this > mail. > > foobar.png denotes the original image. > > foobar_ref,png denotes the output from scale2x. > > foobar_out.png denotes the output from the code written. > > the ref and out images look somewhat different > also, what is the relation between scale2x and xbr ? > > http://scale2x.sourceforge.net/index.html > states that > "Other interesting effects are HQx and xBR. These effects are a bit slower > than Scale2x, but surely in the grasp of modern processors. " > > This does not sound like scale2x and xbr are the same thing > > [...] > > > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Freedom in capitalist society always remains about the same as it was in > ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] ffserver_config: improve AVOption handing
AVOption are checked right after found in config file. It allows to report exact line in config file. Options provided more than once are threated as errors. It also fixes flag options handing. Flags may occur more than once in config file. Signed-off-by: Lukasz Marek --- ffserver_config.c | 44 +--- ffserver_config.h | 1 + 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/ffserver_config.c b/ffserver_config.c index 045b791..cc8ee48 100644 --- a/ffserver_config.c +++ b/ffserver_config.c @@ -344,6 +344,27 @@ static int ffserver_set_float_param(float *dest, const char *value, float factor return AVERROR(EINVAL); } +static int ffserver_save_avoption(const char *opt, const char *arg, AVDictionary **dict, + int type, FFServerConfig *config, int line_num) +{ +int ret = 0; +AVDictionaryEntry *e; +const AVOption *o = av_opt_find(config->dummy_ctx, opt, NULL, type, AV_OPT_SEARCH_CHILDREN); +if (!o) { +report_config_error(config->filename, line_num, AV_LOG_ERROR, &config->errors, "Option not found: %s\n", opt); +} else if ((ret = av_opt_set(config->dummy_ctx, opt, arg, AV_OPT_SEARCH_CHILDREN)) < 0) { +report_config_error(config->filename, line_num, AV_LOG_ERROR, &config->errors, "Invalid value for option %s (%s): %s\n", opt, arg, av_err2str(ret)); +} else if ((e = av_dict_get(*dict, opt, NULL, 0))) { +if ((o->type == AV_OPT_TYPE_FLAGS) && arg && (arg[0] == '+' || arg[0] == '-')) +return av_dict_set(dict, opt, arg, AV_DICT_APPEND); +report_config_error(config->filename, line_num, AV_LOG_ERROR, &config->errors, +"Redeclaring value of the option %s, previous value: %s\n", opt, e->value); +} else if (av_dict_set(dict, opt, arg, 0) < 0) { +return AVERROR(ENOMEM); +} +return 0; +} + #define ERROR(...) report_config_error(config->filename, line_num, AV_LOG_ERROR, &config->errors, __VA_ARGS__) #define WARNING(...) report_config_error(config->filename, line_num, AV_LOG_WARNING, &config->warnings, __VA_ARGS__) @@ -517,7 +538,6 @@ static int ffserver_parse_config_feed(FFServerConfig *config, const char *cmd, c static int ffserver_apply_stream_config(AVCodecContext *enc, const AVDictionary *conf, AVDictionary **opts) { AVDictionaryEntry *e; -int ret = 0; /* Return values from ffserver_set_*_param are ignored. Values are initially parsed and checked before inserting to AVDictionary. */ @@ -589,13 +609,8 @@ static int ffserver_apply_stream_config(AVCodecContext *enc, const AVDictionary ffserver_set_int_param(&enc->bit_rate, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); av_opt_set_dict2(enc, opts, AV_OPT_SEARCH_CHILDREN); -e = NULL; -while (e = av_dict_get(*opts, "", e, AV_DICT_IGNORE_SUFFIX)) { -av_log(NULL, AV_LOG_ERROR, "Provided AVOption '%s' doesn't match any existing option.\n", e->key); -ret = AVERROR(EINVAL); -} -return ret; +return 0; } static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd, const char **p, @@ -613,6 +628,11 @@ static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd, stream = av_mallocz(sizeof(FFServerStream)); if (!stream) return AVERROR(ENOMEM); +config->dummy_ctx = avcodec_alloc_context3(NULL); +if (!config->dummy_ctx) { +av_free(stream); +return AVERROR(ENOMEM); +} ffserver_get_arg(stream->filename, sizeof(stream->filename), p); q = strrchr(stream->filename, '>'); if (q) @@ -806,14 +826,14 @@ static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd, goto nomem; } else if (!av_strcasecmp(cmd, "AVOptionVideo") || !av_strcasecmp(cmd, "AVOptionAudio")) { -AVDictionary **dict; +int ret; ffserver_get_arg(arg, sizeof(arg), p); ffserver_get_arg(arg2, sizeof(arg2), p); if (!av_strcasecmp(cmd, "AVOptionVideo")) -dict = &config->video_opts; +ret = ffserver_save_avoption(arg, arg2, &config->video_opts, AV_OPT_FLAG_VIDEO_PARAM ,config, line_num); else -dict = &config->audio_opts; -if (av_dict_set(dict, arg, arg2, 0) < 0) +ret = ffserver_save_avoption(arg, arg2, &config->audio_opts, AV_OPT_FLAG_AUDIO_PARAM ,config, line_num); +if (ret < 0) goto nomem; } else if (!av_strcasecmp(cmd, "AVPresetVideo") || !av_strcasecmp(cmd, "AVPresetAudio")) { @@ -911,6 +931,7 @@ static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd, av_dict_free(&config->video_conf); av_dict_free(&config->audio_opts); av_dict_free(&config->audio_conf); +avcodec_free_context(&config->dummy_ctx);
Re: [FFmpeg-devel] [PATCH] libavformat/assenc: Add ignore_gaps option
On Thu, Oct 30, 2014 at 08:16:08PM -0500, Rodger Combs wrote: > > > On Oct 30, 2014, at 07:48, wm4 wrote: > > ... > > The option name is a bit unspecific - how about "ignore_readorder"? > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > No objections here; new patch: > From 369cf0366a8d03f6a4b2d746ae420e42a18fcb34 Mon Sep 17 00:00:00 2001 > From: Rodger Combs > Date: Thu, 30 Oct 2014 04:33:17 -0500 > Subject: [PATCH] avformat/assenc: Ass ignore_readorder option > > --- > libavformat/assenc.c | 21 - > 1 file changed, 20 insertions(+), 1 deletion(-) > Bumped and applied, thanks [...] -- Clément B. pgpDvy8QT7_3C.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avformat: add webp muxer
On Sat, Nov 01, 2014 at 11:40:33AM +0100, Michael Niedermayer wrote: > On Sat, Nov 01, 2014 at 10:21:20AM +, Carl Eugen Hoyos wrote: > > Michael Niedermayer gmx.at> writes: > > > > > +{ "loop", "Number of times to loop the output: 0 - infinite loop", > > > OFFSET(loop), > > > + AV_OPT_TYPE_INT, { .i64 = 1 }, -1, 65535, ENC }, > > > > What effect does "-1" have? > > same as 65535, removed -1 patch applied [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User questions about the command line tools should be sent to the ffmpeg-user ML. And questions about how to use libav* should be sent to the libav-user ML. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] avcodec/libwebpenc: support "P" frames in webp animations
On Sat, Nov 01, 2014 at 11:57:31AM +0100, Michael Niedermayer wrote: > On Sat, Nov 01, 2014 at 10:54:33AM +0100, Clément Bœsch wrote: > > On Fri, Oct 31, 2014 at 04:48:08PM +0100, Michael Niedermayer wrote: > > > Signed-off-by: Michael Niedermayer > > > --- > > > libavcodec/libwebpenc.c | 80 > > > +-- > > > 1 file changed, 77 insertions(+), 3 deletions(-) > > > > > > diff --git a/libavcodec/libwebpenc.c b/libavcodec/libwebpenc.c > > > index 4cb8dc3..c7f9784 100644 > > > --- a/libavcodec/libwebpenc.c > > > +++ b/libavcodec/libwebpenc.c > > [...] > > > +alt_frame->format = AV_PIX_FMT_YUVA420P; > > > +for (y = 0; y < frame->height; y+= bs) { > > > +for (x = 0; x < frame->width; x+= bs) { > > > +int skip; > > > +int sse = 0; > > > +for (p = 0; p < 3; p++) { > > > +int bs2 = bs >> !!p; > > > > > +int w = frame->width >> !!p; > > > +int h = frame->height >> !!p; > > > > Does it work with odd dimensions? Same below > > yes it works, and replaced by > int w = FF_CEIL_RSHIFT(frame->width , !!p); > int h = FF_CEIL_RSHIFT(frame->height, !!p); > same for the 2nd occurance patch applied [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB During times of universal deceit, telling the truth becomes a revolutionary act. -- George Orwell signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avcodec/libwebpenc: add quality option
previously quality could only be set through qscale/global_quality but the scale was inverted. Using a separate option avoids the confusion from qscale working backward. Signed-off-by: Michael Niedermayer --- libavcodec/libwebpenc.c |8 libavcodec/version.h|2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/libwebpenc.c b/libavcodec/libwebpenc.c index c4c880f..95d56ac 100644 --- a/libavcodec/libwebpenc.c +++ b/libavcodec/libwebpenc.c @@ -65,10 +65,9 @@ static av_cold int libwebp_encode_init(AVCodecContext *avctx) LibWebPContext *s = avctx->priv_data; int ret; -if (avctx->global_quality < 0) -avctx->global_quality = 75 * FF_QP2LAMBDA; -s->quality = av_clipf(avctx->global_quality / (float)FF_QP2LAMBDA, - 0.0f, 100.0f); +if (avctx->global_quality >= 0) +s->quality = av_clipf(avctx->global_quality / (float)FF_QP2LAMBDA, + 0.0f, 100.0f); if (avctx->compression_level < 0 || avctx->compression_level > 6) { av_log(avctx, AV_LOG_WARNING, "invalid compression level: %d\n", @@ -327,6 +326,7 @@ static const AVOption options[] = { { "text", "text-like",0, AV_OPT_TYPE_CONST, { .i64 = WEBP_PRESET_TEXT}, 0, 0, VE, "preset" }, { "cr_threshold","Conditional replenishment threshold", OFFSET(cr_threshold), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, { "cr_size" ,"Conditional replenishment block size", OFFSET(cr_size) , AV_OPT_TYPE_INT, { .i64 = 16 }, 0, 256, VE }, +{ "quality" ,"Quality",OFFSET(quality), AV_OPT_TYPE_FLOAT, { .dbl = 75 }, 0, 100, VE }, { NULL }, }; diff --git a/libavcodec/version.h b/libavcodec/version.h index ea9207a..c0fd259 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -30,7 +30,7 @@ #define LIBAVCODEC_VERSION_MAJOR 56 #define LIBAVCODEC_VERSION_MINOR 10 -#define LIBAVCODEC_VERSION_MICRO 101 +#define LIBAVCODEC_VERSION_MICRO 102 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/4] ffserver_config: drop requirement video size being multiple of 16
Hi On 10/31/2014 11:00 PM, Lukasz Marek wrote: > [..] > diff --git a/ffserver_config.c b/ffserver_config.c > index d589ff2..f11db03 100644 > --- a/ffserver_config.c > +++ b/ffserver_config.c > @@ -819,8 +819,6 @@ static int ffserver_parse_config_stream(FFServerConfig > *config, const char *cmd, > ret = av_parse_video_size(&w, &h, arg); > if (ret < 0) > ERROR("Invalid video size '%s'\n", arg); > -else if ((w % 16) || (h % 16)) > -ERROR("Image size must be a multiple of 16\n"); > [..] OK if always safe. Otherwise demote to WARNING() Feel free to push otherwise. Bests, -- Reynaldo H. Verdejo Pinochet Open Source Group Samsung Research America / Silicon Valley ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/4] ffserver_config: drop presets support
Patch seems OK but I'm missing on the rationalle behind dropping the preset support. Can you elaborate? Bests, -- Reynaldo H. Verdejo Pinochet Open Source Group Samsung Research America / Silicon Valley ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/4] ffserver_config: improve error handling
Hi On 10/31/2014 11:00 PM, Lukasz Marek wrote: > [..] > @@ -356,9 +356,7 @@ static int ffserver_parse_config_global(FFServerConfig > *config, const char *cmd, > if (!av_strcasecmp(cmd, "Port")) > WARNING("Port option is deprecated, use HTTPPort instead\n"); > ffserver_get_arg(arg, sizeof(arg), p); > -val = atoi(arg); > -if (val < 1 || val > 65536) > -ERROR("Invalid port: %s\n", arg); > +ffserver_set_int_param(&val, arg, 0, 1, 65535, config, line_num, > "Invalid port: %s\n", arg); > if (val < 1024) > WARNING("Trying to use IETF assigned system port: %d\n", val); > config->http_addr.sin_port = htons(val); > @@ -367,37 +365,38 @@ static int ffserver_parse_config_global(FFServerConfig > *config, const char *cmd, > WARNING("BindAddress option is deprecated, use HTTPBindAddress > instead\n"); > ffserver_get_arg(arg, sizeof(arg), p); > if (resolve_host(&config->http_addr.sin_addr, arg) != 0) > -ERROR("%s:%d: Invalid host/IP address: %s\n", arg); > +ERROR("Invalid host/IP address: %s\n", arg); > } else if (!av_strcasecmp(cmd, "NoDaemon")) { > WARNING("NoDaemon option has no effect, you should remove it\n"); > } else if (!av_strcasecmp(cmd, "RTSPPort")) { > ffserver_get_arg(arg, sizeof(arg), p); > -val = atoi(arg); > -if (val < 1 || val > 65536) > -ERROR("%s:%d: Invalid port: %s\n", arg); > -config->rtsp_addr.sin_port = htons(atoi(arg)); > +ffserver_set_int_param(&val, arg, 0, 1, 65535, config, line_num, > "Invalid port: %s\n", arg); > +config->rtsp_addr.sin_port = htons(val); > } else if (!av_strcasecmp(cmd, "RTSPBindAddress")) { > ffserver_get_arg(arg, sizeof(arg), p); > if (resolve_host(&config->rtsp_addr.sin_addr, arg) != 0) > ERROR("Invalid host/IP address: %s\n", arg); > } else if (!av_strcasecmp(cmd, "MaxHTTPConnections")) { > ffserver_get_arg(arg, sizeof(arg), p); > -val = atoi(arg); > -if (val < 1 || val > 65536) > -ERROR("Invalid MaxHTTPConnections: %s\n", arg); > +ffserver_set_int_param(&val, arg, 0, 1, 65535, config, line_num, > "Invalid MaxHTTPConnections: %s\n", arg); I don't think we should be capping MaxHTTPConnections at 65535. If there's a reason then FFServerConfig.nb_max_http_connections type needs to be revised too? > config->nb_max_http_connections = val; > +if (config->nb_max_connections > config->nb_max_http_connections) > +ERROR("Inconsistent configuration: MaxClients(%d) > > MaxHTTPConnections(%d)\n", > + config->nb_max_connections, > config->nb_max_http_connections); > } else if (!av_strcasecmp(cmd, "MaxClients")) { > ffserver_get_arg(arg, sizeof(arg), p); > -val = atoi(arg); > -if (val < 1 || val > config->nb_max_http_connections) > -ERROR("Invalid MaxClients: %s\n", arg); > -else > -config->nb_max_connections = val; > +ffserver_set_int_param(&val, arg, 0, 1, 65535, config, line_num, > "Invalid MaxClients: %s\n", arg); > +config->nb_max_connections = val; > +if (config->nb_max_connections > config->nb_max_http_connections) > +ERROR("Inconsistent configuration: MaxClients(%d) > > MaxHTTPConnections(%d)\n", > + config->nb_max_connections, > config->nb_max_http_connections); Same as above > [...] > @@ -500,6 +499,9 @@ static int ffserver_parse_config_feed(FFServerConfig > *config, const char *cmd, c > case 'G': > fsize *= 1024 * 1024 * 1024; > break; > +default: > +ERROR("Invalid file size: %s\n", arg); > +break; > } > feed->feed_max_size = (int64_t)fsize; > if (feed->feed_max_size < FFM_PACKET_SIZE*4) > @@ -876,11 +878,15 @@ static int ffserver_parse_config_stream(FFServerConfig > *config, const char *cmd, > stream->is_multicast = 1; > stream->loop = 1; /* default is looping */ > } else if (!av_strcasecmp(cmd, "MulticastPort")) { > +int val; > ffserver_get_arg(arg, sizeof(arg), p); > -stream->multicast_port = atoi(arg); > +ffserver_set_int_param(&val, arg, 0, 1, 65535, config, line_num, > "Invalid MulticastPort: %s\n", arg); > +stream->multicast_port = val; > } else if (!av_strcasecmp(cmd, "MulticastTTL")) { > +int val; Maybe declare val once at the beginning of ffserver_parse_config_stream() Rest looks OK. Bests, -- Reynaldo H. Verdejo Pinochet Open Source Group Samsung Research America / Silicon Valley ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi: add xbr filter
On Sat, Nov 01, 2014 at 11:35:11PM +0530, arwa arif wrote: > Scale2x and xBR are very different. But they have implemented xBR also in > their source code. Anyways, I found a good link --> " > http://imgur.com/a/XAwx5"; for reference pictures. But, the answers are > coming out to be different. Not sure, why this is happening. Maybe, it is > because of different versions. the version which you implemented, where is the reference code for that ? can it be build on linux or windows ? if so we could build it and test against that > > On Sat, Nov 1, 2014 at 10:02 PM, Michael Niedermayer > wrote: > > > On Sat, Nov 01, 2014 at 07:30:32PM +0530, arwa arif wrote: > > > On Sat, Nov 1, 2014 at 4:40 PM, Stefano Sabatini > > wrote: > > > > > > > On date Saturday 2014-11-01 04:27:24 +0530, arwa arif encoded: > > > > [...] > > > > > On Fri, Oct 31, 2014 at 6:31 PM, Stefano Sabatini < > > stefa...@gmail.com> > > > > > From 9b6b1d546247cf61b2f696835fb8a5e782d353ea Mon Sep 17 00:00:00 > > 2001 > > > > > From: Arwa Arif > > > > > Date: Thu, 30 Oct 2014 22:06:20 +0530 > > > > > Subject: [PATCH] [PATCH]lvafi: add xbr filter > > > > > > > > typo: lvafi > > > > > > > > > > > > > > --- > > > > > doc/filters.texi |5 + > > > > > libavfilter/Makefile |1 + > > > > > libavfilter/allfilters.c |1 + > > > > > libavfilter/vf_xbr.c | 331 > > > > ++ > > > > > 4 files changed, 338 insertions(+) > > > > > create mode 100644 libavfilter/vf_xbr.c > > > > [...] > > > > > > > > Code looks good to me, apart a few cosmetics nits which I can fix > > > > myself before pushing. > > > > > > > > About Michael's question, is it possible to compare it with the > > > > reference filter? > > > > > > > > > > I compared the output with the code from scale2x " > > > http://scale2x.sourceforge.net/";. I have attached the ouput with this > > mail. > > > foobar.png denotes the original image. > > > foobar_ref,png denotes the output from scale2x. > > > foobar_out.png denotes the output from the code written. > > > > the ref and out images look somewhat different > > also, what is the relation between scale2x and xbr ? > > > > http://scale2x.sourceforge.net/index.html > > states that > > "Other interesting effects are HQx and xBR. These effects are a bit slower > > than Scale2x, but surely in the grasp of modern processors. " > > > > This does not sound like scale2x and xbr are the same thing > > > > [...] > > > > > > -- > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > > > Freedom in capitalist society always remains about the same as it was in > > ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin > > > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Opposition brings concord. Out of discord comes the fairest harmony. -- Heraclitus signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/4] ffserver_config: dont pass pointer to enum as pointer to int
Looks OK. Feel free to push. Bests, -- Reynaldo H. Verdejo Pinochet Open Source Group Samsung Research America / Silicon Valley ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/4] ffserver_config: drop presets support
On 01.11.2014 22:27, Reynaldo H. Verdejo Pinochet wrote: Patch seems OK but I'm missing on the rationalle behind dropping the preset support. Can you elaborate? Patch 1 and 2 are just suggestion from previous reviews by Stefano. Regarding presents itself I have no pressure to remove it, but I agree with Stefano that it seems to be dead feature. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/4] ffserver_config: improve error handling
On 01.11.2014 23:06, Reynaldo H. Verdejo Pinochet wrote: Hi On 10/31/2014 11:00 PM, Lukasz Marek wrote: [..] @@ -356,9 +356,7 @@ static int ffserver_parse_config_global(FFServerConfig *config, const char *cmd, if (!av_strcasecmp(cmd, "Port")) WARNING("Port option is deprecated, use HTTPPort instead\n"); ffserver_get_arg(arg, sizeof(arg), p); -val = atoi(arg); -if (val < 1 || val > 65536) -ERROR("Invalid port: %s\n", arg); +ffserver_set_int_param(&val, arg, 0, 1, 65535, config, line_num, "Invalid port: %s\n", arg); if (val < 1024) WARNING("Trying to use IETF assigned system port: %d\n", val); config->http_addr.sin_port = htons(val); @@ -367,37 +365,38 @@ static int ffserver_parse_config_global(FFServerConfig *config, const char *cmd, WARNING("BindAddress option is deprecated, use HTTPBindAddress instead\n"); ffserver_get_arg(arg, sizeof(arg), p); if (resolve_host(&config->http_addr.sin_addr, arg) != 0) -ERROR("%s:%d: Invalid host/IP address: %s\n", arg); +ERROR("Invalid host/IP address: %s\n", arg); } else if (!av_strcasecmp(cmd, "NoDaemon")) { WARNING("NoDaemon option has no effect, you should remove it\n"); } else if (!av_strcasecmp(cmd, "RTSPPort")) { ffserver_get_arg(arg, sizeof(arg), p); -val = atoi(arg); -if (val < 1 || val > 65536) -ERROR("%s:%d: Invalid port: %s\n", arg); -config->rtsp_addr.sin_port = htons(atoi(arg)); +ffserver_set_int_param(&val, arg, 0, 1, 65535, config, line_num, "Invalid port: %s\n", arg); +config->rtsp_addr.sin_port = htons(val); } else if (!av_strcasecmp(cmd, "RTSPBindAddress")) { ffserver_get_arg(arg, sizeof(arg), p); if (resolve_host(&config->rtsp_addr.sin_addr, arg) != 0) ERROR("Invalid host/IP address: %s\n", arg); } else if (!av_strcasecmp(cmd, "MaxHTTPConnections")) { ffserver_get_arg(arg, sizeof(arg), p); -val = atoi(arg); -if (val < 1 || val > 65536) -ERROR("Invalid MaxHTTPConnections: %s\n", arg); +ffserver_set_int_param(&val, arg, 0, 1, 65535, config, line_num, "Invalid MaxHTTPConnections: %s\n", arg); I don't think we should be capping MaxHTTPConnections at 65535. If there's a reason then FFServerConfig.nb_max_http_connections type needs to be revised too? I decreased it by 1 automatically rather than for any reason. I didn't want to change logic where it was not needed, and it was not needed here. I guess you ask in general if there should be a limit (not just it is 65535 or 6). I don't know, but as I stated before, I don't want to change the limit, just int parsing routine. If you wish I can change back to 65536 or to INT_MAX, but I want it to be clear it is not my original intention. :) [...] @@ -500,6 +499,9 @@ static int ffserver_parse_config_feed(FFServerConfig *config, const char *cmd, c case 'G': fsize *= 1024 * 1024 * 1024; break; +default: +ERROR("Invalid file size: %s\n", arg); +break; } feed->feed_max_size = (int64_t)fsize; if (feed->feed_max_size < FFM_PACKET_SIZE*4) @@ -876,11 +878,15 @@ static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd, stream->is_multicast = 1; stream->loop = 1; /* default is looping */ } else if (!av_strcasecmp(cmd, "MulticastPort")) { +int val; ffserver_get_arg(arg, sizeof(arg), p); -stream->multicast_port = atoi(arg); +ffserver_set_int_param(&val, arg, 0, 1, 65535, config, line_num, "Invalid MulticastPort: %s\n", arg); +stream->multicast_port = val; } else if (!av_strcasecmp(cmd, "MulticastTTL")) { +int val; Maybe declare val once at the beginning of ffserver_parse_config_stream() OK, will do that locally. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/4] ffserver_config: improve error handling
On 11/01/2014 07:59 PM, Lukasz Marek wrote: > [..] > > I decreased it by 1 automatically rather than for any reason. I didn't > want to change logic where it was not needed, and it was not needed > here. I guess you ask in general if there should be a limit (not just it > is 65535 or 6). I don't know, but as I stated before, I don't want to > change the limit, just int parsing routine. If you wish I can change > back to 65536 or to INT_MAX, but I want it to be clear it is not my > original intention. :) > Fair enough. We can work on those limits latter on. > > OK, will do that locally. > Thanks. Feel free to push afterward. Bests, -- Reynaldo H. Verdejo Pinochet Open Source Group Samsung Research America / Silicon Valley ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/4] ffserver_config: dont pass pointer to enum as pointer to int
On 1 November 2014 23:07, Reynaldo H. Verdejo Pinochet < reyna...@osg.samsung.com> wrote: > Looks OK. Feel free to push. > Pushed this one ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/4] ffserver_config: drop presets support
Hi On 11/01/2014 07:42 PM, Lukasz Marek wrote: > [..] > > Patch 1 and 2 are just suggestion from previous reviews by Stefano. > Regarding presents itself I have no pressure to remove it, but I agree > with Stefano that it seems to be dead feature. > Got it. My take on these matters is usually that if the feature works and does no harm, then keep it. Maybe there's someone relying on this. I will try getting others to comment on and decide. For the time been though I think there might be a missing and needed change to the ffserver docs for this patch to be complete. Bests, -- Reynaldo H. Verdejo Pinochet Open Source Group Samsung Research America / Silicon Valley ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/4] ffserver_config: drop presets support
On 2 November 2014 00:15, Reynaldo H. Verdejo Pinochet < reyna...@osg.samsung.com> wrote: > Hi > > On 11/01/2014 07:42 PM, Lukasz Marek wrote: > > [..] > > > > Patch 1 and 2 are just suggestion from previous reviews by Stefano. > > Regarding presents itself I have no pressure to remove it, but I agree > > with Stefano that it seems to be dead feature. > > > > Got it. My take on these matters is usually that if the feature > works and does no harm, then keep it. I agree in general. > Maybe there's someone relying > on this. I will try getting others to comment on and decide. For > the time been though I think there might be a missing and needed > change to the ffserver docs for this patch to be complete. Right, I forgot about doc. I agree to wait for other comments, ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/3] idet improvements: add reset_count feature
Ok, changed to half life. On Sat, Nov 1, 2014 at 10:52 AM, Michael Niedermayer wrote: > On Sat, Nov 01, 2014 at 07:08:53AM -0700, Kevin Mitchell wrote: >> > >> doc/filters.texi |7 +++ >> libavfilter/version.h |2 +- >> libavfilter/vf_idet.c | 45 + >> libavfilter/vf_idet.h |2 ++ >> 4 files changed, 43 insertions(+), 13 deletions(-) >> 5d2c485705ed33022dda83da39bd9f1fc28a97e5 >> 0002-avfilter-vf_idet-add-a-reset_count-option-like-cropd.patch >> From 2ac0c4b6bab752c92ffa615c028cd4582441f680 Mon Sep 17 00:00:00 2001 >> From: Kevin Mitchell >> Date: Sat, 1 Nov 2014 05:38:35 -0700 >> Subject: [PATCH 2/3] avfilter/vf_idet: add a "reset_count" option like >> cropdetect >> >> This can be useful for videos in which the interlacing pattern changes. >> >> Also log the total number of frames as metadata and with avlog. >> --- >> doc/filters.texi | 7 +++ >> libavfilter/version.h | 2 +- >> libavfilter/vf_idet.c | 45 + >> libavfilter/vf_idet.h | 2 ++ >> 4 files changed, 43 insertions(+), 13 deletions(-) >> >> diff --git a/doc/filters.texi b/doc/filters.texi >> index 33f842b..2896978 100644 >> --- a/doc/filters.texi >> +++ b/doc/filters.texi >> @@ -5583,6 +5583,9 @@ Multiple frame detection incorporates the >> classification history of previous fra >> The filter will log these metadata values: >> >> @table @option >> +@item frames_total >> +Total number of frames considered in current statistics. >> + >> @item single.current_frame >> Detected type of current frame using single-frame detection. One of: >> ``tff'' (top field first), ``bff'' (bottom field first), >> @@ -5625,6 +5628,10 @@ The filter accepts the following options: >> Set interlacing threshold. >> @item prog_thres >> Set progressive threshold. >> +@item reset_count >> +Number of frames after which idet will reset all previously collected >> +statistics. The current statistics are logged before being >> +destroyed. The default of 0 indicates 'never reset'. >> @end table > > some kind of FIR or IIR filtering/windowing of the per frame data is > probably better than sharply discarding data at data independant > intervalls > > > [...] > > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > From fa3c0a70a41afb2432278b7a16b5b0de4a5f354a Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Sat, 1 Nov 2014 17:17:04 -0700 Subject: [PATCH 1/2] avfilter/vf_idet: add a "half_life" option for statistics This can be useful for videos in which the interlacing pattern changes. Also log the total number of frames as metadata and with avlog. --- doc/filters.texi | 16 +-- libavfilter/version.h | 2 +- libavfilter/vf_idet.c | 79 +++ libavfilter/vf_idet.h | 8 -- 4 files changed, 75 insertions(+), 30 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 33f842b..b12beae 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5574,15 +5574,19 @@ value. Detect video interlacing type. -This filter tries to detect if the input is interlaced or progressive, +This filter tries to detect the input frames as interlaced, progressive, top or bottom field first. -Single frame detection considers only immediately adjacent frames when classifying each frame. -Multiple frame detection incorporates the classification history of previous frames. +There are two detection modes. Single frame detection considers only +immediately adjacent frames when classifying each frame. Multiple frame +detection incorporates the classification history of previous frames. The filter will log these metadata values: @table @option +@item frames_total +Total number of frames considered in current statistics. + @item single.current_frame Detected type of current frame using single-frame detection. One of: ``tff'' (top field first), ``bff'' (bottom field first), @@ -5616,6 +5620,7 @@ Cumulative number of frames that could not be classified using single-frame dete @item multiple.undetermined Cumulative number of frames that could not be classified using multiple-frame detection. + @end table The filter accepts the following options: @@ -5625,6 +5630,11 @@ The filter accepts the following options: Set interlacing threshold. @item prog_thres Set progressive threshold. +@item half_life +Number of frames after which a given frame's contribution to the +statistics is halved (i.e., it contributes only 0.5 to it's +classification). The default of 0 means that all frames seen are given +full weight of 1.0 forever. @end table @section il diff --git a/libavfilter/version.h b/libavfilter/version.h index 440c587
Re: [FFmpeg-devel] [PATCH 3/3] idet improvements: add repeated field detection
Updated to fit with half life patch On Sat, Nov 1, 2014 at 7:12 AM, Kevin Mitchell wrote: > From d31cbea4430043ad71f8ad3f099ee8cbbc997875 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Sat, 1 Nov 2014 05:38:35 -0700 Subject: [PATCH 2/2] avfilter/vf_idet: add a repeated field detection This can be useful for determining telecine. --- doc/filters.texi | 18 -- libavfilter/version.h | 2 +- libavfilter/vf_idet.c | 40 +++- libavfilter/vf_idet.h | 8 4 files changed, 64 insertions(+), 4 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index b12beae..5a5ac87 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5574,8 +5574,9 @@ value. Detect video interlacing type. -This filter tries to detect the input frames as interlaced, progressive, -top or bottom field first. +This filter tries to detect if the input frames as interlaced, progressive, +top or bottom field first. It will also try and detect fields that are +repeated between adjacent frames (a sign of telecine). There are two detection modes. Single frame detection considers only immediately adjacent frames when classifying each frame. Multiple frame @@ -5621,6 +5622,17 @@ Cumulative number of frames that could not be classified using single-frame dete @item multiple.undetermined Cumulative number of frames that could not be classified using multiple-frame detection. +@item repeated.current_frame +Which field in the current frame is repeated from the last. One of ``neither'', ``top'', or ``bottom''. + +@item repeated.neither +Cumulative number of frames with no repeated field. + +@item repeated.top +Cumulative number of frames with the top field repeated from the previous frame's top field. + +@item repeated.bottom +Cumulative number of frames with the bottom field repeated from the previous frame's bottom field. @end table The filter accepts the following options: @@ -5630,6 +5642,8 @@ The filter accepts the following options: Set interlacing threshold. @item prog_thres Set progressive threshold. +@item repeat_thres +Threshold for repeated field detection. @item half_life Number of frames after which a given frame's contribution to the statistics is halved (i.e., it contributes only 0.5 to it's diff --git a/libavfilter/version.h b/libavfilter/version.h index dab9b45..6f61aee 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -31,7 +31,7 @@ #define LIBAVFILTER_VERSION_MAJOR 5 #define LIBAVFILTER_VERSION_MINOR 2 -#define LIBAVFILTER_VERSION_MICRO 102 +#define LIBAVFILTER_VERSION_MICRO 103 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ LIBAVFILTER_VERSION_MINOR, \ diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index b6a42ce..ad1fa54 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -32,6 +32,7 @@ static const AVOption idet_options[] = { { "intl_thres", "set interlacing threshold", OFFSET(interlace_threshold), AV_OPT_TYPE_FLOAT, {.dbl = 1.04}, -1, FLT_MAX, FLAGS }, { "prog_thres", "set progressive threshold", OFFSET(progressive_threshold), AV_OPT_TYPE_FLOAT, {.dbl = 1.5}, -1, FLT_MAX, FLAGS }, +{ "rep_thres", "set repeat threshold", OFFSET(repeat_threshold), AV_OPT_TYPE_FLOAT, {.dbl = 3.0}, -1, FLT_MAX, FLAGS }, { "half_life", "half life of cumulative statistics", OFFSET(half_life), AV_OPT_TYPE_FLOAT, { .dbl = 0.0 }, -1, INT_MAX, FLAGS }, { NULL } }; @@ -57,6 +58,16 @@ static int av_dict_set_float(AVDictionary **pm, const char *key, float value, return av_dict_set(pm, key, valuestr, flags); } +static const char *rep2str(RepeatedField repeated_field) +{ +switch(repeated_field) { +case REPEAT_NONE: return "neither"; +case REPEAT_TOP : return "top"; +case REPEAT_BOTTOM : return "bottom"; +} +return NULL; +} + int ff_idet_filter_line_c(const uint8_t *a, const uint8_t *b, const uint8_t *c, int w) { int x; @@ -87,6 +98,12 @@ static void log_cumulative_stats(AVFilterContext *ctx) { IDETContext *idet = ctx->priv; +av_log(ctx, AV_LOG_INFO, "Repeated Fields: Neither:%6.1f Top:%6.1f Bottom:%6.1f Total: %6.1f\n", + idet->repeats[REPEAT_NONE], + idet->repeats[REPEAT_TOP], + idet->repeats[REPEAT_BOTTOM], + idet->frames_total +); av_log(ctx, AV_LOG_INFO, "Single frame detection: TFF:%6.1f BFF:%6.1f Progressive:%6.1f Undetermined:%6.1f Total: %6.1f\n", idet->prestat[TFF], idet->prestat[BFF], @@ -109,7 +126,9 @@ static void filter(AVFilterContext *ctx) int y, i; int64_t alpha[2]={0}; int64_t delta=0; +int64_t gamma[2]={0}; Type type, best_type; +RepeatedField repeat; int match = 0; AVDictionary **metadata = avpriv_frame_get_metadatap(idet->cur); @@ -130,6 +149,7 @@ static void filter(AVFilterContext *ct
Re: [FFmpeg-devel] [PATCH] lavfi: add xbr filter
On Sun, Nov 2, 2014 at 3:36 AM, Michael Niedermayer wrote: > On Sat, Nov 01, 2014 at 11:35:11PM +0530, arwa arif wrote: > > Scale2x and xBR are very different. But they have implemented xBR also in > > their source code. Anyways, I found a good link --> " > > http://imgur.com/a/XAwx5"; for reference pictures. But, the answers are > > coming out to be different. Not sure, why this is happening. Maybe, it is > > because of different versions. > > the version which you implemented, where is the reference code for > that ? > can it be build on linux or windows ? > if so we could build it and test against that > > > > > > On Sat, Nov 1, 2014 at 10:02 PM, Michael Niedermayer > > wrote: > > > > > On Sat, Nov 01, 2014 at 07:30:32PM +0530, arwa arif wrote: > > > > On Sat, Nov 1, 2014 at 4:40 PM, Stefano Sabatini > > > > wrote: > > > > > > > > > On date Saturday 2014-11-01 04:27:24 +0530, arwa arif encoded: > > > > > [...] > > > > > > On Fri, Oct 31, 2014 at 6:31 PM, Stefano Sabatini < > > > stefa...@gmail.com> > > > > > > From 9b6b1d546247cf61b2f696835fb8a5e782d353ea Mon Sep 17 00:00:00 > > > 2001 > > > > > > From: Arwa Arif > > > > > > Date: Thu, 30 Oct 2014 22:06:20 +0530 > > > > > > Subject: [PATCH] [PATCH]lvafi: add xbr filter > > > > > > > > > > typo: lvafi > > > > > > > > > > > > > > > > > --- > > > > > > doc/filters.texi |5 + > > > > > > libavfilter/Makefile |1 + > > > > > > libavfilter/allfilters.c |1 + > > > > > > libavfilter/vf_xbr.c | 331 > > > > > ++ > > > > > > 4 files changed, 338 insertions(+) > > > > > > create mode 100644 libavfilter/vf_xbr.c > > > > > [...] > > > > > > > > > > Code looks good to me, apart a few cosmetics nits which I can fix > > > > > myself before pushing. > > > > > > > > > > About Michael's question, is it possible to compare it with the > > > > > reference filter? > > > > > > > > > > > > > I compared the output with the code from scale2x " > > > > http://scale2x.sourceforge.net/";. I have attached the ouput with > this > > > mail. > > > > foobar.png denotes the original image. > > > > foobar_ref,png denotes the output from scale2x. > > > > foobar_out.png denotes the output from the code written. > > > > > > the ref and out images look somewhat different > > > also, what is the relation between scale2x and xbr ? > > > > > > http://scale2x.sourceforge.net/index.html > > > states that > > > "Other interesting effects are HQx and xBR. These effects are a bit > slower > > > than Scale2x, but surely in the grasp of modern processors. " > > > > > > This does not sound like scale2x and xbr are the same thing > > > > > > [...] > > > > > > > > > -- > > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > > > > > Freedom in capitalist society always remains about the same as it was > in > > > ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin > > > > > > ___ > > > ffmpeg-devel mailing list > > > ffmpeg-devel@ffmpeg.org > > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > > > > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > > Opposition brings concord. Out of discord comes the fairest harmony. > -- Heraclitus > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > The reference code I used was "https://github.com/carlosascari/2xBR-Filter";. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] doc/codecs: Better documentation for the libavcodec bitexact flag
On Friday, October 31, 2014, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > > --- > doc/codecs.texi |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/doc/codecs.texi b/doc/codecs.texi > index 2bb6059..5cf2dc0 100644 > --- a/doc/codecs.texi > +++ b/doc/codecs.texi > @@ -71,7 +71,7 @@ Force low delay. > @item global_header > Place global headers in extradata instead of every keyframe. > @item bitexact > -Use only bitexact stuff (except (I)DCT). > +Only write binary portable, build and time independant data. (except > (I)DCT). > What is "binary portable"? Also, it should be "build- and time-independent." I would prefer if you can add the word "reproducible" somewhere in it as well. Timothy ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [patch 1/3]Fix bug for POWER LE: /libavcodec/ppc/me_cmp.c
你好: Hi, On Friday, October 31, 2014, Michael Niedermayer wrote: > > Why do you keep sending patches which duplicate code? > > Maybe someone can translate this to a language you understand > better then english: This is an Chinese translation. Hope this helps. 我把Michael的邮件翻译了一下。 > > Code duplication is not allowed 请不要重复使用同一个代码。如果有几种不同的版本的代码,请不要做这个: > > #if A > foo > this > bar > #else > foo > that > bar > #endif 这样,foo和bar被重复使用了。如果我们以后在更改第一条"foo"时很容易会把第二条foo忘了。请使用这样的格式: > > foo > #if A > this > #else > that > #endif > bar > 这样,不仅让代码跟容易阅读,以后出错的可能性会更小。 > > also the then remaining difference (this vs that) should be avoided > as well by using appropriate macros and inline functions 如果可能的话,您还可以把不同的部分用一个宏来简化。比如说: (放在文件头里) #ifdef HAVE_BIGENDIAN #define DIFFERENT_PART this #else #define DIFFERENT_PART that #endif (放在源代码里) foo DIFFERENT_PART bar > there is already some duplicated code in there, this was a mistake. 现在FFmpeg已经有一些重复的代码。这是一个我们以前犯的错误。 > No more duplicated code should be added. 请不要再添加新的重复的代码。 如果你还有问题,我们一定会尽我们全力解释。 Timothy ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] New FATE Server Based on Node.js
Hi all, ## Background For the past few weeks I have taken the liberty of learning Node.js. The inefficient godly Perl CGI code of fateserver obviously served as a non-example during my learning process. In the end, I decided to rewrite fateserver in asynchronous Javascript with Express.js and EJS. The result is much better in all perspectives: easier-to-read templates, clean routing code, and most importantly, it is much faster than I have previously thought. ## Changes from the Perl CGI fateserver I have restyled the history and result pages to be a little bit more mobile-friendly and modern. The `summary` files are now stored in JSON format, although support for the older colon-separated format is also written. The URL scheme is now changed to: /history/:slot /report/:slot/:time /log/:slot/:time/:log although the old `.cgi?slot=` scheme is still supported. ## To-Dos Nevertheless, this is still an WIP. I have written history, results, and log pages, but not yet the index page. There might be bugs I have not discovered. The source is covered with redundant file existence checks that can be eliminated after the server is finished. I also want to add branch support. ## Demos and Benchmarks A demo is up on http://104.131.148.213:8080/history/tgdo-test-nothing. Feel free to click on the report buttons. A preliminary benchmark (versusing the old fateserver) is available on https://gist.github.com/TimothyGu/356e0cf6ce5e62ac6910 The results page has gone through some serious scripting so the performance gain is not as significant as the history page, but still sweet. A quick gallery is on https://gist.github.com/TimothyGu/fcc5b5f9fb34303a6420 ## The Sources https://github.com/TimothyGu/fateserver-node ## Looking Forward All comments, patches, suggestions are welcome. Bug reports are welcome too, but preferably on the GitHub bug tracker. Timothy ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] New FATE Server Based on Node.js
Some more information... On Sat, Nov 1, 2014 at 10:33 PM, Timothy Gu wrote: > ## To-Dos > > Nevertheless, this is still an WIP. I have written history, results, and log > pages, but not yet the index page. There might be bugs I have not > discovered. The source is covered with redundant file existence checks that > can be eliminated after the server is finished. > > I also want to add branch support. A nice error page is needed also. > > ## Demos and Benchmarks > > A demo is up on http://104.131.148.213:8080/history/tgdo-test-nothing. For those with broken mail readers that consider trailing dots a part of the URL, here you go: http://104.131.148.213:8080/history/tgdo-test-nothing [...] Timothy ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel