Log in

View Full Version : "Visual-lossless" comparison x264 x265


zub35
19th March 2018, 19:09
"Visual-lossless" comparison x264 x265 8bit

x265 2.7+14 vs x264 r2851
source: crowd_run_2160p50.y4m (60 frames) + park_joy_2160p50.y4m (60 frames) + in_to_tree_2160p50.y4m (60 frames)
a=rawsourceplus("crowd_run_2160p50.y4m").trim(1,60)
b=rawsourceplus("park_joy_2160p50.y4m").trim(1,60)
c=rawsourceplus("in_to_tree_2160p50.y4m").trim(1,60)
a+b+c
ConvertToRGB(chromaresample="spline64")
Spline64Resize(1920,1080)
ConvertToYV12(chromaresample="spline64")
AssumeFPS(30)

avs2yuv64.exe raw.avs -o raw_1080p30.y4m

x265 --preset placebo --bitrate 20000 --merange 57 --subme 7 --no-sao --no-strong-intra-smoothing --aq-mode 3 --aq-motion --psy-rd 4 --psy-rdoq 10 --pass 1/2 -o 265.h265 raw_1080p30.y4m
x264 --level 4.1 --preset placebo --bitrate 20000 --me umh --bframes 8 --psy-rd 1.1:0.20 --aq-mode 3 --pass 1/2 -o 264.h264 raw_1080p30_2.y4m

Encode files: https://yadi.sk/d/tr0z84A63TTY5b

apng (1 frame - source, 2 frame - encode)
55 frame - 264 (http://images2.imagebam.com/4e/ea/fd/3a3543784705413.png) / 265 (http://images2.imagebam.com/c9/f0/23/b4c59e784705453.png)
105 frame - 264 (http://images2.imagebam.com/89/75/1d/ebd724784705423.png) / 265 (http://images2.imagebam.com/50/c1/17/2bd1b6784705463.png)
165 frame - 264 (http://images2.imagebam.com/c4/32/d3/7b8475784705443.png) / 265 (http://images2.imagebam.com/2f/9f/bd/499634784705473.png)

full size
55 frame - source (http://images2.imagebam.com/ba/78/82/749e59784719593.png) / 264 (http://images2.imagebam.com/22/7c/18/e82a54784719663.png) / 265 (http://images2.imagebam.com/c2/7a/6b/f0606b784719763.png)
105 frame - source (http://images2.imagebam.com/93/ae/a0/788390784719623.png) / 264 (http://images2.imagebam.com/15/52/8a/77a8df784719683.png) / 265 (http://images2.imagebam.com/69/b7/30/a0829a784719783.png)
165 frame - source (http://images2.imagebam.com/77/4a/e2/c9f884784719643.png) / 264 (http://images2.imagebam.com/08/25/44/d16896784719713.png) / 265 (http://images2.imagebam.com/02/5a/00/a53186784719803.png)

Metric:
SSIM(Y) (Luma) http://images2.imagebam.com/8b/bb/2b/984391784719843.png
SSIM(U+V)/2 (Chroma) http://images2.imagebam.com/28/5e/d6/0e2093786605333.png
MSU Blurring(Y) (Luma) http://images2.imagebam.com/90/36/df/ef78db786522933.png
MSU Blurring(U+V)/2 (Chroma) http://images2.imagebam.com/cf/dd/35/1eba68786522943.png

The difference between the AVG values of x265 and x264:
ssim: Y~1%, UV~2%
blur: Y~55%, UV~98% (!) I. e., the SSIM metric is easy to cheat by blur and for this, an additional blur test is needed.

no-sao and psy the flags which made it possible to get rid of the blur.
But when you use them, the probability of artifacts increases dramatically, even at such high bitrates ;( (105 frame - wood, 165 frame - sky)

Gser
19th March 2018, 22:32
I'm still not quite sold on --aq-mode 3, I use 1 on both codecs. And using negative deblock values might decrease some blur.

zub35
20th March 2018, 02:50
Gser aq3 and deblock 0:0 because the resulting quantifier values for both IPB codecs are x265(x264) - I:19.96(22.20) P:23.72(27.03) B:28.25(29.90) Avg:27.18(29.19)
With such QP values, and sao disabled, visual quality is at the edge, not to be completely in the artifacts (although they and so there is)

p.s. This is simple resize. If you use ResizeShader-SSIM, alas, or extremely strong artifacts, or sao-on=blur or 30+ Mbps (But at the same time, x264 can compress and at 20Mbps without blur)