From patchwork Thu Jul 12 12:44:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyou Yin X-Patchwork-Id: 9700 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:104:0:0:0:0:0 with SMTP id c4-v6csp1618444jad; Thu, 12 Jul 2018 05:45:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdite6TtPismCXdXvhSBjiODhIRTrGDg79m6fWxPftcmg0aJGXisZrgY6rN8Z9QCEr9sEJQ X-Received: by 2002:a1c:5c7:: with SMTP id 190-v6mr1362282wmf.24.1531399520077; Thu, 12 Jul 2018 05:45:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531399520; cv=none; d=google.com; s=arc-20160816; b=a2qDqbAuZDajJbHWFsrPUHGgVPnK/IruzANUb1xUS6oUAgpMVhZcemWQ+c4veBpYhz WPQn2WhRipXtBGTzxLUmyPjA0gKlQDUEBYALqIg/qfZELTKbKnll0xIMSQ+plsV+s3J2 EAiJM2V1jbA2MZDG05mXPuJb6FSAJ4zG++MyYNj5DkvTH1Bl63H3vGqSLHlgMI20C7L/ qL23v4BZPDbhO+22D8k1v0D+kln7d9N6I+WybWVyKeVD8So+zx8F78dyvIbaFxLziwKD 4zrlI+sxIMhFnjTBDemcNtrKX+QLP5eNCf+PMvgXR2+pm/F4YqhR+BRLYtjzoHPMWaY2 vstA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to :arc-authentication-results; bh=kLOfLa6xfTTca4vYTV6HHkNncgfMzEdQKcU5HmDH3iU=; b=ktAbYKZ2f3Jn0EJtRM4zZqfWI+7zrEZlGewDbLBbHVRrueoz3+KB62xFMzRZG2hwVM b/s1yKOMPWYH/b3ykBJbeLVxOlMXJBDf1Jp4I9T1/q9QM9dTig5F8yQPG+a0GFnob13p yPpC81F2PjfyvV+xzBDiqjj15Qm0pvZ/nrHS/KIxbiOUBZjONtNzce2BM/FwoXniSyV4 4Lslxku9wJyndjCs2MGFHcg/UAreZH53HWzQnfhtYlRvxn8+PxTGDSi1pX3w20npgwP2 eikdZpyV1SfSNt/GYxQ4CJOAcQ9PJKKNbVsaAoB12lb0w7MH1IazPskfhr8eEh3BCCzn kwCw== ARC-Authentication-Results: i=1; mx.google.com; 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 h2-v6si3534036wmg.128.2018.07.12.05.45.19; Thu, 12 Jul 2018 05:45:20 -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; 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 0691E68A6D4; Thu, 12 Jul 2018 15:44:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0F7E168A6B9 for ; Thu, 12 Jul 2018 15:44:49 +0300 (EEST) Received: from localhost (unknown [202.141.160.96]) by mail (Coremail) with SMTP id QMiowPAx+OEmTEdbB5uTAA--.9127S3; Thu, 12 Jul 2018 20:40:06 +0800 (CST) From: Shiyou Yin To: ffmpeg-devel@ffmpeg.org Date: Thu, 12 Jul 2018 20:44:56 +0800 Message-Id: <1531399496-14797-1-git-send-email-yinshiyou-hf@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: QMiowPAx+OEmTEdbB5uTAA--.9127S3 X-Coremail-Antispam: 1UD129KBjvJXoWxCFy7JrWrCr4UGryUXFy3XFb_yoW5CF48pa 1xAr1rZFnFvFsxXa17Jr1UCFy3Zr4vyF4Sk3sFgF1Iv395tFn7Xr4xGr93GrWYya42yF4k XF1UAa4Skwn8Gr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkIb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4 vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7Cj xVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I 0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40E x7xfMcIj6xIIjxv20xvE14v26r126r1DMcIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x 0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7xvr2IYc2Ij64vIr40E4x8a64kEw24lc2xS Y4AK67AK6ryUMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I 8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUJVWU XwCI42IY6xIIjxv20xvE14v26r1I6r4UMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8Jw CI42IY6xAIw20EY4v20xvaj40_JFI_Gr1lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2 z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU0b_-PUUUUU== X-CM-SenderInfo: p1lq2x5l1r3gtki6z05rqj20fqof0/ Subject: [FFmpeg-devel] [PATCH 5/9] avcodec/mips: [loongson] optimize ff_put_pixels16_8 V2. 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Remove useless variable addr used in function ff_put_pixels16_8. Change-Id: I8b8c996a73ad13676852baa5ef4060d73882c0ab Signed-off-by: Shiyou Yin --- libavcodec/mips/hpeldsp_mmi.c | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/libavcodec/mips/hpeldsp_mmi.c b/libavcodec/mips/hpeldsp_mmi.c index 2dbef22..1bba70e 100644 --- a/libavcodec/mips/hpeldsp_mmi.c +++ b/libavcodec/mips/hpeldsp_mmi.c @@ -111,44 +111,41 @@ void ff_put_pixels16_8_mmi(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h) { double ftmp[4]; - mips_reg addr[2]; DECLARE_VAR_ALL64; - DECLARE_VAR_ADDRT; __asm__ volatile ( - PTR_ADDU "%[addr1], %[line_size], %[line_size] \n\t" - "1: \n\t" - PTR_ADDU "%[addr0], %[pixels], %[line_size] \n\t" + "1: \n\t" MMI_ULDC1(%[ftmp0], %[pixels], 0x00) MMI_ULDC1(%[ftmp2], %[pixels], 0x08) - MMI_ULDC1(%[ftmp1], %[addr0], 0x00) - MMI_ULDC1(%[ftmp3], %[addr0], 0x08) + PTR_ADDU "%[pixels], %[pixels], %[line_size] \n\t" + MMI_ULDC1(%[ftmp1], %[pixels], 0x00) + MMI_ULDC1(%[ftmp3], %[pixels], 0x08) MMI_SDC1(%[ftmp0], %[block], 0x00) - MMI_SDXC1(%[ftmp1], %[block], %[line_size], 0x00) MMI_SDC1(%[ftmp2], %[block], 0x08) - MMI_SDXC1(%[ftmp3], %[block], %[line_size], 0x08) - PTR_ADDU "%[pixels], %[pixels], %[addr1] \n\t" - PTR_ADDU "%[block], %[block], %[addr1] \n\t" + PTR_ADDU "%[block], %[block], %[line_size] \n\t" + MMI_SDC1(%[ftmp1], %[block], 0x00) + MMI_SDC1(%[ftmp3], %[block], 0x08) + PTR_ADDU "%[pixels], %[pixels], %[line_size] \n\t" + PTR_ADDU "%[block], %[block], %[line_size] \n\t" - PTR_ADDU "%[addr0], %[pixels], %[line_size] \n\t" MMI_ULDC1(%[ftmp0], %[pixels], 0x00) MMI_ULDC1(%[ftmp2], %[pixels], 0x08) - MMI_ULDC1(%[ftmp1], %[addr0], 0x00) - MMI_ULDC1(%[ftmp3], %[addr0], 0x08) + PTR_ADDU "%[pixels], %[pixels], %[line_size] \n\t" + MMI_ULDC1(%[ftmp1], %[pixels], 0x00) + MMI_ULDC1(%[ftmp3], %[pixels], 0x08) MMI_SDC1(%[ftmp0], %[block], 0x00) - MMI_SDXC1(%[ftmp1], %[block], %[line_size], 0x00) MMI_SDC1(%[ftmp2], %[block], 0x08) - MMI_SDXC1(%[ftmp3], %[block], %[line_size], 0x08) - PTR_ADDU "%[pixels], %[pixels], %[addr1] \n\t" - PTR_ADDU "%[block], %[block], %[addr1] \n\t" - - PTR_ADDI "%[h], %[h], -0x04 \n\t" - "bnez %[h], 1b \n\t" + PTR_ADDU "%[block], %[block], %[line_size] \n\t" + MMI_SDC1(%[ftmp1], %[block], 0x00) + MMI_SDC1(%[ftmp3], %[block], 0x08) + PTR_ADDU "%[pixels], %[pixels], %[line_size] \n\t" + PTR_ADDU "%[block], %[block], %[line_size] \n\t" + + PTR_ADDI "%[h], %[h], -0x04 \n\t" + "bnez %[h], 1b \n\t" : [ftmp0]"=&f"(ftmp[0]), [ftmp1]"=&f"(ftmp[1]), [ftmp2]"=&f"(ftmp[2]), [ftmp3]"=&f"(ftmp[3]), RESTRICT_ASM_ALL64 - RESTRICT_ASM_ADDRT - [addr0]"=&r"(addr[0]), [addr1]"=&r"(addr[1]), [block]"+&r"(block), [pixels]"+&r"(pixels), [h]"+&r"(h) : [line_size]"r"((mips_reg)line_size)