AMF icon indicating copy to clipboard operation
AMF copied to clipboard

HEVC: VCEEncoderD3D initializes HEVC wrong, causing Block Color/Motion flickering with HevcGOPSize not 0

Open Xaymar opened this issue 9 years ago • 11 comments

I've generated some files with the VCEEncoderD3D sample tool and I have to say I'm surprised at how bad the result is. There is some serious flickering going on in the color information itself, visible as blocks of various sizes flickering in and out of existence.

Here is the command line used to generate the file (played back using PlaybackHW):

VCEEncoderD3D -OUTPUT H265_265x265_Speed.h265 -RENDER DX11 -ADAPTERID 0 -CODEC HEVC -WIDTH 256 -HEIGHT 256 -FRAMES 500 -HevcQualityPreset Speed -HevcUsage TRANSCODING -HevcProfile Main -HevcProfileLevel 51 -HevcTier High -HevcRateControlMethod CBR -HevcRateControlPreAnalysisEnable false -HevcRateControlSkipFrameEnable false -HevcMinQP_I 18 -HevcMaxQP_I 51 -HevcMinQP_P 18 -HevcMaxQP_P 51 -HevcTargetBitrate 3500000 -HevcPeakBitrate 3500000 -HevcQP_I 22 -HevcQP_P 22 -HevcDeBlockingFilter true -HevcFillerDataEnable false -HevcVBVBufferSize 3500000 -HevcInitialVBVBufferFullness 64

If we compare this to a normal H264/AVC sample output at the same resolution and settings, HEVC is several times worse.

Xaymar avatar Jan 20 '17 09:01 Xaymar

I haven't used this tool at all before, but have you tried to set the "-HevcQualityPreset" to "Quality"? I personally ruined about 200GBs of movies when using ffmpeg with nvenc_h264 with the preset "superfast", and it was absolutely horrible! I'm imagining that it is something similar is happening to you in this case. Also, I can't really try it out myself because I'm on linux since 4 months back, and when trying to use DX, I get a "Kernel Panic". Good luck!

pcnorden avatar Jan 20 '17 12:01 pcnorden

There is no difference between the quality preset, all suffer from the same problem. I'd argue that Quality actually makes things worse.

Xaymar avatar Jan 20 '17 12:01 Xaymar

How does it compare to HEVC from A's convertor using MFT?

Roph avatar Jan 21 '17 22:01 Roph

@Roph I'm not sure how A's Video Converter is at all relevant here. All it does anyway is fail to either decode the h264 close-to-lossless file or encode as h265, so yeah.

Xaymar avatar Jan 23 '17 12:01 Xaymar

I meant quality wise, as with A's MFT HEVC is clearly superior to AVC at the same resolution and settings.

Roph avatar Jan 23 '17 15:01 Roph

@Roph Did you actually read what I said? It fails to encode or decode, I don't know which. All it says is "Failed (%)".

Xaymar avatar Jan 23 '17 15:01 Xaymar

Pending that A's fixed failures, MFTs provided by AMD (HEVC and AVC) should provide the same quality as AMF considering all parameters are set to their equivalents in AMF. The MFT's are just wrappers around AMF.

MikhailAMD avatar Jan 23 '17 16:01 MikhailAMD

Here is a sample file generated by the VCEEncoderD3D Tool: http://cdn.xaymar.com/private/2017/01/24/17/H265_1280x720_Quality.h265

You can either play this using PlaybackHW tool or by using ffmpeg to mux it into a compatible player format (mkv, mp4).

Xaymar avatar Jan 24 '17 17:01 Xaymar

I think the new title should better show this issue.

Xaymar avatar Jan 24 '17 23:01 Xaymar

This is caused by the VCEEncoderD3D sample not setting things up properly and trying to set things after Init that should have been set before. It does not appear when using HEVC with OBS or any other implementation.

Xaymar avatar Feb 09 '17 01:02 Xaymar

This is caused by the VCEEncoderD3D sample not setting things up properly...

@MikhailAMD So, the sample tool should be updated, yeah?

SuslikV avatar Feb 19 '17 06:02 SuslikV