Re: [libav-devel] [PATCH] Separate h264 qpel from dsputil
On Wed, Jan 23, 2013 at 08:24:53PM -0800, Ronald S. Bultje wrote: From: Mans Rullgard m...@mansr.com The sh4 optimizations are removed, because the code is 100% identical to the C code, so it is unlikely to provide any real practical benefit. Signed-off-by: Diego Biurrun di...@biurrun.de Signed-off-by: Ronald S. Bultje rsbul...@gmail.com --- libavcodec/Makefile| 1 + libavcodec/arm/Makefile| 3 + libavcodec/arm/dsputil_init_neon.c | 136 - libavcodec/arm/h264dsp_neon.S | 933 libavcodec/arm/h264qpel_init_arm.c | 170 ++ libavcodec/arm/h264qpel_neon.S | 955 + libavcodec/dsputil.c | 28 +- libavcodec/dsputil.h | 3 - libavcodec/dsputil_template.c | 561 +-- libavcodec/h264.c | 6 +- libavcodec/h264.h | 2 + libavcodec/h264qpel.c | 86 +++ libavcodec/h264qpel.h | 38 ++ libavcodec/h264qpel_template.c | 550 +++ libavcodec/hpel_template.c | 100 libavcodec/ppc/Makefile| 1 + libavcodec/ppc/h264_altivec.c | 282 -- libavcodec/ppc/h264_altivec_template.c | 775 -- libavcodec/ppc/h264_qpel.c | 319 +++ libavcodec/ppc/h264_qpel_template.c| 775 ++ libavcodec/ppc/vc1dsp_altivec.c| 4 +- libavcodec/rv30dsp.c | 11 +- libavcodec/rv40dsp.c | 27 +- libavcodec/sh4/dsputil_align.c | 9 - libavcodec/sh4/qpel.c | 401 -- libavcodec/x86/Makefile| 1 + libavcodec/x86/dsputil_mmx.c | 93 +--- libavcodec/x86/h264_qpel.c | 126 + 28 files changed, 3162 insertions(+), 3234 deletions(-) create mode 100644 libavcodec/arm/h264qpel_init_arm.c create mode 100644 libavcodec/arm/h264qpel_neon.S create mode 100644 libavcodec/h264qpel.c create mode 100644 libavcodec/h264qpel.h create mode 100644 libavcodec/h264qpel_template.c create mode 100644 libavcodec/hpel_template.c delete mode 100644 libavcodec/ppc/h264_altivec_template.c create mode 100644 libavcodec/ppc/h264_qpel.c create mode 100644 libavcodec/ppc/h264_qpel_template.c Please add -M -C to your git-send-email command line to turn on rename detection, that will reduce the size of this patch considerably and make it easier to review. Better yet, add the the appropriate settings to your personal git configuration and never worry about it again: http://www.libav.org/git-howto.html#Personal-Git-installation Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] libx264: introduce -x264-params private option
On Wed, Jan 23, 2013 at 12:14:39PM +0100, Luca Barbato wrote: --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -527,6 +554,7 @@ static const AVOption options[] = { { cbr, NULL, 0, AV_OPT_TYPE_CONST, {.i64 = X264_NAL_HRD_CBR}, INT_MIN, INT_MAX, VE, nal-hrd }, +{ x264-params, Override the x264 configuration using a :-separated list of key=value list of parameters, OFFSET(x264_params), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE }, The second list confuses me, probably should be removed. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] doc: document libx264 options and mappings
On Wed, Jan 23, 2013 at 12:14:40PM +0100, Luca Barbato wrote: --- Help in filling in missing parameters welcome. You might want to look at the MPlayer man page. --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -413,3 +413,185 @@ Selected by Encoder (default) + +encoder options. Additionally an expert override is provided to pass directly +a list of key=value tuples as accepted by x264_param_parse. directly pass +@multitable @columnfractions .2 .2 +@item b @tab bitrate +Libav @code{b} option is expressed in bytes, x264 @code{bitrate} in Kilobytes. Lowercase kilobytes. +@item bf@tab bframes +Maximum number of b frames B-frames +@subsection Private Options +@table @option +@item -preset @var{string} +Set the encoding preset (cf. x264 --fullhelp) +@item -tune @var{string} +Tune the encoding params (cf. x264 --fullhelp) +@item -profile @var{string} +Set profile restrictions (cf. x264 --fullhelp) +@item -fastfirstpass @var{integer} +Use fast settings when encoding first pass +@item -crf @var{float} +Select the quality for constant quality mode End all of these in periods. It might be better to replace the latin cf. by see. +@item -aq-strength @var{float} +AQ strength. Reduces blocking and blurring in flat and textured areas. AQ strength, reduces blocking and blurring in flat and textured areas. +@item -b-bias @var{integer} +Influences how often B-frames are used + +@item -cplxblur @var{float} +Reduce fluctuations in QP (before curve compression) . +@item -partitions @var{string} +A comma-separated list of partitions to consider. Possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all A comma-separated list of partitions to consider, possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all. +@end table +@item -slice-max-size @var{integer} +Limit the size of each slice in bytes . +@end table +@item -x264-params @var{string} +Override the x264 configuration using a :-separated list of key=value list of parameters The second list confuses me, probably just drop it. End in a period. +Stock encoding presets for common usages are provided they can be used by using so they can be Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] bfin: vp3: Separate VP3 initialization code
On Wed, Jan 23, 2013 at 04:45:22PM +0100, Luca Barbato wrote: From: Diego Biurrun di...@biurrun.de Signed-off-by: Luca Barbato lu_z...@gentoo.org --- Rebased after the move to int16_t. En passant, adding the missing memsets as pointed by Ronald. Please separate those, patch LGTM otherwise. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] doc: update the reference for the title
On Wed, Jan 23, 2013 at 05:12:52PM +0100, Luca Barbato wrote: The recent texi2html exports the title as 'fulltitle_no_texi'. --- doc/t2h.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) How recent and what happens to older variants? Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [0.8 PATCH] pthread: set the frame properties from the thread context, not user.
Right now, the frame properties are set from the user-facing AVCodecContext before it is updated from the thread context, which is wrong since they may be invalid or obsolete. --- This is fixed differently in 9 and git, and frame properties do not exist in 0.7, so this only applies to 0.8. --- libavcodec/pthread.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index a4e3081..64cff43 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -631,10 +631,10 @@ int ff_thread_decode_frame(AVCodecContext *avctx, *picture = p-frame; *got_picture_ptr = p-got_frame; picture-pkt_dts = p-avpkt.dts; -picture-sample_aspect_ratio = avctx-sample_aspect_ratio; -picture-width = avctx-width; -picture-height = avctx-height; -picture-format = avctx-pix_fmt; +picture-sample_aspect_ratio = p-avctx-sample_aspect_ratio; +picture-width = p-avctx-width; +picture-height = p-avctx-height; +picture-format = p-avctx-pix_fmt; /* * A later call with avkpt-size == 0 may loop over all threads, -- 1.7.10.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [0.8 PATCH] pthread: set the frame properties from the thread context, not user.
On 24/01/13 11:51, Anton Khirnov wrote: Right now, the frame properties are set from the user-facing AVCodecContext before it is updated from the thread context, which is wrong since they may be invalid or obsolete. --- This is fixed differently in 9 and git, and frame properties do not exist in 0.7, so this only applies to 0.8. --- libavcodec/pthread.c |8 1 file changed, 4 insertions(+), 4 deletions(-) Looks ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] doc: document libx264 options and mappings
On 24/01/13 11:41, Diego Biurrun wrote: On Wed, Jan 23, 2013 at 12:14:40PM +0100, Luca Barbato wrote: --- Help in filling in missing parameters welcome. You might want to look at the MPlayer man page. Anything specific I should look at? I'll update the patch soon. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] libx264: introduce -x264-params private option
On 24/01/13 11:34, Diego Biurrun wrote: The second list confuses me, probably should be removed. Agreed ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] doc: update the reference for the title
On 24/01/13 11:45, Diego Biurrun wrote: On Wed, Jan 23, 2013 at 05:12:52PM +0100, Luca Barbato wrote: The recent texi2html exports the title as 'fulltitle_no_texi'. --- doc/t2h.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) How recent and what happens to older variants? Recent 2010, older 2009. Works with the 1.82 as well the version 5. My annoyance in not having css classes in the produced elements will warrant some patch sooner or later or maybe just making a reduced version to be added to our sources. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] Note that we now provide both Nightly Builds as well as Release Builds
--- src/download | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/download b/src/download index dcb7e32..b1cbb35 100644 --- a/src/download +++ b/src/download @@ -170,22 +170,24 @@ bootstrap your local libav.org repository. /p -a name=builds/ah1Windows Nightly Builds/h1 +a name=builds/ah1Windows Nightly and Release Builds/h1 p -Nightly builds of Libav linked with various libraries are done for 32-bit and -64-bit Windows, and can be obtained at the following URLs: +Nightly and Release builds of Libav linked with various libraries are +done for 32-bit and 64-bit Windows, and can be obtained at the following +URLs: /p p +a href=http://win32.libav.org/Releases/;Windows Builds of Official Releases/a a href=http://win32.libav.org/win32/;32-bit Windows Builds/abr / a href=http://win32.libav.org/win32-pthreads/;32-bit Windows Builds using pthreads/abr / a href=http://win32.libav.org/win64/;64-bit Windows Builds/a /p + p -Please note that these builds are experimental and should be treated as such. -Report any bugs to the a href=https://bugzilla.libav.org/;bug tracker/a. +Please report any bugs to the a href=https://bugzilla.libav.org/;bug tracker/a. /p -- 1.7.9.5 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Note that we now provide both Nightly Builds as well as Release Builds
On Thu, Jan 24, 2013 at 12:28:09PM +0100, Reinhard Tartler wrote: --- a/src/download +++ b/src/download @@ -170,22 +170,24 @@ bootstrap your local libav.org repository. p +a href=http://win32.libav.org/releases/;Windows Builds of official releases/a a href=http://win32.libav.org/win32/;32-bit Windows Builds/abr / a href=http://win32.libav.org/win32-pthreads/;32-bit Windows Builds using pthreads/abr / a href=http://win32.libav.org/win64/;64-bit Windows Builds/a The word Builds is still capitalized for reasons that elude me.. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] h264: Allow discarding the cropping information from SPS
On 24/01/13 14:14, Vittorio Giovara wrote: Hi Luca, here is one 1920x1088 file with a cropping rectangle of 0,0,0,8: https://dl.dropbox.com/u/24468/test1080.avi With -flags2 ingorecrop you get a 1920x1088 resolution (and trigger the new codepath), without such flag you get a 1920x1080 resolution from this file. Tested with valgrind in both modes and both samples, you do not seem to cause any problem according to the tool. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] Add av_strnstr() function
taking Diego's remarks into account. From 72983b8cf23eb6c4a7996d150c3a326b468ee6ea Mon Sep 17 00:00:00 2001 From: Vladimir Pantelic vlado...@gmail.com Date: Thu, 24 Jan 2013 11:31:41 +0100 Subject: [PATCH] lavu: Add av_strnstr() This is a length limited version of strstr() Signed-off-by: Vladimir Pantelic vlado...@gmail.com --- Changelog|4 doc/APIchanges |3 +++ libavutil/avstring.c | 14 ++ libavutil/avstring.h | 15 +++ libavutil/version.h |2 +- 5 files changed, 37 insertions(+), 1 deletions(-) diff --git a/Changelog b/Changelog index 24f0791..c235727 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,10 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 10: +- av_strnstr + + version 9: - av_basename and av_dirname - adobe and limelight publisher authentication in RTMP diff --git a/doc/APIchanges b/doc/APIchanges index 3120f7e..79e3cb7 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,9 @@ libavutil: 2012-10-22 API changes, most recent first: +2013-01-xx - xxx - lavu 52.6.0 - avstring.h + Add av_strnstr() + 2013-01-xx - xxx - lavu 52.5.0 - hmac.h Add AVHMAC. diff --git a/libavutil/avstring.c b/libavutil/avstring.c index 2c88bd3..42fa6ad 100644 --- a/libavutil/avstring.c +++ b/libavutil/avstring.c @@ -64,6 +64,20 @@ char *av_stristr(const char *s1, const char *s2) return NULL; } +char *av_strnstr(const char *haystack, const char *needle, size_t hay_length) +{ +size_t needle_len = strlen(needle); +if (!needle_len) +return haystack; +while (hay_length = needle_len) { +hay_length--; +if (!memcmp(haystack, needle, needle_len)) +return haystack; +haystack++; +} +return NULL; +} + size_t av_strlcpy(char *dst, const char *src, size_t size) { size_t len = 0; diff --git a/libavutil/avstring.h b/libavutil/avstring.h index acd6610..e0e6ed2 100644 --- a/libavutil/avstring.h +++ b/libavutil/avstring.h @@ -67,6 +67,21 @@ int av_stristart(const char *str, const char *pfx, const char **ptr); char *av_stristr(const char *haystack, const char *needle); /** + * Locate the first occurrence of the string needle in the string haystack + * where not more than hay_length characters are searched. A zero-length + * string needle is considered to match at the start of haystack. + * + * This function is a length-limited version of the standard strstr(). + * + * @param haystack string to search in + * @param needle string to search for + * @param hay_length length of string to search in + * @return pointer to the located match within haystack + * or a null pointer if no match + */ +char *av_strnstr(const char *haystack, const char *needle, size_t hay_length); + +/** * Copy the string src to dst, but no more than size - 1 bytes, and * null-terminate dst. * diff --git a/libavutil/version.h b/libavutil/version.h index 68f5752..4c9651f 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -37,7 +37,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 52 -#define LIBAVUTIL_VERSION_MINOR 5 +#define LIBAVUTIL_VERSION_MINOR 6 #define LIBAVUTIL_VERSION_MICRO 0 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ -- 1.7.6.rc1.1.g2c162b ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] avfilter: allow setpts filter to use wallclock time for calculations
Vladimir Pantelic wrote: Martin Storsjö wrote: On Wed, 23 Jan 2013, Vladimir Pantelic wrote: I have a webcam that outputs raw MJPEG over HTTP and for which I need to create timestamps in order to properly avplay or avconv the stream. Thus I extended vf_setpts to allow to get the current wallclock time and use that as a timestamp with: setpts='(GETTIME - STARTTIME) / (TB * 100) Would it btw ever make sense to have GETTIME without -STARTTIME in this context? If not, perhaps the gettime variable should return that difference? (And would a name like REALTIMECLOCK or similar be better?) I could imagine somebody wanting the absolute time recorded. GETTIME was picked after av_gettime(), I'm fine with e.g RTCTIME and RTCSTART ok with RTCTIME and RTCSTART? ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] avfilter: allow setpts filter to use wallclock time for calculations
On Thu, 24 Jan 2013 16:35:43 +0100, Vladimir Pantelic vlado...@gmail.com wrote: Vladimir Pantelic wrote: Martin Storsjö wrote: On Wed, 23 Jan 2013, Vladimir Pantelic wrote: I have a webcam that outputs raw MJPEG over HTTP and for which I need to create timestamps in order to properly avplay or avconv the stream. Thus I extended vf_setpts to allow to get the current wallclock time and use that as a timestamp with: setpts='(GETTIME - STARTTIME) / (TB * 100) Would it btw ever make sense to have GETTIME without -STARTTIME in this context? If not, perhaps the gettime variable should return that difference? (And would a name like REALTIMECLOCK or similar be better?) I could imagine somebody wanting the absolute time recorded. GETTIME was picked after av_gettime(), I'm fine with e.g RTCTIME and RTCSTART ok with RTCTIME and RTCSTART? Fine with me. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/1] arm: h264qpel: use neon h264 qpel functions only if supported
--- libavcodec/arm/h264qpel_init_arm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/arm/h264qpel_init_arm.c b/libavcodec/arm/h264qpel_init_arm.c index b546c2a..097d0b8 100644 --- a/libavcodec/arm/h264qpel_init_arm.c +++ b/libavcodec/arm/h264qpel_init_arm.c @@ -94,10 +94,10 @@ void ff_avg_h264_qpel8_mc33_neon(uint8_t *, uint8_t *, int); void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth) { -#if HAVE_NEON const int high_bit_depth = bit_depth 8; +int cpu_flags = av_get_cpu_flags(); -if (!high_bit_depth) { +if ((have_neon(cpu_flags) !high_bit_depth) { c-put_h264_qpel_pixels_tab[0][ 0] = ff_put_h264_qpel16_mc00_neon; c-put_h264_qpel_pixels_tab[0][ 1] = ff_put_h264_qpel16_mc10_neon; c-put_h264_qpel_pixels_tab[0][ 2] = ff_put_h264_qpel16_mc20_neon; @@ -166,5 +166,4 @@ void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth) c-avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_neon; c-avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_neon; } -#endif /* HAVE_NEON */ } -- 1.8.1.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] arm: h264qpel: use neon h264 qpel functions only if supported
On Thu, Jan 24, 2013 at 04:47:00PM +0100, Janne Grunau wrote: --- libavcodec/arm/h264qpel_init_arm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/arm/h264qpel_init_arm.c b/libavcodec/arm/h264qpel_init_arm.c index b546c2a..097d0b8 100644 --- a/libavcodec/arm/h264qpel_init_arm.c +++ b/libavcodec/arm/h264qpel_init_arm.c @@ -94,10 +94,10 @@ void ff_avg_h264_qpel8_mc33_neon(uint8_t *, uint8_t *, int); void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth) { -#if HAVE_NEON const int high_bit_depth = bit_depth 8; +int cpu_flags = av_get_cpu_flags(); -if (!high_bit_depth) { +if ((have_neon(cpu_flags) !high_bit_depth) { Can this be compiled at all? Looks like a stray ( c-put_h264_qpel_pixels_tab[0][ 0] = ff_put_h264_qpel16_mc00_neon; c-put_h264_qpel_pixels_tab[0][ 1] = ff_put_h264_qpel16_mc10_neon; c-put_h264_qpel_pixels_tab[0][ 2] = ff_put_h264_qpel16_mc20_neon; @@ -166,5 +166,4 @@ void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth) c-avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_neon; c-avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_neon; } -#endif /* HAVE_NEON */ } -- Also I'm not sure that #if HAVE_NEON can be dropped - does compiler not complain about missing function declarations? Probably it shouldn't though. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] arm: h264qpel: use neon h264 qpel functions only if supported
On Thu, Jan 24, 2013 at 04:47:00PM +0100, Janne Grunau wrote: --- libavcodec/arm/h264qpel_init_arm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) LGTM Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/1] h264: copy h264qpel dsp context to slice thread copies
--- libavcodec/h264.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 9e9384b..38a6f5e 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2556,6 +2556,7 @@ static int h264_slice_header_init(H264Context *h, int reinit) memcpy(c, h-s.thread_context[i], sizeof(MpegEncContext)); memset(c-s + 1, 0, sizeof(H264Context) - sizeof(MpegEncContext)); c-h264dsp = h-h264dsp; +c-h264qpel= h-h264qpel; c-sps = h-sps; c-pps = h-pps; c-pixel_shift = h-pixel_shift; -- 1.8.1.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] arm: h264qpel: use neon h264 qpel functions only if supported
On 2013-01-24 16:51:04 +0100, Kostya Shishkov wrote: On Thu, Jan 24, 2013 at 04:47:00PM +0100, Janne Grunau wrote: --- libavcodec/arm/h264qpel_init_arm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/arm/h264qpel_init_arm.c b/libavcodec/arm/h264qpel_init_arm.c index b546c2a..097d0b8 100644 --- a/libavcodec/arm/h264qpel_init_arm.c +++ b/libavcodec/arm/h264qpel_init_arm.c @@ -94,10 +94,10 @@ void ff_avg_h264_qpel8_mc33_neon(uint8_t *, uint8_t *, int); void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth) { -#if HAVE_NEON const int high_bit_depth = bit_depth 8; +int cpu_flags = av_get_cpu_flags(); -if (!high_bit_depth) { +if ((have_neon(cpu_flags) !high_bit_depth) { Can this be compiled at all? Looks like a stray ( no. copy-n-paste error and I sent the patch before it compiled. also missed to include libavutil/arm/cpu.h c-put_h264_qpel_pixels_tab[0][ 0] = ff_put_h264_qpel16_mc00_neon; c-put_h264_qpel_pixels_tab[0][ 1] = ff_put_h264_qpel16_mc10_neon; c-put_h264_qpel_pixels_tab[0][ 2] = ff_put_h264_qpel16_mc20_neon; @@ -166,5 +166,4 @@ void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth) c-avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_neon; c-avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_neon; } -#endif /* HAVE_NEON */ } -- Also I'm not sure that #if HAVE_NEON can be dropped - does compiler not complain about missing function declarations? Probably it shouldn't though. It works with dead code elimination turned on on which we rely for all/most other arm optimizations too. Janne ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] x86: h264qpel: Move a stray comment to the right spot
--- libavcodec/x86/dsputil_mmx.c |2 -- libavcodec/x86/h264_qpel.c |2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index f9da04f..f72500e 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -2181,8 +2181,6 @@ static void dsputil_init_avx(DSPContext *c, AVCodecContext *avctx, int mm_flags) const int bit_depth = avctx-bits_per_raw_sample; if (bit_depth == 10) { -// AVX implies !cache64. -// TODO: Port cache(32|64) detection from x264. if (CONFIG_H264CHROMA) { c-put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_10_avx; c-avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_10_avx; diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c index bebf5a5..33b2908 100644 --- a/libavcodec/x86/h264_qpel.c +++ b/libavcodec/x86/h264_qpel.c @@ -609,6 +609,8 @@ void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth) #endif #if HAVE_AVX_EXTERNAL +// AVX implies !cache64. +// TODO: Port cache(32|64) detection from x264. if (bit_depth == 10) { H264_QPEL_FUNCS_10(1, 0, sse2); H264_QPEL_FUNCS_10(2, 0, sse2); -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/1] arm: h264qpel: use neon h264 qpel functions only if supported
--- libavcodec/arm/h264qpel_init_arm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/arm/h264qpel_init_arm.c b/libavcodec/arm/h264qpel_init_arm.c index b546c2a..21eb72f 100644 --- a/libavcodec/arm/h264qpel_init_arm.c +++ b/libavcodec/arm/h264qpel_init_arm.c @@ -22,6 +22,7 @@ #include stdint.h #include config.h +#include libavutil/arm/cpu.h #include libavcodec/h264qpel.h void ff_put_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int); @@ -94,10 +95,10 @@ void ff_avg_h264_qpel8_mc33_neon(uint8_t *, uint8_t *, int); void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth) { -#if HAVE_NEON const int high_bit_depth = bit_depth 8; +int cpu_flags = av_get_cpu_flags(); -if (!high_bit_depth) { +if (have_neon(cpu_flags) !high_bit_depth) { c-put_h264_qpel_pixels_tab[0][ 0] = ff_put_h264_qpel16_mc00_neon; c-put_h264_qpel_pixels_tab[0][ 1] = ff_put_h264_qpel16_mc10_neon; c-put_h264_qpel_pixels_tab[0][ 2] = ff_put_h264_qpel16_mc20_neon; @@ -166,5 +167,4 @@ void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth) c-avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_neon; c-avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_neon; } -#endif /* HAVE_NEON */ } -- 1.8.1.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] avfilter: allow setpts filter to use wallclock time for calculations
changed to use RTCTIME and RTCSTART From 272d056828858c2adb73511405b107ac805212c8 Mon Sep 17 00:00:00 2001 From: Vladimir Pantelic vlado...@gmail.com Date: Wed, 23 Jan 2013 13:54:08 +0100 Subject: [PATCH] avfilter: allow setpts filter to use wallclock time for calculations Signed-off-by: Vladimir Pantelic vlado...@gmail.com --- doc/filters.texi|9 + libavfilter/vf_setpts.c |7 +++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 34db2f4..8179a2d 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -1864,6 +1864,12 @@ previous input PTS @item PREV_OUTPTS previous output PTS +@item RTCTIME +current wallclock (RTC) time in microseconds + +@item RTCSTART +current wallclock (RTC) time at the start of the movie in microseconds + @end table Some examples follow: @@ -1883,6 +1889,9 @@ setpts=N/(25*TB) # fixed rate 25 fps with some jitter setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))' + +# generate timestamps from a live source and rebase onto the current timebase +setpts='(GETTIME - STARTTIME) / (TB * 100) @end example @anchor{setsar} diff --git a/libavfilter/vf_setpts.c b/libavfilter/vf_setpts.c index 0c4881e..664fc9a 100644 --- a/libavfilter/vf_setpts.c +++ b/libavfilter/vf_setpts.c @@ -29,6 +29,7 @@ #include libavutil/eval.h #include libavutil/internal.h #include libavutil/mathematics.h +#include libavutil/time.h #include avfilter.h #include internal.h #include video.h @@ -45,6 +46,8 @@ static const char *const var_names[] = { PTS, /// original pts in the file of the frame STARTPTS, /// PTS at start of movie TB, /// timebase +RTCTIME, /// current wallclock (RTC) time in micro seconds +RTCSTART,/// current wallclock (RTC) time at the start of the movie in micro seconds NULL }; @@ -60,6 +63,8 @@ enum var_name { VAR_PTS, VAR_STARTPTS, VAR_TB, +VAR_RTCTIME, +VAR_RTCSTART, VAR_VARS_NB }; @@ -94,6 +99,7 @@ static int config_input(AVFilterLink *inlink) SetPTSContext *setpts = inlink-dst-priv; setpts-var_values[VAR_TB] = av_q2d(inlink-time_base); +setpts-var_values[VAR_RTCSTART] = av_gettime(); av_log(inlink-src, AV_LOG_VERBOSE, TB:%f\n, setpts-var_values[VAR_TB]); return 0; @@ -114,6 +120,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) setpts-var_values[VAR_INTERLACED] = frame-video-interlaced; setpts-var_values[VAR_PTS ] = TS2D(frame-pts); setpts-var_values[VAR_POS ] = frame-pos == -1 ? NAN : frame-pos; +setpts-var_values[VAR_RTCTIME ] = av_gettime(); d = av_expr_eval(setpts-expr, setpts-var_values, NULL); frame-pts = D2TS(d); -- 1.7.6.rc1.1.g2c162b ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] avfilter: allow setpts filter to use wallclock time for calculations
On 2013-01-24 17:09:05 +0100, Vladimir Pantelic wrote: changed to use RTCTIME and RTCSTART From 272d056828858c2adb73511405b107ac805212c8 Mon Sep 17 00:00:00 2001 From: Vladimir Pantelic vlado...@gmail.com Date: Wed, 23 Jan 2013 13:54:08 +0100 Subject: [PATCH] avfilter: allow setpts filter to use wallclock time for calculations Signed-off-by: Vladimir Pantelic vlado...@gmail.com --- doc/filters.texi|9 + libavfilter/vf_setpts.c |7 +++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 34db2f4..8179a2d 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -1864,6 +1864,12 @@ previous input PTS @item PREV_OUTPTS previous output PTS +@item RTCTIME +current wallclock (RTC) time in microseconds + +@item RTCSTART +current wallclock (RTC) time at the start of the movie in microseconds + s/current // @end table Some examples follow: @@ -1883,6 +1889,9 @@ setpts=N/(25*TB) # fixed rate 25 fps with some jitter setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))' + +# generate timestamps from a live source and rebase onto the current timebase +setpts='(GETTIME - STARTTIME) / (TB * 100) s/GETTIME/RTCTIME/;s/STARTTIME/RTCSTART/ @end example @anchor{setsar} diff --git a/libavfilter/vf_setpts.c b/libavfilter/vf_setpts.c index 0c4881e..664fc9a 100644 --- a/libavfilter/vf_setpts.c +++ b/libavfilter/vf_setpts.c @@ -29,6 +29,7 @@ #include libavutil/eval.h #include libavutil/internal.h #include libavutil/mathematics.h +#include libavutil/time.h #include avfilter.h #include internal.h #include video.h @@ -45,6 +46,8 @@ static const char *const var_names[] = { PTS, /// original pts in the file of the frame STARTPTS, /// PTS at start of movie TB, /// timebase +RTCTIME, /// current wallclock (RTC) time in micro seconds +RTCSTART,/// current wallclock (RTC) time at the start of the movie in micro seconds s/current // NULL }; @@ -60,6 +63,8 @@ enum var_name { VAR_PTS, VAR_STARTPTS, VAR_TB, +VAR_RTCTIME, +VAR_RTCSTART, VAR_VARS_NB }; @@ -94,6 +99,7 @@ static int config_input(AVFilterLink *inlink) SetPTSContext *setpts = inlink-dst-priv; setpts-var_values[VAR_TB] = av_q2d(inlink-time_base); +setpts-var_values[VAR_RTCSTART] = av_gettime(); av_log(inlink-src, AV_LOG_VERBOSE, TB:%f\n, setpts-var_values[VAR_TB]); return 0; @@ -114,6 +120,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) setpts-var_values[VAR_INTERLACED] = frame-video-interlaced; setpts-var_values[VAR_PTS ] = TS2D(frame-pts); setpts-var_values[VAR_POS ] = frame-pos == -1 ? NAN : frame-pos; +setpts-var_values[VAR_RTCTIME ] = av_gettime(); d = av_expr_eval(setpts-expr, setpts-var_values, NULL); frame-pts = D2TS(d); otherwise ok Janne ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] h264: copy h264qpel dsp context to slice thread copies
Hi, On Thu, Jan 24, 2013 at 7:56 AM, Janne Grunau janne-li...@jannau.net wrote: --- libavcodec/h264.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 9e9384b..38a6f5e 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2556,6 +2556,7 @@ static int h264_slice_header_init(H264Context *h, int reinit) memcpy(c, h-s.thread_context[i], sizeof(MpegEncContext)); memset(c-s + 1, 0, sizeof(H264Context) - sizeof(MpegEncContext)); c-h264dsp = h-h264dsp; +c-h264qpel= h-h264qpel; OK. Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] avfilter: allow setpts filter to use wallclock time for calculations
Janne Grunau wrote: Some examples follow: @@ -1883,6 +1889,9 @@ setpts=N/(25*TB) # fixed rate 25 fps with some jitter setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))' + +# generate timestamps from a live source and rebase onto the current timebase +setpts='(GETTIME - STARTTIME) / (TB * 100) s/GETTIME/RTCTIME/;s/STARTTIME/RTCSTART/ arf, yes /o\ ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] avfilter: allow setpts filter to use wallclock time for calculations
Janne Grunau wrote: +@item RTCTIME +current wallclock (RTC) time in microseconds + +@item RTCSTART +current wallclock (RTC) time at the start of the movie in microseconds + s/current // fixed +# generate timestamps from a live source and rebase onto the current timebase +setpts='(GETTIME - STARTTIME) / (TB * 100) s/GETTIME/RTCTIME/;s/STARTTIME/RTCSTART/ fixed +RTCTIME, /// current wallclock (RTC) time in micro seconds +RTCSTART,/// current wallclock (RTC) time at the start of the movie in micro seconds s/current // fixed From 184c07a82336e2afb47db79a3a421fdc82f4a227 Mon Sep 17 00:00:00 2001 From: Vladimir Pantelic vlado...@gmail.com Date: Wed, 23 Jan 2013 13:54:08 +0100 Subject: [PATCH] avfilter: allow setpts filter to use wallclock time for calculations Signed-off-by: Vladimir Pantelic vlado...@gmail.com --- doc/filters.texi|9 + libavfilter/vf_setpts.c |7 +++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 34db2f4..2bd013d 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -1864,6 +1864,12 @@ previous input PTS @item PREV_OUTPTS previous output PTS +@item RTCTIME +wallclock (RTC) time in microseconds + +@item RTCSTART +wallclock (RTC) time at the start of the movie in microseconds + @end table Some examples follow: @@ -1883,6 +1889,9 @@ setpts=N/(25*TB) # fixed rate 25 fps with some jitter setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))' + +# generate timestamps from a live source and rebase onto the current timebase +setpts='(RTCTIME - RTCSTART) / (TB * 100) @end example @anchor{setsar} diff --git a/libavfilter/vf_setpts.c b/libavfilter/vf_setpts.c index 0c4881e..79cadd4 100644 --- a/libavfilter/vf_setpts.c +++ b/libavfilter/vf_setpts.c @@ -29,6 +29,7 @@ #include libavutil/eval.h #include libavutil/internal.h #include libavutil/mathematics.h +#include libavutil/time.h #include avfilter.h #include internal.h #include video.h @@ -45,6 +46,8 @@ static const char *const var_names[] = { PTS, /// original pts in the file of the frame STARTPTS, /// PTS at start of movie TB, /// timebase +RTCTIME, /// wallclock (RTC) time in micro seconds +RTCSTART,/// wallclock (RTC) time at the start of the movie in micro seconds NULL }; @@ -60,6 +63,8 @@ enum var_name { VAR_PTS, VAR_STARTPTS, VAR_TB, +VAR_RTCTIME, +VAR_RTCSTART, VAR_VARS_NB }; @@ -94,6 +99,7 @@ static int config_input(AVFilterLink *inlink) SetPTSContext *setpts = inlink-dst-priv; setpts-var_values[VAR_TB] = av_q2d(inlink-time_base); +setpts-var_values[VAR_RTCSTART] = av_gettime(); av_log(inlink-src, AV_LOG_VERBOSE, TB:%f\n, setpts-var_values[VAR_TB]); return 0; @@ -114,6 +120,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) setpts-var_values[VAR_INTERLACED] = frame-video-interlaced; setpts-var_values[VAR_PTS ] = TS2D(frame-pts); setpts-var_values[VAR_POS ] = frame-pos == -1 ? NAN : frame-pos; +setpts-var_values[VAR_RTCTIME ] = av_gettime(); d = av_expr_eval(setpts-expr, setpts-var_values, NULL); frame-pts = D2TS(d); -- 1.7.6.rc1.1.g2c162b ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] arm: h264qpel: use neon h264 qpel functions only if supported
On Thu, 24 Jan 2013, Janne Grunau wrote: --- libavcodec/arm/h264qpel_init_arm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/arm/h264qpel_init_arm.c b/libavcodec/arm/h264qpel_init_arm.c index b546c2a..21eb72f 100644 --- a/libavcodec/arm/h264qpel_init_arm.c +++ b/libavcodec/arm/h264qpel_init_arm.c @@ -22,6 +22,7 @@ #include stdint.h #include config.h +#include libavutil/arm/cpu.h #include libavcodec/h264qpel.h void ff_put_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int); @@ -94,10 +95,10 @@ void ff_avg_h264_qpel8_mc33_neon(uint8_t *, uint8_t *, int); void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth) { -#if HAVE_NEON const int high_bit_depth = bit_depth 8; +int cpu_flags = av_get_cpu_flags(); -if (!high_bit_depth) { +if (have_neon(cpu_flags) !high_bit_depth) { c-put_h264_qpel_pixels_tab[0][ 0] = ff_put_h264_qpel16_mc00_neon; c-put_h264_qpel_pixels_tab[0][ 1] = ff_put_h264_qpel16_mc10_neon; c-put_h264_qpel_pixels_tab[0][ 2] = ff_put_h264_qpel16_mc20_neon; @@ -166,5 +167,4 @@ void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth) c-avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_neon; c-avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_neon; } -#endif /* HAVE_NEON */ } -- 1.8.1.1 LGTM for real this time. // Martin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Add av_strnstr() function
On 24/01/13 16:09, Vladimir Pantelic wrote: taking Diego's remarks into account. Looks ok to me. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] build: Make the H.264 parser select h264qpel
It is required for building the shared H.264 code. --- configure |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure b/configure index 87045f2..77600ef 100755 --- a/configure +++ b/configure @@ -1633,7 +1633,7 @@ wmv3_vdpau_decoder_select=vc1_vdpau_decoder wmv3_vdpau_hwaccel_select=vc1_vdpau_hwaccel # parsers -h264_parser_select=error_resilience golomb h264dsp h264pred mpegvideo +h264_parser_select=error_resilience golomb h264dsp h264pred h264qpel mpegvideo mpeg4video_parser_select=error_resilience mpegvideo mpegvideo_parser_select=error_resilience mpegvideo vc1_parser_select=error_resilience mpegvideo -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] arm: h264qpel: use neon h264 qpel functions only if supported
On Thu, Jan 24, 2013 at 05:07:23PM +0100, Janne Grunau wrote: --- libavcodec/arm/h264qpel_init_arm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/arm/h264qpel_init_arm.c b/libavcodec/arm/h264qpel_init_arm.c index b546c2a..21eb72f 100644 --- a/libavcodec/arm/h264qpel_init_arm.c +++ b/libavcodec/arm/h264qpel_init_arm.c @@ -22,6 +22,7 @@ #include stdint.h #include config.h +#include libavutil/arm/cpu.h #include libavcodec/h264qpel.h void ff_put_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int); @@ -94,10 +95,10 @@ void ff_avg_h264_qpel8_mc33_neon(uint8_t *, uint8_t *, int); void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth) { -#if HAVE_NEON const int high_bit_depth = bit_depth 8; +int cpu_flags = av_get_cpu_flags(); -if (!high_bit_depth) { +if (have_neon(cpu_flags) !high_bit_depth) { c-put_h264_qpel_pixels_tab[0][ 0] = ff_put_h264_qpel16_mc00_neon; c-put_h264_qpel_pixels_tab[0][ 1] = ff_put_h264_qpel16_mc10_neon; c-put_h264_qpel_pixels_tab[0][ 2] = ff_put_h264_qpel16_mc20_neon; @@ -166,5 +167,4 @@ void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth) c-avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_neon; c-avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_neon; } -#endif /* HAVE_NEON */ } -- looks good to me ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] x86: h264qpel: Move a stray comment to the right spot
On 2013-01-24 17:07:11 +0100, Diego Biurrun wrote: --- libavcodec/x86/dsputil_mmx.c |2 -- libavcodec/x86/h264_qpel.c |2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index f9da04f..f72500e 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -2181,8 +2181,6 @@ static void dsputil_init_avx(DSPContext *c, AVCodecContext *avctx, int mm_flags) const int bit_depth = avctx-bits_per_raw_sample; if (bit_depth == 10) { -// AVX implies !cache64. -// TODO: Port cache(32|64) detection from x264. the comment seems to be plain wrong. Sandy bridge, which was the first cpu with AVX has 64 byte cache lines. Janne ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] build: Make the H.264 parser select h264qpel
On 24/01/13 17:48, Diego Biurrun wrote: It is required for building the shared H.264 code. --- configure |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Ok ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] x86: h264qpel: Move a stray comment to the right spot
On Thu, Jan 24, 2013 at 05:56:52PM +0100, Janne Grunau wrote: On 2013-01-24 17:07:11 +0100, Diego Biurrun wrote: --- libavcodec/x86/dsputil_mmx.c |2 -- libavcodec/x86/h264_qpel.c |2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index f9da04f..f72500e 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -2181,8 +2181,6 @@ static void dsputil_init_avx(DSPContext *c, AVCodecContext *avctx, int mm_flags) const int bit_depth = avctx-bits_per_raw_sample; if (bit_depth == 10) { -// AVX implies !cache64. -// TODO: Port cache(32|64) detection from x264. the comment seems to be plain wrong. Sandy bridge, which was the first cpu with AVX has 64 byte cache lines. And you are confident this is not a case of poor man's cpu flag detection like the following block in the SSSE3 section: if (mm_flags AV_CPU_FLAG_SSE4) // not really sse4, just slow on Conroe c-add_hfyu_left_prediction = ff_add_hfyu_left_prediction_sse4; IOW, probably just the ! is a typo and it is meant to read that AVX implies cache64. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/1] x86: h264qpel: add cpu flag checks for init function
The code was copied from per cpu extension init function so the checks for supported extensions was overlooked. --- libavcodec/x86/h264_qpel.c | 139 - 1 file changed, 74 insertions(+), 65 deletions(-) diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c index bebf5a5..a1c35bf 100644 --- a/libavcodec/x86/h264_qpel.c +++ b/libavcodec/x86/h264_qpel.c @@ -21,6 +21,7 @@ #include libavutil/cpu.h #include libavutil/x86/asm.h +#include libavutil/x86/cpu.h #include libavcodec/dsputil.h #include libavcodec/h264qpel.h #include libavcodec/mpegvideo.h @@ -534,85 +535,93 @@ void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth) int mm_flags = av_get_cpu_flags(); #if HAVE_MMXEXT_EXTERNAL -if (!high_bit_depth) { -SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmxext, ); -SET_QPEL_FUNCS(put_h264_qpel, 1, 8, mmxext, ); -SET_QPEL_FUNCS(put_h264_qpel, 2, 4, mmxext, ); -SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, mmxext, ); -SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, mmxext, ); -SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, mmxext, ); -} else if (bit_depth == 10) { +if (EXTERNAL_MMXEXT(mm_flags)) { +if (!high_bit_depth) { +SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmxext, ); +SET_QPEL_FUNCS(put_h264_qpel, 1, 8, mmxext, ); +SET_QPEL_FUNCS(put_h264_qpel, 2, 4, mmxext, ); +SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, mmxext, ); +SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, mmxext, ); +SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, mmxext, ); +} else if (bit_depth == 10) { #if !ARCH_X86_64 -SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 10_mmxext, ff_); -SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_mmxext, ff_); -SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 10_mmxext, ff_); -SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 10_mmxext, ff_); +SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 10_mmxext, ff_); +SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_mmxext, ff_); +SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 10_mmxext, ff_); +SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 10_mmxext, ff_); #endif -SET_QPEL_FUNCS(put_h264_qpel, 2, 4, 10_mmxext, ff_); -SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, 10_mmxext, ff_); +SET_QPEL_FUNCS(put_h264_qpel, 2, 4, 10_mmxext, ff_); +SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, 10_mmxext, ff_); +} } #endif #if HAVE_SSE2_EXTERNAL -if (!(mm_flags AV_CPU_FLAG_SSE2SLOW) !high_bit_depth) { -// these functions are slower than mmx on AMD, but faster on Intel -H264_QPEL_FUNCS(0, 0, sse2); -} - -if (!high_bit_depth) { -H264_QPEL_FUNCS(0, 1, sse2); -H264_QPEL_FUNCS(0, 2, sse2); -H264_QPEL_FUNCS(0, 3, sse2); -H264_QPEL_FUNCS(1, 1, sse2); -H264_QPEL_FUNCS(1, 2, sse2); -H264_QPEL_FUNCS(1, 3, sse2); -H264_QPEL_FUNCS(2, 1, sse2); -H264_QPEL_FUNCS(2, 2, sse2); -H264_QPEL_FUNCS(2, 3, sse2); -H264_QPEL_FUNCS(3, 1, sse2); -H264_QPEL_FUNCS(3, 2, sse2); -H264_QPEL_FUNCS(3, 3, sse2); -} - -if (bit_depth == 10) { -SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_sse2, ff_); -SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 10_sse2, ff_); -SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 10_sse2, ff_); -SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 10_sse2, ff_); -H264_QPEL_FUNCS_10(1, 0, sse2_cache64); -H264_QPEL_FUNCS_10(2, 0, sse2_cache64); -H264_QPEL_FUNCS_10(3, 0, sse2_cache64); +if (EXTERNAL_SSE2(mm_flags)) { +if (!(mm_flags AV_CPU_FLAG_SSE2SLOW) !high_bit_depth) { +// these functions are slower than mmx on AMD, but faster on Intel +H264_QPEL_FUNCS(0, 0, sse2); +} + +if (!high_bit_depth) { +H264_QPEL_FUNCS(0, 1, sse2); +H264_QPEL_FUNCS(0, 2, sse2); +H264_QPEL_FUNCS(0, 3, sse2); +H264_QPEL_FUNCS(1, 1, sse2); +H264_QPEL_FUNCS(1, 2, sse2); +H264_QPEL_FUNCS(1, 3, sse2); +H264_QPEL_FUNCS(2, 1, sse2); +H264_QPEL_FUNCS(2, 2, sse2); +H264_QPEL_FUNCS(2, 3, sse2); +H264_QPEL_FUNCS(3, 1, sse2); +H264_QPEL_FUNCS(3, 2, sse2); +H264_QPEL_FUNCS(3, 3, sse2); +} + +if (bit_depth == 10) { +SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_sse2, ff_); +SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 10_sse2, ff_); +SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 10_sse2, ff_); +SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 10_sse2, ff_); +H264_QPEL_FUNCS_10(1, 0, sse2_cache64); +H264_QPEL_FUNCS_10(2, 0, sse2_cache64); +H264_QPEL_FUNCS_10(3, 0, sse2_cache64); +} } #endif #if HAVE_SSSE3_EXTERNAL -if (!high_bit_depth) { -H264_QPEL_FUNCS(1, 0, ssse3); -H264_QPEL_FUNCS(1, 1,
[libav-devel] [PATCH 1/1] x86: h264qpel: add cpu flag checks for init function
The code was copied from per cpu extension init function so the checks for supported extensions was overlooked. --- libavcodec/x86/h264_qpel.c | 147 +++-- 1 file changed, 75 insertions(+), 72 deletions(-) diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c index bebf5a5..9157223 100644 --- a/libavcodec/x86/h264_qpel.c +++ b/libavcodec/x86/h264_qpel.c @@ -21,6 +21,7 @@ #include libavutil/cpu.h #include libavutil/x86/asm.h +#include libavutil/x86/cpu.h #include libavcodec/dsputil.h #include libavcodec/h264qpel.h #include libavcodec/mpegvideo.h @@ -530,89 +531,91 @@ QPEL16(mmxext) void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth) { +#if HAVE_YASM int high_bit_depth = bit_depth 8; int mm_flags = av_get_cpu_flags(); -#if HAVE_MMXEXT_EXTERNAL -if (!high_bit_depth) { -SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmxext, ); -SET_QPEL_FUNCS(put_h264_qpel, 1, 8, mmxext, ); -SET_QPEL_FUNCS(put_h264_qpel, 2, 4, mmxext, ); -SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, mmxext, ); -SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, mmxext, ); -SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, mmxext, ); -} else if (bit_depth == 10) { +if (EXTERNAL_MMXEXT(mm_flags)) { +if (!high_bit_depth) { +SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmxext, ); +SET_QPEL_FUNCS(put_h264_qpel, 1, 8, mmxext, ); +SET_QPEL_FUNCS(put_h264_qpel, 2, 4, mmxext, ); +SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, mmxext, ); +SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, mmxext, ); +SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, mmxext, ); +} else if (bit_depth == 10) { #if !ARCH_X86_64 -SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 10_mmxext, ff_); -SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_mmxext, ff_); -SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 10_mmxext, ff_); -SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 10_mmxext, ff_); -#endif -SET_QPEL_FUNCS(put_h264_qpel, 2, 4, 10_mmxext, ff_); -SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, 10_mmxext, ff_); -} +SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 10_mmxext, ff_); +SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_mmxext, ff_); +SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 10_mmxext, ff_); +SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 10_mmxext, ff_); #endif - -#if HAVE_SSE2_EXTERNAL -if (!(mm_flags AV_CPU_FLAG_SSE2SLOW) !high_bit_depth) { -// these functions are slower than mmx on AMD, but faster on Intel -H264_QPEL_FUNCS(0, 0, sse2); -} - -if (!high_bit_depth) { -H264_QPEL_FUNCS(0, 1, sse2); -H264_QPEL_FUNCS(0, 2, sse2); -H264_QPEL_FUNCS(0, 3, sse2); -H264_QPEL_FUNCS(1, 1, sse2); -H264_QPEL_FUNCS(1, 2, sse2); -H264_QPEL_FUNCS(1, 3, sse2); -H264_QPEL_FUNCS(2, 1, sse2); -H264_QPEL_FUNCS(2, 2, sse2); -H264_QPEL_FUNCS(2, 3, sse2); -H264_QPEL_FUNCS(3, 1, sse2); -H264_QPEL_FUNCS(3, 2, sse2); -H264_QPEL_FUNCS(3, 3, sse2); +SET_QPEL_FUNCS(put_h264_qpel, 2, 4, 10_mmxext, ff_); +SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, 10_mmxext, ff_); +} } -if (bit_depth == 10) { -SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_sse2, ff_); -SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 10_sse2, ff_); -SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 10_sse2, ff_); -SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 10_sse2, ff_); -H264_QPEL_FUNCS_10(1, 0, sse2_cache64); -H264_QPEL_FUNCS_10(2, 0, sse2_cache64); -H264_QPEL_FUNCS_10(3, 0, sse2_cache64); +if (EXTERNAL_SSE2(mm_flags)) { +if (!(mm_flags AV_CPU_FLAG_SSE2SLOW) !high_bit_depth) { +// these functions are slower than mmx on AMD, but faster on Intel +H264_QPEL_FUNCS(0, 0, sse2); +} + +if (!high_bit_depth) { +H264_QPEL_FUNCS(0, 1, sse2); +H264_QPEL_FUNCS(0, 2, sse2); +H264_QPEL_FUNCS(0, 3, sse2); +H264_QPEL_FUNCS(1, 1, sse2); +H264_QPEL_FUNCS(1, 2, sse2); +H264_QPEL_FUNCS(1, 3, sse2); +H264_QPEL_FUNCS(2, 1, sse2); +H264_QPEL_FUNCS(2, 2, sse2); +H264_QPEL_FUNCS(2, 3, sse2); +H264_QPEL_FUNCS(3, 1, sse2); +H264_QPEL_FUNCS(3, 2, sse2); +H264_QPEL_FUNCS(3, 3, sse2); +} + +if (bit_depth == 10) { +SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_sse2, ff_); +SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 10_sse2, ff_); +SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 10_sse2, ff_); +SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 10_sse2, ff_); +H264_QPEL_FUNCS_10(1, 0, sse2_cache64); +H264_QPEL_FUNCS_10(2, 0, sse2_cache64); +H264_QPEL_FUNCS_10(3, 0, sse2_cache64); +} } -#endif -#if HAVE_SSSE3_EXTERNAL -if (!high_bit_depth) { -
Re: [libav-devel] [PATCH 1/1] x86: h264qpel: add cpu flag checks for init function
On Thu, Jan 24, 2013 at 07:04:20PM +0100, Janne Grunau wrote: The code was copied from per cpu extension init function so the checks for supported extensions was overlooked. --- libavcodec/x86/h264_qpel.c | 147 +++-- 1 file changed, 75 insertions(+), 72 deletions(-) LGTM Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 4/4] lavr: fix matrix reduction for upmixing in certain cases
On 18/01/13 19:50, Justin Ruggles wrote: Do not skip an output if the corresponding input contributes to other output channels. --- libavresample/audio_mix.c |8 1 files changed, 8 insertions(+), 0 deletions(-) Seems fine. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] avstring: KR formatting cosmetics
From: Luca Barbato lu_z...@gentoo.org Signed-off-by: Diego Biurrun di...@biurrun.de --- Added a few more changes. libavutil/avstring.c | 115 - 1 files changed, 56 insertions(+), 59 deletions(-) diff --git a/libavutil/avstring.c b/libavutil/avstring.c index 2c88bd3..a16adcb 100644 --- a/libavutil/avstring.c +++ b/libavutil/avstring.c @@ -24,10 +24,11 @@ #include stdio.h #include string.h #include ctype.h -#include avstring.h + #include config.h #include common.h #include mem.h +#include avstring.h int av_strstart(const char *str, const char *pfx, const char **ptr) { @@ -56,10 +57,10 @@ char *av_stristr(const char *s1, const char *s2) if (!*s2) return s1; -do { +do if (av_stristart(s1, s2, NULL)) return s1; -} while (*s1++); +while (*s1++); return NULL; } @@ -96,8 +97,9 @@ size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) char *av_d2str(double d) { -char *str= av_malloc(16); -if(str) snprintf(str, 16, %f, d); +char *str = av_malloc(16); +if (str) +snprintf(str, 16, %f, d); return str; } @@ -105,32 +107,33 @@ char *av_d2str(double d) char *av_get_token(const char **buf, const char *term) { -char *out = av_malloc(strlen(*buf) + 1); -char *ret= out, *end= out; +char *out = av_malloc(strlen(*buf) + 1); +char *ret = out, *end = out; const char *p = *buf; -if (!out) return NULL; +if (!out) +return NULL; p += strspn(p, WHITESPACES); -while(*p !strspn(p, term)) { +while (*p !strspn(p, term)) { char c = *p++; -if(c == '\\' *p){ +if (c == '\\' *p) { *out++ = *p++; -end= out; -}else if(c == '\''){ -while(*p *p != '\'') +end= out; +} else if (c == '\'') { +while (*p *p != '\'') *out++ = *p++; -if(*p){ +if (*p) { p++; -end= out; +end = out; } -}else{ +} else { *out++ = c; } } -do{ +do *out-- = 0; -}while(out = end strspn(out, WHITESPACES)); +while (out = end strspn(out, WHITESPACES)); *buf = p; @@ -196,54 +199,48 @@ const char *av_dirname(char *path) return path; } - #ifdef TEST -#include common.h - int main(void) { int i; +const char *strings[] = { +'', +, +:, +\\, +', +'':, +'' '' :, +foo '' :, +'foo', +foo , + ' foo ' , +foo\\, +foo': blah:blah, +foo\\: blah:blah, +foo\', +'foo : ' :blahblah, +\\ :blah, + foo, + foo , + foo \\ , +foo ':blah, + foo bar: blahblah, +\\f\\o\\o, +'foo : \\ \\ ' : blahblah, +'\\fo\\o:': blahblah, +\\'fo\\o\\:': foo ' :blahblah +}; printf(Testing av_get_token()\n); -{ -const char *strings[] = { -'', -, -:, -\\, -', -'':, -'' '' :, -foo '' :, -'foo', -foo , - ' foo ' , -foo\\, -foo': blah:blah, -foo\\: blah:blah, -foo\', -'foo : ' :blahblah, -\\ :blah, - foo, - foo , - foo \\ , -foo ':blah, - foo bar: blahblah, -\\f\\o\\o, -'foo : \\ \\ ' : blahblah, -'\\fo\\o:': blahblah, -\\'fo\\o\\:': foo ' :blahblah -}; - -for (i=0; i FF_ARRAY_ELEMS(strings); i++) { -const char *p = strings[i], *q; -printf(|%s|, p); -q = av_get_token(p, :); -printf( - |%s|, q); -printf( + |%s|\n, p); -av_free(q); -} +for (i = 0; i FF_ARRAY_ELEMS(strings); i++) { +const char *p = strings[i], *q; +printf(|%s|, p); +q = av_get_token(p, :); +printf( - |%s|, q); +printf( + |%s|\n, p); +av_free(q); } return 0; -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] lavu/dict: add av_dict_set_string()
From: Justin Ruggles justin.rugg...@gmail.com Can be used to set multiple key/value pairs from a string. Signed-off-by: Luca Barbato lu_z...@gentoo.org --- Rebased doc/APIchanges | 4 libavutil/dict.c| 47 +++ libavutil/dict.h| 17 + libavutil/version.h | 2 +- 4 files changed, 69 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 3120f7e..47f4d56 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,10 @@ libavutil: 2012-10-22 API changes, most recent first: +2013-xx-xx - xxx - lavu 52.6.0 - dict.h + Add av_dict_set_string() to set multiple key/value pairs at once from a + string. + 2013-01-xx - xxx - lavu 52.5.0 - hmac.h Add AVHMAC. diff --git a/libavutil/dict.c b/libavutil/dict.c index 3c3194c..b8eac34 100644 --- a/libavutil/dict.c +++ b/libavutil/dict.c @@ -110,6 +110,53 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags return 0; } +static int parse_key_value_pair(AVDictionary **pm, const char **buf, +const char *key_val_sep, const char *pairs_sep, +int flags) +{ +char *key = av_get_token(buf, key_val_sep); +char *val = NULL; +int ret; + +if (key *key strspn(*buf, key_val_sep)) { +(*buf)++; +val = av_get_token(buf, pairs_sep); +} + +if (key *key val *val) +ret = av_dict_set(pm, key, val, flags); +else +ret = AVERROR(EINVAL); + +av_freep(key); +av_freep(val); + +return ret; +} + +int av_dict_set_string(AVDictionary **pm, const char *str, + const char *key_val_sep, const char *pairs_sep, + int flags) +{ +int ret; + +if (!str) +return 0; + +/* ignore STRDUP flags */ +flags = ~(AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL); + +while (*str) { +if ((ret = parse_key_value_pair(pm, str, key_val_sep, pairs_sep, flags)) 0) +return ret; + +if (*str) +str++; +} + +return 0; +} + void av_dict_free(AVDictionary **pm) { AVDictionary *m = *pm; diff --git a/libavutil/dict.h b/libavutil/dict.h index 492da9a..ac65470 100644 --- a/libavutil/dict.h +++ b/libavutil/dict.h @@ -107,6 +107,23 @@ int av_dict_count(const AVDictionary *m); int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags); /** + * Parse the key/value pairs list and add to a dictionary. + * + * @param key_val_sep a 0-terminated list of characters used to separate + * key from value + * @param pairs_sepa 0-terminated list of characters used to separate + * two pairs from each other + * @param flagsflags to use when adding to dictionary. + * AV_DICT_DONT_STRDUP_KEY and AV_DICT_DONT_STRDUP_VAL + * are ignored since the key/value tokens will always + * be duplicated. + * @return 0 on success, negative AVERROR code on failure + */ +int av_dict_set_string(AVDictionary **pm, const char *str, + const char *key_val_sep, const char *pairs_sep, + int flags); + +/** * Copy entries from one AVDictionary struct into another. * @param dst pointer to a pointer to a AVDictionary struct. If *dst is NULL, *this function will allocate a struct for you and put it in *dst diff --git a/libavutil/version.h b/libavutil/version.h index 68f5752..4c9651f 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -37,7 +37,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 52 -#define LIBAVUTIL_VERSION_MINOR 5 +#define LIBAVUTIL_VERSION_MINOR 6 #define LIBAVUTIL_VERSION_MICRO 0 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ -- 1.8.0.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] avstring: KR formatting cosmetics
On 24/01/13 20:13, Diego Biurrun wrote: From: Luca Barbato lu_z...@gentoo.org Signed-off-by: Diego Biurrun di...@biurrun.de --- Added a few more changes. Commit anytime. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] Move H264/QPEL specific asm from dsputil.asm to h264_qpel_*.asm.
From: Ronald S. Bultje rsbul...@gmail.com --- libavcodec/x86/dsputil.asm| 188 -- libavcodec/x86/h264_qpel_8bit.asm | 169 ++ 2 files changed, 169 insertions(+), 188 deletions(-) diff --git a/libavcodec/x86/dsputil.asm b/libavcodec/x86/dsputil.asm index 9bc6e3f..8002779 100644 --- a/libavcodec/x86/dsputil.asm +++ b/libavcodec/x86/dsputil.asm @@ -648,191 +648,3 @@ BSWAP32_BUF INIT_XMM ssse3 BSWAP32_BUF - -%macro op_avgh 3 -movh %3, %2 -pavgb %1, %3 -movh %2, %1 -%endmacro - -%macro op_avg 2 -pavgb %1, %2 -mova %2, %1 -%endmacro - -%macro op_puth 2-3 -movh %2, %1 -%endmacro - -%macro op_put 2 -mova %2, %1 -%endmacro - -; void pixels4_l2_mmxext(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h) -%macro PIXELS4_L2 1 -%define OP op_%1h -cglobal %1_pixels4_l2, 6,6 -movsxdifnidn r3, r3d -movsxdifnidn r4, r4d -testr5d, 1 -je.loop -movd m0, [r1] -movd m1, [r2] -add r1, r4 -add r2, 4 -pavgbm0, m1 -OP m0, [r0], m3 -add r0, r3 -dec r5d -.loop: -mova m0, [r1] -mova m1, [r1+r4] -lea r1, [r1+2*r4] -pavgbm0, [r2] -pavgbm1, [r2+4] -OP m0, [r0], m3 -OP m1, [r0+r3], m3 -lea r0, [r0+2*r3] -mova m0, [r1] -mova m1, [r1+r4] -lea r1, [r1+2*r4] -pavgbm0, [r2+8] -pavgbm1, [r2+12] -OP m0, [r0], m3 -OP m1, [r0+r3], m3 -lea r0, [r0+2*r3] -add r2, 16 -sub r5d, 4 -jne .loop -REP_RET -%endmacro - -INIT_MMX mmxext -PIXELS4_L2 put -PIXELS4_L2 avg - -; void pixels8_l2_mmxext(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h) -%macro PIXELS8_L2 1 -%define OP op_%1 -cglobal %1_pixels8_l2, 6,6 -movsxdifnidn r3, r3d -movsxdifnidn r4, r4d -testr5d, 1 -je.loop -mova m0, [r1] -mova m1, [r2] -add r1, r4 -add r2, 8 -pavgbm0, m1 -OP m0, [r0] -add r0, r3 -dec r5d -.loop: -mova m0, [r1] -mova m1, [r1+r4] -lea r1, [r1+2*r4] -pavgbm0, [r2] -pavgbm1, [r2+8] -OP m0, [r0] -OP m1, [r0+r3] -lea r0, [r0+2*r3] -mova m0, [r1] -mova m1, [r1+r4] -lea r1, [r1+2*r4] -pavgbm0, [r2+16] -pavgbm1, [r2+24] -OP m0, [r0] -OP m1, [r0+r3] -lea r0, [r0+2*r3] -add r2, 32 -sub r5d, 4 -jne .loop -REP_RET -%endmacro - -INIT_MMX mmxext -PIXELS8_L2 put -PIXELS8_L2 avg - -; void pixels16_l2_mmxext(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h) -%macro PIXELS16_L2 1 -%define OP op_%1 -cglobal %1_pixels16_l2, 6,6 -movsxdifnidn r3, r3d -movsxdifnidn r4, r4d -testr5d, 1 -je.loop -mova m0, [r1] -mova m1, [r1+8] -pavgbm0, [r2] -pavgbm1, [r2+8] -add r1, r4 -add r2, 16 -OP m0, [r0] -OP m1, [r0+8] -add r0, r3 -dec r5d -.loop: -mova m0, [r1] -mova m1, [r1+8] -add r1, r4 -pavgbm0, [r2] -pavgbm1, [r2+8] -OP m0, [r0] -OP m1, [r0+8] -add r0, r3 -mova m0, [r1] -mova m1, [r1+8] -add r1, r4 -pavgbm0, [r2+16] -pavgbm1, [r2+24] -OP m0, [r0] -OP m1, [r0+8] -add r0, r3 -add r2, 32 -sub r5d, 2 -jne .loop -REP_RET -%endmacro - -INIT_MMX mmxext -PIXELS16_L2 put -PIXELS16_L2 avg - -INIT_MMX mmxext -; void pixels(uint8_t *block, const uint8_t *pixels, int line_size, int h) -%macro PIXELS48 2 -%if %2 == 4 -%define OP movh -%else -%define OP mova -%endif -cglobal %1_pixels%2, 4,5 -movsxdifnidn r2, r2d -lea r4, [r2*3] -.loop: -OP m0, [r1] -OP m1, [r1+r2] -OP m2, [r1+r2*2] -OP m3, [r1+r4] -lea r1, [r1+r2*4] -%ifidn %1, avg -pavgbm0, [r0] -pavgbm1, [r0+r2] -pavgbm2, [r0+r2*2] -pavgbm3, [r0+r4] -%endif -OP [r0], m0 -OP [r0+r2], m1 -OP[r0+r2*2], m2 -OP [r0+r4], m3 -sub r3d, 4 -lea r0, [r0+r2*4] -jne .loop -RET -%endmacro - -PIXELS48 put, 4 -PIXELS48 avg, 4 -PIXELS48 put, 8 -PIXELS48 avg, 8 diff --git a/libavcodec/x86/h264_qpel_8bit.asm