View Full Version : About --ref
palmman
9th January 2010, 13:07
Hi guys,
I1 P2 P3 B4 P5 P6
If B4 only refers to P3/P5, and I1/P2/P6 is prohibited. In other words, the distance of reference is 1. According to x264 help, what I should do is using "--ref 1". Is my thought right? Thanks a lot.
Asmodian
12th January 2010, 22:02
I don't think that is quite right, --ref 1 means there is only 1 decoded picture frame used as a reference for any type of frame.
As far as I understand it you need at least 2 refs to use B frames (1 forward, 1 back).
sneaker_ger
12th January 2010, 22:27
As far as I understand it you need at least 2 refs to use B frames (1 forward, 1 back).
Yes, that's true. If you're using b-frames x264 will set a minimum of --ref 2 - even if you're setting "--ref 1" manually.
Dark Shikari
12th January 2010, 22:30
Yes, that's true. If you're using b-frames x264 will set a minimum of --ref 2 - even if you're setting "--ref 1" manually.Wrong. --ref X means "use no more than X reference frames whenever possible". This means even with B-frames, P-frames will still use only 1 reference frame.
More specifically, --ref X is the maximum size of the L0 reference list.
sneaker_ger
12th January 2010, 22:58
I see. Didn't notice that. What about the question of the thread starter? Will it also limit the distance or could B4 reference P2 instead of P3 for example? (using --ref 1)
Dark Shikari
12th January 2010, 23:00
Assuming his example is display order, not coded order, yes.
sneaker_ger
12th January 2010, 23:03
"Yes" meaning that B4 could reference P2 or "yes" meaning it will limit the distance?
Dark Shikari
12th January 2010, 23:17
"Yes" meaning that B4 could reference P2 or "yes" meaning it will limit the distance?Neither, "yes, in that case, B4 will reference P3 and P5".
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.