Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th January 2006, 19:13   #1  |  Link
Mentar
Registered User
 
Join Date: Nov 2001
Location: Hamburg
Posts: 94
No-fast-pskip inferior to Adaptive Quants?

I'd like to ask the gurus for help in one issue, because I can't seem to get it done right.

The task is encoding a clean anime DVD source with alot of dark-grey spots. Bitrate is high (2000+), source video is very stable.

My problem: The latest builds ever since the Adaptive Quants were removed again _always_ exhibit the old problems, with or without no-fast-pskip: Nasty moving/morphing blocks in dark areas, around lighter pixels. Where AQ nicely dithered these places and thus "hid" them from the view, the dreaded old blocks are back and looking really poor. (I heard of the same issue from enough other people to skip posting screenshots yet, but if they are desired, I can provide them)

The results have been so consistent that I've recently downgraded to build 375 again, and all the problems are gone again.

So my questions:

1) Is there anything else I need to do to recreate the excellent stable dithering of AQ in dark places, with the new builds?

2) If not, why was AQ removed again?

Any hints would be very much appreciated.

EDIT: I forgot to mention - for the newest build I was using the 3P-Slowest preset.

Last edited by Mentar; 4th January 2006 at 19:18.
Mentar is offline   Reply With Quote
Old 4th January 2006, 20:45   #2  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,779
provide a video source for recreating this and screenshots plz
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 4th January 2006, 22:27   #3  |  Link
OvejaNegra
ekTOMBE STUDIOS
 
OvejaNegra's Avatar
 
Join Date: Dec 2005
Location: Cuba
Posts: 253
MMMM the uggly blocks, i have the same problem with oceanīs eleven.
ŋThis is normal? iīm encoding with a fixed q=22:
"x264.exe" --qp 22 --ref 5 --mixed-refs --no-fast-pskip --bframes 3 --b-rdo --weightb --nf --subme 7 --analyse all --8x8dct --me esa --merange 10 --progress --no-psnr --output "" ""

Why this blocks?

sorry for my bad english!!!!
OvejaNegra is offline   Reply With Quote
Old 4th January 2006, 22:37   #4  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,575
dare I ask why you disabled the in-loop filter and use an insane motion estimation setting?
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 4th January 2006, 22:56   #5  |  Link
DeathTheSheep
<The VFW Sheep of Death>
 
DeathTheSheep's Avatar
 
Join Date: Dec 2004
Location: Deathly pasture of VFW
Posts: 1,149
OvejaNegra:
Um...interesting. Yes, that's the word: interesting.
If your encodes have blocks, try turning on deblocking
It just might help!

And as for that ME setting... How about using --me umh --merange 16
It's faster and probably a... better... choice (though I hate to use that word!).
__________________
Recommended all-in-one stop for x264/GCC needs on Windows: Komisar x264 builds!
DeathTheSheep is offline   Reply With Quote
Old 5th January 2006, 00:08   #6  |  Link
ChronoCross
Does it really matter?
 
ChronoCross's Avatar
 
Join Date: Jun 2004
Location: Chicago, IL
Posts: 1,542
ME range should be between 16 and 32. I think Sirber had used a me range of 64 before but akupenguin had talked about a major slowdown in the highest 2 --me settings when 64 is used.
ChronoCross is offline   Reply With Quote
Old 5th January 2006, 03:27   #7  |  Link
Romario
Registered User
 
Romario's Avatar
 
Join Date: Dec 2005
Location: Qetchua mountains in Peru, and Klingon battlecruiser D'Mar
Posts: 393
Quote:
Originally Posted by Mentar
The task is encoding a clean anime DVD source with alot of dark-grey spots. Bitrate is high (2000+), source video is very stable.

My problem: The latest builds ever since the Adaptive Quants were removed again _always_ exhibit the old problems, with or without no-fast-pskip: Nasty moving/morphing blocks in dark areas, around lighter pixels. Where AQ nicely dithered these places and thus "hid" them from the view, the dreaded old blocks are back and looking really poor. (I heard of the same issue from enough other people to skip posting screenshots yet, but if they are desired, I can provide them)

The results have been so consistent that I've recently downgraded to build 375 again, and all the problems are gone again.
Yeah man, you are right. Same happens to me, one music spot, Britney Spears. I lost the sourse somehow, so I can't provide pictures, but I am hope that Sharktooth will again include Adaptive Quantization in his new builds.

I use no-fast-no-pskip, and it's worthless, nothing happened. Same ugly blocks stayed.

My settings are: 5 ref frames, 2 B-frames, Mixed frames off, Mode:Automated 2pass, bitrate 800, Keyframe interval 200, Pyramid and Adaptive for B-Frames is on, Deblock Filter on, Alpha Deblocking 0, Beta Deblocking 0, CABAC on, Subme 6, Weighted Prediction on, Chroma ME on, Macroblock options: ALL, AVC Profiles is Main profile, AVC Level: Unrestricted, RDO for B-Frames is on, No Fast P-Skip is on, Bidirectional ME is on, Trellis Quantization off, B-Frame bias is 0, B-Frame mode is Temporal, ME Algo is Hexagon, ME Range 16.

So, I provided ALL my settings, so I hope that someone will rewrite new Adaptive Quantization patch and re-include it in the future x264 builds.

Thank you, and I am waiting for good answer
__________________
Live long and prosperLive long and prosperLive long and prosper
Romario is offline   Reply With Quote
Old 5th January 2006, 07:33   #8  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,779
if you wanna get rid of blocks, use a higher bitrate or higher deblocking values
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 5th January 2006, 14:06   #9  |  Link
Romario
Registered User
 
Romario's Avatar
 
Join Date: Dec 2005
Location: Qetchua mountains in Peru, and Klingon battlecruiser D'Mar
Posts: 393
Well, I set bitrate to 1200 and nothing. And I don't won't anymore to increase bitrate.

Would I set deblocking to -2 or +2, what is your suggestion?
__________________
Live long and prosperLive long and prosperLive long and prosper
Romario is offline   Reply With Quote
Old 5th January 2006, 14:45   #10  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,779
+6,+6 will remove all blocks
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 5th January 2006, 16:08   #11  |  Link
OvejaNegra
ekTOMBE STUDIOS
 
OvejaNegra's Avatar
 
Join Date: Dec 2005
Location: Cuba
Posts: 253
Well:
I always encode with a fixed quantizer, i donīt care the final size of the video.
The in-loop filter sometimes eat detail when i encode real life footage.
The Insane motion estimation gives me smaller videos (i donīt care the compression time), "me esa --merange 10" works very well for me.
BTW.... lowering the quantizer doesnīt dissapears the blocks.

If you want an interesting source for testing try this:
http://www.microsoft.com/windows/win...tShowcase.aspx
I like robotica (of course this is not a normal source but is good for testing)
__________________
So, it works or not???
OvejaNegra is offline   Reply With Quote
Old 6th January 2006, 17:43   #12  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,867
@bond: Am I mixing something up or shouldn't it be +6(strength), -6(threshold) be 'better'. Lowering the threshold when to deblock and lifting the how strong to deblock ?

Cu Selur
Selur is offline   Reply With Quote
Old 7th January 2006, 07:12   #13  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,413
+6,-6 would give you very blocky video mixed up with a few totally blurred out squares that looks even worse than ffdshow with h.264 PP on. (Which looks like Snow or jpeg2000 at too low bitrates.)

The first is how much blur, the second is how many blocks it acts on. If they're way out of sync, like +2,-3, you'll start noticing how unpleasantly the deblocked and not deblocked areas mesh.
foxyshadis is offline   Reply With Quote
Old 10th January 2006, 19:11   #14  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,867
Is this right?

I kind of thought that there's a standard value x, and if a macroblock is encoded at a quantizer greater or equal than x, deblocking is applied with strength y. So beta(threshold) would modify x and alpha(strength) would modify y.

Would be nice is someone could shed some light on this matter.

Cu Selur

Ps.: sorry, for 'carpering' the thread.
Selur is offline   Reply With Quote
Old 10th January 2006, 20:27   #15  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
Deblocking strength is controled by values called alpha & beta. These values are computed for each macroblock according to the quantizer of this macroblock, the quantizer of its neighbour, and the offset you set ( the famous value that range from -6 to +6 ).

Here are the tables for alpha & beta, indexed by 'quantizer + offset' :

Code:
alpha : 

     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
     0,  0,  0,  0,  0,  0,  4,  4,  5,  6,
     7,  8,  9, 10, 12, 13, 15, 17, 20, 22,
    25, 28, 32, 36, 40, 45, 50, 56, 63, 71,
    80, 90,101,113,127,144,162,182,203,226,
    255, 255

beta :

     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
     0,  0,  0,  0,  0,  0,  2,  2,  2,  3,
     3,  3,  3,  4,  4,  4,  6,  6,  7,  7,
     8,  8,  9,  9, 10, 10, 11, 11, 12, 12,
    13, 13, 14, 14, 15, 15, 16, 16, 17, 17,
    18, 18
The higher these values, the stronger the deblocking. When one of these is null, there's no deblocking on the macroblock.

As you can see, when 'quantizer + offset <= 15', both alpha and beta are null, so no deblocking is applied.

Alpha is used to determine whether the frontier is blocky or if it's actually a detail. It works like a threshold. Beta also works as a threshold, but is used to insure that on both side of the frontier, the picture is homogenous enough ( once again, to separate detail from blockiness ).

Once you've decided whether or not to filter the frontier, alpha is used to decide the strength ( in fact, the maximal allowed modification to a pixel ). beta can slightly modify this strength, is the macroblock is flat enough.

So in the end, foxyshadis' description is a bit too simple. Both offsets decide which blocks, and the first one influences the bluriness the most.
__________________
Manao is offline   Reply With Quote
Old 10th January 2006, 20:57   #16  |  Link
slavickas
I'm Shpongled
 
slavickas's Avatar
 
Join Date: Nov 2001
Location: Lithuania
Posts: 303
/|\
.|
that post should be bookmarked/added to stickies
slavickas is offline   Reply With Quote
Old 11th January 2006, 05:02   #17  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,867
thx for clearing that Manao
Selur is offline   Reply With Quote
Old 12th January 2006, 19:21   #18  |  Link
OvejaNegra
ekTOMBE STUDIOS
 
OvejaNegra's Avatar
 
Join Date: Dec 2005
Location: Cuba
Posts: 253
i think this may be interesting:
i have the build (release) 396a and the dark areas blocks are gone (iīm not using loop filter)

a bug????

BTW the explanation of the deblocking is VERY useful...

Thanks!!
__________________
So, it works or not???
OvejaNegra is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:37.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.