From patchwork Fri Jul 26 02:15:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50747 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:a830:0:b0:482:c625:d099 with SMTP id z16csp207242vqo; Thu, 25 Jul 2024 19:31:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUtstp1xOJ7+M6eEEuM/bZSzCvbX3rWrhV9ySjpHjTOXIAnVsaKX9Eud1c3Le3QNOjUs6F50ik6RaoF2n7/RTKXRjpTBHbFC9r8iA== X-Google-Smtp-Source: AGHT+IF/pRCGNBi5wOcpsdSnEDK/aZmsu6ohOZMD8HQdoxLNQqtcJEB4MWtIoWZtIZFtOQzIBWW4 X-Received: by 2002:a17:907:2daa:b0:a7a:b73f:7582 with SMTP id a640c23a62f3a-a7acb3d6a20mr268746366b.2.1721961116255; Thu, 25 Jul 2024 19:31:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721961116; cv=none; d=google.com; s=arc-20160816; b=K5GgIuv2g+8bvePbrDv6JSx6iLXznKDDi5ZbXG2RkpTJvZIBNaWdVIya4PkqXW/Tc3 BJTT0n3KlmPVdx3tFrUa/oFXyhhq/Fi/O3/IDlBXmJu7wNhi3zHJpJNq4xdowdER5WJb ZfvwKtj/76ndZQU9bbsA+JsGcEJ8mbgsuX/9tH6rsE2JvBwG0BT5Ak1fUqVc0KgAosFg 3FkqMPWbc28cNQRtCp3naYkG0oLeiULGNPkdgGbA7ghL6CfeOdziwMb8AM02dsagvkxW inWV1iTD1GDVDDI/5AQ0HQeGIl5kXKTBkrPjWBNsuscR4SolAFyqJD3BQydOsP7HSy+P XvxA== 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 :dkim-signature:delivered-to; bh=HtLyQ5WrSGKCjNI/f0l8JHwOm1bk6/oexyQNm5r9PUA=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=XqROiGbyqYHEoPx68GcvM/dwdjMxo9mZZsUMexpffJtVxbxMCkGkXBA0/u+ORIzsbn zK0nAmPKlJomaZXub2piBB3qs9SNqQkzsLTz+U+T/WmloyHjyB5bd6JPMc9fIbhfQW3+ 37vwnxSclgGsYn748opEuEgvSlTMEVEO3lnpp42WEYzaQ/5D2PvqOw3ptC+v268vVIIv P5vt8U6F3AoxKljh3PV1vrEE+/tF9g/4FnBHBGVbcCYLUPzXjr01CsAv6KwwAuBftrGz GUjiQ2QiyQznP85W100m+UOguVkbDbQg4IuIF8YBilEa6+eskrxLvF4n5/KnY4iiqWcK w0xA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=YzCN2bXY; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a7acac7c978si174974666b.753.2024.07.25.19.31.55; Thu, 25 Jul 2024 19:31:56 -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=@gmail.com header.s=20230601 header.b=YzCN2bXY; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DAEC668D62B; Fri, 26 Jul 2024 05:15:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DC31268D62B for ; Fri, 26 Jul 2024 05:15:23 +0300 (EEST) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1fd69e44596so1287235ad.1 for ; Thu, 25 Jul 2024 19:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721960121; x=1722564921; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=XnXkJ8eKhiwc0+x79RI6s7/N/Z4IUACxvfiqt+/9tC0=; b=YzCN2bXYQ5FXxAWBE0Gyy6WYeMwjSbVOrNDJTOMaxncFg1XxMWxqbUMn6zCaqNwoXa +D7CY+waFOyKcvx/n4DR/tEzFzKXUQmxI+qC/Cbq5ucKVjMm2VCADWT4vHz2Xx5xH6MT 22AbYelQYaafHv5yRY72WWQY+e7WA4JAKniyjSrLOrRy0A4hAvlsl+OMXZHm+IlmJ8dU vNfHCnh1+wXn3ubGAUttCEyYYTXdYfNVe+rFqBRpOk7rEiGI87MrRpIBKbgn06QXr2oK ZZR3ElNeao7XQoD3+m9qxuGuB5Ut0vhY0CCa33+VHkxEiIfLSnCA9XIjRjxZigQ1AKeW x6Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721960121; x=1722564921; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XnXkJ8eKhiwc0+x79RI6s7/N/Z4IUACxvfiqt+/9tC0=; b=W52OZa9qjIilwjXPVvkebhqxWv+foiqETufP6+DsCkwQcC1j9UddysEEMSHWbjbZ8w lwx6gE5PYz3Jg/sqotN6grxwlDDeF02n3rFOSoMDRxgsyFOF4knB6e7STgJoPqsO4lhT cMzPRZ7ivJX0Ij0WSTKjqRe3/IYobblcrXXfKIT5e7Bz4pGFdSO6KukUjmP0d1c03LyZ DAbxaQ3wU9LTPjjDA55B5XnGG2iQhohs5LrzpyDiXni/yRh+D5OBabsBCQa6OkoFZojY SYMI/ckJ69ECw0h6X6QQQMgFqjBWzTs3fBUZHIDAiZkKPxT9ex3DRAZHmYHxyfAdyf40 ONTw== X-Gm-Message-State: AOJu0YxZEQJzXWVVfliiz1/H8KyHxYm87A4Ob+NnOVNVgsIH1QCJ9uxz bhZURUZxYaWhPTxHsfJ250RvJQ3QgFa/Jqs8ThlvOWdy89x8V+4dlOVjdQ== X-Received: by 2002:a17:902:d918:b0:1fc:494b:3ee8 with SMTP id d9443c01a7336-1fed27356admr55175275ad.11.1721960120723; Thu, 25 Jul 2024 19:15:20 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fed7ce6869sm21077715ad.78.2024.07.25.19.15.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 19:15:20 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Jul 2024 23:15:32 -0300 Message-ID: <20240726021535.6354-1-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/4] avutil/intreadwrite: add missing aligned read/write macros 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: nC9oN6dMMpMK Signed-off-by: James Almer --- doc/APIchanges | 3 +++ libavutil/intreadwrite.h | 39 +++++++++++++++++++++++++++++++++++++++ libavutil/version.h | 2 +- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index fb54c3fbc9..d26e05e0ff 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07 API changes, most recent first: +2024-07-26 - xxxxxxxxx - lavu 59.30.100 - cpu.h + Add AV_{R,W}{L,B}{16,32}A and AV_{R,W}B64A. + 2024-07-25 - xxxxxxxxx - lavu 59.29.100 - cpu.h Add AV_CPU_FLAG_RVB. diff --git a/libavutil/intreadwrite.h b/libavutil/intreadwrite.h index 8abc3b9105..120bdbc8f0 100644 --- a/libavutil/intreadwrite.h +++ b/libavutil/intreadwrite.h @@ -539,9 +539,41 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias; #if AV_HAVE_BIGENDIAN # define AV_RLA(s, p) av_bswap##s(AV_RN##s##A(p)) # define AV_WLA(s, p, v) AV_WN##s##A(p, av_bswap##s(v)) +# define AV_RBA(s, p) AV_RN##s##A(p) +# define AV_WBA(s, p, v) AV_WN##s##A(p, v) #else # define AV_RLA(s, p) AV_RN##s##A(p) # define AV_WLA(s, p, v) AV_WN##s##A(p, v) +# define AV_RBA(s, p) av_bswap##s(AV_RN##s##A(p)) +# define AV_WBA(s, p, v) AV_WN##s##A(p, av_bswap##s(v)) +#endif + +#ifndef AV_RL16A +# define AV_RL16A(p) AV_RLA(16, p) +#endif +#ifndef AV_WL16A +# define AV_WL16A(p, v) AV_WLA(16, p, v) +#endif + +#ifndef AV_RB16A +# define AV_RB16A(p) AV_RBA(16, p) +#endif +#ifndef AV_WB16A +# define AV_WB16A(p, v) AV_WBA(16, p, v) +#endif + +#ifndef AV_RL32A +# define AV_RL32A(p) AV_RLA(32, p) +#endif +#ifndef AV_WL32A +# define AV_WL32A(p, v) AV_WLA(32, p, v) +#endif + +#ifndef AV_RB32A +# define AV_RB32A(p) AV_RBA(32, p) +#endif +#ifndef AV_WB32A +# define AV_WB32A(p, v) AV_WBA(32, p, v) #endif #ifndef AV_RL64A @@ -551,6 +583,13 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias; # define AV_WL64A(p, v) AV_WLA(64, p, v) #endif +#ifndef AV_RB64A +# define AV_RB64A(p) AV_RBA(64, p) +#endif +#ifndef AV_WB64A +# define AV_WB64A(p, v) AV_WBA(64, p, v) +#endif + /* * The AV_COPYxxU macros are suitable for copying data to/from unaligned * memory locations. diff --git a/libavutil/version.h b/libavutil/version.h index 852eeef1d6..028d072873 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 59 -#define LIBAVUTIL_VERSION_MINOR 29 +#define LIBAVUTIL_VERSION_MINOR 30 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \