From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 28AF84E595 for ; Wed, 12 Mar 2025 13:46:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1460768EA2E; Wed, 12 Mar 2025 15:46:44 +0200 (EET) Received: from vidala.pars.ee (vidala.pars.ee [116.203.72.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A18FF68C05A for ; Wed, 12 Mar 2025 15:46:37 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; s=202405r; d=lynne.ee; c=relaxed/relaxed; h=From:To:Subject:Date:Message-ID; t=1741787197; bh=NRVoNmmNX2WWrGpX7gvZe3y keml0zqkGx4V2Jx56y1E=; b=lFwvpWTNURJbqKuFpuhnzklDEln6VvqNfwWCPYbDbCMukwt2Pm x0RPYAqJ6k9GQyLUukX+iAzlsACSdNtw7qmf1EoDm9mFGOC3j0IuTTLdO8fZknspOmxcr0dnFWG GUntHDP5Kluonr0XPfgf8MMLTMIRxDWYWheSs25WR4UCHlLsbKSrsebzMNc48WplfDHaqic6zk4 DWlSn71umJJzpYTFVq0t3fljcbX4JfAXopkfkhd8wiHV+4FtUU17WUicwV1NEMX/8QSw/X7wZ4i TeIQKymBp4RH6XowVZlxs1eAtYtmS/XYNMlTzEbHYDAwPud+0pgPLRXD2zzxz0VDK8g==; DKIM-Signature: v=1; a=ed25519-sha256; s=202405e; d=lynne.ee; c=relaxed/relaxed; h=From:To:Subject:Date:Message-ID; t=1741787197; bh=NRVoNmmNX2WWrGpX7gvZe3y keml0zqkGx4V2Jx56y1E=; b=5keMSwNyXPp2NmJg6ShdWttiHiEQjSF7cHffZM7dpcmb25qH5X bFjWsQ84sYsphUIq0RAkc+K0lVail7q92gBA==; Message-ID: <3869161c-d01b-4821-87e0-a9fbd2ae84fc@lynne.ee> Date: Wed, 12 Mar 2025 14:46:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta To: ffmpeg-devel@ffmpeg.org References: Content-Language: en-US From: Lynne Autocrypt: addr=dev@lynne.ee; keydata= xjMEXnFG3BYJKwYBBAHaRw8BAQdA3FyJpqEdfQj4GA7OUWVrNheT9dUsIs+yUx6Hljr9mYvN FEx5bm5lIDxkZXZAbHlubmUuZWU+wpAEExYIADgWIQT+UBOcaAVyyv1SH42i/qXwPwNEZAUC XnFG3AIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRCi/qXwPwNEZOTWAQCSNEA+kZLI NZ2dsR5Qg988c0HXpOXThZEjg+h1TL7KGgEA3Gff0c28efI02S6iMxazrpdWGHqHk7JN7pCj nt397wzOOARecUbcEgorBgEEAZdVAQUBAQdAjDdFQ5H+AJ9vwXrOb7val460g45EsheIaL5S 7/zSaX8DAQgHwngEGBYIACAWIQT+UBOcaAVyyv1SH42i/qXwPwNEZAUCXnFG3AIbDAAKCRCi /qXwPwNEZKaxAQCHLV4gAk/B9JvRG27MYm22X3+5QRCLBtEILP29aDh+MQD/V8JFHATDXRY3 0LsmqR3sPQ0BJ1UFVZA5BUoIJPJZWwg= In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec/vc2enc: Use LUT to assemble interleaved golomb, code 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 12/03/2025 06:27, Andreas Rheinhardt wrote: > Lynne: >> On 12/03/2025 04:10, Andreas Rheinhardt wrote: >>> Patches attached. >>> >>> - Andreas >> >> First patch is wild, its surprising no one considered inverting the way >> decoder parses codes for an encoder yet. > > I didn't even look at the decoder. > (It is actually surprising that it took until > 512e597932dfe05cf5665192efbe2c93c2e36af2 for the original code to be > improved.) > >> Rather than ORing and using put_bits63, I think it would make more sense >> to write out each chunk using put_bits sequentially. It might be >> possible to reverse the lookups such that you get the MSBs first so you >> wouldn't need to reverse them out of place in a small array. >> But either way, LGTM. Feel free to explore this in a follow-up. > > I don't think that writing them sequentially will improve anything: In > order to be able to use a LUT, I would have to shift the bits starting > with the MSBs into position; and then there would be the internal shifts > and checks inside put_bits(). > Apart from that: put_bits63() is the same as put_bits() when BUF_BITS is > 64 (see ede2b391cc516f4f93621f6a214b3410b231f582). > >> >> Second patch seems a bit pointless. It's just one single call you're >> uninlining? Chasing to save a few extra bytes of binary surely don't >> deserve having a wrapper function for uninlining. >> > > I am uninlining all calls besides the hot one. 31 callsites. > For GCC, this reduced codesize 2c36 to 25b1 (15% saved), for clang from > 4b08 to 3338 (32% saved). Oh, it was late and I didn't read carefully. Both patches LGTM. _______________________________________________ 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".