Re: [FFmpeg-devel] [PATCH 2/2] avcodec/put_bits: Make bit buffers 64-bit

2020-07-18 Thread Steinar H. Gunderson
On Sat, Jul 18, 2020 at 01:53:36PM +0200, Carl Eugen Hoyos wrote: >> +#if ARCH_AARCH64 || ARCH_IA64 || ARCH_MIPS64 || ARCH_SPARC64 || ARCH_X86_64 > I suggest to only do this for the platforms that you actually tested. OK. If so, that's x86-64 only. /* Steinar */ -- Homepage: https://www.sesse.ne

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/put_bits: Make bit buffers 64-bit

2020-07-18 Thread Carl Eugen Hoyos
Am Fr., 17. Juli 2020 um 21:41 Uhr schrieb Steinar H. Gunderson : > +#if ARCH_AARCH64 || ARCH_IA64 || ARCH_MIPS64 || ARCH_SPARC64 || ARCH_X86_64 I suggest to only do this for the platforms that you actually tested. > +typedef uint64_t BitBuf; > +#define AV_WBBUF AV_WB64 > +#define AV_WLBUF AV_WL

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/put_bits: Make bit buffers 64-bit

2020-07-18 Thread Steinar H. Gunderson
On Sat, Jul 18, 2020 at 11:53:44AM +0200, Michael Niedermayer wrote: >> +#if ARCH_AARCH64 || ARCH_IA64 || ARCH_MIPS64 || ARCH_SPARC64 || ARCH_X86_64 > this needs a #include "config.h" or something equivalent Sounds right, will fix. /* Steinar */ -- Homepage: https://www.sesse.net/ __

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/put_bits: Make bit buffers 64-bit

2020-07-18 Thread Michael Niedermayer
On Fri, Jul 17, 2020 at 09:41:20PM +0200, Steinar H. Gunderson wrote: > Change BitBuf into uint64_t on all supported 64-bit platforms. > This means we need to flush the buffer less often, which is a > significant speed win. 32-bit platforms are unchanged. > Output bitstream is the same. > > All AP

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/put_bits: Make bit buffers 64-bit

2020-07-17 Thread Steinar H. Gunderson
On Fri, Jul 17, 2020 at 09:48:42PM +0200, Paul B Mahol wrote: > Missing magicyuv benchmark. I didn't intend to do every single codec, but sure: magicyuv 57.10 fps -> 63.29 fps (+10.8%) /* Steinar */ -- Homepage: https://www.sesse.net/ _

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/put_bits: Make bit buffers 64-bit

2020-07-17 Thread Paul B Mahol
Missing magicyuv benchmark. On 7/17/20, Steinar H. Gunderson wrote: > Change BitBuf into uint64_t on all supported 64-bit platforms. > This means we need to flush the buffer less often, which is a > significant speed win. 32-bit platforms are unchanged. > Output bitstream is the same. > > All API

[FFmpeg-devel] [PATCH 2/2] avcodec/put_bits: Make bit buffers 64-bit

2020-07-17 Thread Steinar H. Gunderson
Change BitBuf into uint64_t on all supported 64-bit platforms. This means we need to flush the buffer less often, which is a significant speed win. 32-bit platforms are unchanged. Output bitstream is the same. All API constraints are kept in place, e.g., you still cannot put_bits() more than 31 bi