[x264-devel] Use the correct default B-ref placement with B-pyramid
Anton Mitrofanov
git at videolan.org
Tue Apr 12 20:36:13 CEST 2016
x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Sun Apr 10 20:13:59 2016 +0300| [fd2c324731c2199e502ded9eff723d29c6eafe0b] | committer: Henrik Gramner
Use the correct default B-ref placement with B-pyramid
Cost analyse functions expects the placement of the B-ref in a sequence of
an even number of B-frames to be located towards the beginning while the
actual placement was towards the end.
Change the placement to be consistent with the analyse expectations, e.g.
PbbBbP -> PbBbbP.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=fd2c324731c2199e502ded9eff723d29c6eafe0b
---
encoder/slicetype.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/encoder/slicetype.c b/encoder/slicetype.c
index d7fcb9d..32540be 100644
--- a/encoder/slicetype.c
+++ b/encoder/slicetype.c
@@ -1928,7 +1928,7 @@ void x264_slicetype_decide( x264_t *h )
/* insert a bref into the sequence */
if( h->param.i_bframe_pyramid && bframes > 1 && !brefs )
{
- h->lookahead->next.list[bframes/2]->i_type = X264_TYPE_BREF;
+ h->lookahead->next.list[(bframes-1)/2]->i_type = X264_TYPE_BREF;
brefs++;
}
More information about the x264-devel
mailing list