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-2 Encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th May 2008, 20:23   #21  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
*AQ or *LUMGAIN ?

I did a couple of test encodes using either *AQ 3 or *LUMGAIN 3. The source was quite dark, average bitrate a little over 5000 kbps. The matrix I used comes from manono:
8, 8, 8, 9,11,13,14,17,
8, 8, 9,11,13,13,14,17,
8, 8,11,12,13,14,17,94,
9,11,13,13,14,17,17,94,
11,11,13,13,14,17,94,94,
13,13,14,16,17,20,94,94,
13,13,14,17,94,94,94,94,
13,14,17,94,94,94,94,94

12,12,13,14,15,16,22,26,
12,13,14,15,16,22,26,32,
13,14,15,16,22,26,32,41,
14,15,16,22,26,32,41,53,
15,16,22,26,32,41,53,94,
16,22,26,32,41,53,70,94,
22,26,32,41,53,70,94,94,
26,32,41,53,94,94,94,94


To make it short: I could not detect any differences between the two encodes. Maybe the bitrate was too high. AQ 3 did compress slightly better than LUMGAIN 3, but this probably depends on the source.

So more testing needed, I guess...

Cheers
manolito
manolito is offline   Reply With Quote
Old 19th May 2008, 17:17   #22  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,731
Try sources with flat areas versus sharper edges..the bits should be shifted from the edges towards the more flat areas of the frames. Also scenes with grass or similar texture are quite good.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 21st May 2008, 08:19   #23  |  Link
blutach
Country Member
 
blutach's Avatar
 
Join Date: Sep 2004
Location: is everything!
Posts: 6,499
As usual, I am late with my thanks Hank.

Regards
__________________
Les

Only use genuine Verbatim or Taiyo Yuden media.
blutach is offline   Reply With Quote
Old 21st May 2008, 09:43   #24  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Outstanding piece of work, that HC encoder of yours!

asarian is offline   Reply With Quote
Old 26th May 2008, 06:59   #25  |  Link
phXql
Registered User
 
Join Date: Dec 2005
Posts: 42
Great piece of software. Thank you!
phXql is offline   Reply With Quote
Old 30th May 2008, 05:27   #26  |  Link
six13
Registered User
 
Join Date: Apr 2007
Posts: 102
AQ Setting in HCenc23

Can someone please explain the 4 settings in AQ vs the 4 settings in LUMGAIN? I am trying to understand what to look for. I have previously used LUMGAIN 4 and liked the video. AQ has me puzzled, I saw the comments of Boulder but am still puzzled. I mainly compress/encode TV captures movies at a bitrate of 4K/S with small compression % like 82% with DVD-RB. I do notice that the detail on a face isn't real good it looks kinda flat. I am learning and would welcome opinions. Thanks in advance.
six13 is offline   Reply With Quote
Old 30th May 2008, 05:33   #27  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by six13 View Post
I do notice that the detail on a face isn't real good it looks kinda flat.
Unless I'm mistaken, HC uses luminance-masking adaptive quantization, which won't help in such a case (one needs complexity masking like x264 has).
Dark Shikari is offline   Reply With Quote
Old 30th May 2008, 06:09   #28  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,731
AQ adapts the quantization, LUMGAIN affects the quantization matrix. hank posted the code related to LUMGAIN in the HC Encoder thread which shows how it works. Basically LUMGAIN lowers the coefficients of the base quantization matrix depending on the luminance levels. The strength affects the factor used in determining the new coefficients.

If I'm not entirely mistaken, AQ is meant for shifting bits inside one frame - from sharp edges to the more flat areas. LUMGAIN is supposed to shift bits to low-luminance frames from the brighter ones to prevent blocking in dark frames.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 31st May 2008, 01:26   #29  |  Link
six13
Registered User
 
Join Date: Apr 2007
Posts: 102
So Boulder, then is it OK to use them at the same time or is it best to pick 1 or the other? In the past you have sugested I use LUMGAIN 4 and i like the output but was wondering if AQ would produce better results then LUMGAIN. What I recently encoded didn't have many dark sections. What do you use to make the decision as to use LUMGAIN or AQ?
six13 is offline   Reply With Quote
Old 31st May 2008, 17:52   #30  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,731
I use 3 for both AQ and LUMGAIN. They are two different things so they can be used together.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 31st May 2008, 23:42   #31  |  Link
hank315
HCenc author
 
Join Date: Nov 2003
Location: Netherlands
Posts: 570
Quote:
Originally Posted by Boulder
AQ is meant for shifting bits inside one frame - from sharp edges to the more flat areas. LUMGAIN is supposed to shift bits to low-luminance frames from the brighter ones to prevent blocking in dark frames.
Yes, that's what it does. The final quant for each MacroBlock: Q(i,j) = QMB * Qmatrix(i,j).
QMB is adjusted by the variance of the MacroBlock --> AQ.
Qmatrix(i,j) is adjusted by the average luminance of the frames in a GOP --> LUMGAIN.

Quote:
Originally Posted by Dark Shikari
Unless I'm mistaken, HC uses luminance-masking adaptive quantization, which won't help in such a case (one needs complexity masking like x264 has).
HC doesn't use luminance-masking adaptive quantization, the quantization is adapted by the variance of the MB so it's some kind of a complexity mask.
This picture shows the Quants of the same frame for different AQ values.
__________________
HCenc at: http://hank315.nl
hank315 is offline   Reply With Quote
Old 31st May 2008, 23:50   #32  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by hank315 View Post
HC doesn't use luminance-masking adaptive quantization, the quantization is adapted by the variance of the MB so it's some kind of a complexity mask.
This picture shows the Quants of the same frame for different AQ values.
Oh, so its like VAQ, complexity masking. Good to know that you've implemented a useful AQ method
Dark Shikari is offline   Reply With Quote
Old 1st June 2008, 04:01   #33  |  Link
six13
Registered User
 
Join Date: Apr 2007
Posts: 102
Thanks Boulder, which matrix do you use with those settings in HCenc?
six13 is offline   Reply With Quote
Old 1st June 2008, 08:18   #34  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,731
The matrix depends entirely on the source. Use the search, there are quite a few threads about this issue.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 7th June 2008, 14:33   #35  |  Link
zeropc
Registered User
 
Join Date: Mar 2007
Posts: 114
hank, first let me say this is a very nice tool. i just started using it and the results are so far pretty good. but there are some open question for me in fully understanding the usage and some minor issues. i hope you or somebody else can help with this.

1. i currently set aq to 0 and the luminance gain to 0 , is this good or should i raise it? i encode from br/hd-dvd sources at 18mbps
2. i experienced that hcenc seams to lower the colors by a bit. i re-encoded the simpsons movie and saw how the skin colors faded a bit, which kinda bugs me
3. is there a way to scale hd sources to dvd res (pal and ntsc)?
4. is it possible to import .dga files from dgavcindex besides using avisynth?

Last edited by zeropc; 7th June 2008 at 16:21.
zeropc is offline   Reply With Quote
Old 7th June 2008, 22:50   #36  |  Link
gizzin
Registered User
 
Join Date: Jun 2004
Posts: 324
1. I say leave it on, especially at the bitrate you are using.
2. I never heard of that before, but maybe, how/what program are you using, what kind of file (DVD,XVID), essentially what I'm saying is you need to provide more information.
3. Yes
4. Not sure. I wouldn't think so.

Hank, I get this mismatch error with v23. "Error, large source mismatch found in pass 2 starting at frame:0, count :1 frames." I'm using FAVC 1.06. Just thought I'd point that out. It seems to be only this program that experiences this problem, as I use DVD Rebuilder and it never happened.
gizzin is offline   Reply With Quote
Old 7th June 2008, 23:35   #37  |  Link
Graigddu
Registered User
 
Join Date: Nov 2007
Posts: 48
gizzin i remember that i came across this error before or something similar and after a bit of searching found that ticking reload avisynth during second pass under the settings 3 tab in the HCGUI fixed the problem, remember to save HC Ini in main tab or any settings changes won't take effect
Graigddu is offline   Reply With Quote
Old 8th June 2008, 00:34   #38  |  Link
Revgen
Registered User
 
Join Date: Sep 2004
Location: Near LA, California, USA
Posts: 1,545
Quality is good as long as I keep AQ off. Not much different than HC022.
__________________
Pirate: Now how would you like to die? Would you like to have your head chopped off or be burned at the stake?

Curly: Burned at the stake!

Moe: Why?

Curly: A hot steak is always better than a cold chop.
Revgen is offline   Reply With Quote
Old 8th June 2008, 03:26   #39  |  Link
BDrift
Registered User
 
Join Date: Mar 2008
Posts: 2
Probs with zones

Zones don't seem to work for me

Code:
*ZONE 3
1 0.2
1200 1.0
163500 0.2
Thats what I use in hc.ini, but when I compare it with a encode without zones, there is close to zero difference visible, not even in a frame by frame comparison. Am I missing something? Shouldn't frames 1-1200 and frames 163500-end have a ~80% lower average bitrate?

For testing I've set end frame to 2000 ... could that be causing trouble?
BDrift is offline   Reply With Quote
Old 13th June 2008, 18:28   #40  |  Link
lithoc
Registered User
 
Join Date: Jan 2004
Posts: 95
I've found a bug that cause Ifoedit to crash when muxing.

I encoded some 352x240 video. I found out that Ifoedit will crashed at the beginning if the video bitrate is below ~256kbps.

I notice video having a black fade in. When the black is usually low bitrate that's where the Ifoedit crashed.

If I encode the video starting frames of 100 where there's no black screen. Ifoedit mux just fine when the bitrate is > 256kbps.

Can HCenc have minimum bitrate settings?

Last edited by lithoc; 13th June 2008 at 18:41.
lithoc 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 07:53.


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