View Single Post
Old 23rd May 2022, 12:53   #19494  |  Link
Ryushin
Registered User
 
Ryushin's Avatar
 
Join Date: Mar 2011
Posts: 433
SMDegrain - Issue and Another Solution

Quote:
Originally Posted by Ryushin View Post
So I encoded Invasion of the Body Snatchers 4K over last night and I started watching it this morning and I encountered a problem in one of the scenes in the movie.

It's a dark scene with two people talking and their faces are in the light. If you watch the women's cheek you will see that seems degrain for a quarter second, then not degrain, and back and forth. It was very odd.

I extracted that 90 second scene out and looked it it in detail and the source has some odd grain around the women's cheek and that is probably where the problem occurs. I ran a bunch of tests using different options against the sample in order to find out how to solve the problem. Reducing the block size from the default of 16 to 8 solved the problem. As a bonus the file size was 11% smaller than before using the default block size. Encoding takes a hit since I'm essentially quadrupling the number of blocks to analyze. Encoding was about 30-40% slower.

Link to the sample source and the two encoded files (link valid for two weeks):
https://cloud.chrisdos.com/s/6JkTfF2etSo8Ln8

I've changed my scripts to use a block size of 8 now:
SMDegrain(video,tr=8,thSAD=800,thSADC=400,thSCD2=80,contrasharp=true,prefilter=2,refinemotion=true,blksize=8)
So the encoding performance hit was pretty significant probably closer to 50% slower, so I did some more testing. Removing the thSCD2=80 option (which changes it back to it's default of 130) fixed the problem as well. I know Ripmann changed the option because the scene change detection was not being detected properly and it was merging frames that were not related to each other. Perhaps since SMDegrain brightens to the scene to find more grain before degraining the scene detection will work better. I guess we'll see what happens as I'll go back to using the default of thSCD2=130 by leaving the option out.
Ryushin is offline   Reply With Quote