Log in

View Full Version : slight sharpening for reencodes


Hans Ohlo
10th February 2007, 22:51
hi,
i am searching for a good method for slightly sharpening my hdtv sources for reencoding to x264. x264 eats up much of film grain which i want to preserve so i think this is a good way.

i played around a little with limitedsharpenfaster:

DeGrainMedian(limitY=5,limitUV=5,mode=3)
LimitedSharpenfaster(ss_x=1.5,ss_y=1.5,Smode=3,strength=60)

but for my eye there was little to no improvement. i also heard about seesaw but found no good starting point there.

maybe someone has played around with this for this purpose also and can help me.

thx

JarrettH
10th February 2007, 23:17
Maybe you want to have less deblocking done when you encode. Read about deblocking at the bottom...

http://gabextreme.googlepages.com/DeathTheSheep_x264_VfW_guide.html

Hans Ohlo
10th February 2007, 23:27
Maybe you want to have less deblocking done when you encode. Read about deblocking at the bottom...
i am using -3:-3 settings for the inloop deblocker but still very much film grain is lost during encoding a 720p source mit around 4400kbps.

Terranigma
11th February 2007, 00:03
1. Read about the deblocking algorithms in dgindex.
2. You should check out "SeeSaw, or "MultiSWAR" instead.
3. Instead of using degrainmedian, you should grab "mvtools" and read about MVDegrain2, fft3dfilter, or fft3dgpu

Didée
11th February 2007, 00:32
i am searching for a good method for slightly sharpening my hdtv sources for reencoding to x264. x264 eats up much of film grain which i want to preserve so i think this is a good way.
The habit of "eating" grain & noise is inherent to the efficiency of x264's coding, and just sharpening to counteract this is not a good way.

Grain is temporally random. That's why it's a general problem for all encoders that get most of their "coding efficiency" out of motion compensation: since motion compensation is of zero help in compressing grain, the only way to preserve grain is to use sufficiently enough bits for "texture" ... and even with the codecs getting more modern and more efficient, the needed bits for this don't decrease by the same factor than overall efficiency does.
And that's why the old boy Mpeg-2 can "deal well" with grain, while the more modern codecs Mpeg-4 ASP and AVC seem to "deal worse": one has gotten used to the fact that they "perform similar" to Mpeg-2 at bitrates as low as 25% to 40% of Mpeg-2 bitrates. But that's only with clean sources. When grain comes into play, the keys-to-efficiency don't work out, and one would have to use higher bitrates with the newer codecs, too. But often one won't, because it's "a rule" that the new kids on the block shall always work with rather low bitrates ... the truth is that they can not *always* do so. Mpeg-2 can, because it's bitrate is comparably high, and coding grain with much bits is easy. Coding grain with little bits is hopeless.

Conclusion: It's not so much a problem of the codecs. It's a problem of wrong expectations of the users. :)


Related threads of recent:

Grain/noise retention outside the encoder (http://forum.doom9.org/showthread.php?t=121422)

x264 MUCH better quality than XviD? (http://forum.doom9.org/showthread.php?t=121304)


(In a nutshell: to better preserve grain with x264, lower deadzones, and increase bitrate.)

Hans Ohlo
11th February 2007, 01:06
thanks, that was very informative!