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 Display Modes
Old 8th October 2005, 13:17   #1  |  Link
bond
Moderator
 
Join Date: Nov 2001
Posts: 9,780
new x264 feature: mixed references

thx to Alex_W x264 now has a new feature: mixed references

Quote:
Allows each 8x8 or 16x8 partition to independently select a reference frame, as opposed to only one ref per macroblock.
you can enable it in x264 via the --mixed-refs switch

are there already any findings how much this slows things down
is there a way to check how often different references per frame have been used?
__________________
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 8th October 2005, 15:49   #2  |  Link
Kopernikus
Registered User
 
Join Date: Sep 2002
Posts: 126
I found a slowdown of about 10 % with a PSNR Gain of about 0.03 dB

And I`m getting funky color artifacts. So be careful. It seems there is a bug.

edit: It was a compiler bug on my side, Sharktooths build works like a charm

Last edited by Kopernikus; 8th October 2005 at 17:15.
Kopernikus is offline   Reply With Quote
Old 8th October 2005, 19:36   #3  |  Link
virus
Senior n00b
 
Join Date: Jan 2004
Location: Italy
Posts: 446
Congratulations to Alex for finally entering x264's changelog

Last time I saw results from a pre-release version of this patch, there was a 30% slowdown with up to 0.2-0.25 dB of PSNR gain at constant quantizer (that including the bitrate savings, using the approximate "rule" 1% bitrate = 0.05 dB). I don't know about the final version who made it into SVN. It's probably faster than that.

That only applies to content where multiple refs actually help. Very high motion scenes and scenes with lots of scenechanges usually don't benefit at all from multiple refs, so this patch improves little or nothing in those situations. However it is OK for most material. Probably useless for a trailer, certainly good for boosting the overall quality of a full-length movie
virus is offline   Reply With Quote
Old 8th October 2005, 19:43   #4  |  Link
Sirber
Registered User
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,732
In which rev is that enabled?
__________________
download RealAnime and Bencos
Sirber is offline   Reply With Quote
Old 8th October 2005, 19:44   #5  |  Link
bob0r
Pain and suffering
 
bob0r's Avatar
 
Join Date: Jul 2002
Posts: 1,270
Quote:
Originally Posted by Sirber
In which rev is that enabled?
------------------------------------------------------------------------
r318 | pengvado | 2005-10-08 08:49:29 +0200 (Sat, 08 Oct 2005) | 5 lines

new option: --mixed-refs
Allows each 8x8 or 16x8 partition to independently select a reference frame, as opposed to only one ref per macroblock.
patch mostly by Alex Wright (alexw0885 at hotmail dot com).


------------------------------------------------------------------------
__________________
(x264.nl)
bob0r is offline   Reply With Quote
Old 8th October 2005, 20:06   #6  |  Link
Suchy
Registered User
 
Join Date: Aug 2005
Posts: 69
what about VfW version?
It works only in CLI?
Suchy is offline   Reply With Quote
Old 8th October 2005, 20:35   #7  |  Link
jellysandwich
Registered User
 
Join Date: Mar 2004
Posts: 246
So in layman's terms, this feature increases quality at the expense of speed (encoding time)?

js
jellysandwich is offline   Reply With Quote
Old 8th October 2005, 20:56   #8  |  Link
Kopernikus
Registered User
 
Join Date: Sep 2002
Posts: 126
Quote:
So in layman's terms, this feature increases quality at the expense of speed (encoding time)?
Exactly!
Kopernikus is offline   Reply With Quote
Old 8th October 2005, 21:00   #9  |  Link
Caroliano
Registered User
 
Join Date: Feb 2005
Location: São Paulo, Brazil
Posts: 322
Only encoding time is affected? The decoding complexity still the same?
Caroliano is offline   Reply With Quote
Old 9th October 2005, 01:15   #10  |  Link
hpn
Registered User
 
Join Date: Jan 2005
Posts: 192
A short test with 5 ref frames and 2 bframes:

without --mixed-refs:
x264 -p 1 -B 700 -A all -r 5 -b 2 -w -8 --progress --frames 1500 -o NUL a.avs
x264 -p 2 -B 700 -A all -r 5 -b 2 -w -8 --progress --frames 1500 -o b2_r5.mp4 a.avs
PSNR Global:43.264 8.00 fps, 700.13 kb/s

with --mixed-refs:
x264 -p 1 -B 700 -A all -r 5 -b 2 -w -8 --mixed-refs --progress --frames 1500 -o NUL a.avs
x264 -p 2 -B 700 -A all -r 5 -b 2 -w -8 --mixed-refs --progress --frames 1500 -o b2_r5_mixed.mp4 a.avs
PSNR Global:43.298 6.71 fps, 699.99 kb/s

About 0.034 PSNR gain with --mixed-refs and 16% slower encode. Decoding CPU usage is the same for both encodes (~40% )
As expected --mixed-refs makes no difference if encoding with only 1 max ref frames (the default value), so one should use --mixed-refs with at least -r 2, otherwise the resulting encodes are bit-identical.

I also squeezed 0.017 extra PSNR by upping the max ref. from 5 to 16 (but it's slow).

x264 -p 1 -B 700 -A all -r 16 -b 2 -w -8 --mixed-refs --progress --frames 1500 -o NUL a.avs
x264 -p 2 -B 700 -A all -r 16 -b 2 -w -8 --mixed-refs --progress --frames 1500 -o b2_r16_mixed.mp4 a.avs

PSNR Global:43.315 4.06 fps, 699.78 kb/s
hpn is offline   Reply With Quote
Old 9th October 2005, 02:21   #11  |  Link
jellysandwich
Registered User
 
Join Date: Mar 2004
Posts: 246
Quote:
Originally Posted by hpn
A short test with 5 ref frames and 2 bframes:

without --mixed-refs:
x264 -p 1 -B 700 -A all -r 5 -b 2 -w -8 --progress --frames 1500 -o NUL a.avs
x264 -p 2 -B 700 -A all -r 5 -b 2 -w -8 --progress --frames 1500 -o b2_r5.mp4 a.avs
PSNR Global:43.264 8.00 fps, 700.13 kb/s

with --mixed-refs:
x264 -p 1 -B 700 -A all -r 5 -b 2 -w -8 --mixed-refs --progress --frames 1500 -o NUL a.avs
x264 -p 2 -B 700 -A all -r 5 -b 2 -w -8 --mixed-refs --progress --frames 1500 -o b2_r5_mixed.mp4 a.avs
PSNR Global:43.298 6.71 fps, 699.99 kb/s

About 0.034 PSNR gain with --mixed-refs and 16% slower encode. Decoding CPU usage is the same for both encodes (~40% )
As expected --mixed-refs makes no difference if encoding with only 1 max ref frames (the default value), so one should use --mixed-refs with at least -r 2, otherwise the resulting encodes are bit-identical.

I also squeezed 0.017 extra PSNR by upping the max ref. from 5 to 16 (but it's slow).

x264 -p 1 -B 700 -A all -r 16 -b 2 -w -8 --mixed-refs --progress --frames 1500 -o NUL a.avs
x264 -p 2 -B 700 -A all -r 16 -b 2 -w -8 --mixed-refs --progress --frames 1500 -o b2_r16_mixed.mp4 a.avs

PSNR Global:43.315 4.06 fps, 699.78 kb/s
Newb q: How are PSNR values supposed to be interpreted? Ie, is a .034 PSNR increase signficant or just minor?

js
jellysandwich is offline   Reply With Quote
Old 9th October 2005, 08:02   #12  |  Link
celtic_druid
Registered User
 
celtic_druid's Avatar
 
Join Date: Oct 2001
Location: Melbourne, Australia
Posts: 2,175
Quote:
Originally Posted by Suchy
what about VfW version?
It works only in CLI?
http://ffdshow.faireal.net/mirror/x264/X264VFW.exe
celtic_druid is offline   Reply With Quote
Old 9th October 2005, 10:20   #13  |  Link
hpn
Registered User
 
Join Date: Jan 2005
Posts: 192
Quote:
Originally Posted by jellysandwich
Newb q: How are PSNR values supposed to be interpreted? Ie, is a .034 PSNR increase signficant or just minor?
js
Let's find out by making an extra 710kbps encode:

--bitrate 700 -> PSNR 43.264 (resulting kb/s:700.13)
--bitrate 710 -> PSNR 43.314 (resulting kb/s:709.92)

so 9.79kbps more -> 0.050 PSNR gain

So to gain 0.034 PSNR without --mixed-refs, you'll need to add 6.65kbps (estimated) more bitrate to the original 700. It means that --mixed-refs contributes to almost 1% encoding efficiency in terms of quality. Not bad at all . Of course this conclusion is valid for this particular 1 minute clip (1500 frames) and may be wrong in the general case.

Last edited by hpn; 9th October 2005 at 10:25.
hpn is offline   Reply With Quote
Old 9th October 2005, 11:33   #14  |  Link
DarkZell666
http://z0r.de/?id=1235
 
DarkZell666's Avatar
 
Join Date: Jun 2005
Location: France
Posts: 1,108
Question :
What source has been used for these test ?
Real-life movie or anime/cartoon ?

Another question (maybe off-topic):

Why is it when I download sharktooth's builds I get some wierd message
saying the executable file is corrupted ? (says: "use /NSRC to execute anyway"). I tried downloading the file several times over (and several builds over too, not just 318a) and I alwaygs get the same bl**dy message :/

Those on x264.nl (b0b0r's I suppose ?) work perfectly (at least, before the server went down :P), so I'm wondering if I haven't missed something :/

Last edited by DarkZell666; 9th October 2005 at 11:37.
DarkZell666 is offline   Reply With Quote
Old 9th October 2005, 11:45   #15  |  Link
celtic_druid
Registered User
 
celtic_druid's Avatar
 
Join Date: Oct 2001
Location: Melbourne, Australia
Posts: 2,175
Sounds like the downloads are incomplete.
celtic_druid is offline   Reply With Quote
Old 9th October 2005, 16:17   #16  |  Link
bob0r
Pain and suffering
 
bob0r's Avatar
 
Join Date: Jul 2002
Posts: 1,270
@celtic_druid

Source (x264 patch?) + standalone .dll for updated VFW, possible?

Thanks

(P.S. mirror05 is working (again), it was working, but dns was down)
__________________
(x264.nl)
bob0r is offline   Reply With Quote
Old 9th October 2005, 17:05   #17  |  Link
virus
Senior n00b
 
Join Date: Jan 2004
Location: Italy
Posts: 446
a quick test at constant quantizer to show the capabilities of mixed refs.
x264-r322, 800 frames, PAL DVD source, 560x304, mid-motion, quite rich texture detail.

--qp 22 -m 5 -r 3 -b 2 -8 -A all --me umh
PSNR Mean Y:41.246 U:45.522 V:46.297 Avg:42.304 Global:42.045
5.73 fps, 1320.83 kb/s

--qp 22 -m 5 -r 3 -b 2 -8 -A all --me umh --mixed-refs
PSNR Mean Y:41.253 U:45.522 V:46.296 Avg:42.310 Global:42.052
5.12 fps, 1299.14 kb/s

as expected, with --mixed-refs x264 basically kept the same output quality (differences <= 0.01 dB cannot absolutely be seen) while using a 1.6% lower bitrate. The price for that improvement was reasonably fair, roughly a 10% slowdown.
According to Alex, mixed-refs should perform even better when using R/D to select which reference to use (but R/D is slow, you know).
virus is offline   Reply With Quote
Old 9th October 2005, 17:50   #18  |  Link
AlexW
x264 contributor
 
Join Date: Feb 2005
Posts: 16
Hi all, as virus said --mixed-refs seem to help more on some content than on others, though hopefully using RD to select references will help improve the gain a bit
AlexW is offline   Reply With Quote
Old 9th October 2005, 18:00   #19  |  Link
virus
Senior n00b
 
Join Date: Jan 2004
Location: Italy
Posts: 446
Quote:
Originally Posted by AlexW
Hi all, as virus said --mixed-refs seem to help more on some content than on others, though hopefully using RD to select references will help improve the gain a bit
Man, this guy is really chatty
I cannot tell you "welcome on doom9's forums" since you already made one post eight months ago...
Anyway folks, this guy is Alex, regular x264 contributor (with a new kickass patch coming soon btw) and maybe future developer Make sure you welcome him as he deserves.
virus is offline   Reply With Quote
Old 9th October 2005, 19:05   #20  |  Link
Kostarum Rex Persia
Banned
 
Join Date: May 2005
Location: Serbia
Posts: 565
Of course, he is more then welcome here. I wish him luck in compiling x264 codec.
Kostarum Rex Persia is offline   Reply With Quote
Reply

Thread Tools
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:58.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.