From patchwork Thu Jul 25 16:20:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50733 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc0a:0:b0:482:c625:d099 with SMTP id h10csp664563vqv; Thu, 25 Jul 2024 09:26:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU+ZGBcaujsgCEB9fsON0SZF3dii8yr7k/5wIYthkkXeC1vN5ic9ck5TjogpgdqcURwWavUT3Ef6HF9sI+dga1HKu2Y6thtRnRF7Q== X-Google-Smtp-Source: AGHT+IFo8WZ0x1eCuXf0QXY6APkMuKdTtj8NNXFrhp1O1NbBjWSBRXjqb4WJ0hyo+D/9AmBBMOjd X-Received: by 2002:a17:906:da87:b0:a7a:a46e:dc3c with SMTP id a640c23a62f3a-a7ac4ef24d6mr189412066b.15.1721924812241; Thu, 25 Jul 2024 09:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721924812; cv=none; d=google.com; s=arc-20160816; b=mJBfgRLA+8iLvMUI9nR3XbxHx3UrEtr87HQsdzh48dJW7wjRnm9+RsQi+Ne+iFdZfs /GpW2y5VlxyUkpNsqZgnT7rh+tq/GdJyaS/zY782kwAytxmgkoiHo6wnQ7etyvdIGr+u lgqYbOJxnyZUKxeXBjP/n3o/EOLWINVVbsUb63rqvdD6iW7KsGMUvdmPMKeVLy4vEdfy xY1I5674z1i2nm982AFK/llZteMdEGaioBp/N0Cc0kQdK3uFQ/L0sis+7qU9MytNcfoZ tD8BRFe50JnnFmbOWjvYrBT8XBTSO0xSwZETvVGnPG+UYE6wtaZywr+cG7HMle0Jb4hf pxiA== 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=r+zFRu4lwORy8h5KIIHfPYnYuvkd0jT0VJmtyKmvuPA=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=kFbU8M7D3BF6BCWNlc5hI20ylQRNCP21NHTXoK3YERffpaJRn/vZaqVp8XjuxM4o2l NjvwJbJ/K17+xheQigLTN06Qh09LGWuoAd8MjWm37XuHuK+PKzvlAe1c6Li4oL+OHqld ug3nN/uEiR1vpdUOtYyqhmZYOC5bB4uCdORl823Vi/8cWcGsVjEtaNKZzaCja1sJ8nGc I2nopUfmryYM9aIkr4I680LVgXAJOfDAMnOqQJrZs+hOVIOm1u9Gd6syC6g1YjpUbjH4 OcNW/k/5Yo/nHkhWDDqt2mgkrWa8BV2kqlP5T7NFUznKilPoZG0YGNUQXx92WPqXI6oa sLqA==; 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=nsm24luM; 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-a7acac6382asi115316666b.621.2024.07.25.09.26.51; Thu, 25 Jul 2024 09:26:52 -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=nsm24luM; 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 213A368D770; Thu, 25 Jul 2024 19:19:57 +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 3874468C467 for ; Thu, 25 Jul 2024 19:19:51 +0300 (EEST) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1fd78c165eeso10045955ad.2 for ; Thu, 25 Jul 2024 09:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721924389; x=1722529189; 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=NA3iXlVLqgcR0k3hjY9ifN9LNW6l0E/ZRJOqnQ5cfek=; b=nsm24luMBiPYnddlq2P5h7aRoxBrNoneeTVC6T0OVp4DyC7EhYqhGAok+6hQGkoj3e JOa9Ne5ZoMIo19/GLyWB4VMoPZYhKnfG6lnNqQ+8MOZ+q8RdAeQQ/F48MomgOvFkn5PQ 4ss332/Igq1BXPRYXVX9n4Js6YmkVWWTd0Sq77PyP0v2IxYfwW/SFlphsjeb0zc8onV0 z8PUv3dVFbRxzUOlh6MQWV9rdCtHrMlrb0blnP2DxIRBkkSmO1m5fbxA4RcuLsJP8V9y dZ/8mnsUeeVnetCmbZntFuAh0OmbJfHaNpSNbChUTbd4YoozJL2j6iWlXjyEiQpOEeDm EMdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721924389; x=1722529189; 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=NA3iXlVLqgcR0k3hjY9ifN9LNW6l0E/ZRJOqnQ5cfek=; b=IxTpEqNCRvPy/WG/QtGnXArKpPcFju1fgCkpDLclYb3LAGfupAIr+BvdThiGHfNVu7 R0BuJNfbSiPH7a/ChQNeDDP+d+Ht67MpI64/t6LADbE6MLWbqAxi8bNDWx7kxhfAt/vC b+QPwRLnWAJnDQQHyjDQa7Kpj+BX6kLiBCHdLYRbfrRhRiEGCAyHoOetHbnUAdpaADik hiBuGKVVSrzdlnKGRJKhYkQ0rJDHtnl0y6y+w3m1YwPQHeJxTEObFdeQLqQ7hhhZ97Lc ekqVRPF6ULzuB0jBmhG0nDo5S55wGMbCEhKKqgU27rKA1gL1ccpWXROLyTPxqZW80xbW M0AA== X-Gm-Message-State: AOJu0Yy6lRaxdXH0NaK7kBwX8pNp5/cRLknpTKqidadsoGEOVG/br+b8 ec1Q/AjaPXF+ollMw0xCvfP5lGkBlOrVVK7PYv9vM/+tx3Vz2s8jpxu0Aw== X-Received: by 2002:a17:902:ced2:b0:1f9:fb48:7cf9 with SMTP id d9443c01a7336-1fed92d4bb0mr28014865ad.63.1721924388889; Thu, 25 Jul 2024 09:19:48 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fed7ee1477sm16179965ad.169.2024.07.25.09.19.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 09:19:48 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Jul 2024 13:20:07 -0300 Message-ID: <20240725162007.2048-1-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] x86/intreadwrite: add SSE2 optimized AV_COPY128U 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: fjTsPSYZ3gFR Signed-off-by: James Almer --- libavutil/x86/intreadwrite.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavutil/x86/intreadwrite.h b/libavutil/x86/intreadwrite.h index 65cc6b39a1..c92b75ed12 100644 --- a/libavutil/x86/intreadwrite.h +++ b/libavutil/x86/intreadwrite.h @@ -37,6 +37,13 @@ static av_always_inline void AV_COPY128(void *d, const void *s) _mm_store_si128((__m128i *)d, tmp); } +#define AV_COPY128U AV_COPY128U +static av_always_inline void AV_COPY128U(void *d, const void *s) +{ + __m128i tmp = _mm_loadu_si128((const __m128i *)s); + _mm_storeu_si128((__m128i *)d, tmp); +} + #define AV_ZERO128 AV_ZERO128 static av_always_inline void AV_ZERO128(void *d) {