OpenVisualCloud / SVT-HEVC

SVT HEVC encoder. Scalable Video Technology (SVT) is a software-based video coding technology that is highly optimized for Intel® Xeon® processors. Using the open source SVT-HEVC encoder, it is possible to spread video encoding processing across multiple Intel® Xeon® processors to achieve a real advantage of processing efficiency.
Other
510 stars 170 forks source link

Banding artifacts #158

Open Ilya87 opened 5 years ago

Ilya87 commented 5 years ago

Os - Antergos x86_64, SVT-HEVC latest from git https://yadi.sk/i/qBkjd3TzJ_yBQQ - original h.264 file from blu-ray (was converted to YUV) https://yadi.sk/d/K6LBH3HdDVF6zQ - encoded version

Encoding options are: -w 1920 -h 1080 -tune 1 -intra-period 239 -rc 0 -profile 2 -fps-num 24 -fps-denom 1 -encMode 3 -lad 49 -q 15 -n 751 -b out.hevc

Example screenshots (artifacts on faces, eyes): vlcsnap-2019-03-25-1 vlcsnap-2019-03-25-2 vlcsnap-2019-03-25-3

1480c1 commented 5 years ago

Good taste. However, the ss are so dark, that it's so hard to see the banding. Also, why the ? after Antergos x86_64?

Ilya87 commented 5 years ago

@1480c1 ? is a typo (corrected in post), comma should be used. And not, when you'll see screenshots fullscreen using 24" monitor artifacts are clearly seen, moreover this screenshots are from still scene (and you'll see artifacts for seconds), moreover x264 doesn't produce such artifacts.

1480c1 commented 5 years ago

That is true, I saw it when I zoomed in.

tianjunwork commented 5 years ago

@Ilya87 yes, I can see the artifacts on the face. 6.1MBx8/(751/24) = about 1.6Mbps which is not very high for 1080p. What is the bitrate of x264 bitstream?

Ilya87 commented 5 years ago

@tianjunwork, yes, I'm sorry - at this bitrate x264 also provides comparable banding artifacts, BUT at comparable bitrate x264 is better x264 veryslow_qp15_bitrate_3549 https://yadi.sk/i/uBj5eDI_m7-Pcw SVT-HEVC -q12 result bitrate is 3108 https://yadi.sk/i/gFZWSRU0kXDZPg Banding artifacts are still the problem.

Ilya87 commented 5 years ago

Almost doubled bitrate - same artifacts.

svt_q12_11 3 svt_q12_24 5 svt_q12_28 5

Ilya87 commented 5 years ago

Compare with x264 veryslow -crf 16.6 (bitrate is 3088) (yes, I know crf mode for SVT-HEVC isn't yet implemented) https://yadi.sk/i/2Ow-PxJZdqcmUg Comparable encoding speed, same bitrate, banding artifacts are much less.

tianjunwork commented 5 years ago

What is the tune mode used by x264? Could you try -tune 0/2 with SVT?

Ilya87 commented 5 years ago

@tianjunwork, for x264 I used ffmpeg with -c:v libx264 -preset veryslow -qp 15. No additional options. For crf mode -c:v libx264 -preset veryslow -crf 16.6 @tianjunwork, you can test all options you wish if download the sample from the bugreport (1 message).

tianjunwork commented 5 years ago

I tried with different tune mode(all other configs are the same as yours), tune0 is slightly better for banding artifacts. I took the snapshot from media analyzer tool. All of the tune modes are not as obvious as viewed in VLC. This frame is the 263th counting from 0. tune0 tune0_m3 tune1 tune1_m3 tune2 tune2_m3

Ilya87 commented 5 years ago

@tianjunwork, such clearly seen artifacts as I checked have divx265, x265, turing, SVT-HEVC encoders (there is open issue about banding in x265 bug tracker). While x264 has much less banding artifacts. So, my conclusion is that all HEVC standard encoders can't encode without such artifacts by design. But it's only my not professional opinion. If you wish, I can upload encoded materials (encoders mentioned above, same sample as here) with settings description, VMAF values, bitrates.

tianjunwork commented 5 years ago

Hevc introduced SAO filter applied after the standard deblocking filter; it’s designed to increase picture quality and reduce banding and ringing artifacts at some cost of encoding speed. Generally speaking, hevc should perform better than avc. I think SVT has room to further reduce banding artifacts. Please do upload your material:) which will help us debugging later. Thanks! I will mark this issue as a low priority task based on our current resources.

Ilya87 commented 5 years ago

https://yadi.sk/d/KizxwX0-Tu-WRg - encoded files with results in ods. @tianjunwork, SAO filter doesn't significantly affect to banding artifacts. You can try x265 with no-sao option. Generally speaking, HEVC significantly outperforms AVC only on low bitrate (if encoding speed is at the same level at least).

tianjunwork commented 5 years ago

@Ilya87 Thx for the files. You can also turn off SAO for SVT. For all the encoding tools, trade off between video quality and speed has to be made. With SAO turned on, in order not to affect speed so much, parameters of SAO is tuned for each every encoder. So you observe the difference among each encoder output.

Ilya87 commented 5 years ago

@tianjunwork, the problem is not in SAO turned on or off (that doesn't affect much), but in the same banding artifacts of all HEVC encoders for high quality encodes. It can't be a coincidence.