From patchwork Tue Jul 7 15:04:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lynne X-Patchwork-Id: 20856 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 91DFF448CEC for ; Tue, 7 Jul 2020 18:04:48 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5C892688067; Tue, 7 Jul 2020 18:04:48 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A5CBC680C49 for ; Tue, 7 Jul 2020 18:04:41 +0300 (EEST) Received: from w3.tutanota.de (unknown [192.168.1.164]) by w4.tutanota.de (Postfix) with ESMTP id D72201060300 for ; Tue, 7 Jul 2020 15:04:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1594134280; s=s1; d=lynne.ee; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=22TFqPtOOTRe8G7k2hWk0b95MX9G4qeNG5jE9nnAkzw=; b=kGj3nte9GUdN829q/EoiWUxwsL0M4pKIsfxi8LlCgrtI0lYWwOnXtJX4kfhB80J+ rq0FiJdar4FM0AR7f+2y+tKb56/XvicSskmmp6L9I9rTVjTSp51bJykwCdKx4qmvuHf dy/4Za+SCZXwC/5i7u//ykHDng3HQ7UF2ExifoOe/tdVh/60yVgPAqP1wn9uHbzTY+V SoI2qKdQKqnonKcVsQM3QcgR55N4Tb9HGMNivCoW7VQMC7ooOMReCt3xv+4jKmjO/ir aENqW7LUfVPqF6EHCx/pRFnWb9e3SUob30C4MlolicwFSsEco+tgqOQsZztPgt4Iv4k JcERO3DHqg== Date: Tue, 7 Jul 2020 17:04:40 +0200 (CEST) From: Lynne To: Ffmpeg Devel Message-ID: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] yuv2rgb_neon: fix return value 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" We return 0 for this particular architecture but should instead be returning the number of lines. Fixes users who check the return value matches what they expect. Subject: [PATCH] yuv2rgb_neon: fix return value We return 0 for this particular architecture but should instead be returning the number of lines. Fixes users who check the return value matches what they expect. --- libswscale/aarch64/swscale_unscaled.c | 31 ++++++++++++--------------- libswscale/aarch64/yuv2rgb_neon.S | 2 ++ 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/libswscale/aarch64/swscale_unscaled.c b/libswscale/aarch64/swscale_unscaled.c index 551daad9e3..c7a2a1037d 100644 --- a/libswscale/aarch64/swscale_unscaled.c +++ b/libswscale/aarch64/swscale_unscaled.c @@ -42,15 +42,14 @@ static int ifmt##_to_##ofmt##_neon_wrapper(SwsContext *c, const uint8_t *src[], uint8_t *dst[], int dstStride[]) { \ const int16_t yuv2rgb_table[] = { YUV_TO_RGB_TABLE }; \ \ - ff_##ifmt##_to_##ofmt##_neon(c->srcW, srcSliceH, \ - dst[0] + srcSliceY * dstStride[0], dstStride[0], \ - src[0], srcStride[0], \ - src[1], srcStride[1], \ - src[2], srcStride[2], \ - yuv2rgb_table, \ - c->yuv2rgb_y_offset >> 6, \ - c->yuv2rgb_y_coeff); \ - return 0; \ + return ff_##ifmt##_to_##ofmt##_neon(c->srcW, srcSliceH, \ + dst[0] + srcSliceY * dstStride[0], dstStride[0], \ + src[0], srcStride[0], \ + src[1], srcStride[1], \ + src[2], srcStride[2], \ + yuv2rgb_table, \ + c->yuv2rgb_y_offset >> 6, \ + c->yuv2rgb_y_coeff); \ } \ #define DECLARE_FF_YUVX_TO_ALL_RGBX_FUNCS(yuvx) \ @@ -76,14 +75,12 @@ static int ifmt##_to_##ofmt##_neon_wrapper(SwsContext *c, const uint8_t *src[], uint8_t *dst[], int dstStride[]) { \ const int16_t yuv2rgb_table[] = { YUV_TO_RGB_TABLE }; \ \ - ff_##ifmt##_to_##ofmt##_neon(c->srcW, srcSliceH, \ - dst[0] + srcSliceY * dstStride[0], dstStride[0], \ - src[0], srcStride[0], src[1], srcStride[1], \ - yuv2rgb_table, \ - c->yuv2rgb_y_offset >> 6, \ - c->yuv2rgb_y_coeff); \ - \ - return 0; \ + return ff_##ifmt##_to_##ofmt##_neon(c->srcW, srcSliceH, \ + dst[0] + srcSliceY * dstStride[0], dstStride[0], \ + src[0], srcStride[0], src[1], srcStride[1], \ + yuv2rgb_table, \ + c->yuv2rgb_y_offset >> 6, \ + c->yuv2rgb_y_coeff); \ } \ #define DECLARE_FF_NVX_TO_ALL_RGBX_FUNCS(nvx) \ diff --git a/libswscale/aarch64/yuv2rgb_neon.S b/libswscale/aarch64/yuv2rgb_neon.S index b7446aa105..f4b220fb60 100644 --- a/libswscale/aarch64/yuv2rgb_neon.S +++ b/libswscale/aarch64/yuv2rgb_neon.S @@ -142,6 +142,7 @@ .macro declare_func ifmt ofmt function ff_\ifmt\()_to_\ofmt\()_neon, export=1 load_args_\ifmt + mov w9, w1 1: mov w8, w0 // w8 = width 2: @@ -193,6 +194,7 @@ function ff_\ifmt\()_to_\ofmt\()_neon, export=1 increment_\ifmt subs w1, w1, #1 // height -= 1 b.gt 1b + mov w0, w9 ret endfunc .endm