No subject


Sun Mar 15 18:43:03 CET 2009


on with bframes > 0,
which is clearly broken by it undershooting the bitrate; generally
there's a larger undershooting with more bframes.
A. I don't know enough about vbv to try and figure out exactly what
the underlying problem is
B. this issue isn't limited to only when the slicetype thread is used,
it's also prevalent when it's not.
C. I'm too tired of staring at this patch to care anymore.

due to the memory reorg of frames, x264 allocates some 35% less memory
(on average).
using the slicetype thread which is now on by default generates about
a 5-8% speed up (on average) from my testing as well.

--0015174bdcc88c7b3604723c6385
Content-Type: application/octet-stream; 
	name="x264-r1239-threaded-slicetype-v17.diff"
Content-Disposition: attachment; 
	filename="x264-r1239-threaded-slicetype-v17.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_fyxkbylg0

ZGlmZiAtLWdpdCBhL2NvbW1vbi9jb21tb24uYyBiL2NvbW1vbi9jb21tb24uYwppbmRleCAxZjAx
MDMwLi41OTNlNTkwIDEwMDY0NAotLS0gYS9jb21tb24vY29tbW9uLmMKKysrIGIvY29tbW9uL2Nv
bW1vbi5jCkBAIC00NSw2ICs0NSw3IEBAIHZvaWQgICAgeDI2NF9wYXJhbV9kZWZhdWx0KCB4MjY0
X3BhcmFtX3QgKnBhcmFtICkKICAgICBwYXJhbS0+Y3B1ID0geDI2NF9jcHVfZGV0ZWN0KCk7CiAg
ICAgcGFyYW0tPmlfdGhyZWFkcyA9IFgyNjRfVEhSRUFEU19BVVRPOwogICAgIHBhcmFtLT5iX2Rl
dGVybWluaXN0aWMgPSAxOworICAgIHBhcmFtLT5pX3N5bmNfbG9va2FoZWFkID0gWDI2NF9TWU5D
X0xPT0tBSEVBRF9BVVRPOwogCiAgICAgLyogVmlkZW8gcHJvcGVydGllcyAqLwogICAgIHBhcmFt
LT5pX2NzcCAgICAgICAgICAgPSBYMjY0X0NTUF9JNDIwOwpAQCAtMjczLDYgKzI3NCwxMyBAQCBp
bnQgeDI2NF9wYXJhbV9wYXJzZSggeDI2NF9wYXJhbV90ICpwLCBjb25zdCBjaGFyICpuYW1lLCBj
b25zdCBjaGFyICp2YWx1ZSApCiAgICAgICAgIGVsc2UKICAgICAgICAgICAgIHAtPmlfdGhyZWFk
cyA9IGF0b2kodmFsdWUpOwogICAgIH0KKyAgICBPUFQoInN5bmMtbG9va2FoZWFkIikKKyAgICB7
CisgICAgICAgIGlmKCAhc3RyY21wKHZhbHVlLCAiYXV0byIpICkKKyAgICAgICAgICAgIHAtPmlf
c3luY19sb29rYWhlYWQgPSBYMjY0X1NZTkNfTE9PS0FIRUFEX0FVVE87CisgICAgICAgIGVsc2UK
KyAgICAgICAgICAgIHAtPmlfc3luY19sb29rYWhlYWQgPSBhdG9pKHZhbHVlKTsKKyAgICB9CiAg
ICAgT1BUMigiZGV0ZXJtaW5pc3RpYyIsICJuLWRldGVybWluaXN0aWMiKQogICAgICAgICBwLT5i
X2RldGVybWluaXN0aWMgPSBhdG9ib29sKHZhbHVlKTsKICAgICBPUFQyKCJsZXZlbCIsICJsZXZl
bC1pZGMiKQpkaWZmIC0tZ2l0IGEvY29tbW9uL2NvbW1vbi5oIGIvY29tbW9uL2NvbW1vbi5oCmlu
ZGV4IGZhMGY5YzguLmY5MjAxOTYgMTAwNjQ0Ci0tLSBhL2NvbW1vbi9jb21tb24uaAorKysgYi9j
b21tb24vY29tbW9uLmgKQEAgLTI0MCw2ICsyNDAsMTggQEAgdHlwZWRlZiBzdHJ1Y3QKIAogfSB4
MjY0X3NsaWNlX2hlYWRlcl90OwogCit0eXBlZGVmIHN0cnVjdCB4MjY0X2xvb2thaGVhZF90Cit7
CisgICAgdWludDhfdCAgICAgICAgICAgICAgICAgICAgICAgYl90aHJlYWRfYWN0aXZlOworICAg
IHVpbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgIGJfZXhpdF90aHJlYWQ7CisgICAgdWludDhf
dCAgICAgICAgICAgICAgICAgICAgICAgYl9hbmFseXNlX2tleWZyYW1lOworICAgIGludCAgICAg
ICAgICAgICAgICAgICAgICAgICAgIGlfbGFzdF9pZHI7CisgICAgeDI2N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GZyYW1lLT5tYl90eXBlLCBpX21iX2NvdW50ICogc2l6ZW9mKGludDhf
dCkpOworICAgICAgICBDSEVDS0VEX01BTExPQyggZnJhbWUtPm12WzBdLCAyKjE2ICogaV9tYl9j
b3VudCAqIHNpemVvZihpbnQxNl90KSApOworICAgICAgICBDSEVDS0VEX01BTExPQyggZnJhbWUt
PnJlZlswXSwgNCAqIGlfbWJfY291bnQgKiBzaXplb2YoaW50OF90KSApOworICAgICAgICBpZigg
aC0+cGFyYW0uaV9iZnJhbWUgKQorICAgICAgICB7CisgICAgICAgICAgICBDSEVDS0VEX01BTExP
QyggZnJhbWUtPm12WzFdLCAyKjE2ICogaV9tYl9jb3VudCAqIHNpemVvZihpbnQxNl90KSApOwor
ICAgICAgICAgICAgQ0hFQ0tFRF9NQUxMT0MoIGZyYW1lLT5yZWZbMV0sIDQgKiBpX21iX2NvdW50
ICogc2l6ZW9mKGludDhfdCkgKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgIHsK
KyAgICAgICAgICAgIGZyYW1lLT5tdlsxXSAgPSBOVUxMOworICAgICAgICAgICAgZnJhbWUtPnJl
ZlsxXSA9IE5VTEw7CisgICAgICAgIH0KKyAgICAgICAgQ0hFQ0tFRF9NQUxMT0MoIGZyYW1lLT5p
X3Jvd19iaXRzLCBpX2xpbmVzLzE2ICogc2l6ZW9mKGludCkgKTsKKyAgICAgICAgQ0hFQ0tFRF9N
QUxMT0MoIGZyYW1lLT5pX3Jvd19xcCwgaV9saW5lcy8xNiAqIHNpemVvZihpbnQpICk7CisgICAg
ICAgIGlmKCBoLT5wYXJhbS5hbmFseXNlLmlfbWVfbWV0aG9kID49IFgyNjRfTUVfRVNBICkKKyAg
ICAgICAgeworICAgICAgICAgICAgQ0hFQ0tFRF9NQUxMT0MoIGZyYW1lLT5idWZmZXJbM10sCisg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJhbWUtPmlfc3RyaWRlWzBdICogKGZyYW1lLT5p
X2xpbm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oZWFkLT5uZXh0Lm11dGV4ICk7CisgICAgeDI2NF9wdGhy
ZWFkX211dGV4X2xvY2soICZoLT5sb29rYWhlYWQtPmlmYnVmLm11dGV4ICk7CisgICAgeDI2NF9s
b29rYWhlYWRfc2hpZnQoICZoLT5sb29rYWhlYWQtPm5leHQsICZoLT5sb29rYWhlYWQtPmlmYnVm
LCBoLT5sb29rYWhlYWQtPmlmYnVmLmlfc2l6ZSApOworICAgIHgyNjRfcHRocmVhZF9tdXRleF91
bmxvY2soICZoLT5sb29rYWhlYWQtPmlmYnVmLm11dGV4ICk7CisgICAgeDI2NF9wdGhyZWFkX211
dGV4X3VubG9jayggJmgtPmxvb2thaGVhZC0+bmV4dC5tdXRleCApOworICAgIHdoaWxlKCBoLT5s
b29rYWhlYWQtPm5leHQuaV9zaXplICkKKyAgICAgICAgeDI2NF9sb29rYWhlYWRfc2xpY2V0eXBl
X2RlY2lkZSggaCApOworICAgIGgtPmxvb2thaGVhZC0+Yl90aHJlYWRfYWN0aXZlID0gMDsKK30K
KyNlbmRpZgorCitpbnQgeDI2NF9sb29rYWhlYWRfaW5pdCggeDI2NF90ICpoICkKK3sKKyAgICB4
MjY0X2xvb2thaGVhZF90ICpsb29rOworICAgIHgyNjRfdCAqbG9va19oOworICAgIENIRUNLRURf
TUFMTE9DWkVSTyggbG9vaywgc2l6ZW9mKHgyNjRfbG9va2FoZWFkX3QpICk7CisgICAgaW50IGk7
CisgICAgZm9yKCBpID0gMDsgaSA8IGgtPnBhcmFtLmlfdGhyZWFkcyArICEhaC0+cGFyYW0uaV9z
eW5jX2xvb2thaGVhZDsgaSsrICkKKyAgICAgICAgaC0+dGhyZWFkW2ldLT5sb29rYWhlYWQgPSBs
b29rOworCisgICAgbG9vay0+Yl9leGl0X3RocmVhZCA9IDE7CisgICAgbG9vay0+aV9sYXN0X2lk
ciA9IC0gaC0+cGFyYW0uaV9rZXlpbnRfbWF4OworICAgIGxvb2stPmJfYW5hbHlzZV9rZXlmcmFt
ZSA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aWQgeDI2NF9z
bGljZXR5cGVfZGVjaWRlKCB4MjY0X3QgKmggKQogCiAgICAgZm9yKCBiZnJhbWVzID0gMDs7IGJm
cmFtZXMrKyApCiAgICAgewotICAgICAgICBmcm0gPSBoLT5mcmFtZXMubmV4dFtiZnJhbWVzXTsK
KyAgICAgICAgZnJtID0gaC0+bG9va2FoZWFkLT5uZXh0Lmxpc3RbYmZyYW1lc107CiAKICAgICAg
ICAgLyogTGltaXQgR09QIHNpemUgKi8KLSAgICAgICAgaWYoIGZybS0+aV9mcmFtZSAtIGgtPmZy
YW1lcy5pX2xhc3RfaWRyID49IGgtPnBhcmFtLmlfa2V5aW50X21heCApCisgICAgICAgIGlmKCBm
cm0tPmlfZnJhbWUgLSBoLT5sb29rYWhlYWQtPmlfbGFzdF9pZHIgPj0gaC0+cGFyYW0uaV9rZXlp
bnRfbWF4ICkKICAgICAgICAgewogICAgICAgICAgICAgaWYoIGZybS0+aV90eXBlID09IFgyNjRf
VFlQRV9BVVRPICkKICAgICAgICAgICAgICAgICBmcm0tPmlfdHlwZSA9IFgyNjRfVFlQRV9JRFI7
CkBAIC05MTcsMTkgKzkxNywxNiBAQCB2b2lkIHgyNjRfc2xpY2V0eXBlX2RlY2lkZSggeDI2NF90
ICpoICkKICAgICAgICAgaWYoIGZybS0+aV90eXBlID09IFgyNjRfVFlQRV9JRFIgKQogICAgICAg
ICB7CiAgICAgICAgICAgICAvKiBDbG9zZSBHT1AgKi8KKyAgICAgICAgICAgIGgtPmxvb2thaGVh
ZC0+aV9sYXN0X2lkciA9IGZybS0+aV9mcmFtZTsKICAgICAgICAgICAgIGlmKCBiZnJhbWVzID4g
MCApCiAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgYmZyYW1lcy0tOwotICAgICAgICAg
ICAgICAgIGgtPmZyYW1lcy5uZXh0W2JmcmFtZXNdLT5pX3R5cGUgPSBYMjY0X1RZUEVfUDsKLSAg
ICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2U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RocmVhZGVkICovCisgICAgaW50ICAgICAgICAgaV9zeW5jX2xvb2thaGVhZDsgLyogdGhy
ZWFkZWQgbG9va2FoZWFkIGJ1ZmZlciAqLwogCiAgICAgLyogVmlkZW8gUHJvcGVydGllcyAqLwog
ICAgIGludCAgICAgICAgIGlfd2lkdGg7Cg==
--0015174bdcc88c7b3604723c6385--


More information about the x264-devel mailing list