[x265] Large compression loss with slices=4

John Carmack johnc at oculus.com
Thu Jun 6 23:29:14 CEST 2019


I am using "slices=4" to produce videos that I can break up and reassemble at slice boundaries for an updated version of this: https://developer.oculus.com/blog/behind-the-tech-with-john-carmack-5k-immersive-video/

It works perfectly, but encoding a video with four slices and no other changes has a huge impact on compression:

13,588,574 centerStrip-no-slices2.mp4
27,037,758 centerStrip-slices2.mp4

I would expect some impact due to not making optimal choices right at the edges, but these are sizable slices (864x1024) so I expected it to be small.
In a csv log, I see that the I frames are similarly sized, but the P and B frames on the sliced version have far more intra and far fewer inter coded blocks, which accounts for the size difference.  My guess would be that the motion estimation scan is somehow broken for slices after the first one, perhaps some kind of vertical offset not being accounted for.

Any pointers on where to look for this?

No-slices2.csv:
Encode Order, Type, POC, QP, Bits, Scenecut, I/P cost ratio, RateFactor, Latency, List 0, List 1, Intra 64x64 DC, Intra 64x64 Planar, Intra 64x64 Ang, Intra 32x32 DC, Intra 32x32 Planar, Intra 32x32 Ang, Intra 16x16 DC, Intra 16x16 Planar, Intra 16x16 Ang, Intra 8x8 DC, Intra 8x8 Planar, Intra 8x8 Ang, 4x4, Inter 64x64, Inter 64x64 (Rect), Inter 64x64 (Amp), Inter 32x32, Inter 32x32 (Rect), Inter 32x32 (Amp), Inter 16x16, Inter 16x16 (Rect), Inter 16x16 (Amp), Inter 8x8, Inter 8x8 (Rect), Inter 8x8 (Amp), Skip 64x64, Skip 32x32, Skip 16x16, Skip 8x8, Merge 64x64, Merge 32x32, Merge 16x16, Merge 8x8, Avg Luma Distortion, Avg Chroma Distortion, Avg psyEnergy, Avg Residual Energy, Min Luma Level, Max Luma Level, Avg Luma Level, Min Cb Level, Max Cb Level, Avg Cb Level, Min Cr Level, Max Cr Level, Avg Cr Level, Intra 64x64, Skip 64x64, AMP 64, Inter 64x64, Merge 64x64, Inter 64x32, Merge 64x32, Inter 32x64, Merge 32x64, Intra 32x32, Skip 32x32, AMP 32, Inter 32x32, Merge 32x32, Inter 32x16, Merge 32x16, Inter 16x32, Merge 16x32, Intra 16x16, Skip 16x16, AMP 16, Inter 16x16, Merge 16x16, Inter 16x8, Merge 16x8, Inter 8x16, Merge 8x16, Intra 8x8, Skip 8x8, AMP 8, Inter 8x8, Merge 8x8, Inter 8x4, Merge 8x4, Inter 4x8, Merge 4x8, 4x4, DecideWait (ms), Row0Wait (ms), Wall time (ms), Ref Wait Wall (ms), Total CTU time (ms),Stall Time (ms), Total frame time (ms), Avg WPP, Row Blocks
0, I-SLICE,    0, 17.73,    3182216, 0,0.00,17.087,52,  -, -, 0.00%,  0.00%,  0.00%, 0.21%,  0.32%,  0.53%, 1.84%,  1.16%,  7.19%, 9.45%,  4.44%, 44.59%,30.27%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%, 4308.89, 1724.27, 885.03, 137868.50 , 0, 255, 111.48, 9, 195, 98.20, 44, 222, 155.36, 0.00%, 0.00%,0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 75.76%, 0.00%,0.00%, 24.24%, 0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 100.00%, 0.00%,0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 100.00%, 0.00%,0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 0.00%,100.00%, 1745.0, 1.0, 1210.0, 0.0, 4603.0, 0.0, 2937.0, 4.086, 110
1, P-SLICE,    4, 21.20,      48776, 0,44.89,20.000,49, 0 , -, 0.00%,  0.00%,  0.00%, 0.00%,  0.00%,  0.00%, 0.00%,  0.00%,  0.00%, 0.03%,  0.03%,  0.03%, 0.00%,  2.40%,  0.18%,  0.09%,  3.14%,  3.30%,  0.59%,  5.98%,  3.05%,  0.99%,  7.18%,  1.36%,  0.00%,  0.00%,  1.32%,  1.29%,  0.83%, 12.20%, 30.68%, 15.56%,  9.77%, 4436.60, 1863.69, 967.68, 4740.97 , 0, 255, 111.45, 9, 195, 98.19, 44, 222, 155.37, 0.00%, 81.99%,0.62%, 6.63%, 9.52%, 0.31%, 0.31%, 0.10%, 0.52%, 0.00%, 74.48%,1.36%, 12.76%, 3.73%, 1.22%, 1.36%, 1.22%, 3.87%, 0.00%, 62.73%,3.67%, 4.70%, 17.55%, 1.66%, 2.35%, 2.47%, 4.87%, 0.48%, 55.13%,0.00%, 13.94%, 23.40%, 0.80%, 1.44%, 1.44%, 3.37%,0.00%, 1838.0, 41.0, 1466.0, 1034.0, 3180.0, 2.0, 3287.0, 2.589, 85

Slices2.csv:
Encode Order, Type, POC, QP, Bits, Scenecut, I/P cost ratio, RateFactor, Latency, List 0, List 1, Intra 64x64 DC, Intra 64x64 Planar, Intra 64x64 Ang, Intra 32x32 DC, Intra 32x32 Planar, Intra 32x32 Ang, Intra 16x16 DC, Intra 16x16 Planar, Intra 16x16 Ang, Intra 8x8 DC, Intra 8x8 Planar, Intra 8x8 Ang, 4x4, Inter 64x64, Inter 64x64 (Rect), Inter 64x64 (Amp), Inter 32x32, Inter 32x32 (Rect), Inter 32x32 (Amp), Inter 16x16, Inter 16x16 (Rect), Inter 16x16 (Amp), Inter 8x8, Inter 8x8 (Rect), Inter 8x8 (Amp), Skip 64x64, Skip 32x32, Skip 16x16, Skip 8x8, Merge 64x64, Merge 32x32, Merge 16x16, Merge 8x8, Avg Luma Distortion, Avg Chroma Distortion, Avg psyEnergy, Avg Residual Energy, Min Luma Level, Max Luma Level, Avg Luma Level, Min Cb Level, Max Cb Level, Avg Cb Level, Min Cr Level, Max Cr Level, Avg Cr Level, Intra 64x64, Skip 64x64, AMP 64, Inter 64x64, Merge 64x64, Inter 64x32, Merge 64x32, Inter 32x64, Merge 32x64, Intra 32x32, Skip 32x32, AMP 32, Inter 32x32, Merge 32x32, Inter 32x16, Merge 32x16, Inter 16x32, Merge 16x32, Intra 16x16, Skip 16x16, AMP 16, Inter 16x16, Merge 16x16, Inter 16x8, Merge 16x8, Inter 8x16, Merge 8x16, Intra 8x8, Skip 8x8, AMP 8, Inter 8x8, Merge 8x8, Inter 8x4, Merge 8x4, Inter 4x8, Merge 4x8, 4x4, DecideWait (ms), Row0Wait (ms), Wall time (ms), Ref Wait Wall (ms), Total CTU time (ms),Stall Time (ms), Total frame time (ms), Avg WPP, Row Blocks
0, I-SLICE,    0, 17.73,    3179032, 0,0.00,17.087,52,  -, -, 0.00%,  0.00%,  0.00%, 0.22%,  0.34%,  0.54%, 1.96%,  1.29%,  7.51%, 9.33%,  4.65%, 44.15%,30.02%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%,  0.00%, 4311.44, 1722.78, 888.27, 139692.86 , 0, 255, 111.48, 9, 195, 98.20, 44, 222, 155.36, 0.00%, 0.00%,0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 76.12%, 0.00%,0.00%, 23.88%, 0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 100.00%, 0.00%,0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 100.00%, 0.00%,0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 0.00%, 0.00%,100.00%, 1860.0, 0.0, 950.0, 0.0, 5293.0, 0.0, 2792.0, 5.885, 4
1, P-SLICE,    4, 21.97,     329504, 0,44.89,20.000,49, 0 , -, 0.00%,  0.00%,  0.00%, 0.44%,  0.25%,  0.44%, 0.94%,  0.84%,  4.04%, 5.89%,  3.39%, 26.48%,11.59%,  0.85%,  0.15%,  0.06%,  1.23%,  0.93%,  0.29%,  3.01%,  1.47%,  0.56%,  6.43%,  1.17%,  0.00%,  0.00%,  0.62%,  0.66%,  0.60%,  5.58%, 11.89%,  5.96%,  4.24%, 4449.16, 1860.25, 944.05, 15252.19 , 0, 255, 111.45, 9, 195, 98.19, 44, 222, 155.37, 0.00%, 84.07%,0.88%, 6.19%, 6.64%, 0.44%, 0.22%, 0.33%, 1.22%, 6.29%, 69.61%,1.63%, 13.56%, 3.76%, 1.27%, 0.78%, 1.02%, 2.08%, 33.28%, 37.90%,3.19%, 7.31%, 9.92%, 1.51%, 1.60%, 2.14%, 3.15%, 74.17%, 10.05%,0.00%, 9.32%, 4.02%, 0.79%, 0.27%, 0.78%, 0.59%,100.00%, 1952.0, 334.0, 1250.0, 481.0, 3988.0, 0.0, 3477.0, 5.487, 53



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20190606/bb655751/attachment-0001.html>


More information about the x265-devel mailing list