From patchwork Thu Sep 7 13:59:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= X-Patchwork-Id: 5035 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.15.201 with SMTP id 70csp232865jao; Thu, 7 Sep 2017 06:59:38 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6LpgMgZlxWAeRn3dbau3AvUEMwrze29bjSFvGvnEjDD65RKTAm4GXoV30rFArNEGKfJ0X3 X-Received: by 10.28.63.139 with SMTP id m133mr559394wma.140.1504792778626; Thu, 07 Sep 2017 06:59:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504792778; cv=none; d=google.com; s=arc-20160816; b=xR6bX9vro1dlhzEgVjZV09tR0BmFMhRvdeP/KQx7GzBS9nvtsJsuOojpf6l8qxMEpF Ug3hD9nv5Sbvai0DxOGD1cNvaPDPSOFvj6bhxPmmYXMbfVm5Ds78rXS4Z2Zi499rvMcd qG5JeytwbDuX/28UO3+L2DNi6FPnm8l9ehtUzGLu0PZO6KtG3I0fewd+XshSlp+aO8ru /U1LpTrrBoj4+chR7EWc7MODysOUEHRFFAQRjNBxLnfjJMwEfAlEHJvYsqPD9aAATC82 3NS2OUZ7RDWkIF5mSDOaa5nEJkJvFulEhmItHaEOQCy0o/VQGxIWgK8/Im6U+LsyD1rH 1b5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :in-reply-to:mime-version:references:mail-followup-to:message-id:to :from:date:domainkey-signature:dkim-signature:delivered-to :arc-authentication-results; bh=Lgv4UwJ9ivtjcxhN/cFBEk66/Ix7PgHO+Ow8jw44S/Q=; b=Ujv/1uthLr6a1xxSXDSk3jEfjzBy37unxXldRBdE5zIx+m7HhSgOtNjZKnq4FK9M6+ I12fv+AnU6gzDaAxnrsc43k3Im/02ZyrSgDFIqlb+a8O0t8lWH3+1f6nb3bCEwXGPUfi 7uR2QhNnf5Nurc7PWM8vBGpyjh6rSIrV7rOQjQhE1n36P1cr7Q0dI5IbN7EWexIkL+oQ RVatixXtRDEGYpgmPZ2zRVxpj7KtAdhh1CS/ZrfmhA/lO2fv0O3VVDQeQ/W92UIWRZvG Cn9PJ8KkNwc1QRddEtlKekyeCvymq2Bi65uk5uFb4oXx0fELaY2IrP15hTs5c3jSd3Et KO8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=N1yYHTvp; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id f2si2030644wre.192.2017.09.07.06.59.38; Thu, 07 Sep 2017 06:59:38 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=N1yYHTvp; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 73478689E78; Thu, 7 Sep 2017 16:59:33 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from golem.pkh.me (LStLambert-657-1-117-164.w92-154.abo.wanadoo.fr [92.154.28.164]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C53FB689E6E for ; Thu, 7 Sep 2017 16:59:26 +0300 (EEST) Received: from golem.pkh.me (localhost.localdomain [127.0.0.1]) by golem.pkh.me (OpenSMTPD) with ESMTP id f995f1d5 for ; Thu, 7 Sep 2017 13:59:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pkh.me; h=date:from:to :subject:message-id:references:mime-version:content-type :in-reply-to; s=selector1; bh=klS51Tr2S7rn2efx07rankOvk6w=; b=N1 yYHTvpb23+KdBLrQS9w/DEGJ6Yu0kZW/107reZZZgRo6otdaqf3fuWuo2MXDXTe/ 53rWljk8QWWr4owvAFs1KQXmhPNh/zLH6awXFE1FYHY3MJJQadMYejnbWRoly/lf GGmjr3JVHzSnGDGo1eJU1baOkaMzXZsj63Y+LOqHxD0G/xuvSSADypibfasi5O6G 35bbMkW4SsqWlBvfgll97Df4KhsgzE7kmCxtx16snPJ6lP4Czjrkk13EMwLaFUxD tVipYIsMNXzOZhvtk1oX8Fwu7sowk/96kHGsMaQVxDUfElOj+G8D16QsUURlP/gI vGf2Oxgdgl3oa/IZe6hw== DomainKey-Signature: a=rsa-sha1; c=nofws; d=pkh.me; h=date:from:to :subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=selector1; b=EPY2bAS0A84rBgfddv6+yjg/OFTB CLq/U9C84KI7I9iDSAui1lIjb3zT91qkA/FoSvCKhx35MUIWKyu513Kr/dxl+1+t 3gcVeTmp3bmPh8ykUChQQWq34O1Qh85f/JQMoO+ekTi5R8hih/0vXXr7h5RJOKBZ JGAW5TFjSKizDlJXck3wxrO9IvcZn+F15U5f03k02iaqYmulP+uCwsP0Ap0jnlQY 5Cwf0ApjJuz/aD2RGrs63UJPb/2CW3xGc+IQ05tWKZjwgDI/9XPHG+DlzGR6Y/ta UH1lgDoVJi01DN8eTBpp0Lfuac1V6EDmYD1Xjj3mZrz3wIB95snqNShsBA== Received: from golem.pkh.me (localhost.localdomain [127.0.0.1]) by golem.pkh.me (OpenSMTPD) with ESMTPSA id 316f7394 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Thu, 7 Sep 2017 13:59:29 +0000 (UTC) Date: Thu, 7 Sep 2017 15:59:28 +0200 From: =?utf-8?B?Q2zDqW1lbnQgQsWTc2No?= To: FFmpeg development discussions and patches Message-ID: <20170907135928.GH21898@golem.pkh.me> Mail-Followup-To: FFmpeg development discussions and patches References: <20170902181740.23104-1-u@pkh.me> <20170902181740.23104-3-u@pkh.me> <20170903183024.GR7094@nb4> MIME-Version: 1.0 In-Reply-To: <20170903183024.GR7094@nb4> User-Agent: Mutt/1.8.3 (2017-05-23) Subject: Re: [FFmpeg-devel] [PATCH 3/3] lavu/timer.h: add Linux Perf API support X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" On Sun, Sep 03, 2017 at 08:30:24PM +0200, Michael Niedermayer wrote: > On Sat, Sep 02, 2017 at 08:17:40PM +0200, Clément Bœsch wrote: > > From: Clément Bœsch > > > > Refer to "checkasm: use perf API on Linux ARM*" commit for the > > rationale. > > > > The implementation is somehow duplicated with checkasm, but so is the > > current usage of AV_READ_TIME(). Until these implementations and > > heuristics are made consistent, I don't see a way of sharing that code. > > > > Note: when using libavutil/timer.h, it is now important to include > > before any other include due to the _GNU_SOURCE requirement. > > --- > > libavutil/timer.h | 46 +++++++++++++++++++++++++++++++++++++++++++--- > > 1 file changed, 43 insertions(+), 3 deletions(-) > > this breaks building testprogs on qemu arm: > > src/libavutil/tests/base64.c: In function ‘main’: > src/libavutil/tests/base64.c:105:159: error: implicit declaration of function ‘syscall’ [-Werror=implicit-function-declaration] > cc1: some warnings being treated as errors > make: *** [libavutil/tests/base64.o] Error 1 > make: *** Waiting for unfinished jobs.... > src/libavutil/tests/adler32.c: In function ‘main’: > src/libavutil/tests/adler32.c:42:159: error: implicit declaration of function ‘syscall’ [-Werror=implicit-function-declaration] > cc1: some warnings being treated as errors > make: *** [libavutil/tests/adler32.o] Error 1 > src/libavutil/tests/aes.c: In function ‘main’: > src/libavutil/tests/aes.c:94:163: error: implicit declaration of function ‘syscall’ [-Werror=implicit-function-declaration] > cc1: some warnings being treated as errors > make: *** [libavutil/tests/aes.o] Error 1 > src/libavformat/utils.c: In function ‘avformat_transfer_internal_stream_timing_info’: > src/libavformat/utils.c:5537:5: warning: ‘codec’ is deprecated (declared at src/libavformat/avformat.h:893) [-Wdeprecated-declarations] > src/libavformat/utils.c:5538:5: warning: ‘codec’ is deprecated (declared at src/libavformat/avformat.h:893) [-Wdeprecated-declarations] > Fixed in my branch (https://github.com/ubitux/FFmpeg/compare/perf) Also attaching to this mail the two patches fixing this. Thanks. From c5173492fecd1badafdd959987e996f5ca5d64c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Thu, 7 Sep 2017 15:52:47 +0200 Subject: [PATCH 4/5] lavu/tests: move timer.h include earlier In the next commit, timer.h will require a _GNU_SOURCE to be set before including system headers. This commit prevents compilation failures. --- libavutil/tests/adler32.c | 4 +++- libavutil/tests/aes.c | 3 +++ libavutil/tests/base64.c | 4 +++- libavutil/tests/des.c | 2 ++ libavutil/tests/eval.c | 3 ++- libavutil/tests/softfloat.c | 2 ++ 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/libavutil/tests/adler32.c b/libavutil/tests/adler32.c index 511bf1e401..13f760b477 100644 --- a/libavutil/tests/adler32.c +++ b/libavutil/tests/adler32.c @@ -17,10 +17,12 @@ */ // LCOV_EXCL_START + +#include "libavutil/timer.h" + #include #include "libavutil/log.h" -#include "libavutil/timer.h" #include "libavutil/adler32.h" #define LEN 7001 diff --git a/libavutil/tests/aes.c b/libavutil/tests/aes.c index 1291ad6633..c7f842c1c7 100644 --- a/libavutil/tests/aes.c +++ b/libavutil/tests/aes.c @@ -17,6 +17,9 @@ */ // LCOV_EXCL_START + +#include "libavutil/timer.h" + #include #include "libavutil/aes.h" diff --git a/libavutil/tests/base64.c b/libavutil/tests/base64.c index 88fd55c220..400e01cefe 100644 --- a/libavutil/tests/base64.c +++ b/libavutil/tests/base64.c @@ -17,12 +17,14 @@ */ // LCOV_EXCL_START + +#include "libavutil/timer.h" + #include #include #include "libavutil/common.h" #include "libavutil/base64.h" -#include "libavutil/timer.h" #define MAX_DATA_SIZE 1024 #define MAX_ENCODED_SIZE 2048 diff --git a/libavutil/tests/des.c b/libavutil/tests/des.c index eac33d47d4..f2a5c34f1a 100644 --- a/libavutil/tests/des.c +++ b/libavutil/tests/des.c @@ -16,6 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/timer.h" + #include "libavutil/des.c" #include diff --git a/libavutil/tests/eval.c b/libavutil/tests/eval.c index 2a1afcc4dc..b64c6d635d 100644 --- a/libavutil/tests/eval.c +++ b/libavutil/tests/eval.c @@ -16,12 +16,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/timer.h" + #include #include #include #include "libavutil/libm.h" -#include "libavutil/timer.h" #include "libavutil/eval.h" static const double const_values[] = { diff --git a/libavutil/tests/softfloat.c b/libavutil/tests/softfloat.c index 16788d4da9..c06de44933 100644 --- a/libavutil/tests/softfloat.c +++ b/libavutil/tests/softfloat.c @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/timer.h" + #include #include "libavutil/softfloat.h" -- 2.14.1