From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 86D2C4B86B for ; Mon, 26 May 2025 05:20:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 0CFB168C2C8; Mon, 26 May 2025 08:20:48 +0300 (EEST) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 3693268C0F9 for ; Mon, 26 May 2025 08:20:41 +0300 (EEST) Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-551f00720cfso2725688e87.0 for ; Sun, 25 May 2025 22:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1748236840; x=1748841640; darn=ffmpeg.org; h=mime-version:references:message-id:in-reply-to:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=xvVibBkWQflWDiDcz/b5jDzhe2e9xSEI19kpZAIEJ6E=; b=t+HOt8OPx68m6V5mPfuDcQ7woH4qlFipb6hlmbQf9vg/0qzvwL6NobTC7kVFPTbXae 3/P42oR6tHFkx21R81qn645k8SAE4tfxbbasjDCKuEgmE00DxZtOu7/sFUhVKw4nBFQr xLuAAb07BfCzWAi481XUUyrMhgf5q9OmKjXwDG12QPjZuWcmxXibCuG19qzmcOsoEOo4 jzNnXoiwOglFUmWTzEmImfkE6Uq4spvrJzQ27oHgqMuoDMt23oSgqCh16Cf9N+fAH2/j lcITtgAZYi9WasaJp+3HdUs39cWUPZDzEJ96p3FvGPrQLlgvYyFlVAi+nQLlAEb62RkZ eqEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748236840; x=1748841640; h=mime-version:references:message-id:in-reply-to:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xvVibBkWQflWDiDcz/b5jDzhe2e9xSEI19kpZAIEJ6E=; b=mdp4rpgscFJVLQG62GnXnRx5a55e7t+e6UPacoDRCrXHg41dD3MySye7YP4BoC5MuX +caglZzJWh++eBmMbertgEm7m2kiLz4CUei/VD8sNcoDvQZ8Pgmhw9CJQdc0OkER6e3i oxio+2GCuDkqKcj1UGbCn4NTky9Se/59VM9CwFptY1zodbwDZtwwYnkNvt314S6KHjnc yB4V1oYYgWwgAw0fixCuC+LxFi5V9UFOaIt3yr42oqTuhXcnZ15p2g5rkp/w1+zLW5BM nxYt7lUwIVLsnuIvaaIvm/GZGwfk8TKUEuNidKaiCT5TfQRxjdhzga5d/uWxtUzisuwz tlkA== X-Gm-Message-State: AOJu0YxBSJOmK4TZBPEWgm0VjlHT4qDSJCivORJSub8Eu2NKIqhqkakr DHTMVkiCuVq+bIweUrnW3V92SUxuAh2DOMxZ2e/nMrVx5E0RHZrXOi5bGPKjms+H+wueKXxNrr1 wBKB5Yw== X-Gm-Gg: ASbGncuAoQ2SVE8ur6ArVtqFnmshz6at1+Xh9ir+c6bNmd6XS7Axm0FL4aLyYTel9Hg v0kAdUKfemnhwFizGRHHEC+tHyTYWACKINGbDGRkNbUB0lMeejonL2egmYh56QfgXFkgz7drVld /CuhVxH3dwWlJBW4erXne0ph6wnD9FSYX9WUZMYpPOzAR2NVLIWQbtE08QJrpYtLdLF3kCCq0rw yrAb8bc/0bpBNjuX+l+7R0f2/bJGY3aRC9T0eWYXTBFbpXiHlWrApwenMGzwmicz4bZ5/3JBvDH erp3gRDtcJFdD39FqrHzBf1bWu/2Yx3od+f0DxKSjREFUFj1oackPDEgySK8voF6fmnAr1mH78d 6efhpDa/EXdUNsogSCRmpXim4tFa6h4l1jgjDzWsdXQSsGyA= X-Google-Smtp-Source: AGHT+IEJiARchg+qDAtAbkCWEMy64OZc8GPihQoZ58BExXvF4B+m1uTYKb/GPN3NyyK7ARhc+wYrqg== X-Received: by 2002:a05:6512:3b8f:b0:550:e04d:2b81 with SMTP id 2adb3069b0e04-5521c7b052cmr1844746e87.27.1748236840048; Sun, 25 May 2025 22:20:40 -0700 (PDT) Received: from tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net (tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:11::2]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-550eb6c7155sm4734231e87.22.2025.05.25.22.20.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 May 2025 22:20:39 -0700 (PDT) Date: Mon, 26 May 2025 08:20:38 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: ffmpeg-devel@ffmpeg.org In-Reply-To: <20250526015254.3BAED41283C@natalya.videolan.org> Message-ID: References: <20250526015254.3BAED41283C@natalya.videolan.org> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] avcodec/asvenc: Don't waste bits encoding non-visible part 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Mon, 26 May 2025, Andreas Rheinhardt wrote: > ffmpeg | branch: master | Andreas Rheinhardt | Thu May 22 15:57:13 2025 +0200| [0401ca714a2714743573e27c384ffa810fd31a92] | committer: Andreas Rheinhardt > > avcodec/asvenc: Don't waste bits encoding non-visible part > > Up until now, the encoder replicated all the border pixels > for incomplete 16x16 macroblocks. In case the available width > or height is <= 8, some of the luma blocks of the MB > do not correspond to actual input, so that we should encode > them using the least amount of bits. Zeroing the block coefficients > (as this commit does) achieves this, replicating the pixels > and performing an FDCT does not. > > This commit also removes the frame copying code for insufficiently > aligned dimensions. > > The vsynth3-asv[12] FATE tests use a 34x34 input file and are > therefore affected by this. As the ref updates show, the size > and checksum of the encoded changes, yet the decoded output > stays the same. > > Signed-off-by: Andreas Rheinhardt > >> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0401ca714a2714743573e27c384ffa810fd31a92 > --- > > libavcodec/asvenc.c | 131 ++++++++++++++++++++++++++---------------- > tests/ref/vsynth/vsynth3-asv1 | 4 +- > tests/ref/vsynth/vsynth3-asv2 | 4 +- > 3 files changed, 84 insertions(+), 55 deletions(-) As noted on irc, this broke the fate-vsynth3-asv1 and fate-vsynth3-asv2 tests on arm. The issue is not AV_COPY128 as Andreas wondered on irc; the reason is a->pdsp.get_pixels. We have a backtrace like this: #0 0x00cfdd2a in ff_get_pixels_neon () at src/libavcodec/arm/pixblockdsp_neon.S:47 #1 0x0082ea54 in dct_get (mb_y=0, mb_x=0, frame=0xf6202f40, a=0x297f450) at src/libavcodec/asvenc.c:222 #2 encode_frame (avctx=0x297f150, pkt=0xf6202ec0, pict=0xf6202f40, got_packet=0xf7df4af0) at src/libavcodec/asvenc.c:304 The arguments to a->pdsp.get_pixels are this on entry: (gdb) info registers r0 r1 r2 r0 0x297f4a0 43512992 r1 0x297caa0 43502240 r2 0x22 34 After one iteration, it hits the bus error due to unaligned reads from the source, which was expected to stay aligned after incrementing by the stride. // Martin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".