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, \ From patchwork Fri Jul 26 02:15:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50746 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:a830:0:b0:482:c625:d099 with SMTP id z16csp204591vqo; Thu, 25 Jul 2024 19:21:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUNKmQ1ix5RFCJseOjVQoMbu26MxoNCTvA62aNagnIsahkmNzCURzkXk1mHoXL8UEF6NKjyJUsQSiSqH2Bfdnn29HT3F0G4tt/kSw== X-Google-Smtp-Source: AGHT+IGtM46wwhlgdZ6X7VsUoJSeMJSB/J9lBOlOJxxSiHFBgxdVdqI7jxwoZAQw1VqPg+PiRQk5 X-Received: by 2002:a2e:8242:0:b0:2ef:1f51:c4ed with SMTP id 38308e7fff4ca-2f03dbf3222mr23276461fa.47.1721960517375; Thu, 25 Jul 2024 19:21:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721960517; cv=none; d=google.com; s=arc-20160816; b=yA8+A272FFp4d1Lj2KA0Rp07MGiLAWIk/Fv85U1k/L2a9d5ymI7yXHXoSOaGCXPyJW QY/eehP6uAJIYKhjWnb1kR2Un/gIGHxKZ4ZNEH/T3NEoBXLO87Ik1LkbM7NC9tPjbuPP aSdp92FJ1g3SJcd/d3DekGOCa9n6Wqy0Igdc3bJiVHTThrpfTF+LE+/nHglIUctXvKyj iaQx96hDJVTW5nZ5HjLgTe8ncCMgnjqKHtSsS6n6uMDnKmdGaOMEmRX9bpmHsBtJeQ8O sUJ5XVLQuCtfXcdy4CgiquEQslfG2wPskH7Co15Ribjodw6uU0rUTQnuBhoeIhr6q0pC rUfA== 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:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=sK8+5cFGTdPlhItxEqWjJSHE4zowZg8fNRNBUhmGuFo=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=p0XuyqQpmvdzeUJKgwJOE3NMs6lrh+exXRrmDgSNBCheQEhETltjWM0MpeVdfphetR ZCgjCUl8fCcdDixXl84cNoEa2qx3hl5L2SsdGUdS82FA09X3XDoDZRWir5OqUeOmduzz QJuncmyemd4F54lDRx1ZtHjqi74J+fdAVNozYNnsQX2kuZelw2MB5dD+p2LSBaWZ4WZF rYAOntr98JOFFuUzndzZ+cF/hjNOuRi8MBum6U0l3Lz0/ZMvHJ80GAJTtVTbrzsiP6yH vHT5vx0YX4/d7W+47G9/GMGtPIFc+oILvUG+FpbRFlC8ubViDKb5Vs538mNBq841f1Kj dIog==; 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=JBzlP4Af; 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 38308e7fff4ca-2f03d151374si6807861fa.337.2024.07.25.19.21.57; Thu, 25 Jul 2024 19:21:57 -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=JBzlP4Af; 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 AAA5468D6BC; Fri, 26 Jul 2024 05:15:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B065768D45F for ; Fri, 26 Jul 2024 05:15:24 +0300 (EEST) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1fc66fc35f2so1263405ad.0 for ; Thu, 25 Jul 2024 19:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721960122; x=1722564922; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=sem0ajSW+IgPFfHryO94IcScE2xUNmBEQqdfuffdJIk=; b=JBzlP4AfCjDl1jkhcRCauO2cdOXuYbEGPoGZFBKUyF2V/2Xop2tvc0rCaUzisKED5F Mnqsp1x4HDgSonfQY7yyN8NvQVrOM286WUWehqnAJ4tQpenWmYQNw3DmFkUP6HnQq16O iV3KeiZzkpAL/R9KvBCqIjNkZGZDQx4pQ8zvGTaIM2PFplPhNJ/5EscuAA9vQcYsURC6 vre1ZzsDYzaL3T6wZlV1ENd2mLvp05Zozhk4ugItQB75xw8VJhPTdDV2XQM4Ass+0j9b VrBD2fr1l8Xj4PrMv2T23AhsNEIyKMb4jwQ59NiaMgwOSucmBP4Yy8LQLSFHVgVhWTuE fMYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721960122; x=1722564922; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sem0ajSW+IgPFfHryO94IcScE2xUNmBEQqdfuffdJIk=; b=YDF74K05DCZ6Yvnj1bWBmJ+cdwls+oDZiB4N1CEJqfgpXJbKWlY9Sl5SvjUG+4NeYM Wulu0NC+4fKdkwHVGv2W95DJ3XnrRhQETmDPfBUphBTn3TDEm0EW0IVkMbl3avRidLRg ra5+GRqL96hlO+390ykazHBpghMM7NOYt7W/RUXCd4GQsmQhXY9oHFs88+X9B7j/NspS ftuv5e154dEFNV5u1dV2fgVZRt1N8jkFPv8WYC1x8Zqm2FnZDrzcHOjMGFkNeLpB38Q2 LCNTLJAY1v148hIz4UyND0koP4VW9MWoSBb1siVGrzM2EbaQUL1ScXD+X36IU2VtklRQ LEPQ== X-Gm-Message-State: AOJu0YymBSyy3Et+7jeph7fS26FZb9P8TGO3/CakOJJR27gZtpPxDeZa hdw3MIjOjnp2alkzhQGyI4cDrc7+ywTdrMd8pejWBjxfV20h0pmwopfeFA== X-Received: by 2002:a17:902:e54c:b0:1fd:74ac:e6b8 with SMTP id d9443c01a7336-1fed26cb6demr84758985ad.7.1721960122450; Thu, 25 Jul 2024 19:15:22 -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.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 19:15:22 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Jul 2024 23:15:33 -0300 Message-ID: <20240726021535.6354-2-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240726021535.6354-1-jamrial@gmail.com> References: <20240726021535.6354-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/4] avcodec/amfenc_av1: use AV_WL32A 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: UmOR7RVGH27b Signed-off-by: James Almer --- libavcodec/amfenc_av1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/amfenc_av1.c b/libavcodec/amfenc_av1.c index d984779063..97d1ea025c 100644 --- a/libavcodec/amfenc_av1.c +++ b/libavcodec/amfenc_av1.c @@ -535,10 +535,10 @@ FF_ENABLE_DEPRECATION_WARNINGS avctx->nb_coded_side_data++; //top, bottom, left,right - AV_WL32(crop + 0, 0); - AV_WL32(crop + 1, crop_bottom); - AV_WL32(crop + 2, 0); - AV_WL32(crop + 3, crop_right); + AV_WL32A(crop + 0, 0); + AV_WL32A(crop + 1, crop_bottom); + AV_WL32A(crop + 2, 0); + AV_WL32A, crop + 3, crop_right); avctx->coded_side_data[avctx->nb_coded_side_data - 1].type = AV_PKT_DATA_FRAME_CROPPING; avctx->coded_side_data[avctx->nb_coded_side_data - 1].data = (uint8_t*)crop; From patchwork Fri Jul 26 02:15:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50744 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:a830:0:b0:482:c625:d099 with SMTP id z16csp202846vqo; Thu, 25 Jul 2024 19:15:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXSfmMf2/l+eBniCdBhwUHbgbKG6CUh/68sX4aWcH9PtVfL75eprXZdU47FIJsfFPgm8fAGPP1xuOpQpT65MvD9dSmhSe7Bo96Zag== X-Google-Smtp-Source: AGHT+IH1gSDgey879lwDF954Wn3Bz/CdLIfMQxXDTzaR0xAQaGCMrdwSlkYZMCnzqfh1mkHZeK6a X-Received: by 2002:a05:651c:227:b0:2ef:22a4:6415 with SMTP id 38308e7fff4ca-2f039d07c05mr33052671fa.28.1721960153666; Thu, 25 Jul 2024 19:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721960153; cv=none; d=google.com; s=arc-20160816; b=oy0VQFlYkj+fkZre92Mgf8+jMhgEpEQALrS2y8EoEIYDMNxSRlNPEee3Akief32ghf wcOVdTEsY2xuZIXksdRxcpD+u7uHs2Hh7mKCXg2GHXUHyeJCHdrRdaHFJpJMj7R7Euog 7vdG34K8hQZfArn/0zYirHkho0Nqbu1vN97rVIeuVkrXIcHWD/m7/R5Fw4gfT+bu+8i3 jBk+C1OfhLnzhHE+oLGSNYUqE2LEJtbhRpEKl5Kst00VvXoI4eBF+/lDQzul8zpDUUqZ SBe3YdLt3VmHdKhWpMkhxWLEiKJ8+QxTQQ+8Lsc1q7CRLb0DKzw5eW1WusIIGHHb2hQK nrsQ== 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:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=+Zp2niULUP4ZI+b7tC0dJZDJOVdAo47oWR0HVRQMqMM=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=d0JNXfBM8PyqsrVi6LIx++jwjTj+6zGaYSVaYXWfAJb8jOc5LaV/AMPAwLy1Dbuqid Ix54fbLWVCuq178v+NEjR8XfK5oC3/hU9IOps67JLpsN7y6sU+nZP+ygE9ebUhy57g9E 0DTX1qsRwj8fSF91hcO8e4VvjEYvfJ90W8j6D8GS2YrUUT3fC0NsrNsLo7FVbho4cp7Z /F2C0PJ6rN3U6T0oExsJdPEm6qY382FF5gQ1zeUwtXcBOFO9VYnbmS+a+ROVkUo8mJV0 QQ31FNn1l7YKpnYVxtXy4vosx4tSPBSOAuQO9v1PE47Sblb9ascAr+ofJHWfXhFWb8RK 87/Q==; 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=jImz6Pvy; 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 38308e7fff4ca-2f03d151049si6838871fa.332.2024.07.25.19.15.53; Thu, 25 Jul 2024 19:15:53 -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=jImz6Pvy; 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 15EE868D804; Fri, 26 Jul 2024 05:15:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0FFFC68D767 for ; Fri, 26 Jul 2024 05:15:26 +0300 (EEST) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1fed72d23a7so1561475ad.1 for ; Thu, 25 Jul 2024 19:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721960124; x=1722564924; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=7oPJoECoa+8Pm7E8tLO5sUn5k4JmDjtkSaKNP7JJrhE=; b=jImz6Pvyp27C5iZwDt2+JVfZBCtVpF/Sd+QdLg8qPu2SriP5wIPQUaPBKXGo4aNhJf rRUx0pfDCM/JaWKBXdRW+/JDQGr2h9atEHc2XPdi0uTBUm3vSZyIOSdz28gC0p0Sr7q7 1knyXlHM0YWRstrLrA/EPiFKKtd8CfIIGizEhXSBGucdDLPbPgbTwRixXfrrVOBjObki SDhnYwStCYELOQbqc3kcm7k2KtGuuc61z1DBDmNaqUysZ95Arz+l9OZcM/czYppBieyK 1MUo4p1T60Pjk7lsbPZXcuSxqg/irmF4e8yHeQOsyrjkTsi8BKF+PQ41Koo89Tu6v9fZ WXUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721960124; x=1722564924; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7oPJoECoa+8Pm7E8tLO5sUn5k4JmDjtkSaKNP7JJrhE=; b=ZadmeeImxgw4+3lWsJoi8lKriG1cdhMlmO8Mz+BLmRVT/fQ1bc5J+zCx0NolyGJt8c 4fh/j+51O6XLJ5uJSckFiYVGSYdJw95u8fZxdGUy/OP9fQu1laxGcIFGQ46R7KfXswIl vQaLL+M9Z9xEPMFNbzMZ1MDPaLi06aoNqpEBw5Pw3eqo5AbAPmyHxfu3mBEXkzm8PK7u w4R2Mw76t9NOO1c0BobXQLUprWmnZwMHLmSDq8pWUzwiDdvhLKK109V1FakRp8+uMosS rk3gyTUp1XzJLxjVTh4x6OLOmbNFbm9wygPTegrjHM3aDvM1kEtNpohA9i4fHNilU/Bp 9Azw== X-Gm-Message-State: AOJu0YwTfsNV0UhM4FPgwTdBXF9eUQSDipqrJn9R+k4ImqDXcaDcGHEH XJli9uJ3ZcCJD/rIL6t+UoSYio2yoF9eL+sTYRu0H39pWSnBSRkm4Z6Yxw== X-Received: by 2002:a17:902:d506:b0:1fd:8bed:664b with SMTP id d9443c01a7336-1fed928be64mr43034335ad.39.1721960123848; Thu, 25 Jul 2024 19:15:23 -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.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 19:15:23 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Jul 2024 23:15:34 -0300 Message-ID: <20240726021535.6354-3-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240726021535.6354-1-jamrial@gmail.com> References: <20240726021535.6354-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/4] avformat/matroskadec: use AV_WL32A 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: qM/M8a1GymXW Signed-off-by: James Almer --- libavformat/matroskadec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index aa28a37da4..c8741ff2af 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -4059,9 +4059,9 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska, (AVRational){1, 1000000000}, (AVRational){1, st->codecpar->sample_rate}); if (discard_padding > 0) { - AV_WL32(side_data + 4, discard_padding); + AV_WL32A(side_data + 4, discard_padding); } else { - AV_WL32(side_data, -discard_padding); + AV_WL32A(side_data, -discard_padding); } } From patchwork Fri Jul 26 02:15:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50745 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:a830:0:b0:482:c625:d099 with SMTP id z16csp202882vqo; Thu, 25 Jul 2024 19:16:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXddFWjkDRJqYV47ro7aWSGzPXfbywqCSoy820ht7A1CpO6LFuiJ4ABJ64w2gOxmDP9RZBZ5m4sMmEatA8MY+mzt6jzrQX40HtV1A== X-Google-Smtp-Source: AGHT+IGVmEnR+TXRZtm0t/0wmNwoEFhle9x3SiVtIpRLy6Arcnh8YUUqfNSZgt7fiX0HRND0Mrv1 X-Received: by 2002:a2e:86ce:0:b0:2f0:2833:efaa with SMTP id 38308e7fff4ca-2f039ca2640mr29991241fa.25.1721960162550; Thu, 25 Jul 2024 19:16:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721960162; cv=none; d=google.com; s=arc-20160816; b=hQvvj//QeY45qLOKVyCwBFlYl0ZfHM0xDSEHbsQUN8nfVcOHjMlM3yDx35GIa+dD82 xIdmOb6voHIR2jb66cXjBqfrWcKNO5pTr8I7bE77ttCUrGt9X3NrRxIdGBNEuj6iKi4/ Ua4gMYzsnu8RxHMcr78rtgAVQm87t5TaCo+RVaO/c4q8wFng2HaGKZ2N4eD3coi/jwP1 HeCr3hBp9V5XvsZHs1sIF5U3LAXMdF5mqSFw/4aWTn7Yfc+OCMPrTmiBAIi8WQuHWuZU 4XRB87O2HEM5o4JeNJ2UpxaoJdsEupo1rCti/SZvP6CXxQzuh8A0UxCgz3YbWUtzEnIW diNQ== 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:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=his58qSGH2RvhSxHRSoGabZkOxTcXxexAWMxE1rL4W0=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=F+SA9fgXEk4nc4exu+/KBCcQmYe56pKjZcDfsCzui/DY3IxW0slfQQskQeqIDqBjyF h/vSuWnSBziLCPppklMl43bkxnAdSak9mu4YowI5ETUznmQv528OObxqgZj1mapjMAUU bsUe+jQrjtJzOVNatRVgVLev0GcI+DaDnswnele0cgwxXWcR7uJxmdS2QMn9Pf2IlUpy wgsynvCJVQFY0vEmO5ED7y/HHHbLFvOW6vMTs2fWENlCHvbayWKCeHFgm8hlFMKKPAq1 OfOc7ON8innxysEhd2WTzmFkGY1+YPqA8LXkBfEKKVirJQg21i9nYwBsjD/eBh56ML91 HQAw==; 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=Go0Ii6m3; 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 38308e7fff4ca-2f03d17f857si7341751fa.528.2024.07.25.19.16.01; Thu, 25 Jul 2024 19:16:02 -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=Go0Ii6m3; 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 63CB868D81C; Fri, 26 Jul 2024 05:15:40 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9E08268D770 for ; Fri, 26 Jul 2024 05:15:27 +0300 (EEST) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1fc611a0f8cso1450815ad.2 for ; Thu, 25 Jul 2024 19:15:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721960125; x=1722564925; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Tf4i5tpDTQQHlKJ2IQtZph57WaKVVO+Uy9Yyl6jJeI8=; b=Go0Ii6m3qDt13WfHSErEXZz+oOJMxDGZirLzbPJbEuh9/K9Oz2aUUaH4YL19YDjYqI ZyYaVH21OnR+Fhu52SPBV60O2EBPVw5SECkm4A5+jFhYWxuiZCWVhx0k/OSLA1Fqpqbq R62Xv7Nqf+ToOhdVVj0Cjv/TbNIFi4yzBq/qpl/D9O8x0+KzRgYNYsaeVpnbLOx0e3su Nn+VLYLFyFJztuJZ3935WQ4OOxrzbQtXHc7IywgANwwJ9AD5TJuc4UXwqqz1PcXzIpwu Jo4RbrJeQU4izC/bluFt8/GAnDWnAHfB1TIOXdg0prcnogoTfhaBJ/IBvzM3J8gaTNPq vT9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721960125; x=1722564925; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Tf4i5tpDTQQHlKJ2IQtZph57WaKVVO+Uy9Yyl6jJeI8=; b=rZ1tYmmYyRa2vqGSN5Qi1z5i3xGQl9x237nMYr7YxwWKGWboClDEpcC+xqGXtvAq+9 66FFx+jSGQCCtu4wgiu85s8f7oPboN4p94uocDxUAPN2BmJAV8Q33vkTI2pfJBG3uvOL nDN1z0FBTB9uRweu4jElqI0dd52JW4tbG6ui69prEWEWDGZAJ1MhQ7aV0oJSjcgsEaTH QXI84Z4yyal8j/BGhSfebcvza6fPhcoiqmGxfHcB3/SzcdcQQ7TjyJd6eDdV3IsURRJ3 wAF2sA4nZxK8GmQzBJfo14ndzWiuTTWjJtVcXbeTbdr8SzHK+LpTxz2+PoKBcz2V2u2E TmSw== X-Gm-Message-State: AOJu0Yx9PIN8aAlKTuehW9nez+3SoupKAlhDwgqB4DRpVEh7lzQ1EEBI 5Z0xqmN9bV4ynxuXM3tYN5/oYTYUtsyoJ185+FgpZtfXlW/I9qDQzrtYeQ== X-Received: by 2002:a17:902:e885:b0:1fd:9e88:e4b7 with SMTP id d9443c01a7336-1fed923f137mr44431405ad.12.1721960125273; Thu, 25 Jul 2024 19:15:25 -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.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 19:15:24 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Jul 2024 23:15:35 -0300 Message-ID: <20240726021535.6354-4-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240726021535.6354-1-jamrial@gmail.com> References: <20240726021535.6354-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/4] avformat/mov: use AV_WL*A 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: w4u1msGEr8tJ Signed-off-by: James Almer --- libavformat/mov.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index b74e43e214..a8e342dc4f 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1282,10 +1282,10 @@ static int mov_read_clap(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (!sd) return AVERROR(ENOMEM); - AV_WL32(sd->data, top); - AV_WL32(sd->data + 4, bottom); - AV_WL32(sd->data + 8, left); - AV_WL32(sd->data + 12, right); + AV_WL32A(sd->data, top); + AV_WL32A(sd->data + 4, bottom); + AV_WL32A(sd->data + 8, left); + AV_WL32A(sd->data + 12, right); return 0; } @@ -8170,8 +8170,8 @@ static int mov_read_dops(MOVContext *c, AVIOContext *pb, MOVAtom atom) if ((ret = ff_alloc_extradata(st->codecpar, size)) < 0) return ret; - AV_WL32(st->codecpar->extradata, MKTAG('O','p','u','s')); - AV_WL32(st->codecpar->extradata + 4, MKTAG('H','e','a','d')); + AV_WL32A(st->codecpar->extradata, MKTAG('O','p','u','s')); + AV_WL32A(st->codecpar->extradata + 4, MKTAG('H','e','a','d')); AV_WB8(st->codecpar->extradata + 8, 1); /* OpusHead version */ avio_read(pb, st->codecpar->extradata + 9, size - 9); @@ -8179,10 +8179,10 @@ static int mov_read_dops(MOVContext *c, AVIOContext *pb, MOVAtom atom) little-endian; aside from the preceeding magic and version they're otherwise currently identical. Data after output gain at offset 16 doesn't need to be bytewapped. */ - pre_skip = AV_RB16(st->codecpar->extradata + 10); - AV_WL16(st->codecpar->extradata + 10, pre_skip); - AV_WL32(st->codecpar->extradata + 12, AV_RB32(st->codecpar->extradata + 12)); - AV_WL16(st->codecpar->extradata + 16, AV_RB16(st->codecpar->extradata + 16)); + pre_skip = AV_RB16A(st->codecpar->extradata + 10); + AV_WL16A(st->codecpar->extradata + 10, pre_skip); + AV_WL32A(st->codecpar->extradata + 12, AV_RB32A(st->codecpar->extradata + 12)); + AV_WL16A(st->codecpar->extradata + 16, AV_RB16A(st->codecpar->extradata + 16)); st->codecpar->initial_padding = pre_skip; st->codecpar->seek_preroll = av_rescale_q(OPUS_SEEK_PREROLL_MS,