From patchwork Mon Apr 19 20:23:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lynne X-Patchwork-Id: 27105 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp838251iob; Mon, 19 Apr 2021 13:23:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTgZ7VMm6bZeo0x7v7O2D57F6zdsml/nqoWfp4uHY06jpRKtrpeh+ufwOnafwGEK9+xIcD X-Received: by 2002:a05:6402:1a:: with SMTP id d26mr27746497edu.99.1618863817687; Mon, 19 Apr 2021 13:23:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618863817; cv=none; d=google.com; s=arc-20160816; b=U++d1wAiHRVeLYj6WVl8eF2EufdZ/IrkvuzmAG7gbC/n8LQacGRSNjmzYpiMRm49cY AHS+w8AO/b2IHdNp5NWUcYD33ZPXvYcGJ8Qsn7ZAzIb7KVzMGPOzzsK2p+CNvqNKJg7r YxeYEhtytupx5B27kK/HoUt7duQw331r+CpVuukxipDy1tqUwjJj+zk3+H7nox0zfrzW ed7O0SJOf7bBnE3kd91PuA/D1Nol2UmdmNwtqsvKyxmtQgWoJdPlCoOXX166O9JeABG2 IDv3reDtMPDNc3n9BT0yHttpHzkU1krsXvAxRTg8irFI54Q9gDU63kSzJDHB4p88/N3t VLAg== 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 :mime-version:references:in-reply-to:message-id:to:from:date :dkim-signature:delivered-to; bh=A2MxlJxkHymhbYPSINts1brKMbC1j/K8FQn2MvgQO2c=; b=xrPgJ0mhUHFRYCggCj+cG9JbKMC6mkGnD3/sjDY3n0V8zvGOI49wLy6ymEKp/J+BSy WtO1GSpZRPQ2PGf38UWOQkCOgGpzdSvde1ew87z+w8ptVU9I9VRxJUomn5DrlayAROvq aVSism4KhwLB7JE/hoTBLaDF6y5bNxGklDHJaJ762NwLwavWdjUxCqdIQpvPY1CWJMEw 5qe1r7Szf2lc8EgP3NwWGJr/6t2MJ9dzL24Tzg6AeyY1mDXN/mdxrNpQFQcTav5I6/27 qomLR8LntE/dQkmk68xvam3lR8Q86GFNS+44z7yg6v1WdNjNcJV/iLMYUShbZJZxsjBw ILZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@lynne.ee header.s=s1 header.b=Q0rf5bKP; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=lynne.ee Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g8si13248129ejm.206.2021.04.19.13.23.37; Mon, 19 Apr 2021 13:23:37 -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=@lynne.ee header.s=s1 header.b=Q0rf5bKP; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=lynne.ee Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E131D689A8D; Mon, 19 Apr 2021 23:23:34 +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 0B6AB6802B3 for ; Mon, 19 Apr 2021 23:23:28 +0300 (EEST) Received: from w3.tutanota.de (unknown [192.168.1.164]) by w4.tutanota.de (Postfix) with ESMTP id ADE31106015A for ; Mon, 19 Apr 2021 20:23:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1618863807; 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:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=trwWZK/SUFmVwn8f6CZCGWTFjh5mJJFcm2p/nWa5xqM=; b=Q0rf5bKP0Uibkc+fqSAd/bltvHtyq1zmtLZdve/Kc58On1LcZ0n/QnOEW+8oQVC5 Jjd083QSPaK4uQsOiFS2OOXH3gKwJB/THH6Q9sQBAOPb9Qh7rAXKZVRDyJxKX6Nolqo 1TW/Ys/zLY9ekVgnVScs/ZgsGxuhOGMUq2x3wioV3L2I0eQ9mRbwyNoO26CuBfSxH+C 2Oq2qTf8KSn7PTlFip5aT/GVtCTDj+iEuXsgxrox7wCeQJKnHkUI49UxXaef7dARwqV phWCmimOx8rQI38wuAHabG6qrRwfnu1i2VfhXvisSyO+tdJXdBeOn9nyroVVabs/jJM RIYulm4pGA== Date: Mon, 19 Apr 2021 22:23:27 +0200 (CEST) From: Lynne To: FFmpeg development discussions and patches Message-ID: In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 05/11] lavu/tx: add unaligned flag to the API 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: ts/xL1pVj7Qa Patch attached. Subject: [PATCH 05/11] lavu/tx: add unaligned flag to the API --- libavutil/tx.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavutil/tx.h b/libavutil/tx.h index fccded8bc3..a3d70644e4 100644 --- a/libavutil/tx.h +++ b/libavutil/tx.h @@ -95,7 +95,7 @@ enum AVTXType { * @param stride the input or output stride in bytes * * The out and in arrays must be aligned to the maximum required by the CPU - * architecture. + * architecture unless the AV_TX_UNALIGNED flag was set in av_tx_init(). * The stride must follow the constraints the transform type has specified. */ typedef void (*av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride); @@ -110,6 +110,12 @@ enum AVTXFlags { * transform types. */ AV_TX_INPLACE = 1ULL << 0, + + /** + * Relaxes alignment requirement for the in and out arrays of av_tx_fn(). + * May be slower with certain transform types. + */ + AV_TX_UNALIGNED = 1ULL << 1, }; /**