[x265-commits] [x265] compress: add EMMS at return of xCompressInterCu

Steve Borho steve at borho.org
Mon Jun 16 06:36:07 CEST 2014


details:   http://hg.videolan.org/x265/rev/5b975609dc0a
branches:  
changeset: 7040:5b975609dc0a
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 10:58:39 2014 -0500
description:
compress: add EMMS at return of xCompressInterCu

Removed the EMMS from xComputeCostMerge2Nx2N since it is only called from the CU
compress function and it is not using floats
Subject: [x265] rc: set isCbr flag to true only in vbv mode and maxrate equals bitrate

details:   http://hg.videolan.org/x265/rev/a302daa9abd0
branches:  
changeset: 7041:a302daa9abd0
user:      Aarthi Thirumalai
date:      Thu Jun 12 17:12:41 2014 +0530
description:
rc: set isCbr flag to true only in vbv mode and maxrate equals bitrate
Subject: [x265] frameencoder: fix header case

details:   http://hg.videolan.org/x265/rev/01a0982d2e4b
branches:  
changeset: 7042:01a0982d2e4b
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 11:20:28 2014 -0500
description:
frameencoder: fix header case

Reported by Elyonta
Subject: [x265] frameencoder: move prefix SEI generation all together, before compressCTURows

details:   http://hg.videolan.org/x265/rev/ff47e8fd3751
branches:  
changeset: 7043:ff47e8fd3751
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 19:13:21 2014 -0500
description:
frameencoder: move prefix SEI generation all together, before compressCTURows
Subject: [x265] remove unused gradual decoding refresh info SEI

details:   http://hg.videolan.org/x265/rev/9283279c721c
branches:  
changeset: 7044:9283279c721c
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 19:16:05 2014 -0500
description:
remove unused gradual decoding refresh info SEI
Subject: [x265] frameencoder: declare bitstreamRedirect on stack, do not malloc. cleanups

details:   http://hg.videolan.org/x265/rev/2b866266f884
branches:  
changeset: 7045:2b866266f884
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 19:25:27 2014 -0500
description:
frameencoder: declare bitstreamRedirect on stack, do not malloc. cleanups
Subject: [x265] dpb: no need to reset next slice in init function

details:   http://hg.videolan.org/x265/rev/1c2ee741e5b1
branches:  
changeset: 7046:1c2ee741e5b1
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 20:47:28 2014 -0500
description:
dpb: no need to reset next slice in init function
Subject: [x265] frameencoder: remove obsolete comment

details:   http://hg.videolan.org/x265/rev/d55abb8e9106
branches:  
changeset: 7047:d55abb8e9106
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 20:47:44 2014 -0500
description:
frameencoder: remove obsolete comment
Subject: [x265] sao: remove unnecessary shim function

details:   http://hg.videolan.org/x265/rev/957a5e3d0d7b
branches:  
changeset: 7048:957a5e3d0d7b
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 20:48:10 2014 -0500
description:
sao: remove unnecessary shim function
Subject: [x265] slice: remove unused finalized flag

details:   http://hg.videolan.org/x265/rev/e8aee2613bf6
branches:  
changeset: 7049:e8aee2613bf6
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 21:07:43 2014 -0500
description:
slice: remove unused finalized flag
Subject: [x265] frameencoder: inline slice bounds determination, do not perform twice

details:   http://hg.videolan.org/x265/rev/4ac8602fb0af
branches:  
changeset: 7050:4ac8602fb0af
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 21:09:25 2014 -0500
description:
frameencoder: inline slice bounds determination, do not perform twice
Subject: [x265] frameencoder: move QP/lambda initialization together

details:   http://hg.videolan.org/x265/rev/9afd674721a8
branches:  
changeset: 7051:9afd674721a8
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 21:13:17 2014 -0500
description:
frameencoder: move QP/lambda initialization together
Subject: [x265] frameencoder: nit

details:   http://hg.videolan.org/x265/rev/edbb60c0ac0c
branches:  
changeset: 7052:edbb60c0ac0c
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 21:13:23 2014 -0500
description:
frameencoder: nit
Subject: [x265] frameencoder: remove redundant sets of SAO lambdas, reorder for clarity

details:   http://hg.videolan.org/x265/rev/8e51b0bfdd30
branches:  
changeset: 7053:8e51b0bfdd30
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 21:15:00 2014 -0500
description:
frameencoder: remove redundant sets of SAO lambdas, reorder for clarity
Subject: [x265] frameencoder: nit, unify comment style in this function

details:   http://hg.videolan.org/x265/rev/8644321a206e
branches:  
changeset: 7054:8644321a206e
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 21:18:23 2014 -0500
description:
frameencoder: nit, unify comment style in this function
Subject: [x265] frameencoder: make per-row output streams member variables

details:   http://hg.videolan.org/x265/rev/97be21ff81bb
branches:  
changeset: 7055:97be21ff81bb
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 21:28:03 2014 -0500
description:
frameencoder: make per-row output streams member variables

Avoid repeated malloc/free and subsequent reallocs and frees each frame
Subject: [x265] remove unused display orientation SEI

details:   http://hg.videolan.org/x265/rev/4f87da44e4db
branches:  
changeset: 7056:4f87da44e4db
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 21:36:29 2014 -0500
description:
remove unused display orientation SEI
Subject: [x265] encoder: remove unused m_bPCMInputBitDepthFlag

details:   http://hg.videolan.org/x265/rev/635f159b4d0f
branches:  
changeset: 7057:635f159b4d0f
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 21:39:08 2014 -0500
description:
encoder: remove unused m_bPCMInputBitDepthFlag
Subject: [x265] frameencoder: remove unnecessary set of nextSlice()

details:   http://hg.videolan.org/x265/rev/51618487cb7d
branches:  
changeset: 7058:51618487cb7d
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 21:42:55 2014 -0500
description:
frameencoder: remove unnecessary set of nextSlice()

This flag is only read in one place, when encoding the slice header.  We do not
support multiple slices, so there's no point in setting this multiple times.
Subject: [x265] frameencoder: remove sliceSegment, it was always false

details:   http://hg.videolan.org/x265/rev/067b68fd94cc
branches:  
changeset: 7059:067b68fd94cc
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 21:45:19 2014 -0500
description:
frameencoder: remove sliceSegment, it was always false
Subject: [x265] frameencoder: remove need for intermediate bitstreamRedirect

details:   http://hg.videolan.org/x265/rev/602b2c2506a9
branches:  
changeset: 7060:602b2c2506a9
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 21:55:28 2014 -0500
description:
frameencoder: remove need for intermediate bitstreamRedirect
Subject: [x265] slice: remove unused m_tileOffstForMultES

details:   http://hg.videolan.org/x265/rev/df0ee2403067
branches:  
changeset: 7061:df0ee2403067
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 21:57:30 2014 -0500
description:
slice: remove unused m_tileOffstForMultES
Subject: [x265] frameencoder: explain why SAO is being called after compression

details:   http://hg.videolan.org/x265/rev/35bfd27a3c82
branches:  
changeset: 7062:35bfd27a3c82
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 21:58:47 2014 -0500
description:
frameencoder: explain why SAO is being called after compression
Subject: [x265] frameencoder: remove redundant function calls and obsolete comments

details:   http://hg.videolan.org/x265/rev/5b42f824f19c
branches:  
changeset: 7063:5b42f824f19c
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 22:09:32 2014 -0500
description:
frameencoder: remove redundant function calls and obsolete comments
Subject: [x265] frameencoder: remove useless setBitstream call

details:   http://hg.videolan.org/x265/rev/33853b3f694d
branches:  
changeset: 7064:33853b3f694d
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 22:10:54 2014 -0500
description:
frameencoder: remove useless setBitstream call
Subject: [x265] frameencoder: use numSubstreams directly

details:   http://hg.videolan.org/x265/rev/2fdc26545855
branches:  
changeset: 7065:2fdc26545855
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 22:11:12 2014 -0500
description:
frameencoder: use numSubstreams directly
Subject: [x265] framefilter: remove empty end method

details:   http://hg.videolan.org/x265/rev/e254c0d81b5d
branches:  
changeset: 7066:e254c0d81b5d
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 22:14:05 2014 -0500
description:
framefilter: remove empty end method
Subject: [x265] frameencoder: inline resetEntropy(), which was only called once

details:   http://hg.videolan.org/x265/rev/54d6bb746c04
branches:  
changeset: 7067:54d6bb746c04
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 22:17:43 2014 -0500
description:
frameencoder: inline resetEntropy(), which was only called once
Subject: [x265] slice: remove unused m_nextSlice and m_dependentSliceSegmentFlag

details:   http://hg.videolan.org/x265/rev/b3070d28b792
branches:  
changeset: 7068:b3070d28b792
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 22:25:18 2014 -0500
description:
slice: remove unused m_nextSlice and m_dependentSliceSegmentFlag
Subject: [x265] sbac: simplify codeSliceHeader, x265 never codes dependent slices

details:   http://hg.videolan.org/x265/rev/a15044282290
branches:  
changeset: 7069:a15044282290
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 22:27:45 2014 -0500
description:
sbac: simplify codeSliceHeader, x265 never codes dependent slices
Subject: [x265] bitstream: simplify appendSubstream

details:   http://hg.videolan.org/x265/rev/e69a427e461f
branches:  
changeset: 7070:e69a427e461f
user:      Steve Borho <steve at borho.org>
date:      Thu Jun 12 22:53:47 2014 -0500
description:
bitstream: simplify appendSubstream

This function is only called from one place, and we can clearly see that both
the source and dest bitstreams are byte-aligned.

diffstat:

 source/Lib/TLibCommon/SEI.h                        |   38 -
 source/Lib/TLibCommon/TComBitStream.cpp            |   18 +-
 source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp |   10 -
 source/Lib/TLibCommon/TComSlice.cpp                |    6 -
 source/Lib/TLibCommon/TComSlice.h                  |   21 -
 source/Lib/TLibEncoder/SEIwrite.cpp                |   23 -
 source/Lib/TLibEncoder/SEIwrite.h                  |    2 -
 source/Lib/TLibEncoder/TEncSbac.cpp                |  454 ++++++++++----------
 source/encoder/compress.cpp                        |   14 +-
 source/encoder/dpb.cpp                             |    1 -
 source/encoder/encoder.cpp                         |    5 +-
 source/encoder/encoder.h                           |    3 -
 source/encoder/frameencoder.cpp                    |  384 +++++-----------
 source/encoder/frameencoder.h                      |   13 +-
 source/encoder/framefilter.cpp                     |    4 -
 source/encoder/framefilter.h                       |    1 -
 source/encoder/ratecontrol.cpp                     |    3 +-
 17 files changed, 369 insertions(+), 631 deletions(-)

diffs (truncated from 1418 to 300 lines):

diff -r c5015669b6dc -r e69a427e461f source/Lib/TLibCommon/SEI.h
--- a/source/Lib/TLibCommon/SEI.h	Thu Jun 05 21:40:38 2014 -0500
+++ b/source/Lib/TLibCommon/SEI.h	Thu Jun 12 22:53:47 2014 -0500
@@ -228,44 +228,6 @@ public:
     bool m_exactMatchingFlag;
     bool m_brokenLinkFlag;
 };
-
-class SEIDisplayOrientation : public SEI
-{
-public:
-
-    PayloadType payloadType() const { return DISPLAY_ORIENTATION; }
-
-    SEIDisplayOrientation()
-        : cancelFlag(true)
-        , persistenceFlag(0)
-        , extensionFlag(false)
-    {}
-
-    virtual ~SEIDisplayOrientation() {}
-
-    bool     cancelFlag;
-    bool     horFlip;
-    bool     verFlip;
-
-    uint32_t anticlockwiseRotation;
-    bool     persistenceFlag;
-    bool     extensionFlag;
-};
-
-class SEIGradualDecodingRefreshInfo : public SEI
-{
-public:
-
-    PayloadType payloadType() const { return REGION_REFRESH_INFO; }
-
-    SEIGradualDecodingRefreshInfo()
-        : m_gdrForegroundFlag(0)
-    {}
-
-    virtual ~SEIGradualDecodingRefreshInfo() {}
-
-    bool m_gdrForegroundFlag;
-};
 }
 //! \}
 
diff -r c5015669b6dc -r e69a427e461f source/Lib/TLibCommon/TComBitStream.cpp
--- a/source/Lib/TLibCommon/TComBitStream.cpp	Thu Jun 05 21:40:38 2014 -0500
+++ b/source/Lib/TLibCommon/TComBitStream.cpp	Thu Jun 12 22:53:47 2014 -0500
@@ -153,6 +153,9 @@ int TComOutputBitstream::countStartCodeE
 
 void TComOutputBitstream::appendSubstream(TComOutputBitstream* substream)
 {
+    X265_CHECK(!m_partialByteBits, "appending to a non-aligned buffer\n");
+    X265_CHECK(!substream->m_partialByteBits, "appending a non-aligned buffer\n");
+
     if (m_byteOccupancy + substream->m_byteOccupancy > m_byteAlloc)
     {
         /* reallocate buffer with doubled size */
@@ -170,16 +173,7 @@ void TComOutputBitstream::appendSubstrea
             return;
         }
     }
-    if (m_partialByteBits)
-    {
-        for (uint32_t i = 0; i < substream->m_byteOccupancy; i++)
-            write(substream->m_fifo[i], 8);
-    }
-    else
-    {
-        memcpy(m_fifo + m_byteOccupancy, substream->m_fifo, substream->m_byteOccupancy);
-        m_byteOccupancy += substream->m_byteOccupancy;
-    }
-    if (substream->m_partialByteBits)
-        write(substream->m_partialByte >> (8 - substream->m_partialByteBits), substream->m_partialByteBits);
+
+    memcpy(m_fifo + m_byteOccupancy, substream->m_fifo, substream->m_byteOccupancy);
+    m_byteOccupancy += substream->m_byteOccupancy;
 }
diff -r c5015669b6dc -r e69a427e461f source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
--- a/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp	Thu Jun 05 21:40:38 2014 -0500
+++ b/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp	Thu Jun 12 22:53:47 2014 -0500
@@ -1246,7 +1246,6 @@ void TComSampleAdaptiveOffset::copySaoUn
     }
 }
 
-static void xPCMRestoration(TComPic* pic);
 static void xPCMSampleRestoration(TComDataCU* cu, uint32_t absZOrderIdx, uint32_t depth, TextType ttText);
 
 /** PCM LF disable process.
@@ -1257,15 +1256,6 @@ static void xPCMSampleRestoration(TComDa
  */
 void PCMLFDisableProcess(TComPic* pic)
 {
-    xPCMRestoration(pic);
-}
-
-/** Picture-level PCM restoration.
- * \param pic picture (TComPic) pointer
- * \returns void
- */
-static void xPCMRestoration(TComPic* pic)
-{
     bool  bPCMFilter = (pic->getSlice()->getSPS()->getUsePCM() && pic->getSlice()->getSPS()->getPCMFilterDisableFlag()) ? true : false;
 
     if (bPCMFilter || pic->getSlice()->getPPS()->getTransquantBypassEnableFlag())
diff -r c5015669b6dc -r e69a427e461f source/Lib/TLibCommon/TComSlice.cpp
--- a/source/Lib/TLibCommon/TComSlice.cpp	Thu Jun 05 21:40:38 2014 -0500
+++ b/source/Lib/TLibCommon/TComSlice.cpp	Thu Jun 12 22:53:47 2014 -0500
@@ -51,7 +51,6 @@ TComSlice::TComSlice()
     , m_nalUnitType(NAL_UNIT_CODED_SLICE_IDR_W_RADL)
     , m_sliceType(I_SLICE)
     , m_sliceQp(0)
-    , m_dependentSliceSegmentFlag(false)
     , m_deblockingFilterDisable(false)
     , m_deblockingFilterOverrideFlag(false)
     , m_deblockingFilterBetaOffsetDiv2(0)
@@ -68,11 +67,8 @@ TComSlice::TComSlice()
     , m_colFromL0Flag(1)
     , m_colRefIdx(0)
     , m_sliceCurEndCUAddr(0)
-    , m_nextSlice(false)
     , m_sliceBits(0)
     , m_sliceSegmentBits(0)
-    , m_bFinalized(false)
-    , m_tileOffstForMultES(0)
     , m_substreamSizes(NULL)
     , m_cabacInitFlag(false)
     , m_bLMvdL1Zero(false)
@@ -112,8 +108,6 @@ void TComSlice::initSlice()
     m_sliceQpDeltaCr = 0;
     m_maxNumMergeCand = MRG_MAX_NUM_CANDS;
 
-    m_bFinalized = false;
-
     m_cabacInitFlag = false;
     m_numEntryPointOffsets = 0;
     m_enableTMVPFlag = true;
diff -r c5015669b6dc -r e69a427e461f source/Lib/TLibCommon/TComSlice.h
--- a/source/Lib/TLibCommon/TComSlice.h	Thu Jun 05 21:40:38 2014 -0500
+++ b/source/Lib/TLibCommon/TComSlice.h	Thu Jun 12 22:53:47 2014 -0500
@@ -1298,7 +1298,6 @@ private:
     NalUnitType m_nalUnitType;       ///< Nal unit type for the slice
     SliceType   m_sliceType;
     int         m_sliceQp;
-    bool        m_dependentSliceSegmentFlag;
     bool        m_deblockingFilterDisable;
     bool        m_deblockingFilterOverrideFlag;    //< offsets for deblocking filter inherit from PPS
     int         m_deblockingFilterBetaOffsetDiv2;  //< beta offset for deblocking filter
@@ -1329,12 +1328,8 @@ private:
     uint32_t    m_maxNumMergeCand;
 
     uint32_t    m_sliceCurEndCUAddr;
-    bool        m_nextSlice;
     uint32_t    m_sliceBits;
     uint32_t    m_sliceSegmentBits;
-    bool        m_bFinalized;
-
-    uint32_t    m_tileOffstForMultES;
 
     uint32_t*   m_substreamSizes;
     TComScalingList* m_scalingList; //!< pointer of quantization matrix
@@ -1402,10 +1397,6 @@ public:
 
     int       getSliceQp()                        { return m_sliceQp; }
 
-    bool      getDependentSliceSegmentFlag() const   { return m_dependentSliceSegmentFlag; }
-
-    void      setDependentSliceSegmentFlag(bool val) { m_dependentSliceSegmentFlag = val; }
-
     int       getSliceQpDelta()                   { return m_sliceQpDelta; }
 
     int       getSliceQpDeltaCb()                 { return m_sliceQpDeltaCb; }
@@ -1515,10 +1506,6 @@ public:
 
     uint32_t getSliceCurEndCUAddr()                { return m_sliceCurEndCUAddr; }
 
-    void setNextSlice(bool b)                  { m_nextSlice = b; }
-
-    bool isNextSlice()                         { return m_nextSlice; }
-
     void setSliceBits(uint32_t val)            { m_sliceBits = val; }
 
     uint32_t getSliceBits()                    { return m_sliceBits; }
@@ -1527,10 +1514,6 @@ public:
 
     uint32_t getSliceSegmentBits()             { return m_sliceSegmentBits; }
 
-    void setFinalized(bool val)                { m_bFinalized = val; }
-
-    bool getFinalized()                        { return m_bFinalized; }
-
     void  setWpScaling(wpScalingParam wp[2][MAX_NUM_REF][3]) { memcpy(m_weightPredTable, wp, sizeof(wpScalingParam) * 2 * MAX_NUM_REF * 3); }
 
     void  getWpScaling(int e, int refIdx, wpScalingParam *&wp);
@@ -1539,10 +1522,6 @@ public:
     void  initWpScaling();
     inline bool applyWP() { return (m_sliceType == P_SLICE && m_pps->getUseWP()) || (m_sliceType == B_SLICE && m_pps->getWPBiPred()); }
 
-    void setTileOffstForMultES(uint32_t offset) { m_tileOffstForMultES = offset; }
-
-    uint32_t getTileOffstForMultES()           { return m_tileOffstForMultES; }
-
     void allocSubstreamSizes(uint32_t uiNumSubstreams);
     uint32_t* getSubstreamSizes()              { return m_substreamSizes; }
 
diff -r c5015669b6dc -r e69a427e461f source/Lib/TLibEncoder/SEIwrite.cpp
--- a/source/Lib/TLibEncoder/SEIwrite.cpp	Thu Jun 05 21:40:38 2014 -0500
+++ b/source/Lib/TLibEncoder/SEIwrite.cpp	Thu Jun 12 22:53:47 2014 -0500
@@ -127,11 +127,7 @@ void SEIWriter::xWriteSEIpayloadData(con
         xWriteSEIRecoveryPoint(*static_cast<const SEIRecoveryPoint*>(&sei));
         break;
     case SEI::DISPLAY_ORIENTATION:
-        xWriteSEIDisplayOrientation(*static_cast<const SEIDisplayOrientation*>(&sei));
-        break;
     case SEI::REGION_REFRESH_INFO:
-        xWriteSEIGradualDecodingRefreshInfo(*static_cast<const SEIGradualDecodingRefreshInfo*>(&sei));
-        break;
     case SEI::SOP_DESCRIPTION:
     case SEI::TONE_MAPPING_INFO:
     case SEI::SCALABLE_NESTING:
@@ -356,25 +352,6 @@ void SEIWriter::xWriteSEIRecoveryPoint(c
     xWriteByteAlign();
 }
 
-void SEIWriter::xWriteSEIDisplayOrientation(const SEIDisplayOrientation &sei)
-{
-    WRITE_FLAG(sei.cancelFlag,           "display_orientation_cancel_flag");
-    if (!sei.cancelFlag)
-    {
-        WRITE_FLAG(sei.horFlip,                   "hor_flip");
-        WRITE_FLAG(sei.verFlip,                   "ver_flip");
-        WRITE_CODE(sei.anticlockwiseRotation, 16, "anticlockwise_rotation");
-        WRITE_FLAG(sei.persistenceFlag,           "display_orientation_persistence_flag");
-    }
-    xWriteByteAlign();
-}
-
-void SEIWriter::xWriteSEIGradualDecodingRefreshInfo(const SEIGradualDecodingRefreshInfo &sei)
-{
-    WRITE_FLAG(sei.m_gdrForegroundFlag, "gdr_foreground_flag");
-    xWriteByteAlign();
-}
-
 void SEIWriter::xWriteByteAlign()
 {
     if (m_bitIf->getNumberOfWrittenBits() % 8 != 0)
diff -r c5015669b6dc -r e69a427e461f source/Lib/TLibEncoder/SEIwrite.h
--- a/source/Lib/TLibEncoder/SEIwrite.h	Thu Jun 05 21:40:38 2014 -0500
+++ b/source/Lib/TLibEncoder/SEIwrite.h	Thu Jun 12 22:53:47 2014 -0500
@@ -64,8 +64,6 @@ protected:
     void xWriteSEIBufferingPeriod(const SEIBufferingPeriod& sei, TComSPS *sps);
     void xWriteSEIPictureTiming(const SEIPictureTiming& sei, TComSPS *sps);
     void xWriteSEIRecoveryPoint(const SEIRecoveryPoint& sei);
-    void xWriteSEIDisplayOrientation(const SEIDisplayOrientation &sei);
-    void xWriteSEIGradualDecodingRefreshInfo(const SEIGradualDecodingRefreshInfo &sei);
     void xWriteByteAlign();
 };
 }
diff -r c5015669b6dc -r e69a427e461f source/Lib/TLibEncoder/TEncSbac.cpp
--- a/source/Lib/TLibEncoder/TEncSbac.cpp	Thu Jun 05 21:40:38 2014 -0500
+++ b/source/Lib/TLibEncoder/TEncSbac.cpp	Thu Jun 12 22:53:47 2014 -0500
@@ -993,271 +993,263 @@ void TEncSbac::codeSliceHeader(TComSlice
         bitsSliceSegmentAddress++;
     }
 
-    //write slice address
-    int sliceSegmentAddress = 0;
-
-    WRITE_FLAG(sliceSegmentAddress == 0, "first_slice_segment_in_pic_flag");
+    WRITE_FLAG(1, "first_slice_segment_in_pic_flag");
     if (slice->getRapPicFlag())
     {
         WRITE_FLAG(0, "no_output_of_prior_pics_flag");
     }
     WRITE_UVLC(slice->getPPS()->getPPSId(), "slice_pic_parameter_set_id");
-    slice->setDependentSliceSegmentFlag(!slice->isNextSlice());
-    if (sliceSegmentAddress > 0)
+
+    /* x265 does not use dependent slices, so always write all this data */
+    for (int i = 0; i < slice->getPPS()->getNumExtraSliceHeaderBits(); i++)
     {
-        WRITE_CODE(sliceSegmentAddress, bitsSliceSegmentAddress, "slice_segment_address");
+        X265_CHECK(0, "slice_reserved_undetermined_flag[]");
+        WRITE_FLAG(0, "slice_reserved_undetermined_flag[]");
     }
-    if (!slice->getDependentSliceSegmentFlag())
+
+    WRITE_UVLC(slice->getSliceType(),       "slice_type");
+
+    if (slice->getPPS()->getOutputFlagPresentFlag())
     {
-        for (int i = 0; i < slice->getPPS()->getNumExtraSliceHeaderBits(); i++)
+        WRITE_FLAG(slice->getPicOutputFlag() ? 1 : 0, "pic_output_flag");
+    }
+    if (slice->getSPS()->getChromaFormatIdc() == CHROMA_444)
+    {
+        //In this version separate_color_plane_flag is 0


More information about the x265-commits mailing list