出于没人给direct264编译第三方版本(主要是没patch),故自己决定动手,并打算长期更新(只要direct264在更新)。
编译环境:
win7 x86 + msys 1.0.17.1
mingw-gcc 4.6.0
yasm 1.1.0
Patches:
01. Film Grain Optimization (#1)
02. Fade Compensation (#2)
03. Remove stats before renaming
04. Auto VBV Settings
05. Force Level
06. Automatically Level
07. Filter: hqdn3d/pad/vflip/yadif
08. Logger
09. Encode Time
10. Cosmetic (#3)
#1: help里额外加了需要subme>=7的提示
#2: 额外使用x264_clip3ff函数强制限制fade-compensate的参数范围为0.0-1.0, help添加对应信息
#3: crf显示的有效小数位被我改为2位
其他说明:
1) direct264目前内置GPAC,与l-smash互斥,故不能打此补丁,所以音频建议用(dshow2wav+音频编码器+)其它混流器处理(如roozhou编译的ffmpeg)
2) MixAQ/OreAQ有可能对x264引起问题,再加上direct264本来与官方x264差别较大,故也不能打这些补丁
Build info:
Platform: X86
System: WINDOWS
asm: yes
avs: yes
lavf: no
ffms: no
gpac: internal
gpl: yes
thread: win32
filters: resize crop select_every hqdn3d pad vflip yadif
debug: no
gprof: no
LTO: no
PIC: no
shared: no
visualize: no
bit depth: 8
说明:取消了lavf和ffms. ffms在direct264里应该不能用;lavf的优势是处理图片序列,所以取消了,这样x264能小不少;gcc换komisar除错的4.6.0 release再次对比了下LTO对x264的编码速度影响,多次测试发现依然不如不带LTO的,故不开启这个开关
gcc CFLAGS相关开关:
-Wshadow -Ofast -Wall -I. -march=#4 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -fno-zero-initialized-in-bss
#4: 本人编译时提供了3个版本的x264, generic为i686, coreix为corei7, k10为amdfam10, 当然后两者我没法做fprofiled
另:make fprofiled时会自动在合适的地方加上-fprofile-generate和-fprofile-use
make fprofiled时的Makefile改动
OPT0 = --crf 30 -b1 -m1 -r1 --me dia --no-cabac --direct temporal --tune ssim --ssim --no-weightb --weightp 0 --b-pyramid 0 --vf resize:640,360,,,,lanczos/pad:0,60,0,60
ifeq ($(MP4),yes)
OPT0 += -o tmpout.mp4
endif
OPT1 = --crf 16 -b2 -m3 -i1 --no-8x8dct --nr 100 --no-dct-decimate -t0 --rc-lookahead 0 --slice-max-mbs 50 --weightp 1 --b-pyramid 1 -I infinite --fade-compensate 0.5
OPT2 = --crf 26 -b4 -m5 -r2 --me umh --merange 64 --cqm jvt --tune psnr --psnr --no-mixed-refs --b-adapt 2 --slice-max-size 1500 --weightp 1 --b-pyramid 1 --vf hqdn3d
OPT3 = --crf 18 --b-adapt 0 -m9 -r5 --me umh -A all --direct auto --no-fast-pskip --no-mbtree --weightp 2 --fgo 10 --vf crop:16,16,16,16
OPT4 = --crf 22 -b4 -r4 --me esa --merange 12 -t2 -A all --psy-rd 1.0:1.0 --slices 4 --weightp 2
OPT5 = --frames 60 --crf 24 -m10 --me tesa -t2 -o tmpout.mkv
OPT6 = --frames 80 -q0 -m9 -r2 -Aall --direct none
OPT7 = --frames 100 -q0 -m2 -r1 -t0 --no-cabac
$(OPT$I) --threads 1
编译环境:
win7 x86 + msys 1.0.17.1
mingw-gcc 4.6.0
yasm 1.1.0
Patches:
01. Film Grain Optimization (#1)
02. Fade Compensation (#2)
03. Remove stats before renaming
04. Auto VBV Settings
05. Force Level
06. Automatically Level
07. Filter: hqdn3d/pad/vflip/yadif
08. Logger
09. Encode Time
10. Cosmetic (#3)
#1: help里额外加了需要subme>=7的提示
#2: 额外使用x264_clip3ff函数强制限制fade-compensate的参数范围为0.0-1.0, help添加对应信息
#3: crf显示的有效小数位被我改为2位
其他说明:
1) direct264目前内置GPAC,与l-smash互斥,故不能打此补丁,所以音频建议用(dshow2wav+音频编码器+)其它混流器处理(如roozhou编译的ffmpeg)
2) MixAQ/OreAQ有可能对x264引起问题,再加上direct264本来与官方x264差别较大,故也不能打这些补丁
Build info:
Platform: X86
System: WINDOWS
asm: yes
avs: yes
lavf: no
ffms: no
gpac: internal
gpl: yes
thread: win32
filters: resize crop select_every hqdn3d pad vflip yadif
debug: no
gprof: no
LTO: no
PIC: no
shared: no
visualize: no
bit depth: 8
说明:取消了lavf和ffms. ffms在direct264里应该不能用;lavf的优势是处理图片序列,所以取消了,这样x264能小不少;gcc换komisar除错的4.6.0 release再次对比了下LTO对x264的编码速度影响,多次测试发现依然不如不带LTO的,故不开启这个开关
gcc CFLAGS相关开关:
-Wshadow -Ofast -Wall -I. -march=#4 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -fno-zero-initialized-in-bss
#4: 本人编译时提供了3个版本的x264, generic为i686, coreix为corei7, k10为amdfam10, 当然后两者我没法做fprofiled
另:make fprofiled时会自动在合适的地方加上-fprofile-generate和-fprofile-use
make fprofiled时的Makefile改动
OPT0 = --crf 30 -b1 -m1 -r1 --me dia --no-cabac --direct temporal --tune ssim --ssim --no-weightb --weightp 0 --b-pyramid 0 --vf resize:640,360,,,,lanczos/pad:0,60,0,60
ifeq ($(MP4),yes)
OPT0 += -o tmpout.mp4
endif
OPT1 = --crf 16 -b2 -m3 -i1 --no-8x8dct --nr 100 --no-dct-decimate -t0 --rc-lookahead 0 --slice-max-mbs 50 --weightp 1 --b-pyramid 1 -I infinite --fade-compensate 0.5
OPT2 = --crf 26 -b4 -m5 -r2 --me umh --merange 64 --cqm jvt --tune psnr --psnr --no-mixed-refs --b-adapt 2 --slice-max-size 1500 --weightp 1 --b-pyramid 1 --vf hqdn3d
OPT3 = --crf 18 --b-adapt 0 -m9 -r5 --me umh -A all --direct auto --no-fast-pskip --no-mbtree --weightp 2 --fgo 10 --vf crop:16,16,16,16
OPT4 = --crf 22 -b4 -r4 --me esa --merange 12 -t2 -A all --psy-rd 1.0:1.0 --slices 4 --weightp 2
OPT5 = --frames 60 --crf 24 -m10 --me tesa -t2 -o tmpout.mkv
OPT6 = --frames 80 -q0 -m9 -r2 -Aall --direct none
OPT7 = --frames 100 -q0 -m2 -r1 -t0 --no-cabac
$(OPT$I) --threads 1