[x265] [PATCH] slicetype: make b-adapt 0 set lastNonB, leadingBframes, and bLastMiniGopBFrame
Steve Borho
steve at borho.org
Tue Nov 5 06:27:12 CET 2013
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1383629219 21600
# Mon Nov 04 23:26:59 2013 -0600
# Node ID 7aa33c9734f55fefeed0f28bc5f53bffccfbcb87
# Parent 686b5b50279715bcfd15af8603e52c59de7d1b40
slicetype: make b-adapt 0 set lastNonB, leadingBframes, and bLastMiniGopBFrame
diff -r 686b5b502797 -r 7aa33c9734f5 source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp Mon Nov 04 22:50:48 2013 -0600
+++ b/source/encoder/slicetype.cpp Mon Nov 04 23:26:59 2013 -0600
@@ -702,6 +702,7 @@
pic->m_lowres.sliceType = X265_TYPE_I;
pic->m_lowres.bKeyframe = true;
lastKeyframe = pic->m_lowres.frameNum;
+ lastNonB = &pic->m_lowres;
}
outputQueue.pushBack(*pic);
numDecided++;
@@ -725,12 +726,18 @@
}
}
- TComPic *pic = list[j - 1];
+ int bframes = j - 1;
+ if (bframes)
+ list[bframes - 1]->m_lowres.bLastMiniGopBFrame = true;
+ list[bframes]->m_lowres.leadingBframes = bframes;
+ lastNonB = &list[bframes]->m_lowres;
+
+ TComPic *pic = list[bframes];
if (pic->m_lowres.sliceType == X265_TYPE_AUTO)
pic->m_lowres.sliceType = X265_TYPE_P;
outputQueue.pushBack(*pic);
numDecided++;
- for (int i = 0; i < j - 1; i++)
+ for (int i = 0; i < bframes; i++)
{
pic = list[i];
if (pic->m_lowres.sliceType == X265_TYPE_AUTO)
More information about the x265-devel
mailing list