OPT0 = $(OPTS) --crf 30 -b1 -m1 -r1 --me dia --no-cabac --pre-scenecut --direct temporal --no-ssim --no-psnr OPT1 = $(OPTS) --crf 16 -b2 -m3 -r3 --me hex -8 --direct spatial --no-dct-decimate OPT2 = $(OPTS) --crf 26 -b2 -m5 -r2 --me hex -8 -w --cqm jvt --nr 100 OPT3 = $(OPTS) --crf 18 -b3 -m9 -r5 --me umh -8 -t1 -A all --mixed-refs -w --b-pyramid --direct auto --no-fast-pskip OPT4 = $(OPTS) --crf 22 -b3 -m7 -r4 --me esa -8 -t2 -A all --mixed-refs OPT5 = $(OPTS) --frames 50 --crf 24 -b3 -m9 -r3 --me tesa -8 -t1 --mixed-refs OPT6 = $(OPTS) --frames 50 -q0 -m9 -r2 --me hex -Aall OPT7 = $(OPTS) --frames 50 -q0 -m2 -r1 --me hex --no-cabac OPTCACHE= $(OPTS) --crf 20 -m0 -r1 --me dia -Anone --no-cabac --no-ssim --no-psnr --direct none -t0 -b0 --b-adapt 0 --scenecut -1 ext=_bench.log avs_sup=`$1 --longhelp 2>&1 | grep "compiled with AVIS support (yes)" | wc -l` gpac_sup=`$1 --longhelp 2>&1 | grep "MP4 if compiled with GPAC support (yes)" | wc -l` pthread_sup=`$1 $2 $(OPTCACHE) --frames 1 -o NUL --threads 2 2>&1 | grep "not compiled with pthread support\!" | wc -l` zone_sup=`$1 $2 $(OPTCACHE) --frames 2 --zones 0,0,me=umh/1,1,me=hex -o NUL 2>&1 | grep "x264_encoder_open failed" | wc -l` run: ifeq ($(VIDS),) @echo need some videos to bench on exit endif ifeq ($(BINS),) @echo need some x264 binaries to bench on exit endif @$(foreach BIN, $(BINS), $(BIN) --version > $(BIN)$(ext);\ echo GPAC support\=$(call gpac_sup,$(BIN)) >> $(BIN)$(ext);\ echo AVS support\=$(call avs_sup,$(BIN)) >> $(BIN)$(ext);\ echo NO Pthreads support\=$(call pthread_sup,$(BIN),$(word 1, $(VIDS))) >> $(BIN)$(ext);\ echo NO zones \> 1 support\=$(call zone_sup,$(BIN),$(word 1, $(VIDS))) >> $(BIN)$(ext);\ echo >> $(BIN)$(ext);) @$(foreach V, $(VIDS), echo caching video $(V); $(word 1, $(BINS)) $(OPTCACHE) $(V) -o NUL --progress --quiet --threads auto;\ $(foreach I, 0 1 2 3 4 5 6 7, $(foreach BIN, $(BINS), echo VID=$(V) >> $(BIN)$(ext);\ echo $(OPT$I) >> $(BIN)_bench.log; $(BIN) $(OPT$I) $(V) -o NUL 2>&1 | tee -a $(BIN)$(ext) ;)))