Re: [FFmpeg-devel] [PATCH] vdpau_mpeg4: Do not fail on unknown profile.
On 01.11.2014, at 13:45, Reimar Döffinger reimar.doeffin...@gmx.de wrote: 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. Are there still objections? As said, to my knowledge every ASP decoder is required to be a fully working SP decoder, so I think this can't break anything with compliant implementations, which is my main justification (besides the regression part). Does anyone disagree? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] configure: Hack to allow compilation for x32.
Configures it as x86_64 with assembler disabled. Does not pass make fate though, e.g. fate-vc1_ilaced_twomv fails. Signed-off-by: Reimar Döffinger reimar.doeffin...@gmx.de --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index e79b34d..c9008ba 100755 --- a/configure +++ b/configure @@ -3958,6 +3958,9 @@ case $arch in ;; x86) check_64bit x86_32 x86_64 'sizeof(void *) 4' +# Treat x32 as x64 without asm for now. Note it also needs spic=$shared +test $subarch = x86_32 check_cpp_condition stddef.h 'defined(__x86_64__)' +disable asm subarch=x86_64 if test $subarch = x86_64; then spic=$shared fi -- 2.1.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: Hack to allow compilation for x32.
Reimar Döffinger Reimar.Doeffinger at gmx.de writes: Configures it as x86_64 with assembler disabled. Does not pass make fate though, e.g. fate-vc1_ilaced_twomv fails. This test also fails for other fate installations iirc. Is it the only failing test? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: Hack to allow compilation for x32.
On Sun, Nov 02, 2014 at 10:44:43AM +0100, Reimar Döffinger wrote: Configures it as x86_64 with assembler disabled. Does not pass make fate though, e.g. fate-vc1_ilaced_twomv fails. Sorry, it actually does pass. I forgot to rsync the samples first. Note that if you leave asm enabled it won't even compile due to pointers and registers having different size. The gcc manual describes hacks/macros to work around this, but I doubt it is worth the effort. ___ 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 Reimar.Doeffinger at gmx.de writes: Are there still objections? I just wanted to know if we shouldn't always set ASP? Or at least for everything != SP? 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 Sun, Nov 02, 2014 at 10:02:50AM +, Carl Eugen Hoyos wrote: Reimar Döffinger Reimar.Doeffinger at gmx.de writes: Are there still objections? I just wanted to know if we shouldn't always set ASP? Or at least for everything != SP? I am unsure. It seemed to me this way would be more reliable and ensure we review it if we were to ever add a new profile. But if anyone has a real opinion on it I'll happily follow it. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] ?????? [patch 1/3]Fix bug for POWER LE:/libavcodec/ppc/me_cmp.c
Timothy and Michael, I will modify the code according to your comments, then re-submit it. Thanks. Rong Yan -- The world has enough for everyone's need, but not enough for everyone's greed. -- -- ??: Timothy Gu;timothyg...@gmail.com; : 2014??11??2??(??) 12:37 ??: FFmpeg development discussions and patchesffmpeg-devel@ffmpeg.org; : Re: [FFmpeg-devel] [patch 1/3]Fix bug for POWER LE:/libavcodec/ppc/me_cmp.c ?? Hi, On Friday, October 31, 2014, Michael Niedermayer michae...@gmx.at 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 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 05:59:20PM -0700, Kevin Mitchell wrote: Ok, changed to half life. On Sat, Nov 1, 2014 at 10:52 AM, Michael Niedermayer michae...@gmx.at 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 kevmi...@gmail.com 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 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(-) e5ff94b6949f8ed02bf5d6b2ccc1251d91144dd5 0001-avfilter-vf_idet-add-a-half_life-option-for-statisti.patch From fa3c0a70a41afb2432278b7a16b5b0de4a5f354a Mon Sep 17 00:00:00 2001 From: Kevin Mitchell kevmi...@gmail.com 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. these sounds independant of the rest of the patch, and should thus be a seperate patch 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
[FFmpeg-devel] [PATCH] doc/codecs: Better documentation for the libavcodec bitexact flag
Signed-off-by: Michael Niedermayer michae...@gmx.at --- doc/codecs.texi |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/codecs.texi b/doc/codecs.texi index 2bb6059..85e6d47 100644 --- a/doc/codecs.texi +++ b/doc/codecs.texi @@ -71,7 +71,9 @@ 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 platform-, build- and time-independant data. (except (I)DCT). +This ensures that file and data checksums are reproducable and match between +platforms. Its primary use is for regression testing. @item aic Apply H263 advanced intra coding / mpeg4 ac prediction. @item cbp -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi: add xbr filter
On Sun, Nov 02, 2014 at 09:09:51AM +0530, arwa arif wrote: On Sun, Nov 2, 2014 at 3:36 AM, Michael Niedermayer michae...@gmx.at 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 michae...@gmx.at 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 stefa...@gmail.com 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 arwaarif1...@gmail.com 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;. I see, and i understand now where the abs bug in your code came from i dont think this was a good choice as reference Its readme even says: Research: Hyllian mentions a few optional implementations besides level 2 interpolation, but i can't find any documentation on the filter other than the byuu forum, where he only mentions them: Font Enhancement Using LVL2 Interpolation in regions plagued by shades of colors Using linear equation of the Straight Line to interpolate in odd scale factors so it seems to me the reference used was not a complete implementation of xBR does anyone have the actual sources of the original xbr filter ? i did find some links but they all just redirect to some spy/add/crap ware download-manager also i found an example on how one of the reference pics should look with 2x xbr on: http://forums.getpaint.net/index.php?/topic/23601-2d-image-scaling-algorithms/page-2 [...] -- 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] [PATCH 2/3] idet improvements: add reset_count feature
Removed the unrelated documentation changes, used uint64_t instead of float. From 0fc44ce601266e94fb8c6137091f3eb91616a235 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell kevmi...@gmail.com Date: Sun, 2 Nov 2014 04:37:13 -0800 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 | 8 ++ libavfilter/version.h | 2 +- libavfilter/vf_idet.c | 79 +++ libavfilter/vf_idet.h | 9 -- 4 files changed, 71 insertions(+), 27 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 33f842b..03bd1c6 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,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..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..4adadd4 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 }, +{ half_life, half life of cumulative statistics, OFFSET(half_life), AV_OPT_TYPE_FLOAT, {.dbl = 0.0}, -1, INT_MAX, FLAGS }, { NULL } }; @@ -48,6 +49,14 @@ static const char *type2str(Type type) return NULL; } +static int av_dict_set_float(AVDictionary **pm, const char *key, float value, +int flags) +{ +char valuestr[22]; +snprintf(valuestr, sizeof(valuestr), %.1f, value); +return av_dict_set(pm, key, valuestr, flags); +} + int ff_idet_filter_line_c(const uint8_t *a, const uint8_t *b, const uint8_t *c, int w) { int x; @@ -74,6 +83,26 @@ 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:%6.1f BFF:%6.1f Progressive:%6.1f Undetermined:%6.1f Total: %6.1f\n, + idet-prestat[TFF] / PRECISION, + idet-prestat[BFF] / PRECISION, + idet-prestat[PROGRESSIVE] / PRECISION, + idet-prestat[UNDETERMINED] / PRECISION, + idet-total / PRECISION +); +av_log(ctx, AV_LOG_INFO, Multi frame detection: TFF:%6.1f BFF:%6.1f Progressive:%6.1f Undetermined:%6.1f Total: %6.1f\n, + idet-poststat[TFF] / PRECISION, + idet-poststat[BFF] / PRECISION, + idet-poststat[PROGRESSIVE] / PRECISION, + idet-poststat[UNDETERMINED] / PRECISION, + idet-total / PRECISION +); +} + static void filter(AVFilterContext *ctx) { IDETContext *idet = ctx-priv; @@ -146,23 +175,31 @@ static void filter(AVFilterContext *ctx) idet-cur-interlaced_frame = 0; } -idet-prestat [ type] ++; -idet-poststat[idet-last_type] ++; +idet-total = (uint64_t) round(idet-total* idet-decay_coefficient); +for(i=0; i4; i++){ +idet-prestat [i] = (uint64_t) round(idet-prestat [i] * idet-decay_coefficient); +idet-poststat[i] = (uint64_t) round(idet-poststat[i] * idet-decay_coefficient); +} + +idet-total += (uint64_t) PRECISION; +idet-prestat [ type] += (uint64_t) PRECISION; +idet-poststat[idet-last_type] += (uint64_t) PRECISION; av_log(ctx, AV_LOG_DEBUG, Single frame:%12s, Multi frame:%12s\n, type2str(type), type2str(idet-last_type)); -av_dict_set
Re: [FFmpeg-devel] [PATCH 3/3] idet improvements: add repeated field detection
update with half life patch From eab73507ebdc0af04c0aa9b5acd166d588a026c7 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell kevmi...@gmail.com Date: Sun, 2 Nov 2014 04:49:34 -0800 Subject: [PATCH 2/2] avfilter/vf_idet: add a repeated field detection This can be useful for determining telecine. --- doc/filters.texi | 19 +-- libavfilter/version.h | 2 +- libavfilter/vf_idet.c | 41 - libavfilter/vf_idet.h | 9 + 4 files changed, 67 insertions(+), 4 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 03bd1c6..4deaaf6 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5574,8 +5574,9 @@ 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. @@ -5619,6 +5620,18 @@ 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 +5641,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 4adadd4..8f07483 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] / PRECISION, + idet-repeats[REPEAT_TOP] / PRECISION, + idet-repeats[REPEAT_BOTTOM] / PRECISION, + idet-total / PRECISION +); 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] / PRECISION, idet-prestat[BFF] / PRECISION, @@ -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
Re: [FFmpeg-devel] [PATCH] lavfi: add xbr filter
On date Sunday 2014-11-02 13:28:05 +0100, Michael Niedermayer encoded: On Sun, Nov 02, 2014 at 09:09:51AM +0530, arwa arif wrote: [...] The reference code I used was https://github.com/carlosascari/2xBR-Filter;. I see, and i understand now where the abs bug in your code came from i dont think this was a good choice as reference Its readme even says: Research: Hyllian mentions a few optional implementations besides level 2 interpolation, but i can't find any documentation on the filter other than the byuu forum, where he only mentions them: Font Enhancement Using LVL2 Interpolation in regions plagued by shades of colors Using linear equation of the Straight Line to interpolate in odd scale factors so it seems to me the reference used was not a complete implementation of xBR does anyone have the actual sources of the original xbr filter ? i did find some links but they all just redirect to some spy/add/crap ware download-manager also i found an example on how one of the reference pics should look with 2x xbr on: http://forums.getpaint.net/index.php?/topic/23601-2d-image-scaling-algorithms/page-2 This is the link mentioned by ubitux: http://filthypants.blogspot.it/2012/03/xbr-vs-hqx-interpolation-filter.html in ticket: https://trac.ffmpeg.org/ticket/3404 This blog mentions Hyllian xBR algorithm: http://board.byuu.org/viewtopic.php?f=10t=2248 but the link above is dead. Googling for Hyllian and xBR I found this Hyallian's repository: https://github.com/libretro/common-shaders The forum mentioned by Michael: http://forums.getpaint.net/index.php?/topic/23601-2d-image-scaling-algorithms/ is about a Paint.NET Plugin: http://code.google.com/p/2dimagefilter/ A short description of xBR is here: https://code.google.com/p/2dimagefilter/wiki/ImageScaling#xBR Since Hyllian code seems to be mentioned for the first time in relation to byuu (a SNES emulation project), I looked for: http://byuu.org/ I downloaded the higan (name of the SNES emulator) code, and grepped for xBR but with no luck. So at the end I was not able to find a C reference for xBR. Probably we should contact Hyllian himself to get advice about a (possibly C-language) reference implementation. Comments/insight are welcome. -- FFmpeg = Faithful Furious MultiPurpose Enhanced Geek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi: add xbr filter
On Sunday, November 2, 2014, Stefano Sabatini stefa...@gmail.com wrote: On date Sunday 2014-11-02 13:28:05 +0100, Michael Niedermayer encoded: On Sun, Nov 02, 2014 at 09:09:51AM +0530, arwa arif wrote: [...] The reference code I used was https://github.com/carlosascari/2xBR-Filter;. I see, and i understand now where the abs bug in your code came from i dont think this was a good choice as reference Its readme even says: Research: Hyllian mentions a few optional implementations besides level 2 interpolation, but i can't find any documentation on the filter other than the byuu forum, where he only mentions them: Font Enhancement Using LVL2 Interpolation in regions plagued by shades of colors Using linear equation of the Straight Line to interpolate in odd scale factors so it seems to me the reference used was not a complete implementation of xBR does anyone have the actual sources of the original xbr filter ? i did find some links but they all just redirect to some spy/add/crap ware download-manager also i found an example on how one of the reference pics should look with 2x xbr on: http://forums.getpaint.net/index.php?/topic/23601-2d-image-scaling-algorithms/page-2 This is the link mentioned by ubitux: http://filthypants.blogspot.it/2012/03/xbr-vs-hqx-interpolation-filter.html in ticket: https://trac.ffmpeg.org/ticket/3404 This blog mentions Hyllian xBR algorithm: http://board.byuu.org/viewtopic.php?f=10t=2248 but the link above is dead. Googling for Hyllian and xBR I found this Hyallian's repository: https://github.com/libretro/common-shaders The forum mentioned by Michael: http://forums.getpaint.net/index.php?/topic/23601-2d-image-scaling-algorithms/ is about a Paint.NET Plugin: http://code.google.com/p/2dimagefilter/ A short description of xBR is here: https://code.google.com/p/2dimagefilter/wiki/ImageScaling#xBR Since Hyllian code seems to be mentioned for the first time in relation to byuu (a SNES emulation project), I looked for: http://byuu.org/ I downloaded the higan (name of the SNES emulator) code, and grepped for xBR but with no luck. So at the end I was not able to find a C reference for xBR. Probably we should contact Hyllian himself to get advice about a (possibly C-language) reference implementation. Found a C++ implementation: http://sourceforge.net/p/paintown/code/HEAD/tree/trunk/src/util/graphics/sdl/xbr.cpp It says xBR 3.3b and I'm not sure what variant that is in the filthy pants blog. It's close to C and standalone enough, and it is licensed under the LGPL (v3 though). Found via http://wayofthepixel.net/index.php?PHPSESSID=lm3asavrs3g8u63g8k28d62u82topic=13508.10 Timothy ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi: add xbr filter
On Sunday, November 2, 2014, Timothy Gu timothyg...@gmail.com wrote: Found a C++ implementation: http://sourceforge.net/p/paintown/code/HEAD/tree/trunk/src/util/graphics/sdl/xbr.cpp It says xBR 3.3b and I'm not sure what variant that is in the filthy pants blog. It's close to C and standalone enough, and it is licensed under the LGPL (v3 though). Found via http://wayofthepixel.net/index.php?PHPSESSID=lm3asavrs3g8u63g8k28d62u82topic=13508.10 It even includes a fix for ambiguous cases of abs which might be what you guys were talking about. http://sourceforge.net/p/paintown/code/7261/ Timothy ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi: add xbr filter
Le duodi 12 brumaire, an CCXXIII, Stefano Sabatini a écrit : This blog mentions Hyllian xBR algorithm: http://board.byuu.org/viewtopic.php?f=10t=2248 but the link above is dead. There is a version in the Wayback Machine: https://web.archive.org/web/20140904180543/http://board.byuu.org/viewtopic.php?f=10t=2248 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] New FATE Server Based on Node.js
On 11/1/2014 10:37 PM, Timothy Gu wrote: Some more information... On Sat, Nov 1, 2014 at 10:33 PM, Timothy Gu timothyg...@gmail.com 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 Where should I look for code, that you have coded to make fate server in node.js I like this change, just because I never understand perl. -Anshul ___ 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
On Sunday, November 2, 2014, Anshul anshul.ffm...@gmail.com wrote: Where should I look for code, that you have coded to make fate server in node.js As I have written in the first mail in the thread, the code is in https://github.com/TimothyGu/fateserver-node I like this change, just because I never understand perl It took me a long time to understand various tricks Mans used for the perl based fateserver as well. Timothy ___ 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 Sun, Nov 02, 2014 at 05:03:44AM -0800, Kevin Mitchell wrote: Removed the unrelated documentation changes, used uint64_t instead of float. doc/filters.texi |8 + libavfilter/version.h |2 - libavfilter/vf_idet.c | 79 ++ libavfilter/vf_idet.h |9 - 4 files changed, 71 insertions(+), 27 deletions(-) d7f412c49b294b54535d4cfe48e54aa10f35ba08 0001-avfilter-vf_idet-add-a-half_life-option-for-statisti.patch From 0fc44ce601266e94fb8c6137091f3eb91616a235 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell kevmi...@gmail.com Date: Sun, 2 Nov 2014 04:37:13 -0800 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 | 8 ++ libavfilter/version.h | 2 +- libavfilter/vf_idet.c | 79 +++ libavfilter/vf_idet.h | 9 -- 4 files changed, 71 insertions(+), 27 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 33f842b..03bd1c6 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,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..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..4adadd4 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 }, +{ half_life, half life of cumulative statistics, OFFSET(half_life), AV_OPT_TYPE_FLOAT, {.dbl = 0.0}, -1, INT_MAX, FLAGS }, { NULL } }; @@ -48,6 +49,14 @@ static const char *type2str(Type type) return NULL; } +static int av_dict_set_float(AVDictionary **pm, const char *key, float value, +int flags) +{ +char valuestr[22]; +snprintf(valuestr, sizeof(valuestr), %.1f, value); +return av_dict_set(pm, key, valuestr, flags); +} i dont think %f is guranteed to produce the same value across platforms, i think we had a issue in fate with win32 and a %f once but maybe i misremember something like %d.%d, A/10, A%10 could be used + int ff_idet_filter_line_c(const uint8_t *a, const uint8_t *b, const uint8_t *c, int w) { int x; @@ -74,6 +83,26 @@ 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:%6.1f BFF:%6.1f Progressive:%6.1f Undetermined:%6.1f Total: %6.1f\n, + idet-prestat[TFF] / PRECISION, + idet-prestat[BFF] / PRECISION, + idet-prestat[PROGRESSIVE] / PRECISION, + idet-prestat[UNDETERMINED] / PRECISION, + idet-total / PRECISION +); +av_log(ctx, AV_LOG_INFO, Multi frame detection: TFF:%6.1f BFF:%6.1f Progressive:%6.1f Undetermined:%6.1f Total: %6.1f\n, + idet-poststat[TFF] / PRECISION, + idet-poststat[BFF] / PRECISION, + idet-poststat[PROGRESSIVE] / PRECISION, + idet-poststat[UNDETERMINED] / PRECISION, + idet-total / PRECISION +); +} same issue also its at least to me a bit unexpected that the filter prints final statistics which only represent the last frames instead of all +
[FFmpeg-devel] [PATCH 1/2] lavf/ffm: silent deprecated warnings
Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavformat/ffmdec.c | 11 +++ libavformat/ffmenc.c | 5 + 2 files changed, 16 insertions(+) diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index 448762b..e95c139 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -23,6 +23,7 @@ #include libavutil/intreadwrite.h #include libavutil/intfloat.h +#include libavutil/internal.h #include avformat.h #include internal.h #include ffm.h @@ -224,8 +225,10 @@ static int ffm_close(AVFormatContext *s) { int i; +FF_DISABLE_DEPRECATION_WARNINGS for (i = 0; i s-nb_streams; i++) av_freep(s-streams[i]-codec-rc_eq); +FF_ENABLE_DEPRECATION_WARNINGS return 0; } @@ -310,7 +313,9 @@ static int ffm2_read_header(AVFormatContext *s) codec-qblur = avio_rb16(pb) / 1.0; codec-bit_rate_tolerance = avio_rb32(pb); avio_get_str(pb, INT_MAX, rc_eq_buf, sizeof(rc_eq_buf)); +FF_DISABLE_DEPRECATION_WARNINGS codec-rc_eq = av_strdup(rc_eq_buf); +FF_ENABLE_DEPRECATION_WARNINGS codec-rc_max_rate = avio_rb32(pb); codec-rc_min_rate = avio_rb32(pb); codec-rc_buffer_size = avio_rb32(pb); @@ -327,7 +332,9 @@ static int ffm2_read_header(AVFormatContext *s) codec-mb_decision = avio_rb32(pb); codec-nsse_weight = avio_rb32(pb); codec-frame_skip_cmp = avio_rb32(pb); +FF_DISABLE_DEPRECATION_WARNINGS codec-rc_buffer_aggressivity = av_int2double(avio_rb64(pb)); +FF_ENABLE_DEPRECATION_WARNINGS codec-codec_tag = avio_rb32(pb); codec-thread_count = avio_r8(pb); codec-coder_type = avio_rb32(pb); @@ -434,7 +441,9 @@ static int ffm_read_header(AVFormatContext *s) codec-qblur = avio_rb16(pb) / 1.0; codec-bit_rate_tolerance = avio_rb32(pb); avio_get_str(pb, INT_MAX, rc_eq_buf, sizeof(rc_eq_buf)); +FF_DISABLE_DEPRECATION_WARNINGS codec-rc_eq = av_strdup(rc_eq_buf); +FF_ENABLE_DEPRECATION_WARNINGS codec-rc_max_rate = avio_rb32(pb); codec-rc_min_rate = avio_rb32(pb); codec-rc_buffer_size = avio_rb32(pb); @@ -451,7 +460,9 @@ static int ffm_read_header(AVFormatContext *s) codec-mb_decision = avio_rb32(pb); codec-nsse_weight = avio_rb32(pb); codec-frame_skip_cmp = avio_rb32(pb); +FF_DISABLE_DEPRECATION_WARNINGS codec-rc_buffer_aggressivity = av_int2double(avio_rb64(pb)); +FF_ENABLE_DEPRECATION_WARNINGS codec-codec_tag = avio_rb32(pb); codec-thread_count = avio_r8(pb); codec-coder_type = avio_rb32(pb); diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c index eb809eb..7528dbf 100644 --- a/libavformat/ffmenc.c +++ b/libavformat/ffmenc.c @@ -23,6 +23,7 @@ #include libavutil/intfloat.h #include libavutil/avassert.h #include libavutil/parseutils.h +#include libavutil/internal.h #include avformat.h #include internal.h #include ffm.h @@ -165,7 +166,9 @@ static int ffm_write_header(AVFormatContext *s) avio_wb16(pb, (int) (codec-qcompress * 1.0)); avio_wb16(pb, (int) (codec-qblur * 1.0)); avio_wb32(pb, codec-bit_rate_tolerance); +FF_DISABLE_DEPRECATION_WARNINGS avio_put_str(pb, codec-rc_eq ? codec-rc_eq : tex^qComp); +FF_ENABLE_DEPRECATION_WARNINGS avio_wb32(pb, codec-rc_max_rate); avio_wb32(pb, codec-rc_min_rate); avio_wb32(pb, codec-rc_buffer_size); @@ -182,7 +185,9 @@ static int ffm_write_header(AVFormatContext *s) avio_wb32(pb, codec-mb_decision); avio_wb32(pb, codec-nsse_weight); avio_wb32(pb, codec-frame_skip_cmp); +FF_DISABLE_DEPRECATION_WARNINGS avio_wb64(pb, av_double2int(codec-rc_buffer_aggressivity)); +FF_ENABLE_DEPRECATION_WARNINGS avio_wb32(pb, codec-codec_tag); avio_w8(pb, codec-thread_count); avio_wb32(pb, codec-coder_type); -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] [RFC]lavf/ffm: update with more options.
TODO: bump micro Many common codec options are not via ffm protocol. This commit adds common A/V encoding options to protocol. Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavformat/ffmdec.c | 78 libavformat/ffmenc.c | 60 2 files changed, 138 insertions(+) diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index e95c139..8f5338f 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -233,6 +233,12 @@ FF_ENABLE_DEPRECATION_WARNINGS return 0; } +static void ffm_report_old_version(AVFormatContext *s) +{ +av_log(s, AV_LOG_WARNING, + Old version of feed file detected. Consider deleting feed files.\n); +} + static int ffm2_read_header(AVFormatContext *s) { FFMContext *ffm = s-priv_data; @@ -294,6 +300,17 @@ static int ffm2_read_header(AVFormatContext *s) if (ff_get_extradata(codec, pb, avio_rb32(pb)) 0) return AVERROR(ENOMEM); } +if (avio_tell(pb) next) { +codec-slices = avio_r8(pb); +codec-thread_type = avio_r8(pb); +codec-compression_level = avio_rb32(pb); +codec-global_quality = avio_rb32(pb); +codec-ticks_per_frame = avio_rb32(pb); +codec-trellis = avio_rb32(pb); +codec-profile = avio_rb32(pb); +} +if (avio_tell(pb) next) +ffm_report_old_version(s); avio_seek(pb, next, SEEK_SET); id = avio_rb32(pb); size = avio_rb32(pb); @@ -348,11 +365,72 @@ FF_ENABLE_DEPRECATION_WARNINGS codec-qblur = av_int2double(avio_rb64(pb)); codec-max_qdiff = avio_rb32(pb); codec-refs = avio_rb32(pb); +if (avio_tell(pb) next) { +codec-bidir_refine = avio_rb32(pb); +codec-brd_scale = avio_rb32(pb); +codec-b_sensitivity = avio_rb32(pb); +codec-chromaoffset = avio_rb32(pb); +codec-chroma_sample_location = avio_r8(pb); +codec-color_primaries = avio_r8(pb); +codec-color_range = avio_r8(pb); +codec-colorspace = avio_r8(pb); +codec-color_trc = avio_r8(pb); +codec-context_model = avio_rb32(pb); +codec-dia_size = avio_rb32(pb); +codec-field_order = avio_r8(pb); +codec-frame_skip_exp = avio_rb32(pb); +codec-frame_skip_factor = avio_rb32(pb); +codec-frame_skip_threshold = avio_rb32(pb); +codec-idct_algo = avio_rb16(pb); +codec-ildct_cmp = avio_rb16(pb); +codec-inter_quant_bias = avio_rb32(pb); +codec-intra_quant_bias = avio_rb32(pb); +codec-last_predictor_count = avio_rb32(pb); +codec-mb_cmp = avio_rb32(pb); +codec-mb_lmin = avio_rb16(pb); +codec-mb_lmax = avio_rb16(pb); +codec-lumi_masking = av_int2double(avio_rb64(pb)); +codec-dark_masking = av_int2double(avio_rb64(pb)); +codec-me_penalty_compensation = avio_rb32(pb); +codec-me_pre_cmp = avio_rb32(pb); +codec-me_sub_cmp = avio_rb32(pb); +codec-mv0_threshold = avio_rb32(pb); +codec-noise_reduction = avio_rb32(pb); +codec-p_masking = av_int2double(avio_rb32(pb)); +codec-pre_dia_size = avio_rb32(pb); +codec-prediction_method = avio_r8(pb); +codec-pre_me = avio_rb32(pb); +codec-rc_initial_buffer_occupancy = avio_rb32(pb); +codec-rc_max_available_vbv_use = av_int2double(avio_rb32(pb)); +codec-rc_min_vbv_overflow_use = av_int2double(avio_rb32(pb)); +codec-rtp_payload_size = avio_rb32(pb); +codec-sample_aspect_ratio.num = avio_rb32(pb); +codec-sample_aspect_ratio.den = avio_rb32(pb); +codec-spatial_cplx_masking = av_int2double(avio_rb32(pb)); +codec-temporal_cplx_masking = av_int2double(avio_rb32(pb)); +codec-timecode_frame_start = avio_rb64(pb); +} +if (avio_tell(pb) next) +ffm_report_old_version(s); break; case MKBETAG('S', 'T', 'A', 'U'): codec-sample_rate = avio_rb32(pb); codec-channels = avio_rl16(pb); codec-frame_size = avio_rl16(pb); +if (avio_tell(pb) next) { +codec-thread_count = avio_r8(pb); +
Re: [FFmpeg-devel] [PATCH] ffserver_config: improve AVOption handing
Hi On 11/01/2014 03:33 PM, Lukasz Marek wrote: [..] @@ -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; } If you are always returning 0 then this func should probably be declared static void instead? [..] diff --git a/ffserver_config.h b/ffserver_config.h index f29f07f..c684fb5 100644 --- a/ffserver_config.h +++ b/ffserver_config.h @@ -113,6 +113,7 @@ typedef struct FFServerConfig { AVDictionary *video_conf; /* Values stored in video AVCodecContext.fields */ AVDictionary *audio_opts; /* AVOptions for audio encoder */ AVDictionary *audio_conf; /* Values stored in audio AVCodecContext.fields */ +AVCodecContext *dummy_ctx;/* Used internally to test AVOptions, not to be used anywere else */ s/anywere/anywhere/g nit: . Not to be Looks OK, feel free to push after fixing ^ 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] FFserver bug?
Hi. I'm afraid I don't understand what the problem is. Can someone 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
[FFmpeg-devel] [PATCH]Silence warnings if fic files contains a zero-length cursor
Hi! Attached patch fixes ticket #4072 for me. Please comment, Carl Eugen diff --git a/libavcodec/fic.c b/libavcodec/fic.c index 5615e69..adc8a25 100644 --- a/libavcodec/fic.c +++ b/libavcodec/fic.c @@ -308,7 +308,10 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data, return AVERROR_INVALIDDATA; } -if (tsize 32) { +if (!tsize) +skip_cursor = 1; + +if (!skip_cursor tsize 32) { av_log(avctx, AV_LOG_WARNING, Cursor data too small. Skipping cursor.\n); skip_cursor = 1; @@ -317,14 +320,14 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data, /* Cursor position. */ cur_x = AV_RL16(src + 33); cur_y = AV_RL16(src + 35); -if (cur_x avctx-width || cur_y avctx-height) { +if (!skip_cursor (cur_x avctx-width || cur_y avctx-height)) { av_log(avctx, AV_LOG_WARNING, Invalid cursor position: (%d,%d). Skipping cusor.\n, cur_x, cur_y); skip_cursor = 1; } -if (AV_RL16(src + 37) != 32 || AV_RL16(src + 39) != 32) { +if (!skip_cursor (AV_RL16(src + 37) != 32 || AV_RL16(src + 39) != 32)) { av_log(avctx, AV_LOG_WARNING, Invalid cursor size. Skipping cursor.\n); skip_cursor = 1; ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] x86/flacdsp: add SSE2 and AVX decorrelate functions
Two to four times faster depending on instruction set, block size and channel count. Signed-off-by: James Almer jamr...@gmail.com --- TODO: 16 bits indep for 4, 6 and 8 channels. 24/32 bits indep for 8 channels. AVX2 and maybe MMX versions. Planar? libavcodec/arm/flacdsp_init_arm.c | 2 +- libavcodec/flacdec.c | 6 +- libavcodec/flacdsp.c | 6 +- libavcodec/flacdsp.h | 6 +- libavcodec/flacenc.c | 2 +- libavcodec/x86/flacdsp.asm| 206 ++ libavcodec/x86/flacdsp_init.c | 48 - 7 files changed, 264 insertions(+), 12 deletions(-) diff --git a/libavcodec/arm/flacdsp_init_arm.c b/libavcodec/arm/flacdsp_init_arm.c index 9ddb268..df1b19c 100644 --- a/libavcodec/arm/flacdsp_init_arm.c +++ b/libavcodec/arm/flacdsp_init_arm.c @@ -24,7 +24,7 @@ void ff_flac_lpc_16_arm(int32_t *samples, const int coeffs[32], int order, int qlevel, int len); -av_cold void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, +av_cold void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps) { if (bps = 16 CONFIG_FLAC_DECODER) diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index 1333972..01ae717 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -111,7 +111,7 @@ static av_cold int flac_decode_init(AVCodecContext *avctx) if (ret 0) return ret; flac_set_bps(s); -ff_flacdsp_init(s-dsp, avctx-sample_fmt, s-bps); +ff_flacdsp_init(s-dsp, avctx-sample_fmt, s-channels, s-bps); s-got_streaminfo = 1; return 0; @@ -173,7 +173,7 @@ static int parse_streaminfo(FLACContext *s, const uint8_t *buf, int buf_size) if (ret 0) return ret; flac_set_bps(s); -ff_flacdsp_init(s-dsp, s-avctx-sample_fmt, s-bps); +ff_flacdsp_init(s-dsp, s-avctx-sample_fmt, s-channels, s-bps); s-got_streaminfo = 1; return 0; @@ -472,7 +472,7 @@ static int decode_frame(FLACContext *s) ret = allocate_buffers(s); if (ret 0) return ret; -ff_flacdsp_init(s-dsp, s-avctx-sample_fmt, s-bps); +ff_flacdsp_init(s-dsp, s-avctx-sample_fmt, s-channels, s-bps); s-got_streaminfo = 1; dump_headers(s-avctx, (FLACStreaminfo *)s); } diff --git a/libavcodec/flacdsp.c b/libavcodec/flacdsp.c index b15bc74..a83eb83 100644 --- a/libavcodec/flacdsp.c +++ b/libavcodec/flacdsp.c @@ -85,7 +85,7 @@ static void flac_lpc_32_c(int32_t *decoded, const int coeffs[32], } -av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, +av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps) { if (bps 16) { @@ -127,7 +127,7 @@ av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, } if (ARCH_ARM) -ff_flacdsp_init_arm(c, fmt, bps); +ff_flacdsp_init_arm(c, fmt, channels, bps); if (ARCH_X86) -ff_flacdsp_init_x86(c, fmt, bps); +ff_flacdsp_init_x86(c, fmt, channels, bps); } diff --git a/libavcodec/flacdsp.h b/libavcodec/flacdsp.h index 14f3466..417381c 100644 --- a/libavcodec/flacdsp.h +++ b/libavcodec/flacdsp.h @@ -31,8 +31,8 @@ typedef struct FLACDSPContext { const int32_t coefs[32], int shift); } FLACDSPContext; -void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int bps); -void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int bps); -void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int bps); +void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); +void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); +void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); #endif /* AVCODEC_FLACDSP_H */ diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 3b72888..e66ef3d 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -428,7 +428,7 @@ static av_cold int flac_encode_init(AVCodecContext *avctx) s-options.max_prediction_order, FF_LPC_TYPE_LEVINSON); ff_bswapdsp_init(s-bdsp); -ff_flacdsp_init(s-flac_dsp, avctx-sample_fmt, +ff_flacdsp_init(s-flac_dsp, avctx-sample_fmt, channels, avctx-bits_per_raw_sample); dprint_compression_options(s); diff --git a/libavcodec/x86/flacdsp.asm b/libavcodec/x86/flacdsp.asm index 37ee87b..35f9b81 100644 --- a/libavcodec/x86/flacdsp.asm +++ b/libavcodec/x86/flacdsp.asm @@ -72,3 +72,209 @@ ALIGN 16 LPC_32 xop %endif LPC_32 sse4 + +;- +;void ff_flac_decorrelate_{ls,rs,ms,indep2}_16_sse2(uint8_t **out, int32_t **in, int channels, +;
Re: [FFmpeg-devel] FFserver bug?
I still don't have tested old gits. But i will try to expain. A half year ago i installed ffmpeg and i made a configuration file. When i start this bitrate was going up to 2000kbs max. I updated and now it will go higher like its sum up or something, in some seconds the content bitrate will be 40 mb and still go higher. I also reinstalled the system. Maybe my configuration is old and that causes the problem. I will do some more extra tests and i will tell you. Op 2 nov. 2014 22:52 schreef Reynaldo H. Verdejo Pinochet reyna...@osg.samsung.com: Hi. I'm afraid I don't understand what the problem is. Can someone 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 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/flacdsp: add SSE2 and AVX decorrelate functions
On Sun, Nov 02, 2014 at 07:31:48PM -0300, James Almer wrote: Two to four times faster depending on instruction set, block size and channel count. Signed-off-by: James Almer jamr...@gmail.com --- TODO: 16 bits indep for 4, 6 and 8 channels. 24/32 bits indep for 8 channels. AVX2 and maybe MMX versions. Planar? libavcodec/arm/flacdsp_init_arm.c | 2 +- libavcodec/flacdec.c | 6 +- libavcodec/flacdsp.c | 6 +- libavcodec/flacdsp.h | 6 +- libavcodec/flacenc.c | 2 +- libavcodec/x86/flacdsp.asm| 206 ++ libavcodec/x86/flacdsp_init.c | 48 - 7 files changed, 264 insertions(+), 12 deletions(-) [...] +mova m0, [in0q] +mova m1, [in0q+in1q] +%if %1 2 +mova m2, [in0q+in2q] +mova m3, [in0q+in3q] +%if %1 4 +mova m4, [in0q+in4q] +mova m5, [in0q+in5q] +%endif +%endif +pslld m0, m%2 +pslld m1, m%2 +%if %1 2 +pslld m2, m%2 +pslld m3, m%2 +%if %1 4 +pslld m4, m%2 +pslld m5, m%2 +%endif +%endif Can't you do something like this? (untested) pslld m0, [in0q], m%2 %assign i 0 %rep %1 pslld m%i, [in0q+in%iq], m%2 %assigni i+1 %endrep [...] -- Clément B. pgphQeDWNz8un.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/flacdsp: add SSE2 and AVX decorrelate functions
On 02/11/14 7:43 PM, Clément Bœsch wrote: On Sun, Nov 02, 2014 at 07:31:48PM -0300, James Almer wrote: Two to four times faster depending on instruction set, block size and channel count. Signed-off-by: James Almer jamr...@gmail.com --- TODO: 16 bits indep for 4, 6 and 8 channels. 24/32 bits indep for 8 channels. AVX2 and maybe MMX versions. Planar? libavcodec/arm/flacdsp_init_arm.c | 2 +- libavcodec/flacdec.c | 6 +- libavcodec/flacdsp.c | 6 +- libavcodec/flacdsp.h | 6 +- libavcodec/flacenc.c | 2 +- libavcodec/x86/flacdsp.asm| 206 ++ libavcodec/x86/flacdsp_init.c | 48 - 7 files changed, 264 insertions(+), 12 deletions(-) [...] +mova m0, [in0q] +mova m1, [in0q+in1q] +%if %1 2 +mova m2, [in0q+in2q] +mova m3, [in0q+in3q] +%if %1 4 +mova m4, [in0q+in4q] +mova m5, [in0q+in5q] +%endif +%endif +pslld m0, m%2 +pslld m1, m%2 +%if %1 2 +pslld m2, m%2 +pslld m3, m%2 +%if %1 4 +pslld m4, m%2 +pslld m5, m%2 +%endif +%endif Can't you do something like this? (untested) pslld m0, [in0q], m%2 %assign i 0 %rep %1 pslld m%i, [in0q+in%iq], m%2 %assigni i+1 %endrep YASMlibavcodec/x86/flacdsp.o D:/MinGW/msys/1.0/ffmpeg/src/libavcodec/x86/flacdsp.asm:271: error: undefined symbol `m' (first use) D:/MinGW/msys/1.0/ffmpeg/src/libavcodec/x86/flacdsp.asm:271: error: undefined symbol `i' (first use) D:/MinGW/msys/1.0/ffmpeg/src/libavcodec/x86/flacdsp.asm:271: error: undefined symbol `in' (first use) D:/MinGW/msys/1.0/ffmpeg/src/libavcodec/x86/flacdsp.asm:271: error: undefined symbol `iq' (first use) D:/MinGW/msys/1.0/ffmpeg/src/libavcodec/x86/flacdsp.asm:271: error: (Each undefined symbol is reported only once.) make: *** [libavcodec/x86/flacdsp.o] Error 1 A %rep like that is only four lines shorter. Do you consider it more readable than the alternative to justify trying to get it working? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/flacdsp: add SSE2 and AVX decorrelate functions
On Sun, Nov 02, 2014 at 07:55:35PM -0300, James Almer wrote: On 02/11/14 7:43 PM, Clément Bœsch wrote: On Sun, Nov 02, 2014 at 07:31:48PM -0300, James Almer wrote: Two to four times faster depending on instruction set, block size and channel count. Signed-off-by: James Almer jamr...@gmail.com --- TODO: 16 bits indep for 4, 6 and 8 channels. 24/32 bits indep for 8 channels. AVX2 and maybe MMX versions. Planar? libavcodec/arm/flacdsp_init_arm.c | 2 +- libavcodec/flacdec.c | 6 +- libavcodec/flacdsp.c | 6 +- libavcodec/flacdsp.h | 6 +- libavcodec/flacenc.c | 2 +- libavcodec/x86/flacdsp.asm| 206 ++ libavcodec/x86/flacdsp_init.c | 48 - 7 files changed, 264 insertions(+), 12 deletions(-) [...] +mova m0, [in0q] +mova m1, [in0q+in1q] +%if %1 2 +mova m2, [in0q+in2q] +mova m3, [in0q+in3q] +%if %1 4 +mova m4, [in0q+in4q] +mova m5, [in0q+in5q] +%endif +%endif +pslld m0, m%2 +pslld m1, m%2 +%if %1 2 +pslld m2, m%2 +pslld m3, m%2 +%if %1 4 +pslld m4, m%2 +pslld m5, m%2 +%endif +%endif Can't you do something like this? (untested) pslld m0, [in0q], m%2 %assign i 0 %rep %1 pslld m%i, [in0q+in%iq], m%2 %assigni i+1 %endrep YASMlibavcodec/x86/flacdsp.o D:/MinGW/msys/1.0/ffmpeg/src/libavcodec/x86/flacdsp.asm:271: error: undefined symbol `m' (first use) D:/MinGW/msys/1.0/ffmpeg/src/libavcodec/x86/flacdsp.asm:271: error: undefined symbol `i' (first use) D:/MinGW/msys/1.0/ffmpeg/src/libavcodec/x86/flacdsp.asm:271: error: undefined symbol `in' (first use) D:/MinGW/msys/1.0/ffmpeg/src/libavcodec/x86/flacdsp.asm:271: error: undefined symbol `iq' (first use) D:/MinGW/msys/1.0/ffmpeg/src/libavcodec/x86/flacdsp.asm:271: error: (Each undefined symbol is reported only once.) make: *** [libavcodec/x86/flacdsp.o] Error 1 A %rep like that is only four lines shorter. Do you consider it more readable than the alternative to justify trying to get it working? Totally up to you, it looked easier to maintain and obvious than several nested ifdefery. -- Clément B. pgpzLgMCq7wMk.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]Silence warnings if fic files contains a zero-length cursor
On Sun, Nov 02, 2014 at 11:06:11PM +0100, Carl Eugen Hoyos wrote: Hi! Attached patch fixes ticket #4072 for me. Please comment, Carl Eugen fic.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) fc0e9306e01d102a7ed0eb7eaa8d0890498156d1 patchfic.diff diff --git a/libavcodec/fic.c b/libavcodec/fic.c probably ok [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Republics decline into democracies and democracies degenerate into despotisms. -- Aristotle signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] FFserver bug?
On 02.11.2014 23:34, Sevan Gelici wrote: I still don't have tested old gits. But i will try to expain. A half year ago i installed ffmpeg and i made a configuration file. When i start this bitrate was going up to 2000kbs max. I updated and now it will go higher like its sum up or something, in some seconds the content bitrate will be 40 mb and still go higher. I also reinstalled the system. Maybe my configuration is old and that causes the problem. Offtopic: regarding config: partitions, directpred (it should be direct-pred), wpredp are x264 options and ffserver doesn't send them to ffmpeg that serves a stream. Any private option for any codec is not supported yet. They have no meaning and now they are treated as errors. (in near future I will add posibility to set them) Also VideoGopSize is as alias for AVOptionVideo g But this doesn't cause the issue anyway. I noticed that commenting out VideoSize 1280x720 reduces bitrate back to 1500kbit/s which is correct. Why setting VideoSize has such strange effect - I dont know. I just checked ffserver and ffm format and there is everything ok with these width and height. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] lavf/flvenc: fail in case the muxed packet is too big
Avoid the creation of files which cannot be successfully decoded by ffmpeg, for example generated with: ffmpeg -f lavfi -i sine -af aselect='not(between(t,100,500))',aresample=min_comp=0.001:min_hard_comp=0.10 -acodec pcm_s16le -t 1000 -y out_audio.flv --- libavformat/flvenc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 31a5c9e..939e663 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -548,6 +548,12 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) if (sc-last_ts ts) sc-last_ts = ts; +if (size + flags_size = 124) { +av_log(s, AV_LOG_ERROR, Too large packet with size %u = %u\n, + size + flags_size, 124); +return AVERROR(EINVAL); +} + avio_wb24(pb, size + flags_size); avio_wb24(pb, ts 0xFF); avio_w8(pb, (ts 24) 0x7F); // timestamps are 32 bits _signed_ -- 1.8.3.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] ffserver_config: improve AVOption handing
On 02.11.2014 22:37, Reynaldo H. Verdejo Pinochet wrote: If you are always returning 0 then this func should probably be declared static void instead? I left it as int for future, but probably no reason for that, so changed. [..] diff --git a/ffserver_config.h b/ffserver_config.h index f29f07f..c684fb5 100644 --- a/ffserver_config.h +++ b/ffserver_config.h @@ -113,6 +113,7 @@ typedef struct FFServerConfig { AVDictionary *video_conf; /* Values stored in video AVCodecContext.fields */ AVDictionary *audio_opts; /* AVOptions for audio encoder */ AVDictionary *audio_conf; /* Values stored in audio AVCodecContext.fields */ +AVCodecContext *dummy_ctx;/* Used internally to test AVOptions, not to be used anywere else */ s/anywere/anywhere/g nit: . Not to be Changed and pushed. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] x86/flacdsp: add SSE2 and AVX decorrelate functions
Two to four times faster depending on instruction set, block size and channel count. Signed-off-by: James Almer jamr...@gmail.com --- libavcodec/arm/flacdsp_init_arm.c | 2 +- libavcodec/flacdec.c | 6 +- libavcodec/flacdsp.c | 6 +- libavcodec/flacdsp.h | 6 +- libavcodec/flacenc.c | 2 +- libavcodec/x86/flacdsp.asm| 193 ++ libavcodec/x86/flacdsp_init.c | 48 +- 7 files changed, 251 insertions(+), 12 deletions(-) diff --git a/libavcodec/arm/flacdsp_init_arm.c b/libavcodec/arm/flacdsp_init_arm.c index 9ddb268..df1b19c 100644 --- a/libavcodec/arm/flacdsp_init_arm.c +++ b/libavcodec/arm/flacdsp_init_arm.c @@ -24,7 +24,7 @@ void ff_flac_lpc_16_arm(int32_t *samples, const int coeffs[32], int order, int qlevel, int len); -av_cold void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, +av_cold void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps) { if (bps = 16 CONFIG_FLAC_DECODER) diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index 1333972..01ae717 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -111,7 +111,7 @@ static av_cold int flac_decode_init(AVCodecContext *avctx) if (ret 0) return ret; flac_set_bps(s); -ff_flacdsp_init(s-dsp, avctx-sample_fmt, s-bps); +ff_flacdsp_init(s-dsp, avctx-sample_fmt, s-channels, s-bps); s-got_streaminfo = 1; return 0; @@ -173,7 +173,7 @@ static int parse_streaminfo(FLACContext *s, const uint8_t *buf, int buf_size) if (ret 0) return ret; flac_set_bps(s); -ff_flacdsp_init(s-dsp, s-avctx-sample_fmt, s-bps); +ff_flacdsp_init(s-dsp, s-avctx-sample_fmt, s-channels, s-bps); s-got_streaminfo = 1; return 0; @@ -472,7 +472,7 @@ static int decode_frame(FLACContext *s) ret = allocate_buffers(s); if (ret 0) return ret; -ff_flacdsp_init(s-dsp, s-avctx-sample_fmt, s-bps); +ff_flacdsp_init(s-dsp, s-avctx-sample_fmt, s-channels, s-bps); s-got_streaminfo = 1; dump_headers(s-avctx, (FLACStreaminfo *)s); } diff --git a/libavcodec/flacdsp.c b/libavcodec/flacdsp.c index b15bc74..a83eb83 100644 --- a/libavcodec/flacdsp.c +++ b/libavcodec/flacdsp.c @@ -85,7 +85,7 @@ static void flac_lpc_32_c(int32_t *decoded, const int coeffs[32], } -av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, +av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps) { if (bps 16) { @@ -127,7 +127,7 @@ av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, } if (ARCH_ARM) -ff_flacdsp_init_arm(c, fmt, bps); +ff_flacdsp_init_arm(c, fmt, channels, bps); if (ARCH_X86) -ff_flacdsp_init_x86(c, fmt, bps); +ff_flacdsp_init_x86(c, fmt, channels, bps); } diff --git a/libavcodec/flacdsp.h b/libavcodec/flacdsp.h index 14f3466..417381c 100644 --- a/libavcodec/flacdsp.h +++ b/libavcodec/flacdsp.h @@ -31,8 +31,8 @@ typedef struct FLACDSPContext { const int32_t coefs[32], int shift); } FLACDSPContext; -void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int bps); -void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int bps); -void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int bps); +void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); +void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); +void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); #endif /* AVCODEC_FLACDSP_H */ diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 3b72888..e66ef3d 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -428,7 +428,7 @@ static av_cold int flac_encode_init(AVCodecContext *avctx) s-options.max_prediction_order, FF_LPC_TYPE_LEVINSON); ff_bswapdsp_init(s-bdsp); -ff_flacdsp_init(s-flac_dsp, avctx-sample_fmt, +ff_flacdsp_init(s-flac_dsp, avctx-sample_fmt, channels, avctx-bits_per_raw_sample); dprint_compression_options(s); diff --git a/libavcodec/x86/flacdsp.asm b/libavcodec/x86/flacdsp.asm index 37ee87b..4091e16 100644 --- a/libavcodec/x86/flacdsp.asm +++ b/libavcodec/x86/flacdsp.asm @@ -72,3 +72,196 @@ ALIGN 16 LPC_32 xop %endif LPC_32 sse4 + +;- +;void ff_flac_decorrelate_{ls,rs,ms,indep2}_16_sse2(uint8_t **out, int32_t **in, int channels, +; int len, int shift);
Re: [FFmpeg-devel] [PATCH] lavf/flvenc: fail in case the muxed packet is too big
On date Monday 2014-11-03 00:32:04 +0100, Stefano Sabatini encoded: Avoid the creation of files which cannot be successfully decoded by ffmpeg, for example generated with: ffmpeg -f lavfi -i sine -af aselect='not(between(t,100,500))',aresample=min_comp=0.001:min_hard_comp=0.10 -acodec pcm_s16le -t 1000 -y out_audio.flv BTW I wonder if we should tweak aresample to generate smaller packets, my current workaround is to add asetnsamples after aresample. -- FFmpeg = Fanciful Foolish Moronic Problematic Ecstatic Guru ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] FFserver bug?
On date Monday 2014-11-03 00:25:54 +0100, Lukasz Marek encoded: [...] Offtopic: regarding config: partitions, directpred (it should be direct-pred), wpredp are x264 options and ffserver doesn't send them to ffmpeg that serves a stream. Any private option for any codec is not supported yet. They have no meaning and now they are treated as errors. (in near future I will add posibility to set them) I'm curious about that, since that was in my (much neglected) todo list. How do you plan to do that? The only way I see is to fiddle with FFM. -- FFmpeg = Formidable and Fast Mysterious Picky Eccentric Guru ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] [RFC]lavf/ffm: update with more options.
On date Sunday 2014-11-02 19:19:14 +0100, Lukasz Marek encoded: TODO: bump micro Many common codec options are not via ffm protocol. This commit adds common A/V encoding options to protocol. Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavformat/ffmdec.c | 78 libavformat/ffmenc.c | 60 2 files changed, 138 insertions(+) My idea was to let the protocol specify the option using the AVOption interface. This way you don't have to update the protocol every time a new option is added to libavcodec, *AND* you can support private codec options. [...] -- FFmpeg = Faithful and Fierce Mastodontic Political Empowered Guru ___ 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 2 November 2014 00:02, Reynaldo H. Verdejo Pinochet reyna...@osg.samsung.com wrote: 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. Pushed ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] [RFC]lavf/ffm: update with more options.
On 03.11.2014 00:40, Stefano Sabatini wrote: On date Sunday 2014-11-02 19:19:14 +0100, Lukasz Marek encoded: TODO: bump micro Many common codec options are not via ffm protocol. This commit adds common A/V encoding options to protocol. Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavformat/ffmdec.c | 78 libavformat/ffmenc.c | 60 2 files changed, 138 insertions(+) My idea was to let the protocol specify the option using the AVOption interface. This way you don't have to update the protocol every time a new option is added to libavcodec, *AND* you can support private codec options. (in near future I will add posibility to set them) I'm curious about that, since that was in my (much neglected) todo list. How do you plan to do that? The only way I see is to fiddle with FFM. To not spam other thread with offtopic I moved your question here. I'm not sure yet. In config I wanted to something like that: VideoCodec libx264 #common options: AVOptionVideo flags +global_header #private option AVOptionVideo libx264:crf 23 In ffm my first idea was to serialize it as strings in separate section. I haven't really thought about it yet. Maybe serializing common options would be also good idea. And send only set values. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavf/flvenc: fail in case the muxed packet is too big
On Mon, 3 Nov 2014 00:35:58 +0100 Stefano Sabatini stefa...@gmail.com wrote: On date Monday 2014-11-03 00:32:04 +0100, Stefano Sabatini encoded: Avoid the creation of files which cannot be successfully decoded by ffmpeg, for example generated with: ffmpeg -f lavfi -i sine -af aselect='not(between(t,100,500))',aresample=min_comp=0.001:min_hard_comp=0.10 -acodec pcm_s16le -t 1000 -y out_audio.flv BTW I wonder if we should tweak aresample to generate smaller packets, my current workaround is to add asetnsamples after aresample. Why should filter output sizes have anything to do with packet sizes? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] [RFC]lavf/ffm: update with more options.
On Sun, Nov 02, 2014 at 07:19:14PM +0100, Lukasz Marek wrote: TODO: bump micro Many common codec options are not via ffm protocol. This commit adds common A/V encoding options to protocol. Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavformat/ffmdec.c | 78 libavformat/ffmenc.c | 60 2 files changed, 138 insertions(+) diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index e95c139..8f5338f 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -233,6 +233,12 @@ FF_ENABLE_DEPRECATION_WARNINGS return 0; } +static void ffm_report_old_version(AVFormatContext *s) +{ +av_log(s, AV_LOG_WARNING, + Old version of feed file detected. Consider deleting feed files.\n); +} + static int ffm2_read_header(AVFormatContext *s) { FFMContext *ffm = s-priv_data; @@ -294,6 +300,17 @@ static int ffm2_read_header(AVFormatContext *s) if (ff_get_extradata(codec, pb, avio_rb32(pb)) 0) return AVERROR(ENOMEM); } +if (avio_tell(pb) next) { +codec-slices = avio_r8(pb); +codec-thread_type = avio_r8(pb); +codec-compression_level = avio_rb32(pb); +codec-global_quality = avio_rb32(pb); +codec-ticks_per_frame = avio_rb32(pb); +codec-trellis = avio_rb32(pb); +codec-profile = avio_rb32(pb); +} +if (avio_tell(pb) next) +ffm_report_old_version(s); avio_seek(pb, next, SEEK_SET); id = avio_rb32(pb); size = avio_rb32(pb); @@ -348,11 +365,72 @@ FF_ENABLE_DEPRECATION_WARNINGS codec-qblur = av_int2double(avio_rb64(pb)); codec-max_qdiff = avio_rb32(pb); codec-refs = avio_rb32(pb); +if (avio_tell(pb) next) { +codec-bidir_refine = avio_rb32(pb); +codec-brd_scale = avio_rb32(pb); +codec-b_sensitivity = avio_rb32(pb); +codec-chromaoffset = avio_rb32(pb); +codec-chroma_sample_location = avio_r8(pb); +codec-color_primaries = avio_r8(pb); +codec-color_range = avio_r8(pb); +codec-colorspace = avio_r8(pb); +codec-color_trc = avio_r8(pb); +codec-context_model = avio_rb32(pb); +codec-dia_size = avio_rb32(pb); +codec-field_order = avio_r8(pb); +codec-frame_skip_exp = avio_rb32(pb); +codec-frame_skip_factor = avio_rb32(pb); +codec-frame_skip_threshold = avio_rb32(pb); +codec-idct_algo = avio_rb16(pb); +codec-ildct_cmp = avio_rb16(pb); +codec-inter_quant_bias = avio_rb32(pb); +codec-intra_quant_bias = avio_rb32(pb); +codec-last_predictor_count = avio_rb32(pb); +codec-mb_cmp = avio_rb32(pb); +codec-mb_lmin = avio_rb16(pb); +codec-mb_lmax = avio_rb16(pb); +codec-lumi_masking = av_int2double(avio_rb64(pb)); +codec-dark_masking = av_int2double(avio_rb64(pb)); +codec-me_penalty_compensation = avio_rb32(pb); +codec-me_pre_cmp = avio_rb32(pb); +codec-me_sub_cmp = avio_rb32(pb); +codec-mv0_threshold = avio_rb32(pb); +codec-noise_reduction = avio_rb32(pb); +codec-p_masking = av_int2double(avio_rb32(pb)); +codec-pre_dia_size = avio_rb32(pb); +codec-prediction_method = avio_r8(pb); +codec-pre_me = avio_rb32(pb); +codec-rc_initial_buffer_occupancy = avio_rb32(pb); +codec-rc_max_available_vbv_use = av_int2double(avio_rb32(pb)); +codec-rc_min_vbv_overflow_use = av_int2double(avio_rb32(pb)); +codec-rtp_payload_size = avio_rb32(pb); +codec-sample_aspect_ratio.num = avio_rb32(pb); +codec-sample_aspect_ratio.den = avio_rb32(pb); +codec-spatial_cplx_masking = av_int2double(avio_rb32(pb)); +codec-temporal_cplx_masking = av_int2double(avio_rb32(pb)); +codec-timecode_frame_start = avio_rb64(pb); +} +if (avio_tell(pb) next) +ffm_report_old_version(s); break; case MKBETAG('S', 'T', 'A', 'U'): codec-sample_rate = avio_rb32(pb); codec-channels =
Re: [FFmpeg-devel] [PATCH] lavf/flvenc: fail in case the muxed packet is too big
On Mon, Nov 03, 2014 at 12:32:04AM +0100, Stefano Sabatini wrote: Avoid the creation of files which cannot be successfully decoded by ffmpeg, for example generated with: ffmpeg -f lavfi -i sine -af aselect='not(between(t,100,500))',aresample=min_comp=0.001:min_hard_comp=0.10 -acodec pcm_s16le -t 1000 -y out_audio.flv --- libavformat/flvenc.c | 6 ++ 1 file changed, 6 insertions(+) LGTM [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: Hack to allow compilation for x32.
Reimar Döffinger Reimar.Doeffinger at gmx.de writes: Configures it as x86_64 with assembler disabled. Please mention ticket #1565 in the commit message. Thank you, Carl Eugen ___ 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
Michael Niedermayer michaelni at gmx.at writes: Ticket #4069 indicates that users unfortunately try to put G.726 in mov. Attached patch makes such files decodable. should be ok The patch was merged. Thank you, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Discuss mp4 fragmented: TFDT::BaseMediaDecodeTime. TRUN::SampleDuration
*Hi ffmpeg-devel, I’m sending this mail in order to encourage some discussion about ISO BMFF specification and find out what people think about problems described below and if anybody else also have seen these problems.I’m software engineer and I write MP4 Muxer/Demuxer (It’s not FFmpeg code) which is then used to generate DASH streams (MP4 fragmented container). Some players reported playback issues so I had to provide some controversial patches in MP4 Muxer to make these players accepting streams generated by my Muxer. My current understanding is that these issues happen because people read ISO BMFF specification differently, so they expect different behavior.Below I would like to describe these issues and I would be glad to hear your opinion about that. The latest spec I have on hands is ISO/IEC 14496-12:2012. Fourth edition 2012-07-15, Corrected version 2012-09-15. TFDT::BaseMediaDecodeTimeISO BMFF standard defines TFDT::BaseMediaDecodeTime as is an integer equal to the sum of the decode durations of all earlier samples in the media:8.8.12 Track fragment decode timeThe Track Fragment Base Media Decode Time Box provides the absolute decode time, measured on the media timeline, of the first sample in decode order in the track fragment. This can be useful, for example, when performing random access in a file; it is not necessary to sum the sample durations of all preceding samples in previous fragments to find this value (where the sample durations are the deltas in the Decoding Time to Sample Box and the sample_durations in the preceding track runs)baseMediaDecodeTime is an integer equal to the sum of the decode durations of all earlier samples in the media, expressed in the media's timescale. It does not include the samples added in the enclosing track fragment.Player claims that TFDT::BaseMediaDecodeTime must be strictly equal to sum of all preceding sample decode durations. Most likely, Player side is absolutely right here, because specification just says “baseMediaDecodeTime is an integer equal to the sum of the decode durations of all earlier samples in the media” Unfortunately, strict following of the spec makes Transcoding/Muxing process much more complicated and flaky. Modern transcoding engines (for instance, YouTube and Vimeo) split video and chunks and transcode them in parallel. Parallel transcoding and frame rate conversion cause DTS/PTS fluctuation, so it becomes not trivial to follow TFDT::BaseMediaDecodTime and in most cases sample duration correction or sample dropping is required to follow this rule strictly. The most complicated thing is that in order to perform this correction for current fragment (MOOF+MDAT pair), we have to know DTS of first sample of the next fragment. We can not really get this information because of parallel processing, so we try to guess this value. We can do it for constant framerate, but for variable frame rate it’s a real issue. Frankly, current solution is flaky.Current TFDT::BaseMediaDecodeTime requirement also doesn’t address frame dropping and stream errors which may happen during live streaming/transcoding.What do you think about TFDT::BaseMediaDecodeTime?TRUN::SampleDurationMediaSourceExtensions http://www.w3.org/TR/media-source/ (MSE) specification authors think that TRUN::duraton in ISO BMFF spec is sample duration. In another words TRUN::duration[n] = PTS[n+1] - PTS[n]. I always have been thinking that TRUN::duration is calculated as DTS[n+1] - DTS[n].In most cases delta DTS is equal to delta PTS, but because of timescale conversion rounding, DTS/PTS fluctuations caused by parallel processing and framerate conversion, it’s not true all the time. This mismatch causes holes on MSE playback timeline. Holes cause poor user experience.I went through ISO spec and I've seen that it is not clear. It explicitly says that STTS entries are decoding deltas:8.6.1.1 Time to Sample BoxesThe composition times (CT) and decoding times (DT) of samples are derived from the Time to Sample Boxes, of which there are two types. The decoding time is defined in the Decoding Time to Sample Box, giving time deltas between successive decoding times.8.6.1.2 Decoding Time to Sample BoxThe Decoding Time to Sample Box contains decode time delta's: DT(n+1) = DT(n) + STTS(n) where STTS(n) is the (uncompressed) table entry for sample n.As you can see, ISO spec is very clear about regular MP4 files. Unfortunately, it's not so clear about fragmented MP4 and atom TRUN:8.8.8 Track Fragment Run Box...The following flags are defined:...0x000100 sample-duration-present: indicates that each sample has its own duration, otherwise thedefault is usedI reviewed FFmpeg MOV Muxer code and it calculates TRUN::SampleDuration as DTS delta:http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/movenc.c;h=a43752a01173eb8a37fb459f8325d516daf2e74a;hb=HEAD#l860 http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/movenc.c;h=a43752a01173eb8a37fb459f8325d516daf2e74a;hb=HEAD#l860What do you
Re: [FFmpeg-devel] [PATCH 2/3] idet improvements: add reset_count feature
I made the decay multiplication fixed point. I moved all the fixed point logic to macros which hopefully makes it easier to read. I also removed the total_frames count since it is now likely to become inconsistent with the actual classification totals anyway. I've gone back to just outputting rounded integers to av_log so as not to break scripts of people who are insane enough to try and parse it (bash can't handle float). I used your suggestion for formatting fixed point decimal values for the metadata tags. From 7171918c2f34118679412da72add7b9056e04209 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell kevmi...@gmail.com Date: Sun, 2 Nov 2014 04:37:13 -0800 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. --- doc/filters.texi | 5 libavfilter/version.h | 2 +- libavfilter/vf_idet.c | 79 +++ libavfilter/vf_idet.h | 15 -- 4 files changed, 74 insertions(+), 27 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 33f842b..ae08f32 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5625,6 +5625,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..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..d0b3aa2 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 }, +{ half_life, half life of cumulative statistics, OFFSET(half_life), AV_OPT_TYPE_FLOAT, {.dbl = 0.0}, -1, INT_MAX, FLAGS }, { NULL } }; @@ -48,6 +49,14 @@ static const char *type2str(Type type) return NULL; } +static int av_dict_set_fxp(AVDictionary **pm, const char *key, uint64_t value, int decimal_digits, +int flags) +{ +char valuestr[44]; +snprintf(valuestr, sizeof(valuestr), %PRId64.%0*PRId64, FXP_TO_DECIMAL(value, decimal_digits)); +return av_dict_set(pm, key, valuestr, flags); +} + int ff_idet_filter_line_c(const uint8_t *a, const uint8_t *b, const uint8_t *c, int w) { int x; @@ -74,6 +83,23 @@ 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:%6PRId64 BFF:%6PRId64 Progressive:%6PRId64 Undetermined:%6PRId64\n, + FXP_TO_INT(idet-prestat[TFF]), + FXP_TO_INT(idet-prestat[BFF]), + FXP_TO_INT(idet-prestat[PROGRESSIVE]), + FXP_TO_INT(idet-prestat[UNDETERMINED]) +); +av_log(ctx, AV_LOG_INFO, Multi frame detection: TFF:%6PRId64 BFF:%6PRId64 Progressive:%6PRId64 Undetermined:%6PRId64\n, + FXP_TO_INT(idet-poststat[TFF]), + FXP_TO_INT(idet-poststat[BFF]), + FXP_TO_INT(idet-poststat[PROGRESSIVE]), + FXP_TO_INT(idet-poststat[UNDETERMINED]) +); +} + static void filter(AVFilterContext *ctx) { IDETContext *idet = ctx-priv; @@ -146,23 +172,34 @@ static void filter(AVFilterContext *ctx) idet-cur-interlaced_frame = 0; } -idet-prestat [ type] ++; -idet-poststat[idet-last_type] ++; +for(i=0; i4; i++){ +idet-prestat [i] = FXP_MULT(idet-decay_coefficient, idet-prestat [i]); +idet-poststat[i] = FXP_MULT(idet-decay_coefficient, idet-poststat[i]); +} + +FXP_INCREMENT(idet-prestat [ type]); +FXP_INCREMENT(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(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); -
Re: [FFmpeg-devel] [PATCH 3/3] idet improvements: add repeated field detection
update with half life patch On Sun, Nov 2, 2014 at 5:04 AM, Kevin Mitchell kevmi...@gmail.com wrote: update with half life patch From 0a870e0bb9be9c8537c7b6b133e528f8afffe35f Mon Sep 17 00:00:00 2001 From: Kevin Mitchell kevmi...@gmail.com Date: Sun, 2 Nov 2014 04:49:34 -0800 Subject: [PATCH 2/2] avfilter/vf_idet: add a repeated field detection This can be useful for determining telecine. --- doc/filters.texi | 19 +-- libavfilter/version.h | 2 +- libavfilter/vf_idet.c | 43 +-- libavfilter/vf_idet.h | 9 + 4 files changed, 68 insertions(+), 5 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index ae08f32..be4d9c2 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5574,8 +5574,9 @@ 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. @@ -5616,6 +5617,18 @@ 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: @@ -5625,6 +5638,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 d0b3aa2..4695fd7 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_fxp(AVDictionary **pm, const char *key, uint64_t value, i 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; @@ -86,12 +97,20 @@ 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:%6PRId64 Top:%6PRId64 Bottom:%6PRId64\n, + FXP_TO_INT(idet-repeats[REPEAT_NONE]), + FXP_TO_INT(idet-repeats[REPEAT_TOP]), + FXP_TO_INT(idet-repeats[REPEAT_BOTTOM]) +); + av_log(ctx, AV_LOG_INFO, Single frame detection: TFF:%6PRId64 BFF:%6PRId64 Progressive:%6PRId64 Undetermined:%6PRId64\n, FXP_TO_INT(idet-prestat[TFF]), FXP_TO_INT(idet-prestat[BFF]), FXP_TO_INT(idet-prestat[PROGRESSIVE]), FXP_TO_INT(idet-prestat[UNDETERMINED]) ); + av_log(ctx, AV_LOG_INFO, Multi frame detection:
Re: [FFmpeg-devel] [PATCH 2/3] idet improvements: add reset_count feature
On Sun, Nov 02, 2014 at 06:20:06PM -0800, Kevin Mitchell wrote: I made the decay multiplication fixed point. I moved all the fixed point logic to macros which hopefully makes it easier to read. I also removed the total_frames count since it is now likely to become inconsistent with the actual classification totals anyway. I've gone back to just outputting rounded integers to av_log so as not to break scripts of people who are insane enough to try and parse it (bash can't handle float). I used your suggestion for formatting fixed point decimal values for the metadata tags. doc/filters.texi |5 +++ libavfilter/version.h |2 - libavfilter/vf_idet.c | 79 ++ libavfilter/vf_idet.h | 15 - 4 files changed, 74 insertions(+), 27 deletions(-) 48d7ffa6bec7940ae0c348fd09308364a69e7cdc 0001-avfilter-vf_idet-add-a-half_life-option-for-statisti.patch From 7171918c2f34118679412da72add7b9056e04209 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell kevmi...@gmail.com Date: Sun, 2 Nov 2014 04:37:13 -0800 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. --- doc/filters.texi | 5 libavfilter/version.h | 2 +- libavfilter/vf_idet.c | 79 +++ libavfilter/vf_idet.h | 15 -- 4 files changed, 74 insertions(+), 27 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 33f842b..ae08f32 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5625,6 +5625,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..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..d0b3aa2 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 }, +{ half_life, half life of cumulative statistics, OFFSET(half_life), AV_OPT_TYPE_FLOAT, {.dbl = 0.0}, -1, INT_MAX, FLAGS }, { NULL } }; @@ -48,6 +49,14 @@ static const char *type2str(Type type) return NULL; } +static int av_dict_set_fxp(AVDictionary **pm, const char *key, uint64_t value, int decimal_digits, +int flags) +{ +char valuestr[44]; +snprintf(valuestr, sizeof(valuestr), %PRId64.%0*PRId64, FXP_TO_DECIMAL(value, decimal_digits)); ... +#define FXP_TO_DECIMAL(value,digits) (value) / PRECISION, (digits), (uint64_t) round(( (value) % PRECISION) / (double) (PRECISION / pow(10.0, (digits) ))) thats still using floating point calculations round(), pow(), and double are not integer based also it will give incorrect results i think 0.9 could get printed as 0.100 when the remainder is rounded up [...] -- 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/3] idet improvements: add reset_count feature
Ok, I fixed the logic by removing round() and added an integer power function to replace pow() From f66e072d477964ebcfe38eafe40d12030a91df14 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell kevmi...@gmail.com Date: Sun, 2 Nov 2014 21:30:51 -0800 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. --- doc/filters.texi | 5 +++ libavfilter/version.h | 2 +- libavfilter/vf_idet.c | 93 ++- libavfilter/vf_idet.h | 7 ++-- 4 files changed, 80 insertions(+), 27 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 33f842b..ae08f32 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5625,6 +5625,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..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..464532f 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -32,11 +32,26 @@ 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 }, +{ half_life, half life of cumulative statistics, OFFSET(half_life), AV_OPT_TYPE_FLOAT, {.dbl = 0.0}, -1, INT_MAX, FLAGS }, { NULL } }; AVFILTER_DEFINE_CLASS(idet); +static uint64_t uintpow(uint64_t b,unsigned int e) +{ +uint64_t r=1; +while(e--) r*=b; +return r; +} + +#define PRECISION 10 +#define FLOAT_TO_FXP(value) (uint64_t) round( PRECISION * (value) ) +#define FXP_TO_INT(value) (value) / PRECISION +#define FXP_TO_DECIMAL(value,digits) FXP_TO_INT(value), (digits), ( (value) % PRECISION ) / ( PRECISION / uintpow(10, (digits) ) ) +#define FXP_MULT(a,b) ((a) * (b)) / PRECISION +#define FXP_INCREMENT(value) (value) += PRECISION + static const char *type2str(Type type) { switch(type) { @@ -48,6 +63,14 @@ static const char *type2str(Type type) return NULL; } +static int av_dict_set_fxp(AVDictionary **pm, const char *key, uint64_t value, unsigned int decimal_digits, +int flags) +{ +char valuestr[44]; +snprintf(valuestr, sizeof(valuestr), %PRId64.%0*PRId64, FXP_TO_DECIMAL(value, decimal_digits)); +return av_dict_set(pm, key, valuestr, flags); +} + int ff_idet_filter_line_c(const uint8_t *a, const uint8_t *b, const uint8_t *c, int w) { int x; @@ -74,6 +97,23 @@ 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:%6PRId64 BFF:%6PRId64 Progressive:%6PRId64 Undetermined:%6PRId64\n, + FXP_TO_INT(idet-prestat[TFF]), + FXP_TO_INT(idet-prestat[BFF]), + FXP_TO_INT(idet-prestat[PROGRESSIVE]), + FXP_TO_INT(idet-prestat[UNDETERMINED]) +); +av_log(ctx, AV_LOG_INFO, Multi frame detection: TFF:%6PRId64 BFF:%6PRId64 Progressive:%6PRId64 Undetermined:%6PRId64\n, + FXP_TO_INT(idet-poststat[TFF]), + FXP_TO_INT(idet-poststat[BFF]), + FXP_TO_INT(idet-poststat[PROGRESSIVE]), + FXP_TO_INT(idet-poststat[UNDETERMINED]) +); +} + static void filter(AVFilterContext *ctx) { IDETContext *idet = ctx-priv; @@ -146,23 +186,34 @@ static void filter(AVFilterContext *ctx) idet-cur-interlaced_frame = 0; } -idet-prestat [ type] ++; -idet-poststat[idet-last_type] ++; +for(i=0; i4; i++){ +idet-prestat [i] = FXP_MULT(idet-decay_coefficient, idet-prestat [i]); +idet-poststat[i] = FXP_MULT(idet-decay_coefficient, idet-poststat[i]); +} + +FXP_INCREMENT(idet-prestat [ type]); +FXP_INCREMENT(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(metadata, lavfi.idet.single.current_frame, type2str(type),
Re: [FFmpeg-devel] [PATCH 3/3] idet improvements: add repeated field detection
update with half life patch From bb68edd9a0f31acf757e8819e783191ce5b2d800 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell kevmi...@gmail.com Date: Sun, 2 Nov 2014 04:49:34 -0800 Subject: [PATCH 2/2] avfilter/vf_idet: add a repeated field detection This can be useful for determining telecine. --- doc/filters.texi | 19 +-- libavfilter/version.h | 2 +- libavfilter/vf_idet.c | 43 +-- libavfilter/vf_idet.h | 9 + 4 files changed, 68 insertions(+), 5 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index ae08f32..be4d9c2 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5574,8 +5574,9 @@ 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. @@ -5616,6 +5617,18 @@ 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: @@ -5625,6 +5638,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 464532f..619ee66 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 } }; @@ -71,6 +72,16 @@ static int av_dict_set_fxp(AVDictionary **pm, const char *key, uint64_t value, u 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; @@ -100,12 +111,20 @@ 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:%6PRId64 Top:%6PRId64 Bottom:%6PRId64\n, + FXP_TO_INT(idet-repeats[REPEAT_NONE]), + FXP_TO_INT(idet-repeats[REPEAT_TOP]), + FXP_TO_INT(idet-repeats[REPEAT_BOTTOM]) +); + av_log(ctx, AV_LOG_INFO, Single frame detection: TFF:%6PRId64 BFF:%6PRId64 Progressive:%6PRId64 Undetermined:%6PRId64\n, FXP_TO_INT(idet-prestat[TFF]), FXP_TO_INT(idet-prestat[BFF]), FXP_TO_INT(idet-prestat[PROGRESSIVE]), FXP_TO_INT(idet-prestat[UNDETERMINED]) ); + av_log(ctx, AV_LOG_INFO, Multi frame detection: TFF:%6PRId64 BFF:%6PRId64 Progressive:%6PRId64 Undetermined:%6PRId64\n,
Re: [FFmpeg-devel] [PATCH] lavfi: add xbr filter
I mailed Sergio (Hyllian) and this is his message - You can look at this thread: http://www.libretro.com/forums/viewtopic.php?f=6t=134 And there are some c/c++ implementations out there like this: https://github.com/yoyofr/iFBA/blob/master/fba_src/src/intf/video/scalers/xbr.cpp I'm not working on it this time, though. Hyllian. On Sun, Nov 2, 2014 at 9:15 PM, Nicolas George geo...@nsup.org wrote: Le duodi 12 brumaire, an CCXXIII, Stefano Sabatini a écrit : This blog mentions Hyllian xBR algorithm: http://board.byuu.org/viewtopic.php?f=10t=2248 but the link above is dead. There is a version in the Wayback Machine: https://web.archive.org/web/20140904180543/http://board.byuu.org/viewtopic.php?f=10t=2248 Regards, -- Nicolas George ___ 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