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 > New and alternative video codecs

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd December 2003, 20:06   #1  |  Link
karl_lillevold
Moderator
 
karl_lillevold's Avatar
 
Join Date: Oct 2002
Location: Seattle
Posts: 1,584
RV9-EHQ with fast 1st pass

Here is another much requested improvement: speed up RV9-EHQ encoding. I have been saying it already is as fast as possible without any sacrifices to quality. However, this is when doing the actual encoding, and this change only affects the 1st pass of a 2-pass encode.

erv4_xVBR_x1stPass_120203.zip

The above DLL allows the 1st pass of a 2-pass RV9-EHQ encode to be run at any complexity. Specifically, I recommend running it at 65, i.e. medium complexity. Since the output of the 1st pass is a list of recommended QP values to use for the 2nd pass, in this encoder these are automatically adjusted to accommodate the higher compression efficiency in the 2nd pass. The QP adjustment is just an estimate, but since having the exact value is not very critical, this appears to work very well, generally with less than 0.05 dB loss in average PSNR.

This encoder DLL is also completely compiled with the Intel Compiler 7.1, increasing the DLL size a little, but gains up to 5% overall encoding speed on top of the 1st pass speed-up. All CPU intensive modules are already fully ASM optimized, so this improvement is the result of better inlining and some loop unrolling by the Intel Compiler. It also includes Prescott optimized code from Intel, but no Prescott CPUs are yet available.

How to enable
1 ) Replace erv4.dll in producer's codecs directory. Milestone 7 is recommended.
2a) Enter this registry key

===>8===
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\RealNetworks\RV9]
"firstPassComplexity"=dword:00000041
===>8===

or

2b) use this option in the codecProperties section of the audience.
Code:
<codecProperties type="bag">
  <firstPassComplexity type="uint">65</firstPassComplexity>
</codecProperties>
That's it. If your 2-pass encodes took 24 hours before, they will now be 12 + (12/4) = 15 hours [AMD example *)]. On a 2.8 GHz P4, a previous 12 hour encode will now take 6 + (6/3) = 8 hours.

*) on an AMD without SSE2, EHQ is around 4X slower than medium complexity. On a P4 with SSE2, EHQ is ~3X slower than medium.
__________________
This information is provided "AS IS" with no warranties, grants no rights, and reflects my personal opinion.

Last edited by karl_lillevold; 4th December 2003 at 06:08.
karl_lillevold is offline   Reply With Quote
Old 3rd December 2003, 20:20   #2  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
going to add it to RealAnime
__________________
Detritus Software
Sirber is offline   Reply With Quote
Old 4th December 2003, 02:04   #3  |  Link
ookzDVD
DVD Rebuilder!
 
ookzDVD's Avatar
 
Join Date: Oct 2001
Posts: 1,147
@karl,

Thank you for your great job
RV9 is still the best codec in my heart! at least for me
ookzDVD is offline   Reply With Quote
Old 4th December 2003, 02:13   #4  |  Link
karl_lillevold
Moderator
 
karl_lillevold's Avatar
 
Join Date: Oct 2002
Location: Seattle
Posts: 1,584
two questions that were asked elsewhere:

The firstPassComplexity parameter affects only the 1st pass in a 2-pass encode. It does not affect 1-pass encodes, for instance 1-pass Constant Quality.

The default setting is still to encode both passes with the selected encoding complexity. The codecProperties or the reg key method are needed to enable faster 1st pass. This may change though, as I am considering making 65 the default 1st pass speed.

@ookzDVD : thanks!
__________________
This information is provided "AS IS" with no warranties, grants no rights, and reflects my personal opinion.
karl_lillevold is offline   Reply With Quote
Old 4th December 2003, 03:23   #5  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
stop considering and do it

On my 2000+, the first pass @ 65 gives me between 15 and 21 FPS in FFDshow.

[edit]

15-30 FPS
__________________
Detritus Software

Last edited by Sirber; 5th December 2003 at 00:46.
Sirber is offline   Reply With Quote
Old 4th December 2003, 13:01   #6  |  Link
tiki4
Registered User
 
tiki4's Avatar
 
Join Date: Dec 2001
Location: Who Knows?
Posts: 929
Would this dll also work with AutoRV9 bundled producer M6? I used the published xVBR version with it and had no problems so far.

Thanks for this great codec.

tiki4

off-topic:

Got it, the magical 666 posts
tiki4 is offline   Reply With Quote
Old 4th December 2003, 14:07   #7  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
you'll have to stop posting now

[edit]

I've got quality drop with animes at VLB. At 300kbps (including 32kbps voice), I get more buring. I'll post screens.

[edit2]

Sorry, the bluring was caused by the bad squary MPEG4 source.
__________________
Detritus Software

Last edited by Sirber; 4th December 2003 at 14:16.
Sirber is offline   Reply With Quote
Old 4th December 2003, 19:05   #8  |  Link
karl_lillevold
Moderator
 
karl_lillevold's Avatar
 
Join Date: Oct 2002
Location: Seattle
Posts: 1,584
Quote:
Originally posted by tiki4
Would this dll also work with AutoRV9 bundled producer M6? I used the published xVBR version with it and had no problems so far.
Yes, just replace the DLL the same way, and use the reg key to set firstPassComplexity, since AutoRV9 does not yet support this setting in the audience file. Producer Milestone 6 works just as well as 7.
__________________
This information is provided "AS IS" with no warranties, grants no rights, and reflects my personal opinion.
karl_lillevold is offline   Reply With Quote
Old 4th December 2003, 21:45   #9  |  Link
slavickas
I'm Shpongled
 
slavickas's Avatar
 
Join Date: Nov 2001
Location: Lithuania
Posts: 303
Quote:
Originally posted by karl_lillevold
Yes, just replace the DLL the same way, and use the reg key to set firstPassComplexity, since AutoRV9 does not yet support this setting in the audience file. Producer Milestone 6 works just as well as 7.
Karl, have u fixed "bug" when first pass file is not specified it's not deleted anyway, so doing normal 2pass i get bunch of files with "interesting" names
slavickas is offline   Reply With Quote
Old 4th December 2003, 23:37   #10  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
I still get them. It's good reading before going to sleep
__________________
Detritus Software
Sirber is offline   Reply With Quote
Old 5th December 2003, 00:31   #11  |  Link
karl_lillevold
Moderator
 
karl_lillevold's Avatar
 
Join Date: Oct 2002
Location: Seattle
Posts: 1,584
i am sorry, i never considered this a bug, but rather a research and development feature. If I had known it was a problem, I would have taken it out. It will be removed in whatever is the next update.

Until then, if you are running so many encodes these files are filling up your hard-drive, please feel free to run the following script nightly , or at the end of every batch encode:

find . -name "ENC*.rva" -print | xargs rm -f

__________________
This information is provided "AS IS" with no warranties, grants no rights, and reflects my personal opinion.
karl_lillevold is offline   Reply With Quote
Old 5th December 2003, 00:45   #12  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
is "find" a linux command?
__________________
Detritus Software
Sirber is offline   Reply With Quote
Old 5th December 2003, 02:41   #13  |  Link
ookzDVD
DVD Rebuilder!
 
ookzDVD's Avatar
 
Join Date: Oct 2001
Posts: 1,147
@karl,

Is there anyway to force the Producer (Milestone >5)
while use the 2-pass always use 2-pass-ehq,
with the fast first pass and second pass always ehq=80 ?
and ignore all the audience setting for the ehq ?

thank you.
ookzDVD is offline   Reply With Quote
Old 5th December 2003, 03:23   #14  |  Link
karl_lillevold
Moderator
 
karl_lillevold's Avatar
 
Join Date: Oct 2002
Location: Seattle
Posts: 1,584
@ookzDVD: I am not quite sure I understand the question.. The reg keys will always over-ride whatever anything else specifies, incl. the audience files. So with encoderComplexity and firstPassComplexity reg keys you can set the complexities to whatever you would like, for both passes. For example, to use 65 for 1st pass and 80 for 2nd pass, in a 2-pass encode, the following keys are needed. If you want to use 80 for both passes, you can set both keys to 80 (decimal).

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\RealNetworks\RV9]
"firstPassComplexity"=dword:00000041
"encoderComplexity"=dword:00000050
__________________
This information is provided "AS IS" with no warranties, grants no rights, and reflects my personal opinion.
karl_lillevold is offline   Reply With Quote
Old 5th December 2003, 03:31   #15  |  Link
ookzDVD
DVD Rebuilder!
 
ookzDVD's Avatar
 
Join Date: Oct 2001
Posts: 1,147
@karl,

thank you for your reply.

ps, which milestone your recommend to use (with autorv9) ?

thank you.
ookzDVD is offline   Reply With Quote
Old 5th December 2003, 03:39   #16  |  Link
karl_lillevold
Moderator
 
karl_lillevold's Avatar
 
Join Date: Oct 2002
Location: Seattle
Posts: 1,584
for file-to-file encoding I don't think much changed from Milestone 6 to 7, so either of these should be fine. Then just drop in my latest encoder DLL (first post).
__________________
This information is provided "AS IS" with no warranties, grants no rights, and reflects my personal opinion.
karl_lillevold is offline   Reply With Quote
Old 5th December 2003, 10:24   #17  |  Link
tiki4
Registered User
 
tiki4's Avatar
 
Join Date: Dec 2001
Location: Who Knows?
Posts: 929
Thanks Karl. I'll have to test it now.

tiki4
tiki4 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 20:23.


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