View Single Post
Old 16th May 2019, 17:27   #6822  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Quote:
Originally Posted by StvG View Post
Last time I tested avs input with this patch was quite slower than avs2yuv+x265.
Don't use 32-bit builds of x265 to encode high bit depth. They have no asm.

Proof:
Code:
J:\>x265 --preset ultrafast --crf 18 -o test-direct.mkv testavi.avs
lavf [info]:
 Format    : avisynth
 Codec     : rawvideo ( raw video )
 PixFmt    : yuv422p
 Framerate : 24000/1001
 Timebase  : 1001/24000
 Duration  : 0:00:10
lavf [info]: 1920x1080 fps 24000/1001 i422p8 frames 0 - 239 of 240
x265 [info]: Using preset ultrafast & tune none
mkv  [info]: output file: test-direct.mkv
x265 [info]: HEVC encoder version 2.9+2-7e978ed93d608697
x265 [info]: build info [Windows][GCC 8.2.0][64 bit]  8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x265 [info]: Main 4:2:2 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 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 23 / 250 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=6 deblock
x265 [info]: frame I:      1, Avg QP:22.97  kb/s: 119.50
x265 [info]: frame P:     60, Avg QP:22.41  kb/s: 5591.55
x265 [info]: frame B:    179, Avg QP:25.33  kb/s: 1784.29
x265 [info]: consecutive B-frames: 1.6% 0.0% 1.6% 96.7%

encoded 240 frames in 16.02s (14.99 fps), 2729.17 kb/s, Avg QP:24.59

J:\>avs2yuv testavi.avs -o - | x265 --y4m --preset ultrafast --crf 18 -o test-pipe.mkv -
testavi.avs: 1920x1080, 24000/1001 fps, 240 frames
converting input clip to YV12
y4m  [info]: 1920x1080 fps 24000/1001 i420p8 unknown frame count
x265 [info]: Using preset ultrafast & tune none
mkv  [info]: output file: test-pipe.mkv
x265 [info]: HEVC encoder version 2.9+2-7e978ed93d608697
x265 [info]: build info [Windows][GCC 8.2.0][64 bit]  8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x265 [info]: Main 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 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 23 / 250 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=6 deblock
x265 [info]: frame I:      1, Avg QP:22.97  kb/s: 116.81
x265 [info]: frame P:     60, Avg QP:22.44  kb/s: 4963.89
x265 [info]: frame B:    179, Avg QP:25.33  kb/s: 1607.71
x265 [info]: consecutive B-frames: 1.6% 0.0% 1.6% 96.7%

encoded 240 frames in 14.40s (16.67 fps), 2440.54 kb/s, Avg QP:24.60

J:\>
Summary:
Direct input of testavi.avs to 64-bit x265 with LAVF input: 14.99 fps
Piping from 32-bit avs2yuv bm2 to 64-bit x265: 16.67 fps

That's not 'quite slower', it's within the margin of error (especially considering the overhead of having the libav* libraries loaded in the x265 process). Re-running the test with the script converting to 4:2:0 before handing it to x265 or avs2yuv bm3 flipped the values around: direct use was faster than piping:

Code:
J:\>x265 --preset ultrafast --crf 18 -o testdirect.mkv testavi.avs
lavf [info]:
 Format    : avisynth
 Codec     : rawvideo ( raw video )
 PixFmt    : yuv420p
 Framerate : 24000/1001
 Timebase  : 1001/24000
 Duration  : 0:00:10
lavf [info]: 1920x1080 fps 24000/1001 i420p8 frames 0 - 239 of 240
x265 [info]: Using preset ultrafast & tune none
mkv  [info]: output file: testdirect.mkv
x265 [info]: HEVC encoder version 2.9+2-7e978ed93d608697
x265 [info]: build info [Windows][GCC 8.2.0][64 bit]  8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x265 [info]: Main 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 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 23 / 250 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=6 deblock
x265 [info]: frame I:      1, Avg QP:22.97  kb/s: 116.81
x265 [info]: frame P:     60, Avg QP:22.44  kb/s: 4963.89
x265 [info]: frame B:    179, Avg QP:25.33  kb/s: 1607.71
x265 [info]: consecutive B-frames: 1.6% 0.0% 1.6% 96.7%

encoded 240 frames in 14.11s (17.01 fps), 2440.54 kb/s, Avg QP:24.60

J:\>avs2yuv testavi.avs -o - | x265 --y4m --preset ultrafast --crf 18 -o testdirect.mkv -
testavi.avs: 1920x1080, 24000/1001 fps, 240 frames
y4m  [info]: 1920x1080 fps 24000/1001 i420p8 unknown frame count
x265 [info]: Using preset ultrafast & tune none
mkv  [info]: output file: testdirect.mkv
x265 [info]: HEVC encoder version 2.9+2-7e978ed93d608697
x265 [info]: build info [Windows][GCC 8.2.0][64 bit]  8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x265 [info]: Main 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 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 23 / 250 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=6 deblock
x265 [info]: frame I:      1, Avg QP:22.97  kb/s: 116.81
x265 [info]: frame P:     60, Avg QP:22.44  kb/s: 4963.89
x265 [info]: frame B:    179, Avg QP:25.33  kb/s: 1607.71
x265 [info]: consecutive B-frames: 1.6% 0.0% 1.6% 96.7%

encoded 240 frames in 14.35s (16.72 fps), 2440.54 kb/s, Avg QP:24.60

J:\>
Direct: 17.01 fps
Piped: 16.72 fps

The DJATOM fork of avs2yuv is, amusingly, only relevant for 64-bit tests. The 32-bit build would be comparing apples to oranges.

Last edited by qyot27; 16th May 2019 at 17:36.
qyot27 is offline   Reply With Quote