Steinar H. Gunderson
88d80cb975
avcodec/put_bits: Make bit buffers 64-bit
...
Change BitBuf into uint64_t on 64-bit x86. This means we need to flush the
buffer less often, which is a significant speed win. All other platforms,
including all 32-bit ones, are unchanged. Output bitstream is the same.
All API constraints are kept in place, e.g., you still cannot put_bits()
more than 31 bits at a time. This is so that codecs cannot accidentally
become 64-bit-only or similar.
Benchmarking on transcoding to various formats shows consistently
positive results:
dnxhd 25.60 fps -> 26.26 fps ( +2.6%)
dvvideo 24.88 fps -> 25.17 fps ( +1.2%)
ffv1 14.32 fps -> 14.58 fps ( +1.8%)
huffyuv 58.75 fps -> 63.27 fps ( +7.7%)
jpegls 6.22 fps -> 6.34 fps ( +1.8%)
magicyuv 57.10 fps -> 63.29 fps (+10.8%)
mjpeg 48.65 fps -> 49.01 fps ( +0.7%)
mpeg1video 76.41 fps -> 77.01 fps ( +0.8%)
mpeg2video 75.99 fps -> 77.43 fps ( +1.9%)
mpeg4 80.66 fps -> 81.37 fps ( +0.9%)
prores 12.35 fps -> 12.88 fps ( +4.3%)
prores_ks 16.20 fps -> 16.80 fps ( +3.7%)
rv20 62.80 fps -> 62.99 fps ( +0.3%)
utvideo 68.41 fps -> 76.32 fps (+11.6%)
Note that this includes video decoding and all other encoding work,
such as DCTs. If you isolate the actual bit-writing routines, it is
likely to be much more.
Benchmark details: Transcoding the first 30 seconds of Big Buck Bunny
in 1080p, Haswell 2.1 GHz, GCC 8.3, generally quantizer locked to
5.0. (Exceptions: DNxHD needs fixed bitrate, and JPEG-LS is so slow
that I only took the first 10 seconds, not 30.) All runs were done
ten times and single-threaded, top and bottom two results discarded to
get rid of outliers, arithmetic mean between the remaining six.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-19 10:59:43 +02:00
..
2020-06-10 11:31:16 +02:00
2020-07-12 11:30:23 -03:00
2020-06-26 09:53:36 +08:00
2020-06-26 09:53:36 +08:00
2020-05-22 14:38:57 +02:00
2020-06-13 06:59:19 +08:00
2020-06-08 00:21:15 +02:00
2020-06-13 06:59:18 +08:00
2020-06-13 06:59:19 +08:00
2020-06-13 06:59:19 +08:00
2020-05-29 19:40:36 +02:00
2020-05-29 19:40:36 +02:00
2020-06-26 21:47:13 +02:00
2020-06-20 23:20:27 -04:00
2020-06-13 06:59:19 +08:00
2020-07-03 23:28:26 +02:00
2020-06-18 17:11:37 -03:00
2020-07-03 00:54:20 +02:00
2020-06-18 17:11:37 -03:00
2020-06-18 17:11:37 -03:00
2020-05-31 13:13:52 +02:00
2020-07-07 18:20:39 +02:00
2020-05-23 00:26:38 +02:00
2020-07-19 10:59:43 +02:00
2020-06-22 12:20:37 +02:00
2020-05-21 12:32:15 -03:00
2020-07-16 21:49:27 -03:00
2020-07-07 04:46:51 +02:00
2020-07-16 21:49:27 -03:00
2020-07-07 04:46:51 +02:00
2020-05-31 18:31:54 +02:00
2020-07-15 05:47:14 +08:00
2020-06-10 11:31:16 +02:00
2020-05-21 12:32:15 -03:00
2020-06-04 19:22:29 +02:00
2020-06-10 12:36:44 +02:00
2020-06-27 23:31:34 +02:00
2020-06-06 00:25:00 +02:00
2020-06-10 12:36:44 +02:00
2020-06-10 12:36:44 +02:00
2020-05-22 11:16:40 -03:00
2020-07-16 21:49:27 -03:00
2020-07-16 21:49:27 -03:00
2020-07-07 04:46:51 +02:00
2020-06-25 23:36:12 -03:00
2020-07-07 04:46:51 +02:00
2020-07-10 20:27:07 +02:00
2020-07-07 04:46:51 +02:00
2020-07-07 04:46:51 +02:00
2020-07-07 04:46:51 +02:00
2020-07-07 04:46:51 +02:00
2020-06-23 21:55:40 +02:00
2020-07-04 16:27:24 +01:00
2020-05-22 14:38:57 +02:00
2020-07-07 11:03:02 +02:00
2020-07-03 23:28:26 +02:00
2020-05-22 14:38:57 +02:00
2020-06-18 17:11:37 -03:00
2020-05-22 14:38:57 +02:00
2020-07-15 05:47:14 +08:00
2020-05-21 12:32:15 -03:00
2020-06-13 06:59:19 +08:00
2020-05-21 09:31:08 +02:00
2020-07-02 17:14:31 +02:00
2020-05-22 14:38:57 +02:00
2020-07-04 17:36:19 +02:00
2020-07-08 23:09:29 +08:00
2020-07-04 17:36:19 +02:00
2020-05-21 12:32:15 -03:00
2020-05-22 14:38:57 +02:00
2020-06-18 17:11:37 -03:00
2020-06-18 17:11:37 -03:00
2020-05-20 15:47:22 +02:00
2020-05-22 14:38:57 +02:00
2020-06-14 19:17:07 +02:00
2020-07-07 04:46:51 +02:00
2020-05-21 12:32:15 -03:00
2020-05-27 21:59:51 +08:00
2020-05-25 12:46:22 -03:00
2020-06-13 06:59:18 +08:00
2020-05-27 21:59:51 +08:00
2020-06-13 06:59:18 +08:00
2020-07-07 05:07:15 +02:00
2020-05-22 14:38:57 +02:00
2020-05-25 11:59:42 +02:00
2020-07-07 04:46:51 +02:00
2020-06-15 07:19:55 +08:00
2020-06-15 07:19:55 +08:00
2020-07-09 22:18:42 +08:00
2020-07-06 13:52:34 -03:00
2020-05-25 11:59:42 +02:00
2020-07-07 05:07:15 +02:00
2020-05-22 14:38:57 +02:00
2020-06-21 11:13:29 +02:00
2020-07-02 17:18:35 +02:00
2020-06-15 03:18:11 +02:00
2020-06-08 10:51:56 +02:00
2020-06-08 10:51:56 +02:00
2020-06-08 10:51:56 +02:00
2020-06-28 21:00:52 +08:00
2020-06-28 21:00:52 +08:00
2020-07-09 20:54:11 -07:00
2020-06-08 10:51:56 +02:00
2020-06-05 18:14:17 +02:00
2020-06-06 00:38:53 +02:00
2020-05-21 12:32:15 -03:00
2020-06-14 18:20:37 +02:00
2020-06-15 04:22:28 +02:00
2020-05-22 14:38:57 +02:00
2020-07-01 00:00:51 -03:00
2020-05-21 09:31:08 +02:00
2020-06-07 01:23:40 +02:00
2020-06-30 20:35:23 +02:00
2020-06-30 20:35:23 +02:00
2020-07-19 10:59:43 +02:00
2020-05-21 12:32:15 -03:00
2020-05-21 12:32:15 -03:00
2020-07-17 18:23:45 -03:00
2020-05-22 22:16:53 +02:00
2020-05-23 20:25:08 +02:00
2020-05-21 12:32:15 -03:00
2020-05-23 20:24:37 +02:00
2020-06-18 17:11:37 -03:00
2020-05-21 12:32:15 -03:00
2020-06-22 12:20:37 +02:00
2020-06-02 19:02:12 -03:00
2020-05-22 14:38:57 +02:00
2020-07-17 15:24:56 -03:00
2020-06-19 07:14:46 +08:00
2020-06-02 19:02:12 -03:00
2020-06-02 19:02:12 -03:00
2020-06-14 20:00:02 +02:00
2020-05-21 12:32:15 -03:00
2020-07-07 18:20:34 +02:00
2020-06-14 19:17:07 +02:00
2020-06-08 00:21:15 +02:00
2020-05-21 12:32:15 -03:00
2020-07-09 20:54:11 -07:00
2020-05-25 18:07:45 +02:00
2020-05-19 21:34:04 +03:00
2020-05-27 00:19:32 +03:00
2020-06-18 17:11:37 -03:00
2020-05-22 14:38:57 +02:00
2020-07-10 20:27:07 +02:00
2020-05-22 14:38:57 +02:00
2020-07-05 19:59:49 +02:00
2020-05-27 21:59:51 +08:00
2020-06-06 00:25:00 +02:00
2020-07-01 00:24:25 -03:00
2020-05-22 14:38:57 +02:00
2020-06-11 13:49:54 +02:00
2020-05-22 14:38:57 +02:00
2020-07-07 04:46:51 +02:00
2020-05-22 14:38:57 +02:00
2020-06-14 19:17:07 +02:00
2020-05-27 21:59:51 +08:00
2020-07-09 22:18:42 +08:00
2020-06-01 07:05:32 +08:00
2020-05-26 10:23:11 +01:00
2020-06-13 06:59:19 +08:00
2020-07-19 10:59:43 +02:00
2020-06-14 21:54:40 +08:00
2020-06-13 06:59:18 +08:00
2020-07-02 17:18:55 +02:00
2020-06-22 12:19:24 +02:00
2020-05-22 14:38:57 +02:00
2020-05-19 20:09:25 +02:00
2020-05-22 14:38:57 +02:00
2020-07-01 16:10:00 +02:00
2020-07-01 16:10:00 +02:00
2020-07-01 16:10:00 +02:00
2020-07-01 16:10:00 +02:00
2020-05-22 22:23:18 +02:00
2020-06-10 12:36:44 +02:00
2020-05-22 14:38:57 +02:00
2020-05-26 10:52:12 +01:00
2020-05-26 10:52:12 +01:00
2020-05-26 10:52:12 +01:00
2020-06-02 19:02:12 -03:00
2020-07-15 05:47:14 +08:00
2020-06-07 01:23:40 +02:00
2020-05-22 14:38:57 +02:00
2020-07-03 23:28:26 +02:00
2020-06-14 18:20:37 +02:00
2020-06-06 00:25:00 +02:00
2020-07-01 11:41:35 +02:00
2020-05-22 14:38:57 +02:00
2020-06-08 20:45:56 +02:00
2020-05-30 18:02:55 +02:00
2020-07-05 19:59:49 +02:00
2020-06-25 23:36:29 -03:00
2020-05-22 14:38:57 +02:00
2020-05-21 12:32:15 -03:00
2020-05-21 12:32:15 -03:00
2020-07-07 11:03:09 +02:00
2020-07-19 10:59:43 +02:00
2020-06-14 12:26:51 +08:00
2020-07-05 23:43:45 +08:00
2020-07-05 23:43:45 +08:00
2020-05-21 12:32:15 -03:00
2020-06-03 06:57:50 +08:00
2020-05-22 14:38:57 +02:00
2020-06-13 06:59:18 +08:00
2020-05-27 21:59:51 +08:00
2020-05-27 21:59:51 +08:00
2020-05-22 22:23:18 +02:00
2020-07-02 17:14:31 +02:00
2020-06-30 11:59:54 +02:00
2020-06-14 21:54:40 +08:00
2020-06-13 06:59:19 +08:00
2020-06-11 13:49:54 +02:00
2020-06-09 18:18:11 -03:00
2020-06-14 19:17:07 +02:00
2020-07-06 18:23:50 +01:00
2020-06-13 06:59:18 +08:00
2020-05-22 14:38:57 +02:00
2020-07-10 20:27:07 +02:00
2020-05-21 12:32:15 -03:00
2020-07-07 04:46:51 +02:00
2020-05-22 14:38:57 +02:00
2020-05-21 12:32:15 -03:00
2020-06-13 06:59:19 +08:00
2020-06-28 21:00:52 +08:00
2020-05-21 12:32:15 -03:00
2020-07-16 11:25:23 -04:00
2020-06-18 17:11:37 -03:00
2020-06-18 17:11:37 -03:00
2020-06-18 17:11:37 -03:00
2020-05-21 12:32:15 -03:00
2020-05-21 12:32:15 -03:00
2020-07-07 04:46:51 +02:00
2020-07-07 04:46:51 +02:00
2020-07-07 04:46:51 +02:00
2020-07-07 04:46:51 +02:00
2020-06-18 17:11:37 -03:00
2020-06-18 17:11:37 -03:00
2020-07-19 14:38:26 +08:00
2020-06-18 17:11:37 -03:00
2020-05-27 15:34:16 +08:00
2020-07-09 20:54:11 -07:00
2020-07-09 20:54:11 -07:00
2020-07-15 05:47:14 +08:00
2020-07-07 04:46:51 +02:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-06-04 23:58:49 +02:00
2020-06-04 23:09:07 +02:00
2020-06-30 20:35:23 +02:00
2020-06-13 06:59:18 +08:00
2020-05-27 21:59:51 +08:00
2020-05-21 12:32:15 -03:00
2020-05-23 07:07:36 +02:00
2020-05-21 09:31:08 +02:00
2020-05-21 12:32:15 -03:00
2020-05-21 12:32:15 -03:00