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 ESMTP id C6FF547AB2 for ; Tue, 31 Oct 2023 00:25:22 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 744E168CCE6; Tue, 31 Oct 2023 02:25:18 +0200 (EET) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0A00468CB92 for ; Tue, 31 Oct 2023 02:25:11 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1B237C0003 for ; Tue, 31 Oct 2023 00:25:10 +0000 (UTC) Date: Tue, 31 Oct 2023 01:25:10 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20231031002510.GP3543730@pb2> References: <20231024150443.7438-1-michael@niedermayer.cc> <20231024150443.7438-2-michael@niedermayer.cc> <20231027183814.GW3543730@pb2> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 2/4] avcodec/get_bits: Avoid 2nd bitstream read in GET_VLC() if bits are known at build and small 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-Type: multipart/mixed; boundary="===============0470118829457163726==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0470118829457163726== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ANuwOrt5WnP5djRs" Content-Disposition: inline --ANuwOrt5WnP5djRs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 30, 2023 at 09:49:07PM +0100, Andreas Rheinhardt wrote: > Michael Niedermayer: [...] > >=20 > > also i was wondering about a vlc reader thats entirely free of conditio= nal > > branches. Just a loop that in each iteration would step by 0-n symbols > > forward and update a pointer to which table to use next >=20 > Doesn't this have the downside that short symbols need as many > iterations as the longest one? i dont think so but maybe iam thinking of something else lets assume our main table is 10bits so we read 10 bits look it up in the table and that tells us what there is and lets assume these 10 bits contain 2 complete symbols and one partial first we copy from the table a block into our symbol output list (that cont= ains 2 symbols) second we take a pointer from the table to the next table the incomplete can either now be handled in the next iteration or we could point back to the main 10bit table and only handle the 2 complete in this iteration third we move bits (10) and symbols output pointer (2) forward now we go back to the start of the loop and continue handling the partial s= ymbol first we copy from the table a block into our symbol output list (that cont= ains 0 symbols as our partial one still is unfinished) second we take a pointer from the table to the next table this is the next table to decode the long symbol third we move bits (10) and symbols output pointer (0) forward now we go back to the start of the loop and continue handling the partial s= ymbol first we copy from the table a block into our symbol output list (that fina= lly completes the long symbol so we output it) second we take a pointer from the table to the next which is back at the ma= in table third we move bits (x) and symbols output pointer (1) forward thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. U= ser questions about the command line tools should be sent to the ffmpeg-user ML. And questions about how to use libav* should be sent to the libav-user ML. --ANuwOrt5WnP5djRs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZUBJYgAKCRBhHseHBAsP q1LiAKCb6YVOFqVcOXA+FpI3Jnql5VxxOACcDn/L2BG4+YUObqL0al027p0LFmE= =nZ8H -----END PGP SIGNATURE----- --ANuwOrt5WnP5djRs-- --===============0470118829457163726== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============0470118829457163726==--