PDA

View Full Version : Deadzones, trellis and deblock


crasus
29th March 2009, 08:45
Hey! Good morning!

I've been encoding a movie with lots of grain today to 720p and was wondering a little bit about my decisions for the settings. It should be mentioned that the source is very good - a Criterion BluRay with a classic movie, and there aren't any special effects and so on.

I want to keep the final image as close as possible to the original.

x264 core 67 r1128
deblock : -3,-3
trellis=2

I've let the me_range=16 and deadzone=21,11 to those settings.

Here's the complete command :

"K:\x264\x264.exe" --level 4.1 --pass 2 --bitrate 7774 --stats ".stats" --ref 4 --mixed-refs --no-fast-pskip --bframes 5 --b-pyramid --weightb --direct auto --deblock -3:-3 --subme 9 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --trellis 2 --b-adapt 2 --me umh --threads auto --thread-input --progress --no-psnr --no-ssim --output K:\x264\G.mkv K:\x264\script2.avs

How does those settings sound? Would raising the me_range have any actual effect on the final result other than increasing the encoding time under these conditions? Considering the deblock and trellis setting, would changing the deadzone levels have any improvement?

Audionut
29th March 2009, 10:09
You can't change deadzone if using trellis.

*.mp4 guy
29th March 2009, 10:15
You should use psy trellis ~0.2, and psy rdo ~1.0 (only use psy rdo if you are not close to complete transperency) You should probably leave deblocking at 0:0 or -1:-1, since aq should preserve most noise (aq is on by default).

Blue_MiSfit
29th March 2009, 10:20
Turn on psy trellis like this:


--psy-rd 1.0:0.2


.2 is a low strength to start with, some people use .5 or even 1.

If you're having issues with grain retention, keep in mind that 7774kbps is a bit low for grainy 1080p. I'd suggest raising your bitrate if your goal allows it. If not, it might be time to break out some degraining. Most grainy movies have lots of chroma noise in my experience, and you can safely blow this away with relatively strong fft3dgpu on plane=3 mode for free (provided you have a decent GPU).

If you want some good luma degraining, and you're really after quality, there really is no substitute for MDegrain. If you have a quad-core, you can get surprisingly acceptable speed using 4 threads on 1080p content - sort of :) Then again, I always do CRF encoding, and don't feel the sting of 2 passes.

If you're in a hurry (doubtful, based on your settings), fft3dgpu can do a decent job, provided you're careful in chosing your sigma values. histogram(mode="luma") is a great tool for evaluating the effect of filters on luma. I always dither after this with gradfunkmirror(1.51) which is a little wrapper script for gradfun2db that fixes issues around the border of the image. fft3dfilter/fft3dgpu can introduce banding and/or posterization if not used carefully, in addition to killing details.

~MiSfit

nm
29th March 2009, 10:23
I'd suggest psy-trellis (for example, --psy-rd 1.0:0.7).

Lowering deblocking parameters that much could be counterproductive. It might be better to use the default settings or something like -1:-1. Also, since you are using AQ, --no-fast-pskip just wastes encoding time without having much of an effect on quality.

crasus
29th March 2009, 11:14
I forgot to mention that the encoding is 720p (2h12min movie lenght). The bitrate should be enough in this case, right?

As I said, I want to keep the image as close as possible to the original source. What kind of impact will psy_rd have in this case?

Time doesn't really matter to me - only the final quality. Thanks for all the replies :D

GrandDK
29th March 2009, 15:14
indeed and if you find yourself getting a to soft image of the higer deblock settings go with your original setting -3,-3

Sharktooth
29th March 2009, 15:55
GrandDK: -3,-3 is not a good choice.
as other people suggested default or slightly lower deblocking (-1,-1) is the way to go unless you cant tell the difference between a blockfest and picture.

JohannesL
29th March 2009, 20:46
Use CRF at around 20 instead of bitrate mode unless you need to hit a specific bitrate.

crasus
30th March 2009, 11:23
I do need to reach a certain bitrate as I don't want the final rip to got over a DVD9.

Blue_MiSfit
30th March 2009, 19:18
Yes, that bitrate should be more than enough for most sources at 720p. I usually hit transparency somewhere around 4-6mbps, so 8 should be _plenty_.

~MiSfit