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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th January 2008, 02:52   #581  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by Yoshiyuki Blade View Post
I have a n00b question. What does lowerering the AQ strength do besides create a smaller file size at a given sensitivity? lol. Say from 1.0 to the (now suggested) 0.5-0.6. There's not much I know beyond that.
Because the new VAQ redistributes quantizers; unlike the old AQ, it doesn't just lower them. On many sources, this means a decrease in file size.
Dark Shikari is offline   Reply With Quote
Old 27th January 2008, 02:53   #582  |  Link
DeathTheSheep
<The VFW Sheep of Death>
 
DeathTheSheep's Avatar
 
Join Date: Dec 2004
Location: Deathly pasture of VFW
Posts: 1,149
Strength 0.5 to 0.6 is now recommended for 0.47? Looks like I missed something here.
__________________
Recommended all-in-one stop for x264/GCC needs on Windows: Komisar x264 builds!
DeathTheSheep is offline   Reply With Quote
Old 27th January 2008, 02:57   #583  |  Link
Yoshiyuki Blade
Novice x264 User
 
Yoshiyuki Blade's Avatar
 
Join Date: Dec 2006
Location: California
Posts: 169
Quote:
Originally Posted by DeathTheSheep View Post
Strength 0.5 to 0.6 is now recommended for 0.47? Looks like I missed something here.
I wouldn't say recommended, but DS has suggested it a few posts ago, as well as setting qcomp to 1 for the time being. Unfortunately, it's gonna be hours till I get some results O_O!
Yoshiyuki Blade is offline   Reply With Quote
Old 27th January 2008, 03:09   #584  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
Quote:
Originally Posted by Dark Shikari View Post
Because the new VAQ redistributes quantizers; unlike the old AQ, it doesn't just lower them. On many sources, this means a decrease in file size.
See, in my eyes AQ was an algorithm that rearranged quants in a frame to get the best quality, not one that would just "lower quants" like Haali's AQ does.


On a side note, if qcomp is set to 1 and aq-strength is varied, isn't that just making AQ the rate control algorithm?
Sagekilla is offline   Reply With Quote
Old 27th January 2008, 04:08   #585  |  Link
akupenguin
x264 developer
 
akupenguin's Avatar
 
Join Date: Sep 2004
Posts: 2,392
Yes. Static-mode AQ is very similar algorithm-wise to CRF, it just uses a different complexity metric and applies to MBs.
akupenguin is offline   Reply With Quote
Old 27th January 2008, 05:09   #586  |  Link
fields_g
x264... Brilliant!
 
Join Date: Mar 2005
Location: Rockville, MD
Posts: 167
Quote:
Originally Posted by Yoshiyuki Blade View Post
I have a n00b question. What does lowerering the AQ strength do besides create a smaller file size at a given sensitivity? lol. Say from 1.0 to the (now suggested) 0.5-0.6. There's not much I know beyond that.
I want anyone to feel free to correct me.

FIRST think of Sensitivity.... What level of flatness should be considered necessary adjustment. THEN.. knowing what needs to be changed, Strength determines how radical the adjustment is.

Higher Sensitivity, more should be fixed.
Higher Strength, more radically the attempt to fix it.
This is why while lowering one of these and raising the other, you can get a file with the same bitrate.
fields_g is offline   Reply With Quote
Old 27th January 2008, 06:14   #587  |  Link
Yoshiyuki Blade
Novice x264 User
 
Yoshiyuki Blade's Avatar
 
Join Date: Dec 2006
Location: California
Posts: 169
From what I've tested so far, AQ on anime look much better with strong settings (such as --aq-strength 1.0 --aq-sensitivity 20). Even though it makes file sizes large at a given crf, it still looks nice at smaller file sizes too, though doing that will compromise overall image quality.

Setting qcomp 1, aq str 0.5, and sensitivity 20 looks nice, and the file size is small, but dark areas don't get improved much in comparison. I'm going to re-run the same settings but change strength to 1.0 and see how it turns out. Sorry that I can't post numbers, I'm unorganized and everything's a mess . I'll try and get a consistent order going.
Yoshiyuki Blade is offline   Reply With Quote
Old 27th January 2008, 10:25   #588  |  Link
Morte66
Flying Skull
 
Morte66's Avatar
 
Join Date: Jan 2005
Posts: 397
Slight diversion from crf: any thoughts about qcomp and sensitivity for 2-pass encode to a target size with 0.47?
Morte66 is offline   Reply With Quote
Old 27th January 2008, 10:28   #589  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by Morte66 View Post
Slight diversion from crf: any thoughts about qcomp and sensitivity for 2-pass encode to a target size with 0.47?
qcomp = 1, sensitivity = 10-15? Sensitivity is much less meaningful with 2pass.
Dark Shikari is offline   Reply With Quote
Old 27th January 2008, 10:33   #590  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
I did some tests on 'A knight's tale' and 'the 6th day', on both occasions I found the best aq strength and sensitivity, in regards to these two clips as strength 0.6 and senstivity 17.6 to maintain the same file size (very slightly larger, I mean by about 0.5 percent) and be of good quality. I didn't set qcomp.

Again, setting the sensitivity lower than that, even with qcomp being 1, the filesize was way undersized. The quality was also noticeable lower, but was about right in terms of its file size.

Setting aq strength to 1 (auto sens.) with the same clips ended up with doubling the file size.

I keep ending up with a sensitivity of around 17 for strengths of say, 0.6, and slightly lower at around 15 or 16 for strength 1

Last edited by burfadel; 27th January 2008 at 10:34. Reason: Addition of information
burfadel is offline   Reply With Quote
Old 27th January 2008, 10:51   #591  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by Morte66 View Post
Before I head out for the day, let me throw up a concept to be shot down (in the full knowledge that I've no idea what I'm talking about). This describes functionality, not necessarily algorithm:

The encoder chugs along, frame after frame. Within each individual frame, it calculates a spatial bitrate distribution according to the new Variance AQ's definition of quality. Then at the whole frame level, it measures the quality according to the vanilla CRF metric, the one that's not PSNR or SSIM but "implicit in the algorithm", and varies the whole-frame bit budget to hit a quality level measured that way. So VAQ does spatial bitrate distribution within frames, and non-AQ does temporally varying bitrate allocation across frames.

I wonder if that would give the excellent smooth/dark area handling by using VAQ spatially within frames, then make sure the frames are crisp enough by using the current CRF metric (which seems more dependable re crispness than VAQCRF 0.47).
Using CRF for frame QP distribution and VAQ for within-frame bit distribution can be done using --aq-sensitivity 0 and adjusting qcomp to however strong you want CRF to be (lower = stronger)
Dark Shikari is offline   Reply With Quote
Old 27th January 2008, 11:08   #592  |  Link
Morte66
Flying Skull
 
Morte66's Avatar
 
Join Date: Jan 2005
Posts: 397
Quote:
Originally Posted by Dark Shikari View Post
Using CRF for frame QP distribution and VAQ for within-frame bit distribution can be done using --aq-sensitivity 0 and adjusting qcomp to however strong you want CRF to be (lower = stronger)
I thought that approach had a problem on frames with a small amount of sharp detail that gets clobbered by variance AQ to feed the large amount of smooth stuff?

I was thinking particularly of CRF measuring quality after VAQ has done spatial bitrate distribution, so it would feed extra bitrate in from the top to resharpen the sharp bits of frames like that. Or is that what it does anyhow?

{I seem to have deleted my original post by accident (!), but DS quoted it whole.}
Morte66 is offline   Reply With Quote
Old 27th January 2008, 13:15   #593  |  Link
Jawed
Registered User
 
Join Date: Jan 2008
Location: London
Posts: 156
Quote:
Originally Posted by akupenguin View Post
Yes. Static-mode AQ is very similar algorithm-wise to CRF, it just uses a different complexity metric and applies to MBs.
Should VAQ constitute an x264 mode alongside crf, qp, bitrate, pass ?

Jawed
Jawed is offline   Reply With Quote
Old 27th January 2008, 13:17   #594  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by Jawed View Post
Should VAQ constitute an x264 mode alongside crf, qp, bitrate, pass ?

Jawed
Well, VAQ works with all of those modes (though, technically, qcomp=1 and CRF is equivalent to QP mode)... so not really, I think.
Dark Shikari is offline   Reply With Quote
Old 27th January 2008, 15:48   #595  |  Link
Jawed
Registered User
 
Join Date: Jan 2008
Location: London
Posts: 156
A few months back I experimented with qcomp in conjunction with HAQ (pre-processed to PC Levels + MVDegrain2). It certainly produced interesting results:

Code:
                 AQ 0.3 5    qcomp 0    qcomp 1  source bitrate
24                 1827.9     2272.1     1621.0     4762.7
Black Pearl        2270.7     1671.9     2924.5     3639.8
Carnivale          2485.2     2115.3     2942.0     6623.8
Hana & Alice 1     2102.7     2557.1     1958.2     4015.5
Monk               3207.5     2132.0     4358.8     8354.6
War of the Worlds  6829.3     3047.2    11542.4     7059.3
X-Files            1951.0     2275.5     1693.9     4821.1
Average            2953.5     2295.9     3863.0     5611.0
Note all three test encodes are with the same HAQ setting, --aq-strength 0.3 --aq-sensitivity 5. The other x264 settings were:

--crf 16 --ref 5 --mixed-refs --no-fast-pskip --bframes 8 --b-pyramid --b-rdo --bime --weightb --subme 6 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh --merange 32 --no-dct-decimate

qcomp is a bit surprising. Maybe you guys are used to it.

I've attached the spreadsheet containing a bit more detail.

Jawed
Attached Files
File Type: zip x264 AQ and QComp.zip (5.9 KB, 42 views)

Last edited by Jawed; 27th January 2008 at 15:53.
Jawed is offline   Reply With Quote
Old 27th January 2008, 18:54   #596  |  Link
bob0r
Pain and suffering
 
bob0r's Avatar
 
Join Date: Jul 2002
Posts: 1,337
AQ patch 0.47: http://akuvian.org/src/x264/x264_aq_var.47.diff

x264.735.dark.aq.0.47.exe (pthreads/mp4 = yes, made with make fprofiled)

Should work i guess, patch did apply.
bob0r is offline   Reply With Quote
Old 27th January 2008, 19:07   #597  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
I did some encodes with qcomp = 1. With aq-strenght 0.5 and sensitivity 10 it gives me similar filesizes to my previous encodes with normal qcomp and without aq. The videos look very good.
nurbs is offline   Reply With Quote
Old 27th January 2008, 20:43   #598  |  Link
Yoshiyuki Blade
Novice x264 User
 
Yoshiyuki Blade's Avatar
 
Join Date: Dec 2006
Location: California
Posts: 169
After some more testing, older anime with lots of noise and details look better (in my opinion) with high CRF and high AQ strength vs low CRF and low AQ strength (at a fixed sensitivity). Both results have their ups and downs.

-Low CRF and Low AQ strength gives a cleaner overall picture as expected, AQ but hardly seems to address ugly blocking in dark areas.

-High CRF and High AQ strength results in a worse overall image quality (as expected), but dark areas look much better.

This trend happens at lower bitrates. At high bitrates, the results look very similar to each other (very good quality across the board).

I'm going to edit this post in a couple hours with some examples. In the meantime, this is what I have so far:

--crf 28.0 --qcomp 1 aq-strength 0.5 aq-sensitivity 20: 188 MB (Sample 1) (Sample 2)
--crf 33.0 --qcomp 1 aq-strength 1.0 aq-sensitivity 20: 199 MB (Sample 1) (Sample 2)
--crf 34.0 --qcomp 1 aq-strength 1.0 aq-sensitivity 20: 161 MB

Update: Uploaded the samples. To be honest, none of them are satisfactory lol, but I expect them to look much better in a 2-pass encode. I did a 2-pass encode a while ago (before patch .47) at lower bitrates than those, and it still looks better than both.

I'm currently re-running tests with 2-pass at a higher bitrate not only to keep the final filesizes very close to each other (there's an 11 MB bias in the tests above), but to narrow the gap on the differences between high CRF/high AQ strength vs low CRF/low AQ strength. The next set of results will look much easier on the eyes.

Last edited by Yoshiyuki Blade; 28th January 2008 at 00:20.
Yoshiyuki Blade is offline   Reply With Quote
Old 27th January 2008, 21:38   #599  |  Link
Raere
Registered User
 
Join Date: Sep 2004
Posts: 44
Are low AQ values recommended as a general psychovisual improvement at this point, or is it still just a tradeoff for lower overall quality for better dark areas?
Raere is offline   Reply With Quote
Old 27th January 2008, 21:40   #600  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by Raere View Post
Are low AQ values recommended as a general psychovisual improvement at this point, or is it still just a tradeoff for lower overall quality for better dark areas?
VAQ is supposed to be a general psychovisual improvement, period. Too high AQ strengths may backfire though.
Dark Shikari is offline   Reply With Quote
Reply


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 10:52.


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