[x265] [PATCH 2 of 2] Used slicetypeAnalyse() in slicetypeDecide()
shazeb at multicorewareinc.com
shazeb at multicorewareinc.com
Mon Sep 2 12:49:23 CEST 2013
# HG changeset patch
# User Shazeb Nawaz Khan <shazeb at multicorewareinc.com>
# Date 1378118764 -19800
# Mon Sep 02 16:16:04 2013 +0530
# Node ID e4a57ae74dd96ceb31815a44098b81872e494fff
# Parent e2d93166e034040d61c897264e1dfe7aeeb3d661
Used slicetypeAnalyse() in slicetypeDecide()
diff -r e2d93166e034 -r e4a57ae74dd9 source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp Mon Sep 02 16:13:37 2013 +0530
+++ b/source/encoder/slicetype.cpp Mon Sep 02 16:16:04 2013 +0530
@@ -112,6 +112,25 @@
#if 0
slicetypeAnalyse(false);
+ // This will work only in all-P config
+ int dframes;
+ for (dframes = 0; (frames[dframes + 1] != NULL) && (frames[dframes + 1]->sliceType != X265_TYPE_AUTO); dframes++)
+ {}
+
+ TComPic *pic;
+ for (int i = 1; i <= dframes && i <= inputQueue.size(); i++)
+ {
+ pic = inputQueue.popFront();
+ pic->m_lowres.gopIdx = (pic->getPOC() - 1) % (cfg->getGOPSize());
+ outputQueue.pushBack(pic);
+ if (pic->m_lowres.sliceType == X265_TYPE_I)
+ {
+ lastKeyframe = pic->getPOC();
+ }
+ }
+
+#else // if 0
+ // Fake lookahead using HM's fixed GOP structure
int batchSize = cfg->getGOPSize();
for (int i = 0; i < batchSize; i++)
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265-2.patch
Type: text/x-patch
Size: 1263 bytes
Desc: not available
URL: <https://mailman.videolan.org/private/x265-devel/attachments/20130902/0b02bf16/attachment.bin>
More information about the x265-devel
mailing list