GPUOpen-LibrariesAndSDKs / AMF

The Advanced Media Framework (AMF) SDK provides developers with optimal access to AMD devices for multimedia processing
Other
596 stars 148 forks source link

[Question]: how to activate or enable Film Grain ?! #419

Closed amdvce closed 8 months ago

amdvce commented 11 months ago

simple question: how can i use Film Grain on videos for quality ! i don't want to disable or reduce the film grain or noise, i want to enable it, what are the setting how can i achieve that ?!

i am very new on amd igpu, on intel igpu i could enable Film Grain, Sharpening with great quality and LA-ICQ or ICQ was awesome, but i sold it and moved to AMD now and video encoding are just MAD. I noticed that and i did some homework as i updated VCEEnc.x64 to latest FFmpeg 6.0 snapshot sep-2023 + amd amf 1.3.40. I build up amd amf and use transcodehw.exe. I tested and retested lost my nerves of steel, and got nothing equal to intel film grain or sharpening. Nothing at all.

I digged some more and found out that amd started to support some functions after 2-3 years since the igpu or gpu released and that was/is laughable and just flat sad.

a. original source - has film grain and quality a  original source - has film grain and quality

_b. vceencx64 v8.16 custom + ffmpeg v6.0 build 24-sept-2023 + amd amf v1.4.30 b  vceenc_x64 v8 16 custom + ffmpeg v6 0 build 24-sept-2023 + amd amf v1 4 30

c. info c  info

Again no matter what i use AMD AMF TranscodeHW.exe or FFmpeg 6.0 or VCEEnc.x64 the result came the same no whatsoever Film Grain or Sharpening. I want Film Grain or Sharpening enabled for these –codec hevc -HevcUsage highquality -HevcDeBlockingFilter false -HevcEnablePreAnalysis true -HevcQualityPreset quality

On ffmpeg is hard to tell just way too many settings, i am still looking into it as i want Film Grain or Sharpening for -hwaccel d3d11va -hwaccel_output_format d3d11 -c:v hevc_amf -usage high_quality -quality quality -preanalysis true -rc hqcbr

on vceenc.x64 the same.

no matter what i try i just can't enable the Film Grain or Sharpening.

What is even more funny is the the DVR.exe can do an amazing job as i patched the source code and now is doing HEVC recording and i only copy the DVR.exe into's "c:\Program Files\AMD\CNext\CNext\" and voila i can happy record in HEVC and not AVC. And therefor i erased, deleted yes OBS since OBS is bad as is using way,way to high cpu and igpu for a simple recording for the same hevc where the AMD AMF single file DVR.exe (patched by me for HEVC rec) is using entirely only the amd igpu's Video Codec 0 and the CPU is always at 2 % (two percent), amazing just simply amazing. And now i wonder why this amazing tiny little file "DVR.exe" is not in AMD CNEXT SOFTWARE ?!?!?!?!?!?!?! to be used with CNEXT ffmpeg files !

Returning to my problem about enable Film Grain or Sharpening on AMD igpu, how can i do that what is the magic ?! I AM DESPERATE !

Some other thing how can i tweak without using ghidra the video profile setting of the file "atiumd6a.dll", since with the latest drivers i lost my colors entirely and now look washed for my high dpi ips with 0 (zero) PWM (pulse width modulation) screen.

New drivers ! a  culori drivere noi de cacat

Old but good drivers: a  culori drivere vechi cu fisierul - atiumd6a dll

New drivers ! b  culori drivere noi de cacat

Old but good drivers: b  culori drivere vechi cu fisierul - atiumd6a dll

People people from AMD make me not having buyers remorse and make me recommended AMD to other people too since all of my friends have Intel.

Time is critical !

amdvce commented 11 months ago

clipboard_(25-Sep-23 _ 16_53_47)

rhutsAMD commented 11 months ago

Thanks! We are grateful for your liking of the DVR sample and performance!

Film grain and sharpening are not currently part of the encoder or AMF filters. We want to take this opportunity to mention that we value user requests such as yours and will consider adding this to AMF in the future.

Regarding colors issue: this repo and it’s associated issues are intended for topics related to the integration of the AMF SDK, but we will pass along the possible issue to the corresponding teams. Does the color issue happen during playback? Which player are you using and is it possible to share the file?

Here is where you may switch between the different codecs used for encoding in Radeon ReLive depending on whether it is supported in your system: image

amdvce commented 11 months ago

The Hidden Gem the small 670 kb file DVR.exe from AMD AMF 1.3.40 !

clipboard_(26-Sep-23 _ 22_01_57)

Again i discovered this by chance when i was inspecting AMD AMF 1.3.40 capabilities. Then after seeing and most important understanding DVR.exe potential, i patched it's source code to avoid the obsolete old and mbs hungry AVC to more advanced HEVC.

After i tested some the HEVC profile SPEED and saw that the quality is so terrible i settled with HEVC Profile Quality and 2600000 in bits, 2.6 MBit.

It's amazing, still due of AMD drivers i do have sometime irregularities regarding colors ( as noticed in the video link ). Also add Mouse support too and fix the focus regarding some colors !

So far DVR.exe made me delete/erase OBS, since OBS is no match at all against DVD.exe !

https://www.mediafire.com/file/e26c6zwoevl19zb/DVRRecording-2023-09-26-21-57-01.mp4/file

Now my only question is why this little gem of only 670 kb DVR.exe is NOT into AMD Official Software for the masses !

AMD can't came anymore with a crippled excuse as to buy only expensive products as ReLive doesn't work on so called "lower end devices"

Look here it works, and it works at HEVC with Profile Quality and only 2.6 mbps ! And more check the video to see the total system usage ! 2 % CPU with all system running and as for the igpu, only 7 % 3D and only 30 % on the Video Codec 0 ! Without the laptop ventilator to kick in, fanless !

amdvce commented 11 months ago

Film grain and sharpening are not currently part of the encoder or AMF filters. We want to take this opportunity to mention that we value user requests such as yours and will consider adding this to AMF in the future.

This kind of thinking is toxic for business.. Take a look at nVidia and Intel, they both have it from a very long time ago mate !

More than 236,000 global tech workers have been laid off so far this year https://www.marketwatch.com/story/more-than-236-000global-tech-workers-have-been-laid-off-so-far-this-year-cc5b2021

Now when AMD came long ago to my family to borrow money as AMD were in trouble and no bank wanted to do business with them, my family did loan them money to settle their problems with GlobalFoundries among other things..

Now next time AMD will have money trouble we will send them to RPChina. My family can buy AMD at Breakfast sale them at Lunch and rebuy them again at Dinner.

My family provides the software measured in gallons for the automobiles to run, and more now we have sun energy from tomorrow as for today. I am very sure that your CEO will be very interesting about your response.

rhutsAMD commented 8 months ago

FFmpeg has a filter for removing grain. It can be used with the following command line option for FFmpeg:

ffmpeg.exe -y -hwaccel d3d11va -i input.mkv -vf removegrain -c:v h264_amf out.mp4

amdvce commented 7 months ago

FFmpeg has a filter for removing grain. It can be used with the following command line option for FFmpeg:

ffmpeg.exe -y -hwaccel d3d11va -i input.mkv -vf removegrain -c:v h264_amf out.mp4

Oh well i guess Ai might replace the team soon. Bet Ai can write decent amf encoder.

Regardless of the question "[Question]: how to activate or enable Film Grain ?!" i get an answer from amd and the answer is laughable as it's owner @rhutsAMD

FFmpeg has a filter for removing grain. It can be used with the following command line option for FFmpeg:

ffmpeg.exe -y -hwaccel d3d11va -i input.mkv -vf removegrain -c:v h264_amf out.mp4

@rhutsAMD if you can't read properly then why bother to comment ?! "how to activate or enable Film Grain" is NOT similar with "removegrain" add is not equal to remove, but hey if you don't know it just hurry up and placed/hide it under the rug !

It's funny but if you where working for me you sure do had an P65 by now ! meaning F I R E D !

This will be addressed up further to AMD and another lawsuit is on it's way !