BitTrace: if BITTRACE is > 0, record and print syntax bits used

* Bittrace decoding is ~3x slower.
* Binary is the same byte-wise if BITTRACE=0
* Example output:
=== Bit traces ===
global-header    :    174 bytes   	[ 0.69%] [count:    1850]
segments         :    246 bytes   	[ 0.98%] [count:    3072]
block-size       :    170 bytes   	[ 0.68%] [count:    1536]
pred-modes       :   3829 bytes   	[15.27%] [count:   51458]
pred-modes-uv    :    279 bytes   	[ 1.11%] [count:    2329]
coeffs           :  20370 bytes   	[81.27%] [count:  212914]
Total: 25065 bytes

Change-Id: Ie32569c4e54a7ec13264e68d2dae2ce45c8536cb
This commit is contained in:
Pascal Massimino
2019-03-12 09:48:37 +01:00
parent 067031eaed
commit fcfd9c71b4
7 changed files with 203 additions and 86 deletions

View File

@ -118,6 +118,10 @@ GROFF = /usr/bin/groff
COL = /usr/bin/col
LDFLAGS = $(EXTRA_LIBS) $(EXTRA_FLAGS) -lm
ifdef BITTRACE
CFLAGS += -DBITTRACE=$(BITTRACE)
endif
ANIM_UTIL_OBJS = \
examples/anim_util.o \