[FFmpeg-devel] A little copy/paste type for you to fix
libavformat:166 if (ctx-pageurl) { av_strlcat(filename, pageUrl=, len); av_strlcat(filename, ctx-pageurl, len); } if (ctx-swfurl) { av_strlcat(filename, swfUrl=, len); av_strlcat(filename, ctx-pageurl, len); } Do you see it? The line at 172 should be av_strlcat(filename, ctx-swfurl, len); joolz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Fwd: [PATCH] lavfi: add xbr filter
On Sun, Nov 9, 2014 at 7:07 AM, Michael Niedermayer michae...@gmx.at wrote: On Sun, Nov 09, 2014 at 01:13:18AM +0100, Stefano Sabatini wrote: On date Sunday 2014-11-09 00:59:36 +0530, arwa arif encoded: [...] +#define pg_lbmask0x00FEFEFE +#define pg_red_blue_mask 0x00FF00FF +#define pg_green_mask0xFF00 pg stands for? Also usually macros and defines are UPCASED. the names where taken from the reference code, so i suspect none of us can know what pg stands for [...] +static uint32_t df(uint32_t x, uint32_t y, const uint32_t *r2y) +{ + +#define YMASK 0xff +#define UMASK 0x00ff00 +#define VMASK 0xff + +uint32_t yuv1 = r2y[x 0xff]; +uint32_t yuv2 = r2y[y 0xff]; Note: is the mask needed? this depends on if AV_PIX_FMT_0RGB32 is guranteed to have the 0 byte really 0. I would not bet on that, even if it works i suggest to leave this masking in there somewhere [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 1 Used only once- Some unspecified defect prevented a second use In good condition - Can be repaird by experienced expert As is - You wouldnt want it even if you were payed for it, if you knew ... I tried the running the filter without YUV masks, it is giving segmentation fault. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel From a477d6e439c9f09c6e90ab22e41d067bf7b9fd2f Mon Sep 17 00:00:00 2001 From: Arwa Arif arwaarif1...@gmail.com Date: Thu, 30 Oct 2014 22:06:20 +0530 Subject: [PATCH] lavfi: add xbr filter xBR --- Changelog|1 + LICENSE.md |1 + configure|1 + doc/filters.texi |4 + libavfilter/Makefile |1 + libavfilter/allfilters.c |1 + libavfilter/vf_xbr.c | 356 ++ 7 files changed, 365 insertions(+) create mode 100644 libavfilter/vf_xbr.c diff --git a/Changelog b/Changelog index ec6abba..ffce1db 100644 --- a/Changelog +++ b/Changelog @@ -9,6 +9,7 @@ version next: - STL subtitle demuxer and decoder - libutvideo YUV 4:2:2 10bit support - XCB-based screen-grabber +- xBR scaler version 2.4: - Icecast protocol diff --git a/LICENSE.md b/LICENSE.md index e0a431b..dd39b90 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -49,6 +49,7 @@ Specifically, the GPL parts of FFmpeg are: - vf_stereo3d.c - vf_super2xsai.c - vf_tinterlace.c +- vf_xbr.c - vsrc_mptestsrc.c Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then diff --git a/configure b/configure index e6e3de3..7d4fa6b 100755 --- a/configure +++ b/configure @@ -2607,6 +2607,7 @@ vidstabtransform_filter_deps=libvidstab pixfmts_super2xsai_test_deps=super2xsai_filter tinterlace_merge_test_deps=tinterlace_filter tinterlace_pad_test_deps=tinterlace_filter +xbr_filter_deps=gpl zmq_filter_deps=libzmq zoompan_filter_deps=swscale diff --git a/doc/filters.texi b/doc/filters.texi index 7be29de..3eac9fc 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -9163,6 +9163,10 @@ Only deinterlace frames marked as interlaced. Default value is @samp{all}. @end table +@section xbr +Apply high-quality magnification filter which is designed for pixel art. It follows a set +of edge-detection rules, see @url{http://www.libretro.com/forums/viewtopic.php?f=6t=134}. + @anchor{yadif} @section yadif diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 6d868e7..2c56e38 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -198,6 +198,7 @@ OBJS-$(CONFIG_VIDSTABDETECT_FILTER) += vidstabutils.o vf_vidstabdetect. OBJS-$(CONFIG_VIDSTABTRANSFORM_FILTER) += vidstabutils.o vf_vidstabtransform.o OBJS-$(CONFIG_VIGNETTE_FILTER) += vf_vignette.o OBJS-$(CONFIG_W3FDIF_FILTER) += vf_w3fdif.o +OBJS-$(CONFIG_XBR_FILTER)+= vf_xbr.o OBJS-$(CONFIG_YADIF_FILTER) += vf_yadif.o OBJS-$(CONFIG_ZMQ_FILTER)+= f_zmq.o OBJS-$(CONFIG_ZOOMPAN_FILTER)+= vf_zoompan.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index d88a9ad..2352d44 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -213,6 +213,7 @@ void avfilter_register_all(void) REGISTER_FILTER(VIDSTABTRANSFORM, vidstabtransform, vf); REGISTER_FILTER(VIGNETTE, vignette, vf); REGISTER_FILTER(W3FDIF, w3fdif, vf); +REGISTER_FILTER(XBR,xbr,vf); REGISTER_FILTER(YADIF, yadif, vf); REGISTER_FILTER(ZMQ,zmq,vf); REGISTER_FILTER(ZOOMPAN,zoompan,vf); diff --git a/libavfilter/vf_xbr.c b/libavfilter/vf_xbr.c new file mode 100644 index 000..88896b5 --- /dev/null +++
Re: [FFmpeg-devel] OPW Qualification Task: Enable daemon mode for FFserver
Le septidi 17 brumaire, an CCXXIII, Binathi Bingi a écrit : From f06f2b656feb9b01c42533bcdf51fc5190ca6f91 Mon Sep 17 00:00:00 2001 From: Binathi binti...@gmail.com Date: Tue, 4 Nov 2014 21:42:07 +0530 Subject: [PATCH] Restore Daemon mode in FFserver Signed-off-by: Binathi Bingi binti...@gmail.com --- doc/ffserver.conf | 5 + doc/ffserver.texi | 7 --- ffserver.c| 41 +++-- ffserver_config.c | 6 -- ffserver_config.h | 1 + 5 files changed, 53 insertions(+), 7 deletions(-) diff --git a/doc/ffserver.conf b/doc/ffserver.conf index b756961..0b63555 100644 --- a/doc/ffserver.conf +++ b/doc/ffserver.conf @@ -25,6 +25,11 @@ MaxBandwidth 1000 # '-' is the standard output. CustomLog - +# Suppress NoDaemon and enable Daemon, if you want to launch ffserver in daemon mode. +# If no option is specified, default option is NoDaemon. +#NoDaemon +#Daemon + ## # Definition of the live feeds. Each live feed contains one video # and/or audio sequence coming from an ffmpeg encoder or another diff --git a/doc/ffserver.texi b/doc/ffserver.texi index 77273d2..5d5fc0f 100644 --- a/doc/ffserver.texi +++ b/doc/ffserver.texi @@ -405,9 +405,10 @@ In case the commandline option @option{-d} is specified this option is ignored, and the log is written to standard output. @item NoDaemon -Set no-daemon mode. This option is currently ignored since now -@command{ffserver} will always work in no-daemon mode, and is -deprecated. +Set no-daemon mode. This is the default. + +@item Daemon +Set daemon mode. The default is NoDaemon @end table @section Feed section diff --git a/ffserver.c b/ffserver.c index ea2a2ae..b623c0b 100644 --- a/ffserver.c +++ b/ffserver.c @@ -3671,6 +3671,7 @@ static void handle_child_exit(int sig) static void opt_debug(void) { config.debug = 1; +config.ffserver_daemon = 0; snprintf(config.logfilename, sizeof(config.logfilename), -); } @@ -3694,7 +3695,7 @@ int main(int argc, char **argv) { struct sigaction sigact = { { 0 } }; int ret = 0; - + Stray change with a tab in it: this can not be applied. config.filename = av_strdup(/etc/ffserver.conf); parse_loglevel(argc, argv, options); @@ -3728,7 +3729,7 @@ int main(int argc, char **argv) logfile = stdout; else logfile = fopen(config.logfilename, a); -av_log_set_callback(http_av_log); +av_log_set_callback(http_av_log); Stray change with bizarre indentation. This line should probably stay as is. } build_file_streams(); @@ -3736,7 +3737,43 @@ int main(int argc, char **argv) build_feed_streams(); compute_bandwidth(); + +if(config.ffserver_daemon) { +pid_t ffserver_id = 0; +pid_t sid = 0; +int fd; +ffserver_id = fork(); + +if (ffserver_id 0) { +ret = AVERROR(errno); +av_log(NULL, AV_LOG_ERROR, Impossible to start in daemon mode: %s\n, av_err2str(ret)); +exit(1); +} +if (ffserver_id 0) +exit(0); + +sid = setsid(); +if (sid 0) +exit(1); + +if (strcmp(config.logfilename, -) !=0) +close(0); I am not sure what this is intended to do. It looks like a mix with other methods of reopening the default streams. I suggest to avoid duplicating the test and just drop this part, it is unnecessary with the dup2() method. + +fd = open(/dev/null, O_RDWR); + +if (fd = 0){ No need to test success if failure causes exit(). +dup2(fd, 0); +dup2(fd, 2); +if (strcmp(config.logfilename,-) != 0) +dup2 (fd, 1); +} I believe you forgot to close fd. +if (fd 0) { +ret = AVERROR(errno); +av_log(NULL, AV_LOG_ERROR, Unable to repoen file descriptors: %s\n, av_err2str(ret)); +exit(1); +} The failure case should probably come immediately after the open(), especially since it causes immediate exit. +} /* signal init */ signal(SIGPIPE, SIG_IGN); diff --git a/ffserver_config.c b/ffserver_config.c index e44cdf7..63cfd43 100644 --- a/ffserver_config.c +++ b/ffserver_config.c @@ -358,8 +358,10 @@ static int ffserver_parse_config_global(FFServerConfig *config, const char *cmd, ffserver_get_arg(arg, sizeof(arg), p); if (resolve_host(config-http_addr.sin_addr, arg) != 0) ERROR(%s:%d: Invalid host/IP address: %s\n, arg); -} else if (!av_strcasecmp(cmd, NoDaemon)) { -WARNING(NoDaemon option has no effect, you should remove it\n); +} else if (!av_strcasecmp(cmd, Daemon)){ +config-ffserver_daemon = 1; +} else if (!av_strcasecmp(cmd,
[FFmpeg-devel] Deleting unused since 3 years ffmpeg-...@mplayerhq.hu mailing list
Hi all ffmpeg-...@mplayerhq.hu is unused since 2011 and the last mails in it are spam. Also future sponsoring programs like SOC will use ffmpeg-devel I thus suggest to delete ffmpeg-soc and will do so in a week or so, unless there are objections Thanks -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 3 Rare item - Common item with rare defect or maybe just a lie Professional - 'Toy' made in china, not functional except as doorstop Experts will know - The seller hopes you are not an expert signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [RFC] cinedec: report meaningful gamma value
For cehoyos: To apply use: -vf 'lutyuv=gammaval(1.0/GAMMA)' --- libavformat/cinedec.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c index 632f46c..5989039 100644 --- a/libavformat/cinedec.c +++ b/libavformat/cinedec.c @@ -89,6 +89,12 @@ static int set_metadata_float(AVDictionary **dict, const char *key, float value, return 0; } +static const float xlat_gamma(int gamma) +{ +return gamma == 34 ? 1.f / 0.45f + : powf(10.f, gamma / 100.f); +} + static int cine_read_header(AVFormatContext *avctx) { AVIOContext *pb = avctx-pb; @@ -186,7 +192,7 @@ static int cine_read_header(AVFormatContext *avctx) set_metadata_int(st-metadata, brightness, avio_rl32(pb), 1); set_metadata_int(st-metadata, contrast, avio_rl32(pb), 1); -set_metadata_int(st-metadata, gamma, avio_rl32(pb), 1); +set_metadata_float(st-metadata, gamma, xlat_gamma(avio_rl32(pb)), 0); avio_skip(pb, 12 + 16); // Reserved1 .. AutoExpRect set_metadata_float(st-metadata, wbgain[0].r, av_int2float(avio_rl32(pb)), 1); -- 2.1.0 -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] A little copy/paste type for you to fix
On Sun, Nov 09, 2014 at 09:35:08AM +, JULIAN GARDNER wrote: libavformat:166 if (ctx-pageurl) { av_strlcat(filename, pageUrl=, len); av_strlcat(filename, ctx-pageurl, len); } if (ctx-swfurl) { av_strlcat(filename, swfUrl=, len); av_strlcat(filename, ctx-pageurl, len); } Do you see it? The line at 172 should be av_strlcat(filename, ctx-swfurl, len); fixed thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB What does censorship reveal? It reveals fear. -- Julian Assange signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]Set -scan_all_pmts 1 in ffmpeg, ffplay and ffprobe
On Sun, Nov 09, 2014 at 12:30:34AM +0100, Carl Eugen Hoyos wrote: On Saturday 08 November 2014 11:35:04 pm Carl Eugen Hoyos wrote: Hi! Attached patch fixes ticket #3762 for me. Working version attached. LGTM maybe the code surrounding the chnages could be factored out into cmdutils.c/h or some other new common file though that makes only sense if its actually simpler then [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Into a blind darkness they enter who follow after the Ignorance, they as if into a greater darkness enter who devote themselves to the Knowledge alone. -- Isha Upanishad signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/3] ffplay: implement separete audio decoder thread
On Fri, 31 Oct 2014, Marton Balint wrote: On Thu, 30 Oct 2014, wm4 wrote: On Thu, 30 Oct 2014 00:31:25 +0100 Marton Balint c...@passwd.hu wrote: Signed-off-by: Marton Balint c...@passwd.hu --- ffplay.c | 265 --- 1 file changed, 153 insertions(+), 112 deletions(-) [...] Is there any actual advantage to this? Also, ffmpeg does support multithreaded audio decoding; only for some codecs though. Not just the decoding, but the filtering as well will be done in the audio decoder thread, so if that consumes a lot of CPU, ffplay should handle it better and less audio buffer underruns should occur. Another benefit might be the future implementation of a non-blocking audio callback where ffplay returns silence if no frames are available at the time of the callback. (this would be useful on platforms where SDL or the underlying audio driver API does not automatically reset the audio buffer to avoid repeated sound on a buffer underrun) Obviously another reason is unification of the three decoding code paths to allow further factorizations and extensions. Hello Michael, Please merge from my stable branch for the patch series: 631ac65 ffplay: implement separete audio decoder thread cc47418 ffplay: fix indentation after last commit 7ba7277 ffplay: only output null packet once on EOF Thanks, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avfilter/avf_showwaves: fix off by one error in loop condition
It caused segfaults. Signed-off-by: Marton Balint c...@passwd.hu --- libavfilter/avf_showwaves.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c index 4cd225a..fa34a52 100644 --- a/libavfilter/avf_showwaves.c +++ b/libavfilter/avf_showwaves.c @@ -157,7 +157,7 @@ inline static int push_frame(AVFilterLink *outlink) showwaves-req_fullfilled = 1; showwaves-outpicref = NULL; showwaves-buf_idx = 0; -for (i = 0; i = nb_channels; i++) +for (i = 0; i nb_channels; i++) showwaves-buf_idy[i] = 0; return ret; } -- 2.1.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/avf_showwaves: fix off by one error in loop condition
On 11/9/14, Marton Balint c...@passwd.hu wrote: It caused segfaults. Signed-off-by: Marton Balint c...@passwd.hu --- libavfilter/avf_showwaves.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c index 4cd225a..fa34a52 100644 --- a/libavfilter/avf_showwaves.c +++ b/libavfilter/avf_showwaves.c @@ -157,7 +157,7 @@ inline static int push_frame(AVFilterLink *outlink) showwaves-req_fullfilled = 1; showwaves-outpicref = NULL; showwaves-buf_idx = 0; -for (i = 0; i = nb_channels; i++) +for (i = 0; i nb_channels; i++) showwaves-buf_idy[i] = 0; return ret; } -- 2.1.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ok ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/3] ffplay: implement separete audio decoder thread
On Sun, Nov 09, 2014 at 02:11:37PM +0100, Marton Balint wrote: On Fri, 31 Oct 2014, Marton Balint wrote: On Thu, 30 Oct 2014, wm4 wrote: On Thu, 30 Oct 2014 00:31:25 +0100 Marton Balint c...@passwd.hu wrote: Signed-off-by: Marton Balint c...@passwd.hu --- ffplay.c | 265 --- 1 file changed, 153 insertions(+), 112 deletions(-) [...] Is there any actual advantage to this? Also, ffmpeg does support multithreaded audio decoding; only for some codecs though. Not just the decoding, but the filtering as well will be done in the audio decoder thread, so if that consumes a lot of CPU, ffplay should handle it better and less audio buffer underruns should occur. Another benefit might be the future implementation of a non-blocking audio callback where ffplay returns silence if no frames are available at the time of the callback. (this would be useful on platforms where SDL or the underlying audio driver API does not automatically reset the audio buffer to avoid repeated sound on a buffer underrun) Obviously another reason is unification of the three decoding code paths to allow further factorizations and extensions. Hello Michael, Please merge from my stable branch for the patch series: 631ac65 ffplay: implement separete audio decoder thread cc47418 ffplay: fix indentation after last commit 7ba7277 ffplay: only output null packet once on EOF merged thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB During times of universal deceit, telling the truth becomes a revolutionary act. -- George Orwell signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/avf_showwaves: fix off by one error in loop condition
On Sun, Nov 09, 2014 at 01:37:03PM +, Paul B Mahol wrote: On 11/9/14, Marton Balint c...@passwd.hu wrote: It caused segfaults. Signed-off-by: Marton Balint c...@passwd.hu --- libavfilter/avf_showwaves.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c index 4cd225a..fa34a52 100644 --- a/libavfilter/avf_showwaves.c +++ b/libavfilter/avf_showwaves.c @@ -157,7 +157,7 @@ inline static int push_frame(AVFilterLink *outlink) showwaves-req_fullfilled = 1; showwaves-outpicref = NULL; showwaves-buf_idx = 0; -for (i = 0; i = nb_channels; i++) +for (i = 0; i nb_channels; i++) showwaves-buf_idy[i] = 0; return ret; } -- 2.1.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ok applied thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is dangerous to be right in matters on which the established authorities are wrong. -- Voltaire 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/4] lavu/opt: document av_opt_copy function
On 09.11.2014 07:15, wm4 wrote: On Sat, 8 Nov 2014 18:13:51 +0100 Lukasz Marek lukasz.m.lu...@gmail.com wrote: --- libavutil/opt.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavutil/opt.h b/libavutil/opt.h index b9ac932..b78810c 100644 --- a/libavutil/opt.h +++ b/libavutil/opt.h @@ -815,6 +815,16 @@ void av_opt_freep_ranges(AVOptionRanges **ranges); */ int av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags); +/** + * Copy options from src object into dest object. + * + * Options that require memory allocation (e.g. string or binary) are malloc'ed in dest object. + * Original memory is freed unless both src and dest options points to the same memory. What?? It frees dest? Or src? Does it leave dangling pointers or something? You must be clear about this. Guessing about it, I'd assume this means options in dest are freed before they are overwritten with the copied data. Better now? Commented sentence is a continuation of the previous one so it is quite clear for me what to expect, but I made it more explicit. From 19fbf249472515e17a2f6cda1eafba71d20a4072 Mon Sep 17 00:00:00 2001 From: Lukasz Marek lukasz.m.lu...@gmail.com Date: Sat, 8 Nov 2014 17:12:29 +0100 Subject: [PATCH] lavu/opt: document av_opt_copy function --- libavutil/opt.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavutil/opt.h b/libavutil/opt.h index 1b72a10..df5a62e 100644 --- a/libavutil/opt.h +++ b/libavutil/opt.h @@ -815,6 +815,16 @@ void av_opt_freep_ranges(AVOptionRanges **ranges); */ int av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags); +/** + * Copy options from src object into dest object. + * + * Options that require memory allocation (e.g. string or binary) are malloc'ed in dest object. + * Original memory allocated for such options is freed unless both src and dest options points to the same memory. + * + * @param dest Object to copy from + * @param src Object to copy into + * @return 0 on success, negative on error + */ int av_opt_copy(void *dest, void *src); /** -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 04/15] libavcodec/libavutil: Implementation of AAC_fixed_decoder (LC-module) [4/5]
On Fri, Nov 07, 2014 at 04:08:08PM +0100, Nedeljko Babic wrote: From: Djordje Pesut djordje.pe...@imgtec.com Add fixed point implementation [...] diff --git a/libavutil/fixed_dsp.h b/libavutil/fixed_dsp.h index ff6f365..3035d19 100644 --- a/libavutil/fixed_dsp.h +++ b/libavutil/fixed_dsp.h @@ -54,6 +54,25 @@ #include libavcodec/mathops.h typedef struct AVFixedDSPContext { +/* assume len is a multiple of 16, and arrays are 32-byte aligned */ + +/** + * Calculate the product of two vectors of integers and store the result in + * a vector of integers. vector_fmul works with fixed point numbers or scales down integers it doesnt just multiply them + * + * @param dst output vector + * constraints: 32-byte aligned + * @param src0 first input vector + * constraints: 32-byte aligned + * @param src1 second input vector + * constraints: 32-byte aligned + * @param len number of elements in the input + * constraints: multiple of 16 + */ +void (*vector_fmul)(int *dst, const int *src0, const int *src1, +int len); this breaks ABI, new fields can only be added at the end + +void (*vector_fmul_reverse)(int *dst, const int *src0, const int *src1, int len); /** * Overlap/add with window function. * Used primarily by MDCT-based audio codecs. @@ -92,6 +111,40 @@ typedef struct AVFixedDSPContext { */ void (*vector_fmul_window)(int32_t *dst, const int32_t *src0, const int32_t *src1, const int32_t *win, int len); +/** + * Calculate the product of two vectors of integers, add a third vector of + * integers and store the result in a vector of integers. + * + * @param dst output vector + * constraints: 32-byte aligned + * @param src0 first input vector + * constraints: 32-byte aligned + * @param src1 second input vector + * constraints: 32-byte aligned + * @param src1 third input vector + * constraints: 32-byte aligned + * @param len number of elements in the input + * constraints: multiple of 16 + */ +void (*vector_fmul_add)(int *dst, const int *src0, const int *src1, +const int *src2, int len); + +/** + * Calculate the scalar product of two vectors of floats. floats ? scalarproduct_fixed? + * @param v1 first vector, 16-byte aligned + * @param v2 second vector, 16-byte aligned + * @param len length of vectors, multiple of 4 + */ +int (*scalarproduct_fixed)(const int *v1, const int *v2, int len); + +/** + * Calculate the sum and difference of two vectors of integers. + * + * @param v1 first input vector, sum output, 16-byte aligned + * @param v2 second input vector, difference output, 16-byte aligned + * @param len length of vectors, multiple of 4 + */ +void (*butterflies_fixed)(int *av_restrict v1, int *av_restrict v2, int len); } AVFixedDSPContext; /** -- 1.8.2.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB While the State exists there can be no freedom; when there is freedom there will be no State. -- Vladimir Lenin signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/4] lavu/opt: document av_opt_copy function
On Sun, 09 Nov 2014 17:10:10 +0100 Lukasz Marek lukasz.m.lu...@gmail.com wrote: On 09.11.2014 07:15, wm4 wrote: On Sat, 8 Nov 2014 18:13:51 +0100 Lukasz Marek lukasz.m.lu...@gmail.com wrote: --- libavutil/opt.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavutil/opt.h b/libavutil/opt.h index b9ac932..b78810c 100644 --- a/libavutil/opt.h +++ b/libavutil/opt.h @@ -815,6 +815,16 @@ void av_opt_freep_ranges(AVOptionRanges **ranges); */ int av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags); +/** + * Copy options from src object into dest object. + * + * Options that require memory allocation (e.g. string or binary) are malloc'ed in dest object. + * Original memory is freed unless both src and dest options points to the same memory. What?? It frees dest? Or src? Does it leave dangling pointers or something? You must be clear about this. Guessing about it, I'd assume this means options in dest are freed before they are overwritten with the copied data. Better now? Commented sentence is a continuation of the previous one so it is quite clear for me what to expect, but I made it more explicit. Yes, thanks. Still slightly nebulous IMHO, but I don't want to be too pedantic, and the patch is a big improvement over the previous state (no documentation? I hope we have a policy that all new public functions must be documented). ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/3] ffplay: implement separete audio decoder thread
Marton Balint cus at passwd.hu writes: 631ac65 ffplay: implement separete audio decoder thread This introduced a regression when trying to quit FFplay: If I play the sample from ticket #2441 (and #3762) for more than five seconds and press q ffplay hangs (and does not quit). Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Fwd: [PATCH] lavfi: add xbr filter
On Sun, Nov 9, 2014 at 3:36 PM, arwa arif arwaarif1...@gmail.com wrote: On Sun, Nov 9, 2014 at 7:07 AM, Michael Niedermayer michae...@gmx.at wrote: On Sun, Nov 09, 2014 at 01:13:18AM +0100, Stefano Sabatini wrote: On date Sunday 2014-11-09 00:59:36 +0530, arwa arif encoded: [...] +#define pg_lbmask0x00FEFEFE +#define pg_red_blue_mask 0x00FF00FF +#define pg_green_mask0xFF00 pg stands for? Also usually macros and defines are UPCASED. the names where taken from the reference code, so i suspect none of us can know what pg stands for [...] +static uint32_t df(uint32_t x, uint32_t y, const uint32_t *r2y) +{ + +#define YMASK 0xff +#define UMASK 0x00ff00 +#define VMASK 0xff + +uint32_t yuv1 = r2y[x 0xff]; +uint32_t yuv2 = r2y[y 0xff]; Note: is the mask needed? this depends on if AV_PIX_FMT_0RGB32 is guranteed to have the 0 byte really 0. I would not bet on that, even if it works i suggest to leave this masking in there somewhere [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 1 Used only once- Some unspecified defect prevented a second use In good condition - Can be repaird by experienced expert As is - You wouldnt want it even if you were payed for it, if you knew ... I tried the running the filter without YUV masks, it is giving segmentation fault. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel I have implemented 2x,3x and 4x. From 04b57f43e5904b9016001b86daa96c9a88f64b0e Mon Sep 17 00:00:00 2001 From: Arwa Arif arwaarif1...@gmail.com Date: Thu, 30 Oct 2014 22:06:20 +0530 Subject: [PATCH] lavfi: add xbr filter xBR --- Changelog|1 + LICENSE.md |1 + configure|1 + doc/filters.texi |4 + libavfilter/Makefile |1 + libavfilter/allfilters.c |1 + libavfilter/vf_xbr.c | 758 ++ 7 files changed, 767 insertions(+) create mode 100644 libavfilter/vf_xbr.c diff --git a/Changelog b/Changelog index ec6abba..ffce1db 100644 --- a/Changelog +++ b/Changelog @@ -9,6 +9,7 @@ version next: - STL subtitle demuxer and decoder - libutvideo YUV 4:2:2 10bit support - XCB-based screen-grabber +- xBR scaler version 2.4: - Icecast protocol diff --git a/LICENSE.md b/LICENSE.md index e0a431b..dd39b90 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -49,6 +49,7 @@ Specifically, the GPL parts of FFmpeg are: - vf_stereo3d.c - vf_super2xsai.c - vf_tinterlace.c +- vf_xbr.c - vsrc_mptestsrc.c Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then diff --git a/configure b/configure index e6e3de3..7d4fa6b 100755 --- a/configure +++ b/configure @@ -2607,6 +2607,7 @@ vidstabtransform_filter_deps=libvidstab pixfmts_super2xsai_test_deps=super2xsai_filter tinterlace_merge_test_deps=tinterlace_filter tinterlace_pad_test_deps=tinterlace_filter +xbr_filter_deps=gpl zmq_filter_deps=libzmq zoompan_filter_deps=swscale diff --git a/doc/filters.texi b/doc/filters.texi index 7be29de..3eac9fc 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -9163,6 +9163,10 @@ Only deinterlace frames marked as interlaced. Default value is @samp{all}. @end table +@section xbr +Apply high-quality magnification filter which is designed for pixel art. It follows a set +of edge-detection rules, see @url{http://www.libretro.com/forums/viewtopic.php?f=6t=134}. + @anchor{yadif} @section yadif diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 6d868e7..2c56e38 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -198,6 +198,7 @@ OBJS-$(CONFIG_VIDSTABDETECT_FILTER) += vidstabutils.o vf_vidstabdetect. OBJS-$(CONFIG_VIDSTABTRANSFORM_FILTER) += vidstabutils.o vf_vidstabtransform.o OBJS-$(CONFIG_VIGNETTE_FILTER) += vf_vignette.o OBJS-$(CONFIG_W3FDIF_FILTER) += vf_w3fdif.o +OBJS-$(CONFIG_XBR_FILTER)+= vf_xbr.o OBJS-$(CONFIG_YADIF_FILTER) += vf_yadif.o OBJS-$(CONFIG_ZMQ_FILTER)+= f_zmq.o OBJS-$(CONFIG_ZOOMPAN_FILTER)+= vf_zoompan.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index d88a9ad..2352d44 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -213,6 +213,7 @@ void avfilter_register_all(void) REGISTER_FILTER(VIDSTABTRANSFORM, vidstabtransform, vf); REGISTER_FILTER(VIGNETTE, vignette, vf); REGISTER_FILTER(W3FDIF, w3fdif, vf); +REGISTER_FILTER(XBR,xbr,vf); REGISTER_FILTER(YADIF, yadif, vf); REGISTER_FILTER(ZMQ,zmq,vf); REGISTER_FILTER(ZOOMPAN,zoompan,vf); diff --git
[FFmpeg-devel] [PATCH] swscale: fix yuv2yuvX_8 assembly on x86
--- libswscale/x86/swscale.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index 8ce87b3..c9f3b1a 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -430,7 +430,7 @@ switch(c-dstBpc){ \ case 16: do_16_case; break; \ case 10: if (!isBE(c-dstFormat)) vscalefn = ff_yuv2planeX_10_ ## opt; break; \ case 9: if (!isBE(c-dstFormat)) vscalefn = ff_yuv2planeX_9_ ## opt; break; \ -default: if (condition_8bit)/*vscalefn = ff_yuv2planeX_8_ ## opt;*/ break; \ +case 8: if (condition_8bit) vscalefn = ff_yuv2planeX_8_ ## opt; break; \ } #define ASSIGN_VSCALE_FUNC(vscalefn, opt1, opt2, opt2chk) \ switch(c-dstBpc){ \ -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] swscale: fix yuv2yuvX_8 assembly on x86
On Sun, Nov 09, 2014 at 08:39:35PM +0100, Kieran Kunhya wrote: --- libswscale/x86/swscale.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index 8ce87b3..c9f3b1a 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -430,7 +430,7 @@ switch(c-dstBpc){ \ case 16: do_16_case; break; \ case 10: if (!isBE(c-dstFormat)) vscalefn = ff_yuv2planeX_10_ ## opt; break; \ case 9: if (!isBE(c-dstFormat)) vscalefn = ff_yuv2planeX_9_ ## opt; break; \ -default: if (condition_8bit)/*vscalefn = ff_yuv2planeX_8_ ## opt;*/ break; \ +case 8: if (condition_8bit) vscalefn = ff_yuv2planeX_8_ ## opt; break; \ doesnt work: for example this generates a funny colored output and seems to not look the same when run multiple times ffmpeg -f lavfi -i testsrc -t 1 test.avi [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No snowflake in an avalanche ever feels responsible. -- Voltaire signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] swscale: fix yuv2yuvX_8 assembly on x86
On 09/11/14 5:28 PM, Michael Niedermayer wrote: On Sun, Nov 09, 2014 at 08:39:35PM +0100, Kieran Kunhya wrote: --- libswscale/x86/swscale.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index 8ce87b3..c9f3b1a 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -430,7 +430,7 @@ switch(c-dstBpc){ \ case 16: do_16_case; break; \ case 10: if (!isBE(c-dstFormat)) vscalefn = ff_yuv2planeX_10_ ## opt; break; \ case 9: if (!isBE(c-dstFormat)) vscalefn = ff_yuv2planeX_9_ ## opt; break; \ -default: if (condition_8bit)/*vscalefn = ff_yuv2planeX_8_ ## opt;*/ break; \ +case 8: if (condition_8bit) vscalefn = ff_yuv2planeX_8_ ## opt; break; \ doesnt work: for example this generates a funny colored output and seems to not look the same when run multiple times ffmpeg -f lavfi -i testsrc -t 1 test.avi Fate passes with this patch applied. Shouldn't a test that can detect this be added then? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] swscale: fix yuv2yuvX_8 assembly on x86
On Sun, Nov 09, 2014 at 05:38:34PM -0300, James Almer wrote: On 09/11/14 5:28 PM, Michael Niedermayer wrote: On Sun, Nov 09, 2014 at 08:39:35PM +0100, Kieran Kunhya wrote: --- libswscale/x86/swscale.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index 8ce87b3..c9f3b1a 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -430,7 +430,7 @@ switch(c-dstBpc){ \ case 16: do_16_case; break; \ case 10: if (!isBE(c-dstFormat)) vscalefn = ff_yuv2planeX_10_ ## opt; break; \ case 9: if (!isBE(c-dstFormat)) vscalefn = ff_yuv2planeX_9_ ## opt; break; \ -default: if (condition_8bit)/*vscalefn = ff_yuv2planeX_8_ ## opt;*/ break; \ +case 8: if (condition_8bit) vscalefn = ff_yuv2planeX_8_ ## opt; break; \ doesnt work: for example this generates a funny colored output and seems to not look the same when run multiple times ffmpeg -f lavfi -i testsrc -t 1 test.avi Fate passes with this patch applied. Shouldn't a test that can detect this be added then? hmm, i wonder why none of the existing tests caught this either way, one should be added [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Awnsering whenever a program halts or runs forever is On a turing machine, in general impossible (turings halting problem). On any real computer, always possible as a real computer has a finite number of states N, and will either halt in less than N cycles or never halt. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] swscale: fix yuv2yuvX_8 assembly on x86
On Sun, Nov 09, 2014 at 09:50:01PM +0100, Michael Niedermayer wrote: On Sun, Nov 09, 2014 at 05:38:34PM -0300, James Almer wrote: On 09/11/14 5:28 PM, Michael Niedermayer wrote: On Sun, Nov 09, 2014 at 08:39:35PM +0100, Kieran Kunhya wrote: --- libswscale/x86/swscale.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index 8ce87b3..c9f3b1a 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -430,7 +430,7 @@ switch(c-dstBpc){ \ case 16: do_16_case; break; \ case 10: if (!isBE(c-dstFormat)) vscalefn = ff_yuv2planeX_10_ ## opt; break; \ case 9: if (!isBE(c-dstFormat)) vscalefn = ff_yuv2planeX_9_ ## opt; break; \ -default: if (condition_8bit)/*vscalefn = ff_yuv2planeX_8_ ## opt;*/ break; \ +case 8: if (condition_8bit) vscalefn = ff_yuv2planeX_8_ ## opt; break; \ doesnt work: for example this generates a funny colored output and seems to not look the same when run multiple times ffmpeg -f lavfi -i testsrc -t 1 test.avi Fate passes with this patch applied. Shouldn't a test that can detect this be added then? hmm, i wonder why none of the existing tests caught this either way, one should be added following passes: ./ffmpeg -f lavfi -i testsrc,scale=flags=bicubic+bitexact,format=yuv420p -t 1 testX.avi and that fails: ./ffmpeg -f lavfi -i testsrc,scale=flags=bicubic,format=yuv420p -t 1 test.avi so it seems to work with the bitexat flag, which explains why fate passed but also makes adding a test more tricky [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Rewriting code that is poorly written but fully understood is good. Rewriting code that one doesnt understand is a sign that one is less smart then the original author, trying to rewrite it will not make it better. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] swscale: fix yuv2yuvX_8 assembly on x86
On Sun, Nov 09, 2014 at 09:55:03PM +0100, Michael Niedermayer wrote: On Sun, Nov 09, 2014 at 09:50:01PM +0100, Michael Niedermayer wrote: On Sun, Nov 09, 2014 at 05:38:34PM -0300, James Almer wrote: On 09/11/14 5:28 PM, Michael Niedermayer wrote: On Sun, Nov 09, 2014 at 08:39:35PM +0100, Kieran Kunhya wrote: --- libswscale/x86/swscale.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index 8ce87b3..c9f3b1a 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -430,7 +430,7 @@ switch(c-dstBpc){ \ case 16: do_16_case; break; \ case 10: if (!isBE(c-dstFormat)) vscalefn = ff_yuv2planeX_10_ ## opt; break; \ case 9: if (!isBE(c-dstFormat)) vscalefn = ff_yuv2planeX_9_ ## opt; break; \ -default: if (condition_8bit)/*vscalefn = ff_yuv2planeX_8_ ## opt;*/ break; \ +case 8: if (condition_8bit) vscalefn = ff_yuv2planeX_8_ ## opt; break; \ doesnt work: for example this generates a funny colored output and seems to not look the same when run multiple times ffmpeg -f lavfi -i testsrc -t 1 test.avi Fate passes with this patch applied. Shouldn't a test that can detect this be added then? hmm, i wonder why none of the existing tests caught this either way, one should be added following passes: ./ffmpeg -f lavfi -i testsrc,scale=flags=bicubic+bitexact,format=yuv420p -t 1 testX.avi and that fails: ./ffmpeg -f lavfi -i testsrc,scale=flags=bicubic,format=yuv420p -t 1 test.avi so it seems to work with the bitexat flag, which explains why fate passed but also makes adding a test more tricky anyway, the reason why this fails is because the yasm code seems to implement the C API not the API for SIMD yuv2planeX See: yuv2yuvX(), use_mmx_vfilter but i just took a quick look and its a while ago that i worked on the code but i think the C API is not a good idea as it requires several avoidable operations [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB While the State exists there can be no freedom; when there is freedom there will be no State. -- Vladimir Lenin signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 3/4] lavu/opt: update tests
Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavutil/opt.c | 81 - 1 file changed, 68 insertions(+), 13 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index f0798a1..58f745a 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1744,6 +1744,11 @@ typedef struct TestContext int64_t duration; uint8_t color[4]; int64_t channel_layout; +void *binary; +int binary_size; +int64_t num64; +float flt; +double dbl; } TestContext; #define OFFSET(x) offsetof(TestContext, x) @@ -1754,20 +1759,24 @@ typedef struct TestContext static const AVOption test_options[]= { {num, set num,OFFSET(num), AV_OPT_TYPE_INT, {.i64 = 0}, 0,100 }, -{toggle, set toggle, OFFSET(toggle), AV_OPT_TYPE_INT, {.i64 = 0}, 0,1 }, -{rational, set rational, OFFSET(rational), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0,10 }, +{toggle, set toggle, OFFSET(toggle), AV_OPT_TYPE_INT, {.i64 = 1}, 0,1 }, +{rational, set rational, OFFSET(rational), AV_OPT_TYPE_RATIONAL, {.dbl = 1}, 0,10 }, {string, set string, OFFSET(string), AV_OPT_TYPE_STRING, {.str = default}, CHAR_MIN, CHAR_MAX }, -{flags,set flags, OFFSET(flags),AV_OPT_TYPE_FLAGS,{.i64 = 0}, 0,INT_MAX, 0, flags }, +{flags,set flags, OFFSET(flags),AV_OPT_TYPE_FLAGS,{.i64 = 1}, 0,INT_MAX, 0, flags }, {cool, set cool flag , 0,AV_OPT_TYPE_CONST,{.i64 = TEST_FLAG_COOL}, INT_MIN, INT_MAX, 0, flags }, {lame, set lame flag , 0,AV_OPT_TYPE_CONST,{.i64 = TEST_FLAG_LAME}, INT_MIN, INT_MAX, 0, flags }, {mu, set mu flag , 0,AV_OPT_TYPE_CONST,{.i64 = TEST_FLAG_MU}, INT_MIN, INT_MAX, 0, flags }, -{size, set size, OFFSET(w),AV_OPT_TYPE_IMAGE_SIZE,{0}, 0,0 }, -{pix_fmt, set pixfmt, OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, {.i64 = AV_PIX_FMT_NONE}, -1, INT_MAX}, -{sample_fmt, set samplefmt, OFFSET(sample_fmt), AV_OPT_TYPE_SAMPLE_FMT, {.i64 = AV_SAMPLE_FMT_NONE}, -1, INT_MAX}, +{size, set size, OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE,{.str=200x300}, 0,0 }, +{pix_fmt, set pixfmt, OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, {.i64 = AV_PIX_FMT_0BGR}, -1, INT_MAX}, +{sample_fmt, set samplefmt, OFFSET(sample_fmt), AV_OPT_TYPE_SAMPLE_FMT, {.i64 = AV_SAMPLE_FMT_S16}, -1, INT_MAX}, {video_rate, set videorate, OFFSET(video_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = 25}, 0, 0 }, -{duration, set duration, OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = 0}, 0, INT64_MAX}, +{duration, set duration, OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = 1000}, 0, INT64_MAX}, {color, set color, OFFSET(color), AV_OPT_TYPE_COLOR, {.str = pink}, 0, 0}, {cl, set channel layout, OFFSET(channel_layout), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64 = AV_CH_LAYOUT_HEXAGONAL}, 0, INT64_MAX}, +{bin, set binary value,OFFSET(binary), AV_OPT_TYPE_BINARY, {.str=62696e00}, 0,0 }, +{num64,set num 64bit, OFFSET(num64),AV_OPT_TYPE_INT64,{.i64 = 1},0,100 }, +{flt, set float, OFFSET(flt), AV_OPT_TYPE_FLOAT,{.dbl = 1.0/3},0,100 }, +{dbl, set double, OFFSET(dbl), AV_OPT_TYPE_DOUBLE, {.dbl = 1.0/3},0,100 }, {NULL}, }; @@ -1786,6 +1795,32 @@ int main(void) { int i; +printf(Testing default values\n); +{ +TestContext test_ctx = { 0 }; +test_ctx.class = test_class; +av_opt_set_defaults(test_ctx); + +printf(num=%d\n, test_ctx.num); +printf(toggle=%d\n, test_ctx.toggle); +printf(string=%s\n, test_ctx.string); +printf(flags=%d\n, test_ctx.flags); +printf(rational=%d/%d\n, test_ctx.rational.num, test_ctx.rational.den); +printf(video_rate=%d/%d\n, test_ctx.video_rate.num, test_ctx.video_rate.den); +printf(width=%d height=%d\n, test_ctx.w, test_ctx.h); +printf(pix_fmt=%s\n, av_get_pix_fmt_name(test_ctx.pix_fmt)); +printf(sample_fmt=%s\n, av_get_sample_fmt_name(test_ctx.sample_fmt)); +printf(duration=%PRId64\n, test_ctx.duration); +printf(color=%d %d %d %d\n, test_ctx.color[0], test_ctx.color[1], test_ctx.color[2], test_ctx.color[3]); +printf(channel_layout=%PRId64=%PRId64\n, test_ctx.channel_layout, (int64_t)AV_CH_LAYOUT_HEXAGONAL); +if (test_ctx.binary) +printf(binary=%x %x %x %x\n, ((uint8_t*)test_ctx.binary)[0], ((uint8_t*)test_ctx.binary)[1], ((uint8_t*)test_ctx.binary)[2], ((uint8_t*)test_ctx.binary)[3]); +printf(binary_size=%d\n, test_ctx.binary_size); +
[FFmpeg-devel] [PATCH 4/4] fate: add opt-test
--- tests/fate/libavutil.mak | 4 +++ tests/ref/fate/opt | 90 2 files changed, 94 insertions(+) diff --git a/tests/fate/libavutil.mak b/tests/fate/libavutil.mak index 63a4dd6..eadebdb 100644 --- a/tests/fate/libavutil.mak +++ b/tests/fate/libavutil.mak @@ -107,6 +107,10 @@ FATE_LIBAVUTIL += fate-xtea fate-xtea: libavutil/xtea-test$(EXESUF) fate-xtea: CMD = run libavutil/xtea-test +FATE_LIBAVUTIL += fate-opt +fate-opt: libavutil/opt-test$(EXESUF) +fate-opt: CMD = run libavutil/opt-test + FATE_LIBAVUTIL += $(FATE_LIBAVUTIL-yes) FATE-$(CONFIG_AVUTIL) += $(FATE_LIBAVUTIL) fate-libavutil: $(FATE_LIBAVUTIL) diff --git a/tests/ref/fate/opt b/tests/ref/fate/opt index e69de29..a14c558 100644 --- a/tests/ref/fate/opt +++ b/tests/ref/fate/opt @@ -0,0 +1,90 @@ +Testing default values +num=0 +toggle=1 +string=default +flags=1 +rational=1/1 +video_rate=25/1 +width=200 height=300 +pix_fmt=0bgr +sample_fmt=s16 +duration=1000 +color=255 192 203 255 +channel_layout=311=311 +binary=62 69 6e 0 +binary_size=4 +num64=1 +flt=0.33 +dbl=0.33 + +Testing av_set_options_string() +OKsetting options string: '' +Error setting options string: ':' +Error setting options string: '=' +Error setting options string: 'foo=:' +Error setting options string: ':=foo' +Error setting options string: '=foo' +Error setting options string: 'foo=' +Error setting options string: 'foo' +Error setting options string: 'foo=val' +Error setting options string: 'foo==val' +Error setting options string: 'toggle=:' +OKsetting options string: 'string=:' +Error setting options string: 'toggle=1 : foo' +Error setting options string: 'toggle=100' +Error setting options string: 'toggle==1' +OKsetting options string: 'flags=+mu-lame : num=42: toggle=0' +OKsetting options string: 'num=42 : string=blahblah' +Error setting options string: 'rational=0 : rational=1/2 : rational=1/-1' +Error setting options string: 'rational=-1/0' +OKsetting options string: 'size=1024x768' +OKsetting options string: 'size=pal' +Error setting options string: 'size=bogus' +OKsetting options string: 'pix_fmt=yuv420p' +OKsetting options string: 'pix_fmt=2' +Error setting options string: 'pix_fmt=bogus' +OKsetting options string: 'sample_fmt=s16' +OKsetting options string: 'sample_fmt=2' +Error setting options string: 'sample_fmt=bogus' +OKsetting options string: 'video_rate=pal' +OKsetting options string: 'video_rate=25' +OKsetting options string: 'video_rate=3/1001' +OKsetting options string: 'video_rate=30/1.001' +Error setting options string: 'video_rate=bogus' +Error setting options string: 'duration=bogus' +OKsetting options string: 'duration=123.45' +OKsetting options string: 'duration=1\:23\:45.67' +OKsetting options string: 'color=blue' +OKsetting options string: 'color=0x223300' +OKsetting options string: 'color=0x42FF07AA' +OKsetting options string: 'cl=stereo+downmix' +Error setting options string: 'cl=foo' +Error setting options string: 'bin=boguss' +Error setting options string: 'bin=111' +OKsetting options string: 'bin=' +Error setting options string: 'num64=bogus' +OKsetting options string: 'num64=44' +OKsetting options string: 'num64=44.4' +Error setting options string: 'num64=-1' +Error setting options string: 'num64=101' +Error setting options string: 'flt=bogus' +OKsetting options string: 'flt=2' +OKsetting options string: 'flt=2.2' +Error setting options string: 'flt=-1' +Error setting options string: 'flt=101' +Error setting options string: 'dbl=bogus' +OKsetting options string: 'dbl=2' +OKsetting options string: 'dbl=2.2' +Error setting options string: 'dbl=-1' +Error setting options string: 'dbl=101' + +Testing av_opt_set_from_string() +OKsetting options string: '' +OKsetting options string: '5' +OKsetting options string: '5:hello' +OKsetting options string: '5:hello:size=pal' +Error setting options string: '5:size=pal:hello' +Error setting options string: ':' +Error setting options string: '=' +OKsetting options string: ' 5 : hello : size = pal ' +Error setting options string: 'a_very_long_option_name_that_will_need_to_be_ellipsized_around_here=42' -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/4] lavu/opt: check for NULL before parsing
set_string_binary crashes with called with val=NULL Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavutil/opt.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index fca5354..bc62044 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -126,11 +126,15 @@ static int set_string_binary(void *obj, const AVOption *o, const char *val, uint { int *lendst = (int *)(dst + 1); uint8_t *bin, *ptr; -int len = strlen(val); +int len; av_freep(dst); *lendst = 0; +if (!val) +return AVERROR(EINVAL); + +len = strlen(val); if (len 1) return AVERROR(EINVAL); len /= 2; -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/4] lavu/opt: add support for binary defaults
Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavutil/opt.c| 2 ++ tests/ref/fate/opt | 0 2 files changed, 2 insertions(+) create mode 100644 tests/ref/fate/opt diff --git a/libavutil/opt.c b/libavutil/opt.c index bc62044..f0798a1 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1226,6 +1226,8 @@ void av_opt_set_defaults2(void *s, int mask, int flags) write_number(s, opt, dst, 1, 1, opt-default_val.i64); break; case AV_OPT_TYPE_BINARY: +set_string_binary(s, opt, opt-default_val.str, dst); +break; case AV_OPT_TYPE_DICT: /* Cannot set defaults for these types */ break; diff --git a/tests/ref/fate/opt b/tests/ref/fate/opt new file mode 100644 index 000..e69de29 -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/4] fate: add opt-test
On 09.11.2014 23:22, Lukasz Marek wrote: --- tests/fate/libavutil.mak | 4 +++ tests/ref/fate/opt | 90 2 files changed, 94 insertions(+) diff --git a/tests/fate/libavutil.mak b/tests/fate/libavutil.mak index 63a4dd6..eadebdb 100644 --- a/tests/fate/libavutil.mak +++ b/tests/fate/libavutil.mak @@ -107,6 +107,10 @@ FATE_LIBAVUTIL += fate-xtea fate-xtea: libavutil/xtea-test$(EXESUF) fate-xtea: CMD = run libavutil/xtea-test +FATE_LIBAVUTIL += fate-opt +fate-opt: libavutil/opt-test$(EXESUF) +fate-opt: CMD = run libavutil/opt-test + FATE_LIBAVUTIL += $(FATE_LIBAVUTIL-yes) FATE-$(CONFIG_AVUTIL) += $(FATE_LIBAVUTIL) fate-libavutil: $(FATE_LIBAVUTIL) diff --git a/tests/ref/fate/opt b/tests/ref/fate/opt index e69de29..a14c558 100644 --- a/tests/ref/fate/opt +++ b/tests/ref/fate/opt @@ -0,0 +1,90 @@ [..] +OKsetting options string: 'num64=44.4' This one is questionable ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [fdk-aac] AAC_PCM_OUTPUT_CHANNEL_MAPPINGS undeclared
Using FFmpeg and fdk-aac from git I am getting the error that AAC_PCM_OUTPUT_CHANNEL_MAPPINGS is undefined. I would have expected a define for AAC_PCM_OUTPUT_CHANNEL_MAPPINGS in https://github.com/mstorsjo/fdk-aac/blob/master/libAACdec/include/aacdecoder_lib.h#L452 but it is not there. AAC_PCM_OUTPUT_CHANNEL_MAPPINGS is defined in the Android sources: https://android.googlesource.com/platform/external/aac/+/jb-dev/libAACdec/include/aacdecoder_lib.h#433 I am using these sources for fdk-aac: https://github.com/mstorsjo/fdk-aac.git Does anyone know a git repo with a declared AAC_PCM_OUTPUT_CHANNEL_MAPPINGS? FFmpeg commit: http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b01a2204b5cff7bb920f42fda1bb0103f450fe93 http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5a1aa559054b197b64453c60dd01bc5c37532ff9 I have no build environment for libav, so I did not check if the same error happens when building libav. But anyway, building FFmpeg with fdk-aac is broken right now. Jan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [fdk-aac] AAC_PCM_OUTPUT_CHANNEL_MAPPINGS undeclared
Oops. Sorry for the top-post, but you should read AAC_PCM_OUTPUT_CHANNELS everywhere I wrote AAC_PCM_OUTPUT_CHANNEL_MAPPINGS in my previous message. Jan Ehrhardt in gmane.comp.video.ffmpeg.devel (Mon, 10 Nov 2014 00:04:53 +0100): Using FFmpeg and fdk-aac from git I am getting the error that AAC_PCM_OUTPUT_CHANNEL_MAPPINGS is undefined. I would have expected a define for AAC_PCM_OUTPUT_CHANNEL_MAPPINGS in https://github.com/mstorsjo/fdk-aac/blob/master/libAACdec/include/aacdecoder_lib.h#L452 but it is not there. AAC_PCM_OUTPUT_CHANNEL_MAPPINGS is defined in the Android sources: https://android.googlesource.com/platform/external/aac/+/jb-dev/libAACdec/include/aacdecoder_lib.h#433 I am using these sources for fdk-aac: https://github.com/mstorsjo/fdk-aac.git Does anyone know a git repo with a declared AAC_PCM_OUTPUT_CHANNEL_MAPPINGS? FFmpeg commit: http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b01a2204b5cff7bb920f42fda1bb0103f450fe93 http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5a1aa559054b197b64453c60dd01bc5c37532ff9 I have no build environment for libav, so I did not check if the same error happens when building libav. But anyway, building FFmpeg with fdk-aac is broken right now. Jan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [fdk-aac] AAC_PCM_OUTPUT_CHANNEL_MAPPINGS undeclared
On 11/9/2014 11:04 PM, Jan Ehrhardt wrote: I am using these sources for fdk-aac: https://github.com/mstorsjo/fdk-aac.git This is not the repo for fdk-aac and you should not be using it. FDK-AAC is from: Releases: http://sourceforge.net/projects/opencore-amr/files/fdk-aac/ Git: git://git.code.sf.net/p/opencore-amr/fdk-aac - Derek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [fdk-aac] AAC_PCM_OUTPUT_CHANNEL_MAPPINGS undeclared
On Mon, Nov 10, 2014 at 12:16:05AM +, Derek Buitenhuis wrote: On 11/9/2014 11:04 PM, Jan Ehrhardt wrote: I am using these sources for fdk-aac: https://github.com/mstorsjo/fdk-aac.git This is not the repo for fdk-aac and you should not be using it. FDK-AAC is from: Releases: http://sourceforge.net/projects/opencore-amr/files/fdk-aac/ Git: git://git.code.sf.net/p/opencore-amr/fdk-aac This issue seems to also apply to that repository greping succeeds for the new symbol but fails for the old [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 1 Used only once- Some unspecified defect prevented a second use In good condition - Can be repaird by experienced expert As is - You wouldnt want it even if you were payed for it, if you knew ... signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [fdk-aac] AAC_PCM_OUTPUT_CHANNEL_MAPPINGS undeclared
On 09/11/14 8:04 PM, Jan Ehrhardt wrote: Using FFmpeg and fdk-aac from git I am getting the error that AAC_PCM_OUTPUT_CHANNEL_MAPPINGS is undefined. I would have expected a define for AAC_PCM_OUTPUT_CHANNEL_MAPPINGS in https://github.com/mstorsjo/fdk-aac/blob/master/libAACdec/include/aacdecoder_lib.h#L452 but it is not there. AAC_PCM_OUTPUT_CHANNEL_MAPPINGS is defined in the Android sources: https://android.googlesource.com/platform/external/aac/+/jb-dev/libAACdec/include/aacdecoder_lib.h#433 I am using these sources for fdk-aac: https://github.com/mstorsjo/fdk-aac.git Does anyone know a git repo with a declared AAC_PCM_OUTPUT_CHANNEL_MAPPINGS? FFmpeg commit: http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b01a2204b5cff7bb920f42fda1bb0103f450fe93 http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5a1aa559054b197b64453c60dd01bc5c37532ff9 I have no build environment for libav, so I did not check if the same error happens when building libav. But anyway, building FFmpeg with fdk-aac is broken right now. There's a patch pending in libav mailing list posted by one of fdk-aac devs that probably deals with this. You can try to apply it (It should work on ffmpeg's tree without conflicts) and see if that works, or wait until it's merged. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [fdk-aac] AAC_PCM_OUTPUT_CHANNEL_MAPPINGS undeclared
On Sun, Nov 09, 2014 at 10:37:35PM -0300, James Almer wrote: On 09/11/14 8:04 PM, Jan Ehrhardt wrote: Using FFmpeg and fdk-aac from git I am getting the error that AAC_PCM_OUTPUT_CHANNEL_MAPPINGS is undefined. I would have expected a define for AAC_PCM_OUTPUT_CHANNEL_MAPPINGS in https://github.com/mstorsjo/fdk-aac/blob/master/libAACdec/include/aacdecoder_lib.h#L452 but it is not there. AAC_PCM_OUTPUT_CHANNEL_MAPPINGS is defined in the Android sources: https://android.googlesource.com/platform/external/aac/+/jb-dev/libAACdec/include/aacdecoder_lib.h#433 I am using these sources for fdk-aac: https://github.com/mstorsjo/fdk-aac.git Does anyone know a git repo with a declared AAC_PCM_OUTPUT_CHANNEL_MAPPINGS? FFmpeg commit: http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b01a2204b5cff7bb920f42fda1bb0103f450fe93 http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5a1aa559054b197b64453c60dd01bc5c37532ff9 I have no build environment for libav, so I did not check if the same error happens when building libav. But anyway, building FFmpeg with fdk-aac is broken right now. There's a patch pending in libav mailing list posted by one of fdk-aac devs that probably deals with this. You can try to apply it (It should work on ffmpeg's tree without conflicts) and see if that works, or wait until it's merged. applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The greatest way to live with honor in this world is to be what we pretend to be. -- Socrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/4] lavu/opt: check for NULL before parsing
On Sun, Nov 09, 2014 at 11:22:46PM +0100, Lukasz Marek wrote: set_string_binary crashes with called with val=NULL Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavutil/opt.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index fca5354..bc62044 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -126,11 +126,15 @@ static int set_string_binary(void *obj, const AVOption *o, const char *val, uint { int *lendst = (int *)(dst + 1); uint8_t *bin, *ptr; -int len = strlen(val); +int len; av_freep(dst); *lendst = 0; +if (!val) +return AVERROR(EINVAL); this deallocates dest and then returns failure shouldnt it either not fail or not change the state of dst ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Let us carefully observe those good qualities wherein our enemies excel us and endeavor to excel them, by avoiding what is faulty, and imitating what is excellent in them. -- Plutarch 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/4] lavu/opt: add support for binary defaults
On Sun, Nov 09, 2014 at 11:22:47PM +0100, Lukasz Marek wrote: Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavutil/opt.c| 2 ++ tests/ref/fate/opt | 0 2 files changed, 2 insertions(+) create mode 100644 tests/ref/fate/opt LGTM [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Into a blind darkness they enter who follow after the Ignorance, they as if into a greater darkness enter who devote themselves to the Knowledge alone. -- Isha Upanishad signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/4] lavu/opt: update tests
On Sun, Nov 09, 2014 at 11:22:48PM +0100, Lukasz Marek wrote: Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavutil/opt.c | 81 - 1 file changed, 68 insertions(+), 13 deletions(-) i think its ok but the commit message should be more verbose [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No snowflake in an avalanche ever feels responsible. -- Voltaire signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [fdk-aac] AAC_PCM_OUTPUT_CHANNEL_MAPPINGS undeclared
Michael Niedermayer in gmane.comp.video.ffmpeg.devel (Mon, 10 Nov 2014 02:47:32 +0100): On Sun, Nov 09, 2014 at 10:37:35PM -0300, James Almer wrote: There's a patch pending in libav mailing list posted by one of fdk-aac devs that probably deals with this. You can try to apply it (It should work on ffmpeg's tree without conflicts) and see if that works, or wait until it's merged. applied Fix confirmed. @Derek: thanks for the pointer to git.code.sf.net Jan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Fwd: [PATCH] lavfi: add xbr filter
On Sun, Nov 09, 2014 at 11:06:17PM +0530, arwa arif wrote: On Sun, Nov 9, 2014 at 3:36 PM, arwa arif arwaarif1...@gmail.com wrote: On Sun, Nov 9, 2014 at 7:07 AM, Michael Niedermayer michae...@gmx.at wrote: On Sun, Nov 09, 2014 at 01:13:18AM +0100, Stefano Sabatini wrote: On date Sunday 2014-11-09 00:59:36 +0530, arwa arif encoded: [...] +#define pg_lbmask0x00FEFEFE +#define pg_red_blue_mask 0x00FF00FF +#define pg_green_mask0xFF00 pg stands for? Also usually macros and defines are UPCASED. the names where taken from the reference code, so i suspect none of us can know what pg stands for [...] +static uint32_t df(uint32_t x, uint32_t y, const uint32_t *r2y) +{ + +#define YMASK 0xff +#define UMASK 0x00ff00 +#define VMASK 0xff + +uint32_t yuv1 = r2y[x 0xff]; +uint32_t yuv2 = r2y[y 0xff]; Note: is the mask needed? this depends on if AV_PIX_FMT_0RGB32 is guranteed to have the 0 byte really 0. I would not bet on that, even if it works i suggest to leave this masking in there somewhere [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 1 Used only once- Some unspecified defect prevented a second use In good condition - Can be repaird by experienced expert As is - You wouldnt want it even if you were payed for it, if you knew ... I tried the running the filter without YUV masks, it is giving segmentation fault. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel I have implemented 2x,3x and 4x. Changelog|1 LICENSE.md |1 configure|1 doc/filters.texi |4 libavfilter/Makefile |1 libavfilter/allfilters.c |1 libavfilter/vf_xbr.c | 758 +++ 7 files changed, 767 insertions(+) 95d0dba9b3e0a3df6991a0daef4c1eae76fc2d39 0001-lavfi-add-xbr-filter.patch From 04b57f43e5904b9016001b86daa96c9a88f64b0e Mon Sep 17 00:00:00 2001 From: Arwa Arif arwaarif1...@gmail.com Date: Thu, 30 Oct 2014 22:06:20 +0530 Subject: [PATCH] lavfi: add xbr filter xBR very nice ! ive removed a few remaining trailing whitespaces and Capitalized the context name for consistency with the rest of FFmpeg and pushed the patch Note you can probably configure your text editor to automatically remove trailing whitespaces, many text editors support that The output of the filter looks good and very similar to some reference images i found like http://i.imgur.com/FhiA3.png there are some differences like somewhat more corners than rounded curves on some squares which are caused by the different df() function. simply scaling the output of df() by /2 or /4 changes the areas of the image that look different. I think its a matter of taste which scaling looks better, also the Y,U,V elements could be scaled independantly Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Mysterious `yuv444p` etc. tests in fate
Hi all, While hacking my Node.js fateserver I found out that there are some odd tests called `yuv444p` and `yuyv422`. Upon further inspection one can see that the tests are actually something else: http://fate.ffmpeg.org/report.cgi?time=20141110002508slot=arm7-cubox-gcc4.1 In this case the `yuvj444p` test is actually the pullup test, but I suspect the Does anyone have any idea on how and why it is behaving like that? Timothy ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] fate: add xBR filter tests
--- If anyone can fix that, that would be great: remote: -Info- Update is fast-forward remote: -Deny- In f079201a6ddab1a3e1dd0018990e3f7c6a11361b: remote: -Deny- Tabs found in tests/fate/filter-video.mak. remote: -Deny- Commit aborted, fix the issue and try again. remote: error: hook declined to update refs/heads/master Thanks. --- tests/fate/filter-video.mak | 7 +++ tests/ref/fate/filter-2xbr | 3 +++ tests/ref/fate/filter-3xbr | 3 +++ tests/ref/fate/filter-4xbr | 3 +++ 4 files changed, 16 insertions(+) create mode 100644 tests/ref/fate/filter-2xbr create mode 100644 tests/ref/fate/filter-3xbr create mode 100644 tests/ref/fate/filter-4xbr diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index c49cf00..601a0d8 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -156,6 +156,13 @@ fate-filter-hq3x: CMD = framecrc -i $(TARGET_SAMPLES)/filter/pixelart%d.png -vf fate-filter-hq4x: CMD = framecrc -i $(TARGET_SAMPLES)/filter/pixelart%d.png -vf hqx=4 -pix_fmt bgra fate-filter-hqx: $(FATE_FILTER_HQX-yes) +FATE_FILTER_XBR-$(call ALLYES, IMAGE2_DEMUXER PNG_DECODER XBR_FILTER) = fate-filter-2xbr fate-filter-3xbr fate-filter-4xbr +FATE_FILTER-yes += $(FATE_FILTER_XBR-yes) +fate-filter-2xbr: CMD = framecrc -i $(TARGET_SAMPLES)/filter/pixelart%d.png -vf xbr=2 -pix_fmt bgra +fate-filter-3xbr: CMD = framecrc -i $(TARGET_SAMPLES)/filter/pixelart%d.png -vf xbr=3 -pix_fmt bgra +fate-filter-4xbr: CMD = framecrc -i $(TARGET_SAMPLES)/filter/pixelart%d.png -vf xbr=4 -pix_fmt bgra +fate-filter-xbr: $(FATE_FILTER_XBR-yes) + FATE_FILTER-$(call ALLYES, UTVIDEO_DECODER AVI_DEMUXER PERMS_FILTER CURVES_FILTER) += fate-filter-curves fate-filter-curves: CMD = framecrc -i $(TARGET_SAMPLES)/utvideo/utvideo_rgb_median.avi -vf perms=random,curves=vintage diff --git a/tests/ref/fate/filter-2xbr b/tests/ref/fate/filter-2xbr new file mode 100644 index 000..91e1d4c --- /dev/null +++ b/tests/ref/fate/filter-2xbr @@ -0,0 +1,3 @@ +#tb 0: 1/25 +0, 0, 0,1, 877072, 0x5142c6cd +0, 1, 1,1, 877072, 0xa01a3f47 diff --git a/tests/ref/fate/filter-3xbr b/tests/ref/fate/filter-3xbr new file mode 100644 index 000..013f6a3 --- /dev/null +++ b/tests/ref/fate/filter-3xbr @@ -0,0 +1,3 @@ +#tb 0: 1/25 +0, 0, 0,1, 1973412, 0xd4cf257b +0, 1, 1,1, 1973412, 0x63fcd614 diff --git a/tests/ref/fate/filter-4xbr b/tests/ref/fate/filter-4xbr new file mode 100644 index 000..92b70d9 --- /dev/null +++ b/tests/ref/fate/filter-4xbr @@ -0,0 +1,3 @@ +#tb 0: 1/25 +0, 0, 0,1, 3508288, 0xc7b1d170 +0, 1, 1,1, 3508288, 0x3fd0c3fb -- 2.1.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel