View Single Post
Old 28th June 2009, 23:56   #8  |  Link
CAFxX
Stray Developer
 
CAFxX's Avatar
 
Join Date: Mar 2003
Location: Italy
Posts: 82
Quote:
Let's say you have a patch that speeds up --ref 16 by 50%. Everyone is very happy; clearly this is a great improvement. Then, someone goes and tests and finds that you can get the same speedup for the same quality cost simply by setting --ref 6 instead of 16, and that the patch is a complete waste of time.
In some of my tests the encoded clip ended up having maximum 2 consecutive b-frames. If I had known this fact beforehand I could have set -b 2 and I would have saved a ton of time (both writing the patch and at runtime), but this is -in general - hardly the case. At least, IMHO.

Quote:
The big possible problem with this I imagine is that the places it will do worst are the few places where tons of B-frames are actually useful--and the places it will do best is the places where they aren't useful, in other words, it will do nothing at all.
The only scenario where this patch could actually possibly perform worse than the main tree is if a scene, after some GOPs where few b-frames are used, suddenly starts having tons of consecutive b-frames. I honestly don't know how common this scenario is. And, BTW, under these assumptions, the patch will swing from 4 to 16 bframes in at most 3 GOPs for a total of 4+8+12=24 frames, wasting one single p-frame (3 against 2).
Apart from this, the patch should behave exactly as a vanilla build. Only faster (YMMV).

Quote:
You need to test on some contrived input cases, e.g. linear fades created in Avisynth and placed after an ordinary sequence or similar (with no scenecut in between), in order to make sure your algorithm isn't going to react badly.
This is why I posted it here in the first place. Bear in mind that this is the absolute first version of the algorithm; as such it is everything but tuned.

Quote:
Finally, I don't like the idea of making b-adapt 2 too suboptimal because the idea of b-adapt 2 to begin with was to serve as a reference representing the best possible B-frame decision given a certain metric (slicetype_frame_cost).
Another good reason to parametrize this algorithm. Moreover, plugging in the same algorithm for --b-adapt 0 is absolutely trivial. For --b-adapt 1 it's only slightly harder IIRC.
__________________
CAFxXcrossway, a collection of my projects
CAFxX@strayorange, my blog
CAFxX is offline   Reply With Quote