From patchwork Wed Jul 11 09:45:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyou Yin X-Patchwork-Id: 9678 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:104:0:0:0:0:0 with SMTP id c4-v6csp294023jad; Wed, 11 Jul 2018 02:46:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfoIhUNXvy96vTlc6P6RLYJjWA/3ss74R4+IRL3yVouiVvmnd1Z8sloFHgo/QWbZq9bzq3l X-Received: by 2002:a5d:4643:: with SMTP id j3-v6mr19733887wrs.52.1531302371162; Wed, 11 Jul 2018 02:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531302371; cv=none; d=google.com; s=arc-20160816; b=G4L+i3T2dMVCFjzZDqPZl2/ZmqHB1kQBdwc0yH0Fy6GanDcYm8YvvB3K9m8tp0kYQ6 v2WDthDTcqEecO8NWlLLoHP2QOXnMgO9jxd5BdtyPFVizZMw+//2c+Xm1zPlcE+bCizW H1vmM9K5yXCIITJpZAUJoNxFuzHmk3c353fXl4YWj68J6jEw+sq6argYw9DuABOlO2VJ v3b36aaUmcr4PysTPTYw/LBFiw39Yv0EDU8tavlJBKcLm0rGdVHJJqp1VCofp1NC5YPw t0LfHcEbFuiVfXlz0HiJG4Vq50aJgGGjoUKFpZfYWX2bRmIY+ChDKFv9vrvMU85CwYGl 0DMg== 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=cxKEBR7M3U9339gdPQEG3IyjpmPGLEIWJSisilaWUFs=; b=tg5Unw2q6yYOsNdoek47ng5pFp0ZVYeym74I9zKLuJ9eK4Z2C3nOqY9gkIeIzJ77Ek YdVdUha55V6e6XumojpFot7iaCOqrNgfKqRt84O4kqJBJjASFLGAin5EdozMVSYmH78X xkYTbU/8laFMospoOvZDedfJdmjqdSNUfgwISGAmvtGAmJngPod3/9++/TuNtjLxC8uD u0s8r/rc8RkVIA50IXzivP8Leg8eFfLkpxUzulBMfu9KzUb+bB/IBaZSgnxsFEPyk+2G 8WjaWEPD1bRB2Oiwa6kTIK81grjNMP91e13IhbfpflCLuu1cfAPmVRSIN5WGClgWBI3D HnoQ== 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 k133-v6si1144037wmb.188.2018.07.11.02.46.10; Wed, 11 Jul 2018 02:46:11 -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 BB1B368A66B; Wed, 11 Jul 2018 12:45: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 3014468A64B for ; Wed, 11 Jul 2018 12:45:46 +0300 (EEST) Received: from localhost (unknown [202.141.160.96]) by mail (Coremail) with SMTP id QMiowPAxaOKw0EVbp2qSAA--.59808S3; Wed, 11 Jul 2018 17:41:04 +0800 (CST) From: Shiyou Yin To: ffmpeg-devel@ffmpeg.org Date: Wed, 11 Jul 2018 17:45:52 +0800 Message-Id: <1531302352-16265-1-git-send-email-yinshiyou-hf@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: QMiowPAxaOKw0EVbp2qSAA--.59808S3 X-Coremail-Antispam: 1UD129KBjvJXoWxCFy7JrWrCr4UGryUXFy3XFb_yoW5CF48pa 18Ar1rZFnFvFsxXa17Jr1UCFy3Zr4vyF4Sk3sFgF1Iv395tFn7Xr4xGr93GrWYya42yF4k XF1UAa4Skwn8Cr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUk2b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4 vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7Cj xVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I 0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40E x7xfMcIj6xIIjxv20xvE14v26r1q6rW5McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x 0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7xvr2IYc2Ij64vIr40E4x8a64kEw24lc2xS Y4AK67AK6r4fMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I 8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUJVWU XwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8Jw CI42IY6xAIw20EY4v20xvaj40_JFI_Gr1lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2 z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuYvjxUxpuWDUUUU 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: I6a1ddd98c14261cffb2b59a8ecfb0d4983d87a85 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)