multi-pass-opt-distortion + CTU 32 + VBV = blocking artifacts

Issue #325 resolved
Sartre created an issue

I did an encode last night which included the settings in the title and it had loads of blocked/artifacted frames. After pruning my original command lines, I narrowed it down to the combination of these settings :

--multi-pass-opt-distortion --CTU 32 --vbv-maxrate 6000 --vbv-bufsize 6000 (size didn't matter)

I also tried 2.3+17 and a GCC compiled 2.3+18 with the same results. Disabling either of the settings got rid of the blocking artifacts.

Command line:

avs4x26x --x26x-binary "C:\Program Files\Video Programs\x264\x265.exe" --output NUL --pass 1 --no-slow-firstpass --bitrate 3000 --multi-pass-opt-distortion --ctu 32 --vbv-maxrate 6000 --vbv-bufsize 6000 --fps 24 --input-res 1920x1080 --input-csp i420 "e:\input.avs" && avs4x26x --output e:\indo3000.hevc --preset medium --pass 2 --bitrate 3000 --multi-pass-opt-distortion --ctu 32 --vbv-maxrate 6000 --vbv-bufsize 6000 --fps 24 --input-res 1920x1080 --input-csp i420 "e:\input.avs" && Pause

avs file just has: FFmpegSource2("e:\indo.mkv")

Screenshot showing blocking http://i.imgur.com/lgzHyH6.png

Source video https://www.mediafire.com/?9ohavr2z2hwg89y

Encoded video https://www.mediafire.com/?cuhfeeh6lkecss2

Here is a log of the sample clip encode:

#!
avs [info]: AviSynth 2.60 MT min mod, rean build 2: Feb 11 2016 [22:12:07]
avs [info]: Video colorspace: YV12
avs [info]: Video resolution: 1920x1080
avs [info]: Video framerate: 24/1
avs [info]: Video framecount: 479
avs4x26x [info]: "x265" - --output e:\indo3000.hevc --preset medium --pass 2 --bitrate 3000 --multi-pass-opt-distortion --ctu 32 --vbv-maxrate 6000 --vbv-bufsize 6000 --fps 24 --input-res 1920x1080 --input-csp i420  --frames 479
yuv  [info]: 1920x1080 fps 24000/1000 i420p8 unknown frame count
raw  [info]: output file: e:\indo3000.hevc
x265 [info]: HEVC encoder version 2.3+18-88fd9082764c
x265 [info]: build info [Windows][GCC 5.3.1][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [info]: Main 10 profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 4 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 2 / wpp(34 rows)
x265 [info]: Coding QT: max CU size, min CU size : 32 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 24 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : ABR-3000 kbps / 0.60
x265 [info]: VBV/HRD buffer / max-rate / init    : 6000 / 6000 / 0.900
x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp strong-intra-smoothing
x265 [info]: tools: lslices=6 deblock sao stats-read
x265 [info]: frame I:      2, Avg QP:22.26  kb/s: 17902.46
x265 [info]: frame P:    124, Avg QP:26.78  kb/s: 5950.18
x265 [info]: frame B:    353, Avg QP:31.07  kb/s: 1808.33
x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x265 [info]: consecutive B-frames: 1.6% 7.1% 7.1% 77.8% 6.3%
encoded 479 frames in 69.54s (6.89 fps), 2947.74 kb/s, Avg QP:29.93

Comments (6)

  1. Pradeep Ramachandran Account Deactivated

    When you say disabling either of the settings, do you mean disabling --ctu 32 or --multi-pass-opt-distortion?

  2. Log in to comment