[x265-commits] [x265] SEI: fix bug in picture timing SEI when interlace encodin...

Kavitha Sampath kavitha at multicorewareinc.com
Tue May 27 20:24:06 CEST 2014


details:   http://hg.videolan.org/x265/rev/807ee7f1597b
branches:  
changeset: 6928:807ee7f1597b
user:      Kavitha Sampath <kavitha at multicorewareinc.com>
date:      Tue May 27 23:22:21 2014 +0530
description:
SEI: fix bug in picture timing SEI when interlace encoding is enabled

When the interlace mode is 1(top field first), the picstruct is 2(bottom field)
for all frames. But the picStruct for frames in display order should be
1(top field), 2(bottom field), 1, 2,..etc

diffstat:

 source/encoder/frameencoder.cpp |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r acd166cf9836 -r 807ee7f1597b source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Tue May 27 16:38:36 2014 +0530
+++ b/source/encoder/frameencoder.cpp	Tue May 27 23:22:21 2014 +0530
@@ -573,7 +573,14 @@ void FrameEncoder::compressFrame()
         OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI);
 
         SEIPictureTiming sei;
-        sei.m_picStruct = (slice->getPOC() & 1) && m_cfg->param->interlaceMode == 2 ? 1 /* top */ : 2 /* bot */;
+        if (m_cfg->param->interlaceMode == 2)
+        {
+            sei.m_picStruct = (slice->getPOC() & 1) ? 1 /* top */ : 2 /* bottom */;
+        }
+        else
+        {
+            sei.m_picStruct = (slice->getPOC() & 1) ? 2 /* bottom */ : 1 /* top */;
+        }
         sei.m_sourceScanType = 0;
         sei.m_duplicateFlag = 0;
 


More information about the x265-commits mailing list