Re: [FFmpeg-devel] [RFC] ffprobe: add -show_pixel_descriptions option
On 09.09.2014 05:38, Dave Rice wrote: On Sep 8, 2014, at 10:08 AM, Tobias Rapp t.r...@noa-audio.com wrote: BTW: How can one test the ffprobe XML output against the XSD? I tried it with xmllint --noout --schema doc/ffprobe.xsd ffprobe-output.xml without success. What tools do other developers use? That's the command that I use; however when generating the xml use the fully qualified option, ie: ffprobe -f lavfi mandelbrot -show_streams -show_format -of xml=q=1 test.xml xmllint --noout --schema ffprobe.xsd test.xml test.xml validates That does the trick. Thanks! Tobias ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 0/2] avdevice/x11grab: fix cursor drawing in multi-screen setup
On Tue, 9 Sep 2014 05:32:36 +0200 Michael Niedermayer michae...@gmx.at wrote: On Mon, Sep 08, 2014 at 01:15:17PM +0200, Antonio Ospite wrote: Hi, with multi-screen setups x11grab does not behave in the correct way wrt. drawing the mouse cursor, e.g. when doing: ffplay -f x11grab -i :0.1 the mouse cursor was drawn in the captured video even when the mouse pointer was on :0.0. The following patches fix the issue. Patch 1 is just a preparatory change which has also the effect to minimize the delta with the version of patch 2 I am sending to libav. Patch 2 has the actual fix I came up with, look there for a detailed description of the issue. I can provide further info about how to replicate the issue with a virtual screen using the xserver-xorg-video-dummy driver if anybody is interested. Thanks, Antonio Antonio Ospite (2): avdevice/x11grab: rename the w Window to root in paint_mouse_pointer avdevice/x11grab: fix cursor drawing in multi-screen setup libavdevice/x11grab.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) patchset applied Thanks Thanks Michael. From a discussion on libav-devel[1] it came out that the follow_mouse option is broken too in multi-screen setups. I will submit a patch for that too. Regards, Antonio [1] https://lists.libav.org/pipermail/libav-devel/2014-September/063068.html -- Antonio Ospite http://ao2.it A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] lavfi/setpts: add stp and ldp functions
TODO: bump micro version --- doc/filters.texi | 18 +- libavfilter/setpts.c | 33 ++--- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index bb486ea..4338a3e 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -10528,7 +10528,7 @@ The expression which is evaluated for each frame to construct its timestamp. @end table The expression is evaluated through the eval API and can contain the following -constants: +constants and functions: @table @option @item FRAME_RATE @@ -10589,6 +10589,14 @@ The wallclock (RTC) time at the start of the movie in microseconds. @item TB The timebase of the input timestamps. +@item ldp(idx) +Load the persistent variable loaded in register @var{idx}, which was +filled with the @code{stp} function. + +@item stp(idx, val) +Store the value @var{val} in the persistent register with index +@var{idx}, which must be a value from 0 to 9. The register can then be +loaded with @code{ldp}. @end table @subsection Examples @@ -10642,6 +10650,14 @@ Generate timestamps by counting samples: asetpts=N/SR/TB @end example +@item +Remove timestamp gaps greater than 60 seconds, and avoid non +monotically increasing timestamps setting an arbitrary constant frame +duration of 0.05 seconds: +@example +setpts='st(0,(T-PREV_INT));if(gt(ld(0),60),stp(0,PTS-PREV_INPTS));st(1,PTS-ldp(0));if(lte(ld(1),PREV_OUTPTS),PREV_OUTPTS+0.05/TB,ld(1))' +@end example + @end itemize @section settb, asettb diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c index 92b07fb..873d987 100644 --- a/libavfilter/setpts.c +++ b/libavfilter/setpts.c @@ -84,21 +84,48 @@ enum var_name { VAR_VARS_NB }; +#define PERSISTENT_VARS_NB 10 typedef struct SetPTSContext { const AVClass *class; char *expr_str; AVExpr *expr; double var_values[VAR_VARS_NB]; enum AVMediaType type; +double persistent_vars[PERSISTENT_VARS_NB]; } SetPTSContext; +static double ldp(void *opaque, double var_idx) +{ +SetPTSContext *s = opaque; +int var_idxi = var_idx; +if ((unsigned)var_idxi = PERSISTENT_VARS_NB) +return NAN; +return s-persistent_vars[var_idxi]; +} + +static double stp(void *opaque, double var_idx, double val) +{ +SetPTSContext *s = opaque; +int var_idxi = var_idx; +if ((unsigned)var_idxi = PERSISTENT_VARS_NB) +return NAN; +s-persistent_vars[var_idxi] = val; +return val; +} + +static double (* const funcs1[])(void *, double) = { (void *)ldp, NULL }; +static double (* const funcs2[])(void *, double, double) = { (void *)stp, NULL }; + +static const char * const funcs1_names[] = { ldp, NULL }; +static const char * const funcs2_names[] = { stp, NULL }; + static av_cold int init(AVFilterContext *ctx) { SetPTSContext *setpts = ctx-priv; int ret; -if ((ret = av_expr_parse(setpts-expr, setpts-expr_str, - var_names, NULL, NULL, NULL, NULL, 0, ctx)) 0) { +if ((ret = av_expr_parse(setpts-expr, setpts-expr_str, var_names, + funcs1_names, funcs1, funcs2_names, funcs2, 0, ctx)) 0) { av_log(ctx, AV_LOG_ERROR, Error while parsing expression '%s'\n, setpts-expr_str); return ret; } @@ -174,7 +201,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) setpts-var_values[VAR_NB_SAMPLES] = frame-nb_samples; } -d = av_expr_eval(setpts-expr, setpts-var_values, NULL); +d = av_expr_eval(setpts-expr, setpts-var_values, setpts); frame-pts = D2TS(d); av_dlog(inlink-dst, -- 1.8.3.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Fwd: Re: patch for x32 for libpostproc
There seems to be at least some activity here. Maybe we can update the Debian libpostproc package to Michael's new branch. Derek, just to clarify since you worked on the branch the package is currently based on: What are your thoughts on this? Are you interested in continuing this effort? What would you recommend to use for the Debian package? Is it useful to have libpostproc in Debian? (see also the backlog of this bug). Please advise. Thanks On Fri, Sep 05, 2014 at 08:18:57AM +0200, Reimar Döffinger wrote: On 05.09.2014, at 03:46, Reinhard Tartler siret...@gmail.com wrote: On Thu, Sep 4, 2014 at 9:32 PM, Michael Niedermayer michae...@gmx.at wrote: At the end of the day, I need a source tarball that contains maintained sources of a stand-alone libpostproc. I don't care too much how it is created, as long as it doesn't result in code-duplication with existing sources in Debian. would it work if libpostproc could be build and installed standalone from ffmpeg git / ffmpeg release tarballs? That would be exactly the code-duplication I referred to in the text you've quoted. Combined with a release script doing rm of libav*? I think the problem is that libpostproc just isn't a viable stand-alone program, mostly due to complete lack of stand-alone testability not to mention test infrastructure. Keeping the separate git up-to-date certainly is an option but involves extra effort (though a lot less than making libpostproc testable stand-alone). I don't see a good way to split the libraries into separate repositories that does not involve either at least maintaining configure in each or seriously harming bisecting/regression testing. Release scripts that generate multiple tarballs seems more realistic than splitting the repository, in case that sounds like helpful to anyone... Heres a proof of concept updated libpostproc https://github.com/michaelni/FFmpeg/tree/separated_libpostproc this is simply a clone of ffmpeg with everything unneeded droped and the build system from the libpostproc repository it builds successfully but is completely untested beyond that It seems the old buildsystem lacks HAVE_MMX*_INLINE support, this would need to be added, as well as updating README and all that as well as testing also the differences in aboves repo could possibly be used to construct a script to create a split out libpostproc for debian if thats whats wanted. [...] -- 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. ___ pkg-multimedia-maintainers mailing list pkg-multimedia-maintain...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 0/2] avdevice/x11grab: fix cursor drawing in multi-screen setup
On Tue, Sep 09, 2014 at 09:30:50AM +0200, Antonio Ospite wrote: On Tue, 9 Sep 2014 05:32:36 +0200 Michael Niedermayer michae...@gmx.at wrote: On Mon, Sep 08, 2014 at 01:15:17PM +0200, Antonio Ospite wrote: Hi, with multi-screen setups x11grab does not behave in the correct way wrt. drawing the mouse cursor, e.g. when doing: ffplay -f x11grab -i :0.1 the mouse cursor was drawn in the captured video even when the mouse pointer was on :0.0. The following patches fix the issue. Patch 1 is just a preparatory change which has also the effect to minimize the delta with the version of patch 2 I am sending to libav. Patch 2 has the actual fix I came up with, look there for a detailed description of the issue. I can provide further info about how to replicate the issue with a virtual screen using the xserver-xorg-video-dummy driver if anybody is interested. Thanks, Antonio Antonio Ospite (2): avdevice/x11grab: rename the w Window to root in paint_mouse_pointer avdevice/x11grab: fix cursor drawing in multi-screen setup libavdevice/x11grab.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) patchset applied Thanks Thanks Michael. From a discussion on libav-devel[1] it came out that the follow_mouse option is broken too in multi-screen setups. I will submit a patch for that too. ok, thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Rewriting code that is poorly written but fully understood is good. Rewriting code that one doesnt understand is a sign that one is less smart then the original author, trying to rewrite it will not make it better. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] av_filter/x86/idet: MMX/SSE2 implementation of 16bits filter_line()
On Tue, Sep 09, 2014 at 02:52:30PM +0200, Pascal Massimino wrote: Hi, $subject /skal vf_idet.c | 11 +--- vf_idet.h |7 +++-- x86/vf_idet.asm| 70 +++-- x86/vf_idet_init.c | 29 + 4 files changed, 103 insertions(+), 14 deletions(-) 14af1d150d70b35d37382b201c12afa52a0ab219 0001-av_filter-x86-idet-MMX-SSE2-implementation-of-16bits.patch From 47c4e2b153744573e392fbe8fe557bb2f8e7b7aa Mon Sep 17 00:00:00 2001 From: Pascal Massimino pascal.massim...@gmail.com Date: Tue, 9 Sep 2014 14:38:58 +0200 Subject: [PATCH] av_filter/x86/idet: MMX/SSE2 implementation of 16bits filter_line() tested on http://ps-auxw.de/10bit-h264-sample/10bit-eldorado.mkv MMX: ~30% faster decoding overall SSE2:~40% faster --- libavfilter/vf_idet.c | 11 --- libavfilter/vf_idet.h | 7 +++-- libavfilter/x86/vf_idet.asm| 70 -- libavfilter/x86/vf_idet_init.c | 29 + 4 files changed, 103 insertions(+), 14 deletions(-) applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The misfortune of the wise is better than the prosperity of the fool. -- Epicurus 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/setpts: add stp and ldp functions
On Tue, Sep 09, 2014 at 11:54:44AM +0200, Stefano Sabatini wrote: TODO: bump micro version --- doc/filters.texi | 18 +- libavfilter/setpts.c | 33 ++--- 2 files changed, 47 insertions(+), 4 deletions(-) should be ok [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The greatest way to live with honor in this world is to be what we pretend to be. -- Socrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] av_filter/x86/idet: MMX/SSE2 implementation of 16bits filter_line()
On 09/09/14 9:52 AM, Pascal Massimino wrote: +mova m2, m_sum +%if mmsize == 16 +psrldqm2, 4 +paddd m_sum, m2 +psrldqm2, 4 +paddd m_sum, m2 +psrldqm2, 4 +paddd m_sum, m2 +%else +psrlq m2, 32 +paddd m_sum, m2 +%endif The SSE2 version is using three instructions more than necessary here. You could use the HADDD macro to replace the code above, which expands to a more optimized SSE2 version. And now that i check the old stuff again, you could also use it in the IDET_FILTER_LINE macro. It will be one less instruction for the mmxext version. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/2] Fix passing argument 1 of av_free discards const qualifier from pointer target type
Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavutil/dict.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavutil/dict.c b/libavutil/dict.c index bdb5690..475e906 100644 --- a/libavutil/dict.c +++ b/libavutil/dict.c @@ -77,8 +77,8 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value, if (tag) { if (flags AV_DICT_DONT_OVERWRITE) { -if (flags AV_DICT_DONT_STRDUP_KEY) av_free(key); -if (flags AV_DICT_DONT_STRDUP_VAL) av_free(value); +if (flags AV_DICT_DONT_STRDUP_KEY) av_free((void*)key); +if (flags AV_DICT_DONT_STRDUP_VAL) av_free((void*)value); return 0; } if (flags AV_DICT_APPEND) @@ -126,8 +126,8 @@ err_out: av_free(m-elems); av_freep(pm); } -if (flags AV_DICT_DONT_STRDUP_KEY) av_free(key); -if (flags AV_DICT_DONT_STRDUP_VAL) av_free(value); +if (flags AV_DICT_DONT_STRDUP_KEY) av_free((void*)key); +if (flags AV_DICT_DONT_STRDUP_VAL) av_free((void*)value); return AVERROR(ENOMEM); } -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat: remove FF_API_ASS_SSA dead code
On Sun, Sep 07, 2014 at 10:18:50PM +0200, wm4 wrote: On Sun, 7 Sep 2014 22:03:26 +0200 Clément Bœsch u...@pkh.me wrote: --- libavformat/matroska.c| 6 libavformat/matroskadec.c | 80 --- libavformat/matroskaenc.c | 79 -- libavformat/version.h | 3 -- 4 files changed, 168 deletions(-) [...] +1 Applied -- Clément B. pgprZ13TcHqOF.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] av_filter/x86/idet: MMX/SSE2 implementation of 16bits filter_line()
James, On Tue, Sep 9, 2014 at 10:31 AM, James Almer jamr...@gmail.com wrote: On 09/09/14 9:52 AM, Pascal Massimino wrote: +mova m2, m_sum +%if mmsize == 16 +psrldqm2, 4 +paddd m_sum, m2 +psrldqm2, 4 +paddd m_sum, m2 +psrldqm2, 4 +paddd m_sum, m2 +%else +psrlq m2, 32 +paddd m_sum, m2 +%endif The SSE2 version is using three instructions more than necessary here. You could use the HADDD macro to replace the code above, which expands to a more optimized SSE2 version. And now that i check the old stuff again, you could also use it in the IDET_FILTER_LINE macro. It will be one less instruction for the mmxext version. oh, right! let me send you a patch for that... ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Suggested Patch for timecode timebase calculation in mov.c
Hi ffmpeg developers. I am still new to attempting contributing here, so please let me know if there is a better approach for this. I am attaching a patch I would like to incorporate for calculating the stream time_base of the timecode data track in mov's. Please advise. Thanks! From 5ae0b5a9cf9c37e11d5a3fea05c80c66b7c00c3e Mon Sep 17 00:00:00 2001 From: Jon Morley j...@tweaksoftware.com Date: Tue, 9 Sep 2014 11:48:02 -0700 Subject: [PATCH] libavformat/mov.c: Set stream time_base from frameduration/timescale Use tmcd atom's timescale and frameduration to for stream time base instead of 1/framenum. For timecode streams that have an entry for each frame 1/framenum is less accurate than frameduration/timescale. --- libavformat/mov.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index ae48c02..c300dd2 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1530,8 +1530,10 @@ static int mov_parse_stsd_data(MOVContext *c, AVIOContext *pb, tmcd_ctx-tmcd_flags = val; if (val 1) st-codec-flags2 |= CODEC_FLAG2_DROP_FRAME_TIMECODE; -st-codec-time_base.den = st-codec-extradata[16]; /* number of frame */ -st-codec-time_base.num = 1; +int timescale = AV_RB32(st-codec-extradata + 8); +int framedur = AV_RB32(st-codec-extradata + 12); +st-codec-time_base.den = timescale; +st-codec-time_base.num = framedur; if (size 30) { uint32_t len = AV_RB32(st-codec-extradata + 18); /* name atom length */ uint32_t format = AV_RB32(st-codec-extradata + 22); -- 1.8.5.2 (Apple Git-48) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Set AV_TIMECODE_FLAG_ALLOWNEGATIVE in avutil/timecode.c av_timecode_init_from_string
If the timecode value is negative it certainly seems safe to set the AV_TIMECODE_FLAG_ALLOWNEGATIVE on the AVTimecode object. From 35ae38f9557e1ff01040d0e681e843d1727f979b Mon Sep 17 00:00:00 2001 From: Jon Morley j...@tweaksoftware.com Date: Tue, 9 Sep 2014 12:12:17 -0700 Subject: [PATCH 2/2] libavutil/timecode.c: improve flag setting when init tc from string If the string begins with a negative HH (hour) value then make sure to set the AV_TIMECODE_FLAG_ALLOW_NEGATIVE flag for the resulting tc-flags. --- libavutil/timecode.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavutil/timecode.c b/libavutil/timecode.c index 1dfd040..b96a4d1 100644 --- a/libavutil/timecode.c +++ b/libavutil/timecode.c @@ -201,9 +201,10 @@ int av_timecode_init_from_string(AVTimecode *tc, AVRational rate, const char *st } memset(tc, 0, sizeof(*tc)); -tc-flags = c != ':' ? AV_TIMECODE_FLAG_DROPFRAME : 0; // drop if ';', '.', ... -tc-rate = rate; -tc-fps = fps_from_frame_rate(rate); +tc-flags = c != ':' ? AV_TIMECODE_FLAG_DROPFRAME : 0; // drop if ';', '.', ... +tc-flags |= (hh 0) ? AV_TIMECODE_FLAG_ALLOWNEGATIVE : 0; // neg if starts with '-' +tc-rate = rate; +tc-fps= fps_from_frame_rate(rate); ret = check_timecode(log_ctx, tc); if (ret 0) -- 1.8.5.2 (Apple Git-48) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] doc/filters: fix localtime drawtext example.
The colon after the localtime function call needs an additional layer of escaping or else everything until the next colon is treated as a fontfile. Signed-off-by: Simon Thelen ffmpeg-...@c-14.de --- doc/filters.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index bb486ea..5d49c5b 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -4185,7 +4185,7 @@ drawtext='fontfile=Linux Libertine O-40\:style=Semibold:text=FFmpeg' @item Print the date of a real-time encoding (see strftime(3)): @example -drawtext='fontfile=FreeSans.ttf:text=%@{localtime:%a %b %d %Y@}' +drawtext='fontfile=FreeSans.ttf:text=%@{localtime\:%a %b %d %Y@}' @end example @item -- 2.1.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] av_filter/x86/idet: use HADDD where appropriate
On 09/09/14 5:53 PM, Pascal Massimino wrote: Hi James, as suggested. /skal Pushed. Thanks! ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Suggested Patch for timecode timebase calculation in mov.c
On Tue, Sep 09, 2014 at 12:01:23PM -0700, jon wrote: Hi ffmpeg developers. I am still new to attempting contributing here, so please let me know if there is a better approach for this. I am attaching a patch I would like to incorporate for calculating the stream time_base of the timecode data track in mov's. Please advise. Thanks! mov.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) 520754621cc38bff327ffd487d43d07c8f14925c timecode_time_base.patch From 5ae0b5a9cf9c37e11d5a3fea05c80c66b7c00c3e Mon Sep 17 00:00:00 2001 From: Jon Morley j...@tweaksoftware.com Date: Tue, 9 Sep 2014 11:48:02 -0700 Subject: [PATCH] libavformat/mov.c: Set stream time_base from frameduration/timescale Use tmcd atom's timescale and frameduration to for stream time base instead of 1/framenum. For timecode streams that have an entry for each frame 1/framenum is less accurate than frameduration/timescale. --- libavformat/mov.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index ae48c02..c300dd2 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1530,8 +1530,10 @@ static int mov_parse_stsd_data(MOVContext *c, AVIOContext *pb, tmcd_ctx-tmcd_flags = val; if (val 1) st-codec-flags2 |= CODEC_FLAG2_DROP_FRAME_TIMECODE; -st-codec-time_base.den = st-codec-extradata[16]; /* number of frame */ -st-codec-time_base.num = 1; +int timescale = AV_RB32(st-codec-extradata + 8); +int framedur = AV_RB32(st-codec-extradata + 12); +st-codec-time_base.den = timescale; +st-codec-time_base.num = framedur; the intermediate variables look unneeded. But if you want to keep them, their declaration should be moved to the block start as some compilers dont like mixed declarations and statements. [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Awnsering whenever a program halts or runs forever is On a turing machine, in general impossible (turings halting problem). On any real computer, always possible as a real computer has a finite number of states N, and will either halt in less than N cycles or never halt. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/concatdec: fix warning: explicitly assigning a variable of type int to itself
Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavformat/concatdec.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index 4590dc5..9e98579 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -345,7 +345,7 @@ static int concat_read_header(AVFormatContext *avf) FAIL(AVERROR_INVALIDDATA); } if ((ret = add_file(avf, filename, file, nb_files_alloc)) 0) -FAIL(ret); +goto fail; } else if (!strcmp(keyword, duration)) { char *dur_str = get_keyword(cursor); int64_t dur; @@ -357,7 +357,7 @@ static int concat_read_header(AVFormatContext *avf) if ((ret = av_parse_time(dur, dur_str, 1)) 0) { av_log(avf, AV_LOG_ERROR, Line %d: invalid duration '%s'\n, line, dur_str); -FAIL(ret); +goto fail; } file-duration = dur; } else if (!strcmp(keyword, stream)) { @@ -387,7 +387,7 @@ static int concat_read_header(AVFormatContext *avf) } } if (ret 0) -FAIL(ret); +goto fail; if (!cat-nb_files) FAIL(AVERROR_INVALIDDATA); @@ -408,7 +408,7 @@ static int concat_read_header(AVFormatContext *avf) cat-stream_match_mode = avf-nb_streams ? MATCH_EXACT_ID : MATCH_ONE_TO_ONE; if ((ret = open_file(avf, 0)) 0) -FAIL(ret); +goto fail; return 0; fail: -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avcodec/libx265: enable psnr reporting when requested by the user
This is similar to what is done in libx264.c Fixes Ticket3567 Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavcodec/libx265.c |1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 55019d4..923c750 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -111,6 +111,7 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) ctx-params-fpsDenom= avctx-time_base.num * avctx-ticks_per_frame; ctx-params-sourceWidth = avctx-width; ctx-params-sourceHeight= avctx-height; +ctx-params-bEnablePsnr = !!(avctx-flags CODEC_FLAG_PSNR); if (avctx-sample_aspect_ratio.num 0 avctx-sample_aspect_ratio.den 0) { av_reduce(sar_num, sar_den, -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/mp3dec: Improve seeking frame sync code
On Sun, Sep 07, 2014 at 09:54:40PM +0200, Michael Niedermayer wrote: Fixes Ticket3884 Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavformat/mp3dec.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) applied [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Awnsering whenever a program halts or runs forever is On a turing machine, in general impossible (turings halting problem). On any real computer, always possible as a real computer has a finite number of states N, and will either halt in less than N cycles or never halt. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Fix vf_cropdetect returning negative rectangles
On Mon, Sep 8, 2014 at 5:21 PM, Michael Niedermayer michae...@gmx.at wrote: On Mon, Sep 08, 2014 at 11:16:49AM -0700, hjiodjf 97xgw46 wrote: On Thu, Sep 4, 2014 at 1:08 PM, Michael Niedermayer michae...@gmx.at wrote: On Tue, Sep 02, 2014 at 02:20:40PM -0700, hjiodjf 97xgw46 wrote: [...] Moreover, as you said, this patch reduces the number of passes through a blank frame from 4 to 2, which should improve performance on movies with many dark scenes. yes but thats seperate from what values are output for blank frames should be fixed so it only needs 2 passes now [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When the tyrant has disposed of foreign enemies by conquest or treaty, and there is nothing more to fear from them, then he is always stirring up some war or other, in order that the people may require a leader. -- Plato ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel I was not aware that the cropdetect filter was designed to prevent shrinking the window over a given number of frames. I have attached a revised patch that prevents negative window sizes based on your patch. I still believe that negative windows should be avoided. My reasoning for this was provided in my previous email. 0001-Avoid-returning-negative-rectangles-from-cropdetect.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel