[x265] [PATCH] SEI: fix bug in picture timing SEI when interlace encoding is enabled

kavitha at multicorewareinc.com kavitha at multicorewareinc.com
Tue May 27 13:43:24 CEST 2014


# HG changeset patch
# User Kavitha Sampath <kavitha at multicorewareinc.com>
# Date 1401190838 -19800
#      Tue May 27 17:10:38 2014 +0530
# Node ID 63701d2926782aa01330350a979c0952b8bcd9a8
# Parent  5e8cce428457f63fd9b8e18dafed2f8bed674d53
SEI: fix bug in picture timing SEI when interlace encoding is enabled

diff -r 5e8cce428457 -r 63701d292678 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Fri May 23 09:11:15 2014 -0500
+++ b/source/encoder/frameencoder.cpp	Tue May 27 17:10:38 2014 +0530
@@ -573,7 +573,14 @@
         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-devel mailing list