[x265-commits] [x265] cmake: tabs to spaces
Steve Borho
steve at borho.org
Tue Jul 22 05:44:09 CEST 2014
details: http://hg.videolan.org/x265/rev/26458b8dcba4
branches:
changeset: 7499:26458b8dcba4
user: Steve Borho <steve at borho.org>
date: Mon Jul 21 17:22:45 2014 -0500
description:
cmake: tabs to spaces
Subject: [x265] entropy: settle on Entropy class name and member names
details: http://hg.videolan.org/x265/rev/ca02fa285ac0
branches:
changeset: 7500:ca02fa285ac0
user: Steve Borho <steve at borho.org>
date: Mon Jul 21 17:24:49 2014 -0500
description:
entropy: settle on Entropy class name and member names
Through all these various refactors the SBAC/CABAC/entropy classes have all
merged together and the member variables were a scattered mix
Subject: [x265] fix for GCC warning about loop bounds
details: http://hg.videolan.org/x265/rev/bf78ebd06ed0
branches:
changeset: 7501:bf78ebd06ed0
user: Steve Borho <steve at borho.org>
date: Thu Jul 17 14:14:24 2014 -0500
description:
fix for GCC warning about loop bounds
Subject: [x265] level: fix typo
details: http://hg.videolan.org/x265/rev/eed3099a90ea
branches:
changeset: 7502:eed3099a90ea
user: Steve Borho <steve at borho.org>
date: Mon Jul 21 17:26:54 2014 -0500
description:
level: fix typo
Subject: [x265] slice: add ProfileTierLevel instance to VPS
details: http://hg.videolan.org/x265/rev/7621ec03e9c6
branches:
changeset: 7503:7621ec03e9c6
user: Steve Borho <steve at borho.org>
date: Mon Jul 21 18:00:09 2014 -0500
description:
slice: add ProfileTierLevel instance to VPS
The PTL data is coded in the VPS (first) and thus belongs with that data
structure, as it allows us to simplify arguments to the level set and
determination functions.
Subject: [x265] ptl: move enums from TypeDef.h to slice.h
details: http://hg.videolan.org/x265/rev/5f64abf3a20a
branches:
changeset: 7504:5f64abf3a20a
user: Steve Borho <steve at borho.org>
date: Mon Jul 21 18:01:29 2014 -0500
description:
ptl: move enums from TypeDef.h to slice.h
Subject: [x265] level: move m_vps.maxDecPicBuffering logic into one function
details: http://hg.videolan.org/x265/rev/72641fecf86a
branches:
changeset: 7505:72641fecf86a
user: Steve Borho <steve at borho.org>
date: Mon Jul 21 18:13:37 2014 -0500
description:
level: move m_vps.maxDecPicBuffering logic into one function
This prevents duplicate logic from existing in two separate files
Subject: [x265] level: nit
details: http://hg.videolan.org/x265/rev/a2506d62d4af
branches:
changeset: 7506:a2506d62d4af
user: Steve Borho <steve at borho.org>
date: Mon Jul 21 18:13:42 2014 -0500
description:
level: nit
Subject: [x265] cli: expose x265_param_apply_profile() via --profile
details: http://hg.videolan.org/x265/rev/56e9d8a66527
branches:
changeset: 7507:56e9d8a66527
user: Steve Borho <steve at borho.org>
date: Mon Jul 21 19:59:56 2014 -0500
description:
cli: expose x265_param_apply_profile() via --profile
This is repairing an egregious oversight
Subject: [x265] param: fix profile warnings in x265_param_apply_profile()
details: http://hg.videolan.org/x265/rev/5835fa3a8281
branches:
changeset: 7508:5835fa3a8281
user: Steve Borho <steve at borho.org>
date: Mon Jul 21 20:03:32 2014 -0500
description:
param: fix profile warnings in x265_param_apply_profile()
This function was likely never used since it was not supported by the CLI till
now. When the user specifies --profile Main10, they intend that the output
stream is decodable by a Main10 decoder. This is true of any Main encode.
The reverse is not true for --profile Main and a Main10 encode. We must return
an error and abort the encode if --profile Main is specified and the encoder
was compiled for Main10 (HIGH_BIT_DEPTH).
Subject: [x265] analysis: don't initialize members of base class in constructor
details: http://hg.videolan.org/x265/rev/eeea411e197a
branches:
changeset: 7509:eeea411e197a
user: Steve Borho <steve at borho.org>
date: Mon Jul 21 22:39:23 2014 -0500
description:
analysis: don't initialize members of base class in constructor
Subject: [x265] rc: prevent gcc shadow warning about int terminate and terminate()
details: http://hg.videolan.org/x265/rev/d303b4d860e9
branches:
changeset: 7510:d303b4d860e9
user: Steve Borho <steve at borho.org>
date: Mon Jul 21 22:43:38 2014 -0500
description:
rc: prevent gcc shadow warning about int terminate and terminate()
diffstat:
source/CMakeLists.txt | 10 +-
source/Lib/TLibCommon/TypeDef.h | 35 --
source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp | 133 +++----
source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h | 6 +-
source/Lib/TLibEncoder/TEncSearch.cpp | 334 ++++++++++----------
source/Lib/TLibEncoder/TEncSearch.h | 4 +-
source/common/param.cpp | 35 +-
source/common/slice.h | 45 ++-
source/encoder/analysis.cpp | 157 ++++----
source/encoder/analysis.h | 2 +-
source/encoder/api.cpp | 6 +-
source/encoder/cturow.cpp | 14 +-
source/encoder/cturow.h | 18 +-
source/encoder/encoder.cpp | 31 +-
source/encoder/encoder.h | 10 +-
source/encoder/entropy.cpp | 144 ++++----
source/encoder/entropy.h | 20 +-
source/encoder/frameencoder.cpp | 50 +-
source/encoder/frameencoder.h | 2 +-
source/encoder/framefilter.cpp | 10 +-
source/encoder/framefilter.h | 6 +-
source/encoder/level.cpp | 76 +--
source/encoder/level.h | 8 +-
source/encoder/ratecontrol.cpp | 8 +-
source/x265.cpp | 7 +
25 files changed, 587 insertions(+), 584 deletions(-)
diffs (truncated from 3266 to 300 lines):
diff -r 80c1d35e5517 -r d303b4d860e9 source/CMakeLists.txt
--- a/source/CMakeLists.txt Mon Jul 21 16:39:16 2014 -0500
+++ b/source/CMakeLists.txt Mon Jul 21 22:43:38 2014 -0500
@@ -276,17 +276,17 @@ if(ENABLE_SHARED)
else()
set_target_properties(x265-shared PROPERTIES OUTPUT_NAME x265)
endif()
- if(UNIX)
- set_target_properties(x265-shared PROPERTIES VERSION ${X265_BUILD})
+ if(UNIX)
+ set_target_properties(x265-shared PROPERTIES VERSION ${X265_BUILD})
if(NOT APPLE)
set_target_properties(x265-shared PROPERTIES LINK_FLAGS "-Wl,-Bsymbolic,-znoexecstack")
endif()
endif()
set_target_properties(x265-shared PROPERTIES SOVERSION ${X265_BUILD})
if(X265_LATEST_TAG)
- if(WINDOWS)
- set_target_properties(x265-shared PROPERTIES VERSION ${X265_LATEST_TAG})
- endif()
+ if(WINDOWS)
+ set_target_properties(x265-shared PROPERTIES VERSION ${X265_LATEST_TAG})
+ endif()
# shared library is not installed if a tag is not found
install(TARGETS x265-shared
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
diff -r 80c1d35e5517 -r d303b4d860e9 source/Lib/TLibCommon/TypeDef.h
--- a/source/Lib/TLibCommon/TypeDef.h Mon Jul 21 16:39:16 2014 -0500
+++ b/source/Lib/TLibCommon/TypeDef.h Mon Jul 21 22:43:38 2014 -0500
@@ -155,41 +155,6 @@ struct TUEntropyCodingParameters
uint32_t firstSignificanceMapContext;
};
-namespace Profile {
-enum Name
-{
- NONE = 0,
- MAIN = 1,
- MAIN10 = 2,
- MAINSTILLPICTURE = 3,
-};
-}
-
-namespace Level {
-enum Tier
-{
- MAIN = 0,
- HIGH = 1,
-};
-
-enum Name
-{
- NONE = 0,
- LEVEL1 = 30,
- LEVEL2 = 60,
- LEVEL2_1 = 63,
- LEVEL3 = 90,
- LEVEL3_1 = 93,
- LEVEL4 = 120,
- LEVEL4_1 = 123,
- LEVEL5 = 150,
- LEVEL5_1 = 153,
- LEVEL5_2 = 156,
- LEVEL6 = 180,
- LEVEL6_1 = 183,
- LEVEL6_2 = 186,
-};
-}
}
//! \}
diff -r 80c1d35e5517 -r d303b4d860e9 source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
--- a/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp Mon Jul 21 16:39:16 2014 -0500
+++ b/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp Mon Jul 21 22:43:38 2014 -0500
@@ -45,7 +45,7 @@ using namespace x265;
//! \{
TEncSampleAdaptiveOffset::TEncSampleAdaptiveOffset()
- : m_rdGoOnSbacCoder(NULL)
+ : m_entropyCoder(NULL)
, m_count(NULL)
, m_offset(NULL)
, m_offsetOrg(NULL)
@@ -137,8 +137,8 @@ void TEncSampleAdaptiveOffset::rdoSaoOne
for (typeIdx = -1; typeIdx < numTotalType; typeIdx++)
{
- m_rdGoOnSbacCoder->load(m_rdSbacCoders[onePart->partLevel][CI_CURR_BEST]);
- m_rdGoOnSbacCoder->resetBits();
+ m_entropyCoder->load(m_rdEntropyCoders[onePart->partLevel][CI_CURR_BEST]);
+ m_entropyCoder->resetBits();
if (typeIdx == -1)
{
@@ -167,7 +167,7 @@ void TEncSampleAdaptiveOffset::rdoSaoOne
saoLcuParamRdo.mergeLeftFlag = 0;
}
- m_rdGoOnSbacCoder->codeSaoUnitInterleaving(yCbCr, 1, rx, ry, &saoLcuParamRdo, 1, 1, allowMergeLeft, allowMergeUp);
+ m_entropyCoder->codeSaoUnitInterleaving(yCbCr, 1, rx, ry, &saoLcuParamRdo, 1, 1, allowMergeLeft, allowMergeUp);
}
}
}
@@ -237,12 +237,12 @@ void TEncSampleAdaptiveOffset::rdoSaoOne
saoLcuParamRdo.offset[classIdx] = (int)m_offset[partIdx][typeIdx][classIdx + saoLcuParamRdo.subTypeIdx + 1];
}
- m_rdGoOnSbacCoder->codeSaoUnitInterleaving(yCbCr, 1, rx, ry, &saoLcuParamRdo, 1, 1, allowMergeLeft, allowMergeUp);
+ m_entropyCoder->codeSaoUnitInterleaving(yCbCr, 1, rx, ry, &saoLcuParamRdo, 1, 1, allowMergeLeft, allowMergeUp);
}
}
m_dist[partIdx][typeIdx] = estDist;
- m_rate[partIdx][typeIdx] = m_rdGoOnSbacCoder->getNumberOfWrittenBits();
+ m_rate[partIdx][typeIdx] = m_entropyCoder->getNumberOfWrittenBits();
m_cost[partIdx][typeIdx] = (double)((double)m_dist[partIdx][typeIdx] + lambda * (double)m_rate[partIdx][typeIdx]);
@@ -251,16 +251,16 @@ void TEncSampleAdaptiveOffset::rdoSaoOne
m_distOrg[partIdx] = 0;
m_costPartBest[partIdx] = m_cost[partIdx][typeIdx];
m_typePartBest[partIdx] = typeIdx;
- m_rdGoOnSbacCoder->store(m_rdSbacCoders[onePart->partLevel][CI_TEMP_BEST]);
+ m_entropyCoder->store(m_rdEntropyCoders[onePart->partLevel][CI_TEMP_BEST]);
}
}
else
{
if (m_distOrg[partIdx] < m_costPartBest[partIdx])
{
- m_costPartBest[partIdx] = (double)m_distOrg[partIdx] + m_rdGoOnSbacCoder->getNumberOfWrittenBits() * lambda;
+ m_costPartBest[partIdx] = (double)m_distOrg[partIdx] + m_entropyCoder->getNumberOfWrittenBits() * lambda;
m_typePartBest[partIdx] = -1;
- m_rdGoOnSbacCoder->store(m_rdSbacCoders[onePart->partLevel][CI_TEMP_BEST]);
+ m_entropyCoder->store(m_rdEntropyCoders[onePart->partLevel][CI_TEMP_BEST]);
}
}
}
@@ -342,15 +342,15 @@ void TEncSampleAdaptiveOffset::runQuadTr
{
if (0 == i) //initialize RD with previous depth buffer
{
- m_rdSbacCoders[nextDepth][CI_CURR_BEST].load(m_rdSbacCoders[onePart->partLevel][CI_CURR_BEST]);
+ m_rdEntropyCoders[nextDepth][CI_CURR_BEST].load(m_rdEntropyCoders[onePart->partLevel][CI_CURR_BEST]);
}
else
{
- m_rdSbacCoders[nextDepth][CI_CURR_BEST].load(m_rdSbacCoders[nextDepth][CI_NEXT_BEST]);
+ m_rdEntropyCoders[nextDepth][CI_CURR_BEST].load(m_rdEntropyCoders[nextDepth][CI_NEXT_BEST]);
}
runQuadTreeDecision(qtPart, onePart->downPartsIdx[i], costFinal, maxLevel, lambda, yCbCr);
costSplit += costFinal;
- m_rdSbacCoders[nextDepth][CI_NEXT_BEST].load(m_rdSbacCoders[nextDepth][CI_TEMP_BEST]);
+ m_rdEntropyCoders[nextDepth][CI_NEXT_BEST].load(m_rdEntropyCoders[nextDepth][CI_TEMP_BEST]);
}
if (costSplit < costNotSplit)
@@ -359,7 +359,7 @@ void TEncSampleAdaptiveOffset::runQuadTr
onePart->bSplit = true;
onePart->length = 0;
onePart->bestType = -1;
- m_rdSbacCoders[onePart->partLevel][CI_NEXT_BEST].load(m_rdSbacCoders[nextDepth][CI_NEXT_BEST]);
+ m_rdEntropyCoders[onePart->partLevel][CI_NEXT_BEST].load(m_rdEntropyCoders[nextDepth][CI_NEXT_BEST]);
}
else
{
@@ -370,7 +370,7 @@ void TEncSampleAdaptiveOffset::runQuadTr
disablePartTree(qtPart, onePart->downPartsIdx[i]);
}
- m_rdSbacCoders[onePart->partLevel][CI_NEXT_BEST].load(m_rdSbacCoders[onePart->partLevel][CI_TEMP_BEST]);
+ m_rdEntropyCoders[onePart->partLevel][CI_NEXT_BEST].load(m_rdEntropyCoders[onePart->partLevel][CI_TEMP_BEST]);
}
}
else
@@ -470,22 +470,19 @@ void TEncSampleAdaptiveOffset::createEnc
}
}
-/** Start SAO encoder
- * \param pic, entropyCoder, rdSbacCoder, rdGoOnSbacCoder
- */
-void TEncSampleAdaptiveOffset::startSaoEnc(Frame* pic, SBac* rdGoOnSbacCoder)
+/** Start SAO encoder */
+void TEncSampleAdaptiveOffset::startSaoEnc(Frame* pic, Entropy* entropyCoder)
{
m_pic = pic;
- m_rdGoOnSbacCoder = rdGoOnSbacCoder;
- m_rdGoOnSbacCoder->resetEntropy(pic->m_picSym->m_slice);
- m_rdGoOnSbacCoder->resetBits();
- m_rdGoOnSbacCoder->store(m_rdSbacCoders[0][CI_NEXT_BEST]);
- m_rdSbacCoders[0][CI_CURR_BEST].load(m_rdSbacCoders[0][CI_NEXT_BEST]);
+ m_entropyCoder = entropyCoder;
+ m_entropyCoder->resetEntropy(pic->m_picSym->m_slice);
+ m_entropyCoder->resetBits();
+ m_entropyCoder->store(m_rdEntropyCoders[0][CI_NEXT_BEST]);
+ m_rdEntropyCoders[0][CI_CURR_BEST].load(m_rdEntropyCoders[0][CI_NEXT_BEST]);
}
-/** End SAO encoder
- */
+/** End SAO encoder */
void TEncSampleAdaptiveOffset::endSaoEnc()
{
m_pic = NULL;
@@ -1379,12 +1376,12 @@ void TEncSampleAdaptiveOffset::rdoSaoUni
compDistortion[0] = 0;
compDistortion[1] = 0;
compDistortion[2] = 0;
- m_rdGoOnSbacCoder->load(m_rdSbacCoders[0][CI_CURR_BEST]);
+ m_entropyCoder->load(m_rdEntropyCoders[0][CI_CURR_BEST]);
if (allowMergeLeft)
- m_rdGoOnSbacCoder->codeSaoMerge(0);
+ m_entropyCoder->codeSaoMerge(0);
if (allowMergeUp)
- m_rdGoOnSbacCoder->codeSaoMerge(0);
- m_rdGoOnSbacCoder->store(m_rdSbacCoders[0][CI_TEMP_BEST]);
+ m_entropyCoder->codeSaoMerge(0);
+ m_entropyCoder->store(m_rdEntropyCoders[0][CI_TEMP_BEST]);
// reset stats Y, Cb, Cr
for (compIdx = 0; compIdx < 3; compIdx++)
{
@@ -1419,40 +1416,40 @@ void TEncSampleAdaptiveOffset::rdoSaoUni
if (saoParam->bSaoFlag[0] || saoParam->bSaoFlag[1])
{
// Cost of new SAO_params
- m_rdGoOnSbacCoder->load(m_rdSbacCoders[0][CI_CURR_BEST]);
- m_rdGoOnSbacCoder->resetBits();
+ m_entropyCoder->load(m_rdEntropyCoders[0][CI_CURR_BEST]);
+ m_entropyCoder->resetBits();
if (allowMergeLeft)
- m_rdGoOnSbacCoder->codeSaoMerge(0);
+ m_entropyCoder->codeSaoMerge(0);
if (allowMergeUp)
- m_rdGoOnSbacCoder->codeSaoMerge(0);
+ m_entropyCoder->codeSaoMerge(0);
for (compIdx = 0; compIdx < 3; compIdx++)
{
if ((compIdx == 0 && saoParam->bSaoFlag[0]) || (compIdx > 0 && saoParam->bSaoFlag[1]))
- m_rdGoOnSbacCoder->codeSaoOffset(&saoParam->saoLcuParam[compIdx][addr], compIdx);
+ m_entropyCoder->codeSaoOffset(&saoParam->saoLcuParam[compIdx][addr], compIdx);
}
- rate = m_rdGoOnSbacCoder->getNumberOfWrittenBits();
+ rate = m_entropyCoder->getNumberOfWrittenBits();
bestCost = compDistortion[0] + (double)rate;
- m_rdGoOnSbacCoder->store(m_rdSbacCoders[0][CI_TEMP_BEST]);
+ m_entropyCoder->store(m_rdEntropyCoders[0][CI_TEMP_BEST]);
// Cost of Merge
for (int mergeUp = 0; mergeUp < 2; ++mergeUp)
{
if ((allowMergeLeft && (mergeUp == 0)) || (allowMergeUp && (mergeUp == 1)))
{
- m_rdGoOnSbacCoder->load(m_rdSbacCoders[0][CI_CURR_BEST]);
- m_rdGoOnSbacCoder->resetBits();
+ m_entropyCoder->load(m_rdEntropyCoders[0][CI_CURR_BEST]);
+ m_entropyCoder->resetBits();
if (allowMergeLeft)
- m_rdGoOnSbacCoder->codeSaoMerge(1 - mergeUp);
+ m_entropyCoder->codeSaoMerge(1 - mergeUp);
if (allowMergeUp && (mergeUp == 1))
- m_rdGoOnSbacCoder->codeSaoMerge(1);
+ m_entropyCoder->codeSaoMerge(1);
- rate = m_rdGoOnSbacCoder->getNumberOfWrittenBits();
+ rate = m_entropyCoder->getNumberOfWrittenBits();
mergeCost = compDistortion[mergeUp + 1] + (double)rate;
if (mergeCost < bestCost)
{
bestCost = mergeCost;
- m_rdGoOnSbacCoder->store(m_rdSbacCoders[0][CI_TEMP_BEST]);
+ m_entropyCoder->store(m_rdEntropyCoders[0][CI_TEMP_BEST]);
for (compIdx = 0; compIdx < 3; compIdx++)
{
mergeSaoParam[compIdx][mergeUp].mergeLeftFlag = !mergeUp;
@@ -1468,8 +1465,8 @@ void TEncSampleAdaptiveOffset::rdoSaoUni
numNoSao[0]++;
if (saoParam->saoLcuParam[1][addr].typeIdx == -1)
numNoSao[1] += 2;
- m_rdGoOnSbacCoder->load(m_rdSbacCoders[0][CI_TEMP_BEST]);
- m_rdGoOnSbacCoder->store(m_rdSbacCoders[0][CI_CURR_BEST]);
+ m_entropyCoder->load(m_rdEntropyCoders[0][CI_TEMP_BEST]);
+ m_entropyCoder->store(m_rdEntropyCoders[0][CI_CURR_BEST]);
}
}
}
@@ -1597,10 +1594,10 @@ void TEncSampleAdaptiveOffset::saoCompon
resetSaoUnit(&saoLcuParamRdo);
- m_rdGoOnSbacCoder->load(m_rdSbacCoders[0][CI_TEMP_BEST]);
- m_rdGoOnSbacCoder->resetBits();
- m_rdGoOnSbacCoder->codeSaoOffset(&saoLcuParamRdo, yCbCr);
- dCostPartBest = m_rdGoOnSbacCoder->getNumberOfWrittenBits() * lambda;
+ m_entropyCoder->load(m_rdEntropyCoders[0][CI_TEMP_BEST]);
+ m_entropyCoder->resetBits();
+ m_entropyCoder->codeSaoOffset(&saoLcuParamRdo, yCbCr);
+ dCostPartBest = m_entropyCoder->getNumberOfWrittenBits() * lambda;
More information about the x265-commits
mailing list