From patchwork Mon May 27 19:07:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= X-Patchwork-Id: 49302 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:542:0:b0:460:55fa:d5ed with SMTP id 63csp3452762vqf; Mon, 27 May 2024 12:15:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVGls6zHoyv8k70kdSJClNiHaQ/TPsCJ2qK8U4kxRZ0OLvmqPyEIGKKFKrmcNYQE/yWi/k/+ERgQ7I2SrUqlHq/LpuogavzorfY3g== X-Google-Smtp-Source: AGHT+IFcKCbNmCI4l7hw6Md2Qcj7wr9jDc8lLE6beGNJHCvjrfczFedhMaFA7sjvr06a0SYrjXKT X-Received: by 2002:a05:6512:280b:b0:51b:5c40:da74 with SMTP id 2adb3069b0e04-52964109ac2mr6730911e87.1.1716837309860; Mon, 27 May 2024 12:15:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716837309; cv=none; d=google.com; s=arc-20160816; b=J8Rl/u47JwWMFgAxl+dZwhGFtgcWx2LU6PA7hswd/kfNv9cef8NviymEhG/rVJ9Uxv sy3prWc3MPsvZUaMjFFQ7x/hMMOC8ggkx72M6Waxv5w6OhcylH6llSqIMQ6JmZh+dlae JxgIYIBlNsEiwdCGZYmhDAE3FTZtbZBKtvcT5ic86LC8OoL9+oOX/LaeH524thwV7F6f MpkUAyHVLJmTk11TF+HVQBWW75ClmAfKG5uDhKWGQR0Kjqs8HG0JXVVpDDEDEIKI8+Tr QMI47gI3BCpyk9lDFMTCS4yES4Co5inVQZAa+coCpk8zH93Ir2gi3Iiyr3sweqBM7jqg V1sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=sEMEIyPwv9GU9/f3cHGP68lRG7bAm6lBt8+1UfCCo7g=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=hW0/BjAZzjrXFOQOA56xxrfMt5J/9ipJrdxuit9KT8KcSMwdwVGtyATEyRd891rvkb i81Kgjf/MrFj6o7mNSscO84NsnqHtmQjtWAv/+paBmXDOZId52I60Ep8H917DvTr5ktf p4rqu5Q4s+1I/sN/S5vtGZFr1B1GH1gF33KW1fwfrxWKVSWIy3X3YfefiRZM26sjBH2N Ooc6uf8uj8VrgXm0do134PqksGX7zfS+QevTYDpYti5Nrqj5P/A8VxfSgXXTD8ZXn0RO qpP7hWo8u/q/W/5+JEWQUgvtl5QTzXnGGxx3UttVwOyOM2Pf2/U7PxP44wfQA+ocW8+C ucGg==; dara=google.com 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 2adb3069b0e04-5296e889a39si2388212e87.145.2024.05.27.12.15.09; Mon, 27 May 2024 12:15:09 -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 9E57868D499; Mon, 27 May 2024 22:07:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from ursule.remlab.net (vps-a2bccee9.vps.ovh.net [51.75.19.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5DC0668CFAB for ; Mon, 27 May 2024 22:07:06 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id F28E2C0069 for ; Mon, 27 May 2024 22:07:05 +0300 (EEST) From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 27 May 2024 22:07:05 +0300 Message-ID: <20240527190705.845511-1-remi@remlab.net> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] lavc/startcode: fix RVV return value on no match X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: pY3HnCkcuyiO If there are no zero bytes, t2 equals -1. The code cannot simply fall through to the match case. --- libavcodec/riscv/startcode_rvv.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/riscv/startcode_rvv.S b/libavcodec/riscv/startcode_rvv.S index 7c43b1d7f3..36a3369431 100644 --- a/libavcodec/riscv/startcode_rvv.S +++ b/libavcodec/riscv/startcode_rvv.S @@ -37,6 +37,8 @@ func ff_startcode_find_candidate_rvv, zve32x bgez t2, 2f add t0, t0, t1 bnez a1, 1b + + mv t2, zero 2: add t0, t0, t2 sub a0, t0, a0